/* ============================================================
   IVORY BOTANICAL — Luxury Wedding Invitation Template
   Palette: warm ivory & cream · dusty rose · antique gold · sage
   Motifs: Mughal arches · kantha-stitch dividers · water-lily crest
   All client content lives in config.js
   ============================================================ */

:root {
  /* ivory & cream */
  --cream: #f7f1e3;
  --cream-deep: #efe6d0;
  --cream-band: #f2e9d6;
  --paper: #fdfaf2;

  /* dusty rose */
  --rose: #b06a5b;
  --rose-deep: #8d4c3e;
  --rose-pale: #f4e3dc;

  /* antique gold */
  --gold: #b3893d;
  --gold-deep: #8a6a2d;
  --gold-soft: #d9c084;
  --gold-pale: #f2e7cb;

  /* sage botanicals */
  --sage: #87906d;
  --sage-deep: #5f6849;

  --ink: #46392b;
  --muted: #8d7d64;

  --serif: "Playfair Display", "Tiro Bangla", Georgia, serif;
  --sans: "Jost", "Anek Bangla", system-ui, sans-serif;
  --script: "Imperial Script", "Galada", cursive;

  --line: rgba(138, 106, 45, 0.35);
  --line-faint: rgba(138, 106, 45, 0.18);
  --shadow-card: 0 1px 2px rgba(70, 57, 43, 0.05), 0 18px 44px -18px rgba(70, 57, 43, 0.22);

  --ease-soft: cubic-bezier(0.22, 0.61, 0.21, 1);
  --ease-curtain: cubic-bezier(0.76, 0, 0.24, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 85% -60px, rgba(176, 106, 91, 0.07), transparent 65%),
    radial-gradient(900px 500px at -140px 38%, rgba(135, 144, 109, 0.08), transparent 60%),
    radial-gradient(1000px 600px at 108% 88%, rgba(179, 137, 61, 0.07), transparent 62%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll is locked while the curtains wait (body ships with .is-locked;
   script.js removes it the moment the invitation opens). */
body.is-locked {
  overflow: hidden;
  height: 100dvh;
}

/* html.no-intro — set before paint when the curtains are skipped */
html.no-intro .intro { display: none !important; }
html.no-intro body.is-locked { overflow: auto; height: auto; }

::selection { background: var(--rose); color: var(--paper); }

/* Author display values would otherwise beat the UA's [hidden] rule
   (e.g. .lightbox's display:flex) and leave "hidden" elements live. */
[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.invite {
  position: relative;
  overflow-x: clip;
}

/* ============ Type helpers ============ */
.eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow--rose { color: var(--rose-deep); }

.section-title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 7.2vw, 42px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--ink);
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
}

.blessing {
  margin: 0;
  font-size: 15px;
  color: var(--gold-deep);
  letter-spacing: 0.02em;
}

.script { font-family: var(--script); }

/* Kantha-stitch divider: dashed threads parting around a diamond bead */
.stitch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 26px auto;
}

.stitch span {
  flex: 0 1 74px;
  border-top: 1.5px dashed var(--line);
}

.stitch i {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  opacity: 0.85;
}

.stitch--left { justify-content: flex-start; margin-left: 0; }
.stitch--left span:first-child { flex-basis: 34px; }

/* ============ Monogram crest (water lily) ============ */
.crest {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--gold-deep);
}

.crest__lily {
  width: 30px;
  height: 30px;
  color: var(--sage-deep);
}

.crest__lily path { vector-effect: non-scaling-stroke; }

.crest__initials {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.22em;
  padding-left: 0.22em; /* optically re-centre tracked caps */
  color: var(--gold-deep);
}

.crest--intro {
  width: 112px;
  height: 112px;
  justify-content: center;
  margin: 0 auto 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
}

.crest--intro::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--line-faint);
  border-radius: 50%;
}

.crest--intro .crest__lily { width: 26px; height: 26px; }
.crest--intro .crest__initials { font-size: 14px; }

/* ============ Scribbly names ============ */
.name-wrap {
  position: relative;
  display: inline-block;
}

.script-name {
  display: inline-block;
  font-family: var(--script);
  font-weight: 400;
  font-size: 1em;
  line-height: 1.25;
  color: var(--rose-deep);
}

