/* ═══════════════════════════════════════════════════════════════════════════
   Premium botanical wedding invitation — static CSS, no framework.
   Palette: navy #0B1D3A · royal #234E9B · ink #101F42 · ivory #F8F5EE
            sand #E8DDC5 · mist #A9BDD5
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy: #0B1D3A;
  --royal: #234E9B;
  --ink: #101F42;
  --ivory: #F8F5EE;
  --sand: #E8DDC5;
  --mist: #A9BDD5;

  --serif: 'Cormorant Garamond', 'Noto Serif Bengali', Georgia, 'Times New Roman', serif;

  --pad-x: clamp(1.25rem, 5vw, 2rem);
  --leading: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: var(--leading);
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
  min-height: 100dvh;
}

body.cover-active { overflow: hidden; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The hero heading is a programmatic focus target (screen-reader orientation
   after the reveal), not an interactive control — never draw a focus ring. */
.hero-names:focus,
.hero-names:focus-visible { outline: none; }

/* Bengali script reads better with a taller leading and no wide tracking */
html[lang="bn"] { --leading: 1.85; }
html[lang="bn"] .invocation,
html[lang="bn"] .cover-family,
html[lang="bn"] .date-note,
html[lang="bn"] dt { letter-spacing: 0.04em; }

/* ─────────────────────────── Cover ─────────────────────────── */

.cover {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;          /* JS-on only; without JS the invitation is fully readable */
}

html.js .cover { display: block; }

.cover-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.25vh;
  height: 50.25dvh;
  will-change: transform;
  z-index: 2;
}
.cover-panel--top { top: 0; z-index: 3; background: linear-gradient(180deg, var(--ink) 0%, var(--navy) 100%); }
.cover-panel--bottom { bottom: 0; background: linear-gradient(180deg, var(--navy) 0%, var(--ink) 100%); }

/* Monogram block, centred on the seam between the two panels */
.cover-mono {
  position: absolute;
  left: 50%;
  top: 50vh;
  top: 50dvh;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  z-index: 3;
}

.mono-wrap {
  position: relative;
  width: clamp(170px, 46vw, 215px);
  aspect-ratio: 1;
}

.mono-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 189, 213, 0.55) 0%, rgba(232, 221, 197, 0.18) 45%, rgba(169, 189, 213, 0) 70%);
  filter: blur(6px);
}

.mono-art {
  position: relative;
  width: 100%;
  height: 100%;
  stroke: var(--mist);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.mono-art .dot { fill: var(--sand); stroke: none; }

.mono-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  letter-spacing: 0.1em;
  color: var(--ivory);
}

.cover-family {
  margin: 0;
  color: var(--mist);
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  max-width: 30ch;
}

/* Fine-line botanical sprigs */
.sprig {
  position: absolute;
  width: clamp(150px, 40vw, 250px);
  height: auto;
  stroke: var(--mist);
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: 0.9;
  pointer-events: none;
}
.sprig .dot, .divider .dot { fill: var(--sand); stroke: none; }
.sprig--tl { top: 0; left: 0; }
.sprig--tr { top: 0; right: 0; transform: scaleX(-1); }
.sprig--br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* Ivory inner stage revealed as the panels part */
.cover-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0 var(--pad-x);
  text-align: center;
  background:
    radial-gradient(120% 85% at 50% 42%, var(--ivory) 46%, #efe7d3 100%);
}

.cover-light {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(120vw, 640px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 246, 0.95) 0%, rgba(232, 221, 197, 0.5) 45%, rgba(232, 221, 197, 0) 72%);
  pointer-events: none;
}

.cover-names {
  position: relative;
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.5rem, 12vw, 4.8rem);
  line-height: 1.04;
  color: var(--ink);
}

.mask { display: block; overflow: hidden; padding: 0.08em 0.2em; margin: -0.02em 0; }
.mask-line { display: block; will-change: transform; }
.mask--and { padding-block: 0; }
.cover-and { font-style: italic; font-size: 0.52em; color: var(--royal); }

.cover-flourish {
  position: relative;
  width: min(300px, 68vw);
  stroke: var(--royal);
  stroke-width: 1.3;
  stroke-linecap: round;
}
.flourish-diamond { fill: var(--sand); stroke: var(--royal); stroke-width: 1; }

.cover-cue {
  position: relative;
  margin-top: 1.1rem;
  padding: 0.75em 1.7em;
  border: 1px solid rgba(16, 31, 66, 0.4);
  border-radius: 999px;
  background: rgba(248, 245, 238, 0.6);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  animation: cue-pulse 2.6s ease-in-out infinite;
}
@keyframes cue-pulse {
  50% { transform: scale(1.045); box-shadow: 0 8px 28px rgba(35, 78, 155, 0.22); }
}

