/* ===========================================================
   Ruslan & Dilsoʻz — wedding invitation
   Palette: warm ivory background · sage-green accent · charcoal text
   =========================================================== */

:root {
  --bg:        #fbf7f0;   /* warm ivory / cream */
  --bg-card:   #fffdf9;   /* slightly lighter card */
  --text:      #2e2c28;   /* deep charcoal */
  --text-soft: #6c6760;   /* muted charcoal */
  --accent:    #7c8f6e;   /* muted sage green (the ONE accent) */
  --accent-deep:#5f7053;
  --line:      #e3ddd0;   /* gentle divider */

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 720px;
  --space: clamp(4.5rem, 11vw, 8rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg);
  /* subtle tiled botanical pattern — very faint sage four-petal motif */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Cg fill='none' stroke='%237c8f6e' stroke-opacity='0.10' stroke-width='1'%3E%3Cpath d='M35 27c4 4 4 8 0 12-4-4-4-8 0-12z'/%3E%3Cpath d='M35 43c4-4 4-8 0-12-4 4-4 8 0 12z'/%3E%3Cpath d='M27 35c4 4 8 4 12 0-4-4-8-4-12 0z'/%3E%3Cpath d='M43 35c-4 4-8 4-12 0 4-4 8-4 12 0z'/%3E%3Ccircle cx='35' cy='35' r='1.3' fill='%237c8f6e' fill-opacity='0.14' stroke='none'/%3E%3Ccircle cx='0' cy='0' r='1' fill='%237c8f6e' fill-opacity='0.10' stroke='none'/%3E%3Ccircle cx='70' cy='0' r='1' fill='%237c8f6e' fill-opacity='0.10' stroke='none'/%3E%3Ccircle cx='0' cy='70' r='1' fill='%237c8f6e' fill-opacity='0.10' stroke='none'/%3E%3Ccircle cx='70' cy='70' r='1' fill='%237c8f6e' fill-opacity='0.10' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { display: block; }

/* ---------- Shared section ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space) clamp(1.25rem, 5vw, 2.5rem);
  text-align: center;
}

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  letter-spacing: .04em;
  color: var(--accent-deep);
  margin-bottom: 2.5rem;
}

/* ===========================================================
   Decorations
   =========================================================== */
/* corner flourishes */
.corner {
  position: absolute;
  width: clamp(64px, 14vw, 120px);
  height: clamp(64px, 14vw, 120px);
  color: var(--accent);
  opacity: .55;
  pointer-events: none;
}
.corner--tl { top: 16px;  left: 16px;  }
.corner--tr { top: 16px;  right: 16px; transform: scaleX(-1); }
.corner--bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.corner--br { bottom: 16px; right: 16px; transform: scale(-1, -1); }
.corner--card { width: 54px; height: 54px; opacity: .4; }

/* branch divider */
.branch-divider {
  display: flex;
  justify-content: center;
  color: var(--accent);
  margin: 1.7rem auto;
}
.branch-divider--sm { margin: 1rem auto; opacity: .9; }

/* small sprig above family names */
.family__sprig {
  width: 40px; height: 24px;
  color: var(--accent);
  opacity: .85;
  margin-bottom: .4rem;
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem clamp(1.25rem, 5vw, 2.5rem);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.9) 0%, rgba(251,247,240,0) 55%);
}

.hero__inner { max-width: 640px; position: relative; z-index: 1; }

.hero__eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(.82rem, 2.6vw, 1rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1.8rem;
}

.couple {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .015em;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
}
.couple__name { font-size: clamp(3rem, 16vw, 6rem); }
.couple__amp {
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  color: var(--accent);
  font-style: italic;
  margin: .1em 0;
}

.hero__date {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  color: var(--text-soft);
  letter-spacing: .03em;
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 34px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  opacity: .55;
}
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes scrolldot {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  80%  { opacity: 0; transform: translateY(11px); }
  100% { opacity: 0; }
}

/* ===========================================================
   FAMILIES
   =========================================================== */
.families__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 3rem);
}
.family { display: flex; flex-direction: column; align-items: center; }
.family__label {
  display: block;
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .55rem;
}
.family__name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 5vw, 1.95rem);
  font-weight: 500;
  color: var(--text);
}
.families__divider {
  width: 1px;
  align-self: stretch;
  min-height: 60px;
  background: linear-gradient(to bottom, transparent, var(--line), transparent);
}

@media (max-width: 560px) {
  .families__grid { grid-template-columns: 1fr; }
  .families__divider {
    width: 60px; height: 1px; min-height: 0;
    margin: .3rem auto;
    background: linear-gradient(to right, transparent, var(--line), transparent);
  }
}

/* ===========================================================
   COUNTDOWN
   =========================================================== */
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.5rem, 2.5vw, 1.4rem);
  max-width: 540px;
  margin: 0 auto;
}
.cd-unit {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(.9rem, 3.5vw, 1.5rem) .35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  box-shadow: 0 14px 30px -26px rgba(60, 55, 45, .5);
}
.cd-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-size: clamp(.62rem, 2.4vw, .78rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.countdown__done {
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent-deep);
}

/* ===========================================================
   VENUE
   =========================================================== */
.venue__card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(2rem, 7vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 18px 40px -28px rgba(60, 55, 45, .35);
}
.venue__date {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
}
.venue__time {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  color: var(--text-soft);
  margin-top: .3rem;
}
.venue__place {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  font-weight: 500;
  color: var(--accent-deep);
}
.venue__addr {
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--text-soft);
  margin-top: .2rem;
  margin-bottom: 1.6rem;
}

/* map embed */
.map-embed {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.8rem;
  box-shadow: 0 14px 30px -26px rgba(60, 55, 45, .5);
}
.map-embed iframe { display: block; width: 100%; filter: saturate(.92); }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: #fff;
  background: var(--accent);
  padding: .85rem 1.7rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 24px -12px rgba(95, 112, 83, .65);
}
.btn:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  text-align: center;
  padding: var(--space) clamp(1.25rem, 5vw, 2.5rem) calc(var(--space) - 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer__text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  line-height: 1.5;
  color: var(--text);
  max-width: 30ch;
  margin: 0 auto 1.4rem;
}
.footer__names {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 6vw, 2rem);
  letter-spacing: .06em;
  color: var(--accent-deep);
}

/* ===========================================================
   Reveal animations
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.65,.3,1), transform .9s cubic-bezier(.2,.65,.3,1);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

.is-hero { transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .scroll-hint span { animation: none; }
}