.script-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  padding: 0 0.18em;
}

/* Hand-scribbled double-pass underline, drawn on reveal */
.scribble {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -0.12em;
  width: 92%;
  height: 0.28em;
  overflow: visible;
  pointer-events: none;
}

.scribble path {
  fill: none;
  stroke: var(--rose);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 1 2; /* gap 2× keeps the seam clear of the path ends */
  stroke-dashoffset: 1;
  opacity: 0.85;
}

.scribble .scribble__pass--2 {
  stroke: var(--gold);
  stroke-width: 1.2;
  opacity: 0.6;
}

body.is-live .scribble path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease-soft) 1.05s;
}

body.is-live .scribble .scribble__pass--2 {
  transition-delay: 1.35s;
}

/* ============ Scroll progress ============ */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 55;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--rose), var(--gold));
  opacity: 0.85;
}

/* ============================================================
   CURTAIN OPENING
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
}

.intro__bloom {
  position: absolute;
  inset: 0;
  background: radial-gradient(560px 420px at 50% 46%, rgba(255, 252, 243, 0.9), rgba(255, 252, 243, 0) 70%);
  opacity: 0.55;
  transition: opacity 1.2s ease, transform 1.4s var(--ease-soft);
}

.intro.is-opening .intro__bloom {
  opacity: 1;
  transform: scale(1.25);
}

/* Velvet drapes — vertical folds in champagne & warm gold */
.intro__drape {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.6%;
  transition: transform 1.6s var(--ease-curtain), filter 1.6s ease;
  will-change: transform;
}

.intro__drape--l {
  left: 0;
  background:
    linear-gradient(90deg, rgba(122, 92, 44, 0.28), rgba(122, 92, 44, 0) 12%),
    linear-gradient(270deg, rgba(70, 48, 18, 0.06), rgba(70, 48, 18, 0) 16%),
    repeating-linear-gradient(90deg,
      #ecdcbf 0 30px, #dfc9a0 30px 40px,
      #f4e8cd 40px 76px, #e4d0aa 76px 88px, #ecdcbf 88px 118px);
}

.intro__drape--r {
  right: 0;
  background:
    linear-gradient(270deg, rgba(122, 92, 44, 0.28), rgba(122, 92, 44, 0) 12%),
    linear-gradient(90deg, rgba(70, 48, 18, 0.06), rgba(70, 48, 18, 0) 16%),
    repeating-linear-gradient(90deg,
      #ecdcbf 0 30px, #dfc9a0 30px 40px,
      #f4e8cd 40px 76px, #e4d0aa 76px 88px, #ecdcbf 88px 118px);
}

/* Gold rope trim on the leading edge of each drape */
.intro__drape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9px;
  background: linear-gradient(180deg,
    #9a7431 0%, #d9bc74 18%, #f2e3b3 38%, #c9a24d 55%,
    #9a7431 74%, #e2c88b 90%, #9a7431 100%);
  /* Faint while closed so the gold seam doesn't cut through the names;
     warms up as the curtains part */
  opacity: 0.28;
  transition: opacity 0.9s ease 0.4s;
}

.intro.is-opening .intro__drape::after,
.intro.is-open .intro__drape::after { opacity: 1; }

.intro__drape--l::after { right: 0; box-shadow: -2px 0 6px rgba(70, 48, 18, 0.35); }
.intro__drape--r::after { left: 0; box-shadow: 2px 0 6px rgba(70, 48, 18, 0.35); }

/* Scalloped valance across the top */
.intro__valance {
  position: absolute;
  top: 0;
  left: -2%;
  right: -2%;
  height: 68px;
  z-index: 3;
  background: linear-gradient(180deg, #f0e3c6, #e2cda5);
  box-shadow: 0 10px 24px -12px rgba(70, 48, 18, 0.55);
  transition: transform 0.9s var(--ease-soft) 0.35s, opacity 0.9s ease 0.35s;
}

.intro__valance::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 26px;
  background-image: radial-gradient(circle at 50% 0, #e2cda5 62%, transparent 64%);
  background-size: 54px 26px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 6px 6px rgba(70, 48, 18, 0.28));
}

.intro__valance::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 54px;
  height: 0;
  border-top: 1.5px dashed rgba(138, 106, 45, 0.5);
  z-index: 1;
}

.intro.is-open .intro__drape--l { transform: translate3d(-103%, 0, 0); filter: brightness(1.06); }
.intro.is-open .intro__drape--r { transform: translate3d(103%, 0, 0); filter: brightness(1.06); transition-delay: 0.08s; }
.intro.is-open .intro__valance { transform: translateY(-130%); opacity: 0; }

.intro__content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 48px;
  transition: opacity 0.55s ease, transform 0.55s var(--ease-soft);
}