.cover-skip {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 6;
  padding: 0.5em 1.15em;
  border: 1px solid rgba(169, 189, 213, 0.45);
  border-radius: 999px;
  background: rgba(11, 29, 58, 0.55);
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.cover-skip:focus-visible, .locale-toggle :focus-visible { outline-color: var(--ivory); }

/* Falling petals */
.cover-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}
.petal {
  position: absolute;
  top: -6%;
  color: var(--mist);
  opacity: 0.55;
}
.petal svg { display: block; width: 100%; fill: currentColor; }
.petal--sand { color: var(--sand); opacity: 0.7; }

/* ── Idle poster (before activation) ─────────────────────────────────────────
   The whole invitation poster — monogram, family line, names, flourish, tap
   cue — is visible immediately, pure CSS, and waits indefinitely. The
   monogram block sits fully in the upper half (bottom edge on the 50vh
   midline) so it can never collide with the bottom-anchored names on short
   viewports; on tap cover.js lifts it further up, clear of the seam, before
   the panels part. `.is-revealing` keeps the poster's ivory look while the
   block glides from its bottom perch to centre over the still-closed panels;
   it is dropped the moment the panels start to part (the switch is then
   hidden). */
.cover.is-idle .cover-inner,
.cover.is-revealing .cover-inner {
  z-index: 5;
  background: none;
  pointer-events: none;
}
.cover.is-idle .cover-inner {
  justify-content: flex-end;
  gap: 0.7rem;
  padding-bottom: calc(2.4rem + env(safe-area-inset-bottom));
}
.cover.is-idle .cover-cue { pointer-events: auto; }
.cover.is-idle .cover-names, .cover.is-revealing .cover-names { color: var(--ivory); }
.cover.is-idle .cover-and, .cover.is-revealing .cover-and { color: var(--sand); }
.cover.is-idle .cover-flourish, .cover.is-revealing .cover-flourish { stroke: rgba(232, 221, 197, 0.85); }
.cover.is-idle .flourish-diamond, .cover.is-revealing .flourish-diamond { fill: rgba(232, 221, 197, 0.3); stroke: var(--sand); }
.cover.is-idle .cover-cue, .cover.is-revealing .cover-cue {
  border-color: rgba(232, 221, 197, 0.6);
  background: rgba(11, 29, 58, 0.35);
  color: var(--ivory);
}
/* Reveal-only elements stay hidden until the choreography starts. */
.cover.is-idle .cover-light,
.cover.is-idle .sprig,
.cover.is-idle .flower-petal { opacity: 0; }
.cover.is-idle .cover-mono { transform: translate(-50%, -100%); }

/* ─────────────────────── Locale toggle & dev controls ─────────────────────── */

.locale-toggle {
  display: none; /* inert without JS — revealed with html.js */
  position: fixed;
  top: max(0.9rem, env(safe-area-inset-top));
  right: max(0.9rem, env(safe-area-inset-right));
  z-index: 60;
  flex-direction: row;
  border: 1px solid rgba(169, 189, 213, 0.55);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(11, 29, 58, 0.45);
  backdrop-filter: blur(6px);
}
html.js .locale-toggle { display: flex; }
.locale-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ivory);
  padding: 0.42em 1em;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.locale-toggle button[aria-pressed="true"] {
  background: var(--ivory);
  color: var(--navy);
}

.dev-replay {
  position: fixed;
  left: max(0.9rem, env(safe-area-inset-left));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 60;
  padding: 0.5em 1.1em;
  border: 1px solid rgba(169, 189, 213, 0.55);
  border-radius: 999px;
  background: rgba(11, 29, 58, 0.55);
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ─────────────────────────── Page sections ─────────────────────────── */

.section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(4.5rem + env(safe-area-inset-top)) var(--pad-x) calc(4.5rem + env(safe-area-inset-bottom));
  text-align: center;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  max-width: none;
  gap: 1.1rem;
  overflow: hidden;
}
.hero .sprig { opacity: 0.55; stroke: var(--royal); }

/* Short phone viewports (browser chrome eats height): the vertically centred
   hero text rises toward the corner sprig — keep the drawing full size and
   slide it toward the corner (up + left) so it clears the invocation. */
@media (max-width: 700px) and (max-height: 800px) {
  #hero .sprig--tl { margin: -2rem 0 0 -2rem; }
}

.invocation {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--royal);
  max-width: 34ch;
}