.intro.is-opening .intro__content {
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  pointer-events: none;
}

.intro__eyebrow {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.intro__blessing { margin-bottom: 22px; }

.intro__names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 400;
  font-size: clamp(40px, 9.5vw, 66px);
  line-height: 1.18;
}

.intro__names .script-name { font-size: 1em; }
.intro__amp { font-size: 0.62em; }

.intro__line {
  margin: 18px 0 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.intro__open {
  margin-top: 34px;
  padding: 15px 38px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--rose-deep);
  border: 1px solid var(--rose-deep);
  border-radius: 999px;
  box-shadow: 0 14px 30px -12px rgba(141, 76, 62, 0.55);
  transition: background 0.3s ease, transform 0.3s var(--ease-soft), box-shadow 0.3s ease;
}

.intro__open:hover,
.intro__open:focus-visible {
  background: #7a4034;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(141, 76, 62, 0.6);
}

.intro__skip {
  position: absolute;
  right: 20px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  padding: 9px 18px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(253, 250, 242, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: opacity 0.4s ease;
}

.intro.is-done { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 110px;
  overflow: hidden;
}

.hero__spray {
  position: absolute;
  width: clamp(150px, 24vw, 250px);
  color: var(--sage);
  opacity: 0.5;
  pointer-events: none;
}

.hero__spray--tl { top: 0; left: 0; transform: rotate(8deg); }
.hero__spray--br { bottom: 0; right: 0; transform: rotate(188deg); }

.hero__spray path { vector-effect: non-scaling-stroke; }

.hero__inner {
  position: relative;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__blessing { margin-bottom: 26px; }

.hero__crest { margin-bottom: 30px; }

.hero__eyebrow { margin-bottom: 18px; }

.hero__names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 400;
  font-size: clamp(46px, 11vw, 84px);
  line-height: 1.16;
}

.hero__names .script-name { font-size: 1em; }
.hero__amp { font-size: 0.6em; }

.hero__rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 22px;
}

.hero__rule span {
  width: 64px;
  border-top: 1.5px dashed var(--line);
}

.hero__rule i {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: var(--rose);
  opacity: 0.9;
}

.hero__date {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 3vw, 22px);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.hero__place {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--gold-deep);
  transition: opacity 0.5s ease;
}

.hero__scroll span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.hero__scroll svg {
  width: 17px;
  height: 17px;
  animation: scrollNudge 2.2s ease-in-out infinite;
}

.hero__scroll.is-hidden { opacity: 0; }

@keyframes scrollNudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ============================================================
   SECTIONS (shared rhythm)
   ============================================================ */
.welcome,
.story,
.events,
.gallery,
.venue,
.rsvp {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(72px, 11vw, 120px) 24px 0;
  text-align: center;
}

.venue { max-width: 1080px; }

.welcome__families {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

.welcome__parents {
  margin: 0;
  max-width: 460px;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.welcome__divider {
  width: 1.5px;
  height: 34px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.welcome__line {
  max-width: 560px;
  margin: 26px auto 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2.6vw, 21px);
  line-height: 1.65;
  font-style: italic;
  color: var(--ink);
}

.welcome__epigraph {
  margin: 30px auto 0;
  font-size: clamp(26px, 4.4vw, 34px);
  line-height: 1.4;
  color: var(--rose-deep);
}

.welcome__epigraph[hidden] { display: none; }

/* ============ Countdown ============ */
.countdown {
  position: relative;
  max-width: 900px;
  margin: clamp(72px, 11vw, 120px) auto 0;
  padding: clamp(56px, 8vw, 84px) 24px;
  background: var(--cream-band);
  border-top: 1.5px dashed var(--line);
  border-bottom: 1.5px dashed var(--line);
  text-align: center;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 40px;
}

/* Arch-topped tiles */
.cd-cell {
  width: 128px;
  padding: 30px 12px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px 999px 16px 16px;
  box-shadow: var(--shadow-card);
}

.cd-cell__num {
  display: block;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
}

.cd-cell__label {
  display: block;
  margin-top: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.cd-cell__num.is-settling {
  animation: cdSettle 0.5s var(--ease-soft);
}

@keyframes cdSettle {
  from { opacity: 0.15; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.countdown__note {
  margin: 34px auto 0;
  max-width: 420px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ============ Our Story — stitched timeline ============ */
.story__timeline {
  position: relative;
  max-width: 720px;
  margin: 54px auto 0;
  padding: 8px 0 4px;
}

.story__rail {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 0;
  border-left: 2px dashed var(--line);
  clip-path: inset(0 0 100% 0); /* drawn on scroll by script.js */
}

.chapter {
  position: relative;
  width: calc(50% - 52px);
  margin-bottom: 46px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line-faint);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.chapter:nth-child(odd) { margin-right: auto; }
.chapter:nth-child(even) { margin-left: auto; }

.chapter:nth-child(odd) .chapter__dot { right: -61px; }
.chapter:nth-child(even) .chapter__dot { left: -61px; }

.chapter__dot {
  position: absolute;
  top: 30px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.chapter.is-active .chapter__dot {
  background: var(--rose);
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 5px rgba(176, 106, 91, 0.15);
}

.chapter__label {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.chapter__title {
  margin: 8px 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--ink);
}

.chapter.is-active .chapter__title { color: var(--rose-deep); }

.chapter__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ============ Events — arch cards ============ */
.events__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 50px;
  text-align: center;
}

.event-card {
  padding: 46px 26px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 190px 190px 20px 20px;
  box-shadow: var(--shadow-card);
}

.event-card__tag {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.event-card__name {
  margin: 12px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  color: var(--ink);
}

.event-card__tagline {
  margin: 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted);
}

.event-card__divider {
  width: 100%;
  max-width: 150px;
  margin: 18px auto;
  border-top: 1.5px dashed var(--line-faint);
}

.event-card__rows { margin: 0; }

.row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
}

.row + .row { border-top: 1px solid var(--line-faint); }

.row dt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.row dt .ico {
  width: 14px;
  height: 14px;
  color: var(--sage-deep);
}

.row dt .ico path { vector-effect: non-scaling-stroke; }

.row__dot {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold);
}

.row dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.event-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 20px;
}

.link-btn {
  display: inline-block;
  padding: 3px 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: var(--gold-deep);
  border-color: var(--gold);
}

/* ============ Gallery — arched mosaic ============ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 50px;
}

.g-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 150px 150px 16px 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s ease;
}

.g-photo:nth-child(even) { border-radius: 16px 16px 150px 150px; }
.g-photo--wide { grid-column: span 2; border-radius: 16px; }

.g-photo:hover,
.g-photo:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -20px rgba(70, 57, 43, 0.32);
}

.g-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.9s var(--ease-soft);
}

.g-photo--wide img { aspect-ratio: 21 / 10; }

.g-photo:hover img { transform: scale(1.045); }

.g-photo__cap {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 5px 14px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(253, 250, 242, 0.88);
  border: 1px solid var(--line-faint);
  border-radius: 999px;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-photo:nth-child(even):not(.g-photo--wide) .g-photo__cap { bottom: auto; top: 12px; }
.g-photo:nth-child(even):not(.g-photo--wide) img { transform: scaleX(-1); }
.g-photo:nth-child(even):not(.g-photo--wide):hover img { transform: scaleX(-1) scale(1.045); }

.gallery__hint {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ Custom sections ============ */
.custom__section {
  position: relative;
  max-width: 900px;
  margin: clamp(72px, 11vw, 120px) auto 0;
  padding: 0 24px;
  text-align: center;
}

.custom__section--quote {
  padding: clamp(56px, 8vw, 80px) 24px;
  background: var(--cream-band);
  border-top: 1.5px dashed var(--line);
  border-bottom: 1.5px dashed var(--line);
  max-width: none;
}

.custom__quote-mark {
  display: block;
  font-family: var(--serif);
  font-size: 66px;
  line-height: 0.6;
  color: var(--gold);
  margin-bottom: 18px;
}

.custom__quote {
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.7;
  color: var(--ink);
}

.custom__quote-source {
  margin: 20px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.custom__note {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 14.5px;
  color: var(--muted);
}

.custom__body {
  max-width: 620px;
  margin: 26px auto 0;
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink);
}

.c-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 40px;
  text-align: center;
}

.c-card {
  padding: 34px 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 130px 130px 18px 18px;
  box-shadow: var(--shadow-card);
}

.c-card__kicker {
  margin: 0;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.c-card__title {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
}

.c-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.c-card__swatches {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.c-card__swatches i {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 4px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px var(--line-faint);
}

/* FAQ accordion */
.faq {
  max-width: 640px;
  margin: 36px auto 0;
  text-align: left;
}

.faq__item {
  border-bottom: 1.5px dashed var(--line-faint);
}

.faq__item:first-child { border-top: 1.5px dashed var(--line-faint); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 17px 4px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--serif);
  font-size: 17.5px;
  color: var(--ink);
  transition: color 0.3s ease;
}

.faq__q:hover { color: var(--rose-deep); }

.faq__q-icon {
  position: relative;
  flex: 0 0 14px;
  height: 14px;
}

.faq__q-icon::before,
.faq__q-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  border-top: 1.6px solid var(--gold-deep);
  transition: transform 0.35s var(--ease-soft);
}

.faq__q-icon::after { transform: rotate(90deg); }

.faq__item.is-open .faq__q-icon::after { transform: rotate(0deg); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-soft);
}

.faq__a-inner {
  margin: 0;
  padding: 0 4px 18px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ============ Venue ============ */
.venue__split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(30px, 5vw, 56px);
  align-items: center;
  margin-top: 50px;
  text-align: left;
}

.venue__info .section-title { text-align: left; }

.venue__name {
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}

.venue__address {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.venue__directions { margin-top: 22px; }

.venue__frame {
  height: 100%;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 200px 200px 18px 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--paper);
}

.venue__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============ RSVP ============ */
.rsvp__panel {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 56px) clamp(22px, 5vw, 48px) clamp(34px, 5vw, 48px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.rsvp__panel::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--line-faint);
  border-radius: 17px;
  pointer-events: none;
}