.divider {
  width: min(300px, 64vw);
  stroke: var(--royal);
  stroke-width: 1.2;
  stroke-linecap: round;
  fill: none;
}
.divider .flourish-diamond { fill: var(--sand); }

.hero-announce, .hero-invite {
  margin: 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--royal);
}

.hero-names {
  margin: 0.05em 0;
  font-weight: 500;
  font-size: clamp(2.9rem, 13.5vw, 5.6rem);
  line-height: 1.02;
}
.hero-names span { display: block; }
.hero-and { font-style: italic; font-size: 0.5em; color: var(--royal); margin: 0.12em 0; }

.hero-date { margin: 0.4rem 0 0; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.date-note {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--royal);
  border: 1px solid rgba(35, 78, 155, 0.4);
  border-radius: 999px;
  padding: 0.55em 1.4em;
}
/* The pill is a live link (adds the event to Google Calendar) — same hover
   language as the other CTAs. */
a.date-note { text-decoration: none; cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }
a.date-note:hover, a.date-note:focus-visible { background: var(--navy); color: var(--ivory); }
.date-line { font-size: clamp(1.15rem, 4.6vw, 1.55rem); }

.scroll-cue { margin: 1.4rem 0 0; font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--royal); opacity: 0.8; }
html[lang="bn"] .scroll-cue { letter-spacing: 0.04em; }

.section h2 {
  margin: 0 0 0.4rem;
  font-weight: 500;
  font-size: clamp(1.7rem, 6.6vw, 2.5rem);
  line-height: 1.15;
}

.section p { margin: 0; max-width: 56ch; }

blockquote {
  margin: 0;
  padding: 0;
}
blockquote p {
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
  max-width: 44ch;
}

.details {
  display: grid;
  gap: 1.15rem;
  margin: 0.6rem 0 0.4rem;
  width: 100%;
}
.details > div { display: flex; flex-direction: column; gap: 0.25rem; }
.details dt {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--royal);
}
.details dd { margin: 0; font-size: 1.12rem; }

.cta {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.7em 1.7em;
  border: 1px solid var(--royal);
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.cta:hover, .cta:focus-visible { background: var(--navy); color: var(--ivory); }

.section--tint {
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, #f1ebdb 0%, var(--ivory) 100%);
}
.section--tint .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 720px;
}
.countdown-fallback { font-style: italic; color: var(--royal); }

.closing { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
.signoff {
  font-style: italic;
  font-size: 1.6rem;
  color: var(--navy);
}

/* ─────────────────────────── Footer ─────────────────────────── */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 0 var(--pad-x) calc(2.4rem + env(safe-area-inset-bottom));
  background: var(--ivory);
}
.socials { display: flex; gap: 1.1rem; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--mist);
  border-radius: 999px;
  color: var(--navy);
  transition: background 0.25s ease, color 0.25s ease;
}
.socials a:hover,
.socials a:focus-visible { background: var(--navy); color: var(--ivory); }
.socials svg { width: 1.2rem; height: 1.2rem; }
.credit {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--royal);
}

/* ─────────────────────────── Desktop ─────────────────────────── */

@media (min-width: 900px) {
  .section { padding-block: 7rem; gap: 1.1rem; }
  .hero { padding-top: 7rem; }
  .hero .sprig, .cover .sprig { width: clamp(250px, 24vw, 330px); }
  .mono-wrap { width: 215px; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 3rem; max-width: 640px; }
  .cover-family { font-size: 0.98rem; }
}

/* ───────────── Stage 2: section compositions & scroll art ───────────── */

/* Botanical section art — venue transition sprig + closing finale bouquet */
.venue-sprig, .finale {
  width: min(560px, 92vw);
  height: auto;
  stroke: var(--royal);
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
}
.venue-sprig { margin-bottom: 0.2rem; }
.finale { width: min(420px, 86vw); margin-top: 0.8rem; }
.venue-sprig .leaf, .finale .leaf {
  fill: rgba(35, 78, 155, 0.13);
  stroke: var(--royal);
  stroke-width: 1;
  stroke-linejoin: round;
}
.venue-sprig .flower-petal, .finale .flower-petal {
  fill: rgba(35, 78, 155, 0.1);
  stroke: var(--royal);
  stroke-width: 1;
}
.venue-sprig .dot, .finale .dot { fill: var(--sand); stroke: none; }

/* Printed plate around the details (static hairline frame, visible without JS) */
.plate {
  width: 100%;
  padding: 1.7rem 1.3rem 1.3rem;
  border: 1px solid rgba(35, 78, 155, 0.32);
  outline: 1px solid rgba(35, 78, 155, 0.14);
  outline-offset: 5px;
  background: rgba(255, 253, 246, 0.55);
}