.rsvp__note {
  max-width: 420px;
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--muted);
}

.rsvp__form {
  position: relative;
  margin-top: 34px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.field__optional {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-left: 6px;
}

.field__input {
  width: 100%;
  padding: 9px 2px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s ease;
}

.field__input:focus {
  outline: none;
  border-bottom-color: var(--rose);
}

.field__input::placeholder { color: rgba(141, 125, 100, 0.55); }

.field__input--area { resize: vertical; min-height: 64px; }

select.field__input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%),
    linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
}

.choice__opt {
  position: relative;
  cursor: pointer;
}

.choice__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__opt span {
  display: inline-block;
  padding: 9px 18px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--line-faint);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.choice__opt input:checked + span {
  color: var(--rose-deep);
  background: var(--rose-pale);
  border-color: var(--rose);
}

.choice__opt input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.rsvp__submit {
  align-self: center;
  margin-top: 8px;
  padding: 16px 52px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--rose-deep);
  border: 1px solid var(--rose-deep);
  border-radius: 999px;
  box-shadow: 0 14px 30px -12px rgba(141, 76, 62, 0.55);
  transition: background 0.3s ease, transform 0.3s var(--ease-soft);
}

.rsvp__submit:hover:not(:disabled),
.rsvp__submit:focus-visible:not(:disabled) {
  background: #7a4034;
  transform: translateY(-2px);
}

.rsvp__submit:disabled { opacity: 0.65; cursor: wait; }

.rsvp__done {
  padding: 26px 0 6px;
  text-align: center;
}

.rsvp__done svg {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  color: var(--sage-deep);
}

.rsvp__done-note {
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

/* ============ Footer ============ */
.footer {
  margin-top: clamp(80px, 12vw, 130px);
  padding: clamp(60px, 9vw, 90px) 24px 96px;
  background: var(--cream-band);
  border-top: 1.5px dashed var(--line);
  text-align: center;
}

.crest--footer { margin-bottom: 20px; }

.footer__closing {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

.footer__names {
  margin: 10px 0 4px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 52px);
  line-height: 1.2;
  color: var(--rose-deep);
}

.footer__date {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.footer .stitch { margin: 30px auto; }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.share-btn svg { width: 16px; height: 16px; }

.share-btn:hover,
.share-btn:focus-visible {
  background: var(--gold-pale);
  color: var(--ink);
}

.footer__hashtag {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--rose-deep);
}

.footer__socials {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 26px 0 0;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--gold-deep);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.footer__social svg { width: 20px; height: 20px; }

.footer__social:hover,
.footer__social:focus-visible {
  background: var(--gold-pale);
  color: var(--ink);
}

.footer__credit {
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============================================================
   FLOATING CONTROLS
   ============================================================ */
.lang-toggle {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  z-index: 90; /* above the curtain (80) — guests can switch language
                   while reading the intro texts */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--rose-deep);
  background: rgba(253, 250, 242, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px -10px rgba(70, 57, 43, 0.35);
  transition: background 0.3s ease;
}

.lang-toggle[hidden] { display: none; }

.lang-toggle__opt { opacity: 0.45; transition: opacity 0.25s ease; }
.lang-toggle__opt.is-active { opacity: 1; }
.lang-toggle__opt[data-lang-opt="en"] { letter-spacing: 0.18em; }
.lang-toggle__opt[data-lang-opt="bn"] { letter-spacing: 0.02em; }

.lang-toggle__sep { opacity: 0.35; }

.lang-toggle:hover,
.lang-toggle:focus-visible { background: var(--gold-pale); }

.music-btn {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  color: var(--rose-deep);
  background: rgba(253, 250, 242, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 10px 26px -10px rgba(70, 57, 43, 0.4);
  transition: background 0.3s ease;
}

.music-btn[hidden] { display: none; }

.music-btn__disc { width: 21px; height: 21px; }

.music-btn.is-playing .music-btn__disc {
  animation: discSpin 7s linear infinite;
}

@keyframes discSpin { to { transform: rotate(360deg); } }

.music-btn__bars {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
}

.music-btn__bars i {
  width: 2.5px;
  height: 10px;
  border-radius: 2px;
  background: var(--rose-deep);
  animation: barDance 1s ease-in-out infinite;
}

.music-btn__bars i:nth-child(2) { animation-delay: 0.18s; }
.music-btn__bars i:nth-child(3) { animation-delay: 0.36s; }

.music-btn.is-playing .music-btn__bars { display: inline-flex; }
.music-btn.is-playing .music-btn__disc { opacity: 0; }

@keyframes barDance {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.25); }
}

.share-fab {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(0);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: rgba(253, 250, 242, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(70, 57, 43, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease;
}

.share-fab svg { width: 16px; height: 16px; }

.share-fab.is-visible { opacity: 1; pointer-events: auto; }

.share-fab:hover { background: var(--gold-pale); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 90;
  max-width: calc(100vw - 48px);
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--rose-deep);
  border: 1px solid rgba(242, 231, 203, 0.4);
  border-radius: 999px;
  box-shadow: 0 12px 32px -10px rgba(70, 57, 43, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(48, 36, 22, 0.93);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.lightbox.is-open { opacity: 1; }

.lightbox__stage {
  margin: 0;
  max-width: min(92vw, 900px);
  text-align: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  animation: lbIn 0.45s var(--ease-soft);
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(0.965); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox__caption {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--gold-pale);
  background: rgba(253, 250, 242, 0.08);
  border: 1px solid rgba(242, 231, 203, 0.35);
  border-radius: 50%;
  transition: background 0.3s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(253, 250, 242, 0.2); }

.lightbox__close svg,
.lightbox__nav svg { width: 19px; height: 19px; }

.lightbox__close { top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; }

.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

/* ============================================================
   PETALS — flowing canvas
   ============================================================ */
.petal-canvas {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

/* ============================================================
   MOTION — hero cascade · reveals
   ============================================================ */
/* Hero cascade: children hold .fx with an inline --d delay; body.is-live
   (set as the curtains part) releases them in order. */
.hero .fx {
  opacity: 0;
  transform: translateY(18px);
}

body.is-live .hero .fx {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.95s var(--ease-soft) var(--d, 0s),
    transform 0.95s var(--ease-soft) var(--d, 0s);
}

/* .hero__scroll keeps its own centring transform */
.hero__scroll.fx { transform: translateX(-50%) translateY(12px); }
body.is-live .hero__scroll.fx { transform: translateX(-50%); }

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   BANGLA MODE (html[lang="bn"])
   Swap type roles: Galada takes the names, Tiro Bangla the serif,
   Anek Bangla the sans. Latin display-tracking is softened so
   Bengali glyphs breathe.
   ============================================================ */
html[lang="bn"] {
  --serif: "Tiro Bangla", "Playfair Display", Georgia, serif;
  --script: "Galada", "Imperial Script", cursive;
  --sans: "Anek Bangla", "Jost", system-ui, sans-serif;
}

html[lang="bn"] .eyebrow { letter-spacing: 0.14em; }
html[lang="bn"] .hero__place { letter-spacing: 0.14em; }
html[lang="bn"] .hero__scroll span { letter-spacing: 0.1em; }
html[lang="bn"] .cd-cell__label { letter-spacing: 0.08em; }

html[lang="bn"] .section-title { font-weight: 400; } /* Tiro Bangla ships 400 only */
html[lang="bn"] .script-amp { font-style: normal; }
html[lang="bn"] .hero__names .script-name,
html[lang="bn"] .intro__names .script-name { font-size: 0.84em; line-height: 1.5; }
html[lang="bn"] .welcome__epigraph { font-size: clamp(22px, 3.8vw, 28px); }
html[lang="bn"] .footer__names { font-size: clamp(32px, 6vw, 42px); }
html[lang="bn"] .welcome__line,
html[lang="bn"] .rsvp__done-note,
html[lang="bn"] .footer__closing,
html[lang="bn"] .custom__quote { font-style: normal; }
html[lang="bn"] .event-card__tagline { font-style: normal; }

/* ============================================================
   REDUCED MOTION (motion: "honor")
   Everything settles instantly; petals & curtains are skipped by JS.
   ============================================================ */
.motion-reduced *,
.motion-reduced *::before,
.motion-reduced *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

.motion-reduced .hero .fx,
.motion-reduced .hero__scroll.fx {
  opacity: 1;
  transform: translateX(0);
}

.motion-reduced .hero__scroll.fx { transform: translateX(-50%); }

.motion-reduced .reveal { opacity: 1; transform: none; }

.motion-reduced .scribble path { stroke-dashoffset: 0; }

.motion-reduced .story__rail { clip-path: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .venue__split { grid-template-columns: 1fr; }
  .venue__info .section-title,
  .venue__info { text-align: center; }
  .venue__info .stitch--left { justify-content: center; }
  .venue__frame { min-height: 320px; }

  /* Story timeline collapses to a left rail */
  .story__rail { left: 6px; }

  /* Cards shrink to keep clear of the rail; dots sit on the line,
     cards start to their right with a gap */
  .chapter,
  .chapter:nth-child(odd),
  .chapter:nth-child(even) {
    width: auto;
    margin: 0 0 24px 24px;
    padding-left: 20px;
  }

  .chapter:nth-child(odd) .chapter__dot,
  .chapter:nth-child(even) .chapter__dot {
    left: -26.5px; /* dot (17px) centred on the 2px rail at left: 6px */
    right: auto;
    top: 28px;
  }
}

@media (max-width: 620px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .g-photo--wide { grid-column: span 1; }
  .g-photo img,
  .g-photo--wide img { aspect-ratio: 4 / 3.4; }
  .g-photo:nth-child(even):not(.g-photo--wide) img { transform: none; }
  .g-photo:nth-child(even):not(.g-photo--wide):hover img { transform: scale(1.045); }
  .g-photo:nth-child(even):not(.g-photo--wide) .g-photo__cap { bottom: 12px; top: auto; }
  .g-photo:nth-child(even) { border-radius: 150px 150px 16px 16px; }

  .cd-cell { width: calc(50% - 9px); max-width: 150px; }

  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }

  .hero__scroll { display: none; }
}