/* Maps — embedded venue map, framed like the gallery plates */
.map-embed {
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(35, 78, 155, 0.25);
  outline: 1px solid rgba(35, 78, 155, 0.12);
  outline-offset: 4px;
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
  filter: saturate(0.75);
}
@media (min-width: 900px) {
  .map-embed iframe { height: 360px; }
}

/* Share — button opens a pill menu (copy / whatsapp / messenger / telegram / email) */
.share { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; position: relative; }
.share .cta {
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
/* Without this, the transparent background above wins the specificity tie and
   hover leaves white text on the ivory page. */
.share .cta:hover,
.share .cta:focus-visible,
.rsvp-form .cta:hover,
.rsvp-form .cta:focus-visible { background: var(--navy); color: var(--ivory); }
.share-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem;
  border: 1px solid rgba(35, 78, 155, 0.25);
  background: rgba(255, 253, 246, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(11, 29, 58, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
  /* Overlay as a dropdown below the button — opening never reflows the page. */
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  width: max-content;
  max-width: min(92vw, 420px);
  z-index: 55;
}
.share-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.share-menu button {
  appearance: none;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(35, 78, 155, 0.4);
  border-radius: 999px;
  padding: 0.5em 1em;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.share-menu button:hover, .share-menu button:focus-visible { background: var(--navy); color: var(--ivory); border-color: var(--navy); }

/* Floating share — sticks to the bottom-right once the hero is out of view */
.float-share {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.float-share.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.float-share-button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  background: var(--navy);
  border: 1px solid rgba(169, 189, 213, 0.45);
  border-radius: 999px;
  color: var(--ivory);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(11, 29, 58, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.float-share-button:hover, .float-share-button:focus-visible { background: var(--royal); transform: translateY(-2px); }
.float-share-button svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; }
.share-menu--float {
  top: auto;
  left: auto;
  right: 0;
  bottom: calc(100% + 0.6rem);
  transform: translateY(8px);
  flex-direction: column;
  align-items: flex-end;
  flex-wrap: nowrap;
  border-radius: 24px;
}
.share-menu--float.open { transform: none; }

/* Background music toggle — bottom-left mirror of the floating share */
.audio-toggle {
  display: none; /* wired by js/audio.js — hidden without JS */
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--navy);
  border: 1px solid rgba(169, 189, 213, 0.45);
  border-radius: 999px;
  color: var(--ivory);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(11, 29, 58, 0.3);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
html.js .audio-toggle { display: grid; }
.audio-toggle:hover, .audio-toggle:focus-visible { background: var(--royal); transform: translateY(-2px); }
.audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}
.audio-waves i {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
}
.audio-toggle.is-playing .audio-waves i { opacity: 1; animation: audio-wave 0.9s ease-in-out infinite; }
.audio-toggle.is-playing .audio-waves i:nth-child(1) { height: 7px; animation-delay: 0s; }
.audio-toggle.is-playing .audio-waves i:nth-child(2) { height: 11px; animation-delay: 0.18s; }
.audio-toggle.is-playing .audio-waves i:nth-child(3) { height: 15px; animation-delay: 0.36s; }
.audio-toggle.is-playing .audio-waves i:nth-child(4) { height: 9px; animation-delay: 0.54s; }
@keyframes audio-wave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}
.audio-waves i { transform-origin: bottom; }
/* Muted state: a clear diagonal slash over still waves */
.audio-toggle:not(.is-playing)::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.9;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ───────── Stage 3+: story · gallery · rsvp ───────── */

/* Our story — stacked moments, a small diamond between each */
.story {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  width: 100%;
  max-width: 480px;
}
.moment { position: relative; display: flex; flex-direction: column; gap: 0.4rem; text-align: center; }
.moment + .moment::before {
  content: '';
  position: absolute;
  top: -1.35rem;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--sand);
  outline: 1px solid rgba(35, 78, 155, 0.4);
  outline-offset: 3px;
  transform: rotate(45deg);
}
.moment-date {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--royal);
}
html[lang="bn"] .moment-date { letter-spacing: 0.05em; }
.moment h3 { margin: 0; font-weight: 500; font-size: 1.4rem; color: var(--navy); }
.moment p { margin: 0 auto; max-width: 42ch; }

/* Gallery — placeholder photos, 2-up on phones, 3-up on desktop */
.gallery-intro { font-style: italic; color: var(--royal); }.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
  max-width: 640px;
  margin-top: 0.6rem;
}
.gallery-item {
  margin: 0;
  border: 1px solid rgba(35, 78, 155, 0.25);
  outline: 1px solid rgba(35, 78, 155, 0.12);
  outline-offset: 4px;
  background: var(--ivory);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
}

/* Lightbox — full-screen viewer over the gallery */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: calc(3.4rem + env(safe-area-inset-top)) calc(3.6rem + env(safe-area-inset-right)) calc(1.4rem + env(safe-area-inset-bottom)) calc(3.6rem + env(safe-area-inset-left));
  background: rgba(11, 29, 58, 0.93);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(92vw, 900px);
  transform: scale(0.96);
  transition: transform 0.3s ease;
}
.lightbox.open .lightbox-figure { transform: none; }
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  height: auto;
  border: 1px solid rgba(169, 189, 213, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lightbox figcaption {
  color: var(--mist);
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  max-width: 60ch;
}
.lightbox-counter {
  color: var(--mist);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
}
.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(11, 29, 58, 0.4);
  border: 1px solid rgba(169, 189, 213, 0.45);
  border-radius: 999px;
  color: var(--ivory);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.lightbox-close:hover, .lightbox-close:focus-visible,
.lightbox-nav:hover, .lightbox-nav:focus-visible { background: var(--royal); border-color: var(--ivory); }
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lightbox-close {
  position: absolute;
  top: max(0.9rem, env(safe-area-inset-top));
  right: max(0.9rem, env(safe-area-inset-right));
}
.lightbox-nav { position: absolute; top: 50%; margin-top: -22px; }
.lightbox-nav--prev { left: max(0.7rem, env(safe-area-inset-left)); }
.lightbox-nav--next { right: max(0.7rem, env(safe-area-inset-right)); }
.lightbox:focus-visible { outline: none; }

/* RSVP — plate-framed form, WhatsApp compose + email fallback */
.rsvp-deadline { font-style: italic; color: var(--royal); }
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: left;
  width: 100%;
  max-width: 460px;
  margin-top: 0.4rem;
}
.rsvp-field { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.rsvp-field > label,
.rsvp-field legend {
  padding: 0;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--royal);
}
html[lang="bn"] .rsvp-field > label,
html[lang="bn"] .rsvp-field legend { letter-spacing: 0.04em; }
.rsvp-field input[type="text"],
.rsvp-field select,
.rsvp-field textarea {
  font: inherit;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.7);
  border: 1px solid rgba(35, 78, 155, 0.35);
  border-radius: 3px;
  padding: 0.6em 0.8em;
}
.rsvp-field ::placeholder { color: rgba(16, 31, 66, 0.45); font-style: italic; }
.rsvp-choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.rsvp-choices label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5em 1em;
  border: 1px solid rgba(35, 78, 155, 0.4);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}
.rsvp-choices input { accent-color: var(--royal); margin: 0; }
.rsvp-choices label:has(input:checked) { background: var(--navy); color: var(--ivory); }
.rsvp-form .cta { align-self: center; margin-top: 0.2rem; border: 1px solid var(--royal); cursor: pointer; font-family: inherit; background: transparent; }
.rsvp-email {
  align-self: center;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--royal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rsvp-error { margin: 0; font-size: 0.9rem; font-style: italic; color: #9c3d3d; }

/* Live countdown — hidden without JS (the fallback line stays readable) */
.countdown { display: none; }
html.js .countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.cd-unit .mask { padding: 0.06em 0.24em; margin: 0; }
.cd-num {
  display: block;
  font-size: clamp(2rem, 8.5vw, 3.1rem);
  line-height: 1.06;
  font-weight: 500;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--royal);
}
html[lang="bn"] .cd-label { letter-spacing: 0.04em; }
.cd-sep {
  font-size: clamp(1.3rem, 4.6vw, 2rem);
  color: var(--mist);
  padding-top: 0.45em;
}

/* Ambient drift layer — beneath the cover (z 40) and locale toggle (z 60) */
.page-petals {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}
.drift { position: absolute; top: -6%; color: var(--mist); }
.drift svg { display: block; width: 100%; fill: currentColor; }
.drift--sand { color: var(--sand); }
.drift--leaf { color: var(--royal); }
.drift--leaf svg path:last-child { fill: none; stroke: rgba(248, 245, 238, 0.7); stroke-width: 1; }

@media (min-width: 900px) {
  .cd-num { font-size: 3.4rem; }
  .plate { padding: 2.2rem 2.4rem 1.8rem; }
  .finale { width: 460px; }
}
