/* ==========================================================================
   BRAMBHAJYOTI WEDS ARPITA — GROOM'S SIDE
   Card theme: matches the family's printed card.
   Pearl card stock, pale sage panels with an ogee lattice, gold foil lines,
   scalloped edges with hanging lanterns, red "Shubho Bibaho" and script names.
   Mobile first (guests open it from WhatsApp).
   ========================================================================== */

:root {
  --pearl: #F3EEE1;
  --pearl-2: #EBE4D2;
  --card-white: #FBF8F0;

  --sage-pale: #E4EADF;
  --sage: #CFDCC6;
  --sage-mid: #B5C8AD;
  --sage-line: #A9BFB0;
  --leaf: #6F8762;

  --gold: #C2A04A;
  --gold-light: #E2CB80;

  --maroon: #9C2235;
  --maroon-deep: #7C1A2A;

  --ink: #3D3529;
  --ink-soft: #6B6052;

  --font-script: "Great Vibes", "Cormorant Garamond", cursive;
  --font-serif: "Cormorant Garamond", "Noto Serif Bengali", Georgia, serif;
  --font-sans: "Jost", "Noto Serif Bengali", system-ui, sans-serif;
  --font-bn: "Noto Serif Bengali", "Cormorant Garamond", serif;

  --nav-h: 60px;

  /* The fine ogee lattice printed on the card's sage panel */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%23A9BFB0' stroke-width='0.8'%3E%3Cpath d='M0 14 C7 14 7 0 14 0 C21 0 21 14 28 14'/%3E%3Cpath d='M0 14 C7 14 7 28 14 28 C21 28 21 14 28 14'/%3E%3Ccircle cx='14' cy='14' r='1.2' fill='%23A9BFB0' stroke='none'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--pearl);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.preloader-open { overflow: hidden; }
body.lang-bn { font-family: var(--font-bn); font-size: 16px; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.nowrap { white-space: nowrap; }

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

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

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal-on-scroll.is-revealed { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Preloader: the gatefold card (photo of the real card front)
   -------------------------------------------------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  background: var(--pearl);
  cursor: pointer;
  transition: opacity 0.6s ease;

  /* The card is turned sideways (988x784) and shown whole, centred, with room around it.
     The fold sits 51.82% from its left edge. */
  --card-ratio: 1.2602;
  --card-w: min(calc(100vw - 32px), 760px, calc((100dvh - 120px) * var(--card-ratio)));
  --card-h: calc(var(--card-w) / var(--card-ratio));
  --fold: calc(var(--card-w) * 0.5182);
  /* how far the invitation zooms in: enough for the inside page to fill the screen */
  --zoom: 2.4;
}
@supports not (height: 100dvh) {
  #preloader { --card-w: min(calc(100vw - 32px), 760px, calc((100vh - 120px) * var(--card-ratio))); }
}
#preloader:focus { outline: none; }

.card-gate {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  perspective: 2000px;
  will-change: transform;
  /* fade in on load (opacity only, so it never fights the zoom below) */
  animation: cardIn 0.8s ease backwards;
  /* zoom gently into the invitation once the pages are open */
  transition: transform 1.2s cubic-bezier(.45,0,.2,1) 0.7s;
}
@keyframes cardIn { from { opacity: 0; } }

/* the inside page the two pages open onto */
.card-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  background: var(--card-white);
  box-shadow: inset 0 0 0 8px var(--card-white), inset 0 0 0 9px rgba(194,160,74,0.6), 0 16px 36px rgba(70,58,36,0.18);
}
.preloader-namaskar {
  font-family: var(--font-bn);
  font-size: clamp(0.7rem, 2.4vw, 0.95rem);
  color: var(--maroon);
}
.card-inner-monogram { width: clamp(80px, 22vw, 160px); height: auto; margin: 8px auto; }
.preloader-name {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 5.6vw, 2.8rem);
  line-height: 1.15;
  color: var(--maroon);
}
.preloader-ampersand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.85rem, 2.6vw, 1.1rem);
  color: var(--ink-soft);
}
.preloader-bengali {
  margin-top: 8px;
  font-family: var(--font-bn);
  font-size: clamp(0.8rem, 2.6vw, 1.05rem);
  color: var(--leaf);
}

/* the two pages of the card: printed front, plain card stock on the back */
.card-flap {
  position: absolute;
  top: 0;
  bottom: 0;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  /* pages swing open from the centre fold, then fade so nothing flies across the screen */
  transition: transform 1.2s cubic-bezier(.45,0,.25,1), opacity 0.5s ease 0.8s;
}
.card-flap::before,
.card-flap::after {
  content: "";
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-flap::before {
  /* front: the printed card */
  background-image: url("../assets/card-front-landscape.webp");
  background-repeat: no-repeat;
  background-size: var(--card-w) var(--card-h);
  box-shadow: 0 16px 36px rgba(70,58,36,0.16);
}
.card-flap::after {
  /* back: pearl card stock, a little shaded so the turn reads */
  background: linear-gradient(90deg, #E9E2CF, var(--card-white));
  transform: rotateY(180deg);
}
.card-flap-left {
  left: 0;
  width: var(--fold);
  transform-origin: left center;
}
.card-flap-left::before { background-position: 0 0; }
.card-flap-right {
  left: var(--fold);
  right: 0;
  transform-origin: right center;
}
.card-flap-right::before { background-position: calc(var(--fold) * -1) 0; }
.card-flap-right::after { background: linear-gradient(270deg, #E9E2CF, var(--card-white)); }

.preloader-skip {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
  transition: opacity 0.4s ease;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }

/* opening: both pages open outwards from the centre fold, then the view zooms into the invitation */
#preloader.scale-exit .card-flap-left  { transform: rotateY(-120deg); opacity: 0; }
#preloader.scale-exit .card-flap-right { transform: rotateY(120deg); opacity: 0; }
#preloader.scale-exit .card-gate {
  transform: scale(var(--zoom));
}
#preloader.scale-exit .preloader-skip  { opacity: 0; animation: none; }
#preloader.scale-exit { cursor: default; }
#preloader.fade-out { opacity: 0; pointer-events: none; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(243,238,225,0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sage-line);
}
.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}
.nav-links a {
  display: block;
  padding: 12px 4px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--maroon);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--maroon-deep); }
body.lang-bn .nav-links a { font-family: var(--font-bn); letter-spacing: 0.02em; font-size: 0.95rem; }

.nav-monogram { display: flex; align-items: center; min-height: 44px; min-width: 44px; }
.nav-monogram-img { width: 76px; height: auto; }

.nav-mobile-controls { display: flex; align-items: center; gap: 10px; }

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  background: var(--card-white);
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
}
.lang-text { opacity: 0.6; font-family: var(--font-sans); }
.lang-text.lang-bn { font-family: var(--font-bn); }
.lang-text.active { opacity: 1; color: var(--maroon); font-weight: 500; }
.lang-sep { opacity: 0.4; }

.nav-toggle-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--maroon);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-links.is-open {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  order: 3;
  text-align: center;
}
#nav-links-left.is-open { padding-top: 6px; border-top: 1px solid var(--sage-line); }
#nav-links-right.is-open { padding-bottom: 10px; }
.nav-links.is-open .nav-lang-item { display: none; }

@media (min-width: 860px) {
  .nav-container { flex-wrap: nowrap; }
  .nav-links { display: flex; flex: 1; align-items: center; gap: 28px; }
  #nav-links-right { justify-content: flex-end; }
  .nav-monogram { margin: 0 32px; }
  .nav-mobile-controls { display: none; }
  .nav-links.is-open { flex-direction: row; flex-basis: auto; order: 0; padding: 0; border: 0; }
}

/* --------------------------------------------------------------------------
   Shared section styles
   -------------------------------------------------------------------------- */
section { position: relative; }

/* sage sections carry the card's lattice */
.section-emerald {
  background: var(--sage);
  color: var(--ink);
  overflow: hidden;
}
.damask-layer {
  position: absolute;
  inset: 0;
  background: var(--lattice) center / 28px;
  opacity: 0.45;
  pointer-events: none;
}

.section-ivory {
  padding: 72px 16px;
  background: var(--pearl);
  color: var(--ink);
}

.section-header {
  position: relative;
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}
.heading-primary {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 6vw, 2.2rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: var(--maroon);
}
body.lang-bn .heading-primary { font-family: var(--font-bn); letter-spacing: 0.01em; font-weight: 600; }

.heading-bengali {
  font-family: var(--font-bn);
  font-size: 1rem;
  color: var(--leaf);
}

.divider-icon {
  width: 200px;
  height: auto;
  margin: 14px auto 0;
}

/* Gold foil frame with corner flourishes (like the card's foil outline) */
.royal-frame {
  position: relative;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 6px var(--card-white), inset 0 0 0 7px rgba(194,160,74,0.55);
}
.frame-corner {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
}
.frame-corner.tl { top: 10px; left: 10px; }
.frame-corner.tr { top: 10px; right: 10px; transform: scaleX(-1); }
.frame-corner.bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.frame-corner.br { bottom: 10px; right: 10px; transform: scale(-1, -1); }

/* Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-pill svg { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }
.btn-pill:hover { background: var(--maroon); color: var(--card-white); }
.btn-pill:active { transform: scale(0.97); }
body.lang-bn .btn-pill { font-family: var(--font-bn); letter-spacing: 0.02em; font-size: 0.88rem; text-transform: none; }

/* Scalloped lantern edge, used under envelope-style panels */
.scallop-edge { position: relative; margin-bottom: 64px; }
.scallop-edge::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 100%;
  height: 64px;
  background: url("../assets/scallop-lantern.svg") 0 0 / 56px 64px round no-repeat;
  background-repeat: round no-repeat;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   1. Hero: the envelope
   -------------------------------------------------------------------------- */
.section-hero {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 20px) 16px 80px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  /* green plaster wall, supplied by the family, turned to landscape, with soft vignette */
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(28, 42, 20, 0.3) 100%),
    #5E7A4E url("../assets/hero-green-wall.webp") center / cover no-repeat;
}

/* The cover card: the family's cream paper with white and green flowers on a green
   border. The image is cut into three slices so the card can grow with its content:
   the top flowers, a plain middle that repeats, and the bottom flowers.
   Padding scales with the card's width (as the slices do), which keeps
   the text on the cream, clear of the flowers. */
.envelope-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  /* the card's own width: full width minus the 16px page margins, at most 520px */
  --card-w: min(calc(100vw - 32px), 520px);
  padding: calc(var(--card-w) * 0.38) calc(var(--card-w) * 0.12) calc(var(--card-w) * 0.66);
  background:
    url("../assets/card-flowers-top.webp") center top / 100% auto no-repeat,
    url("../assets/card-flowers-bottom.webp") center bottom / 100% auto no-repeat,
    #F2EAD6 url("../assets/card-flowers-mid.webp") center top / 100% auto repeat-y;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(40, 52, 30, 0.25);
}
/* the card has its own flowers, so the jasmine branches are not shown on it */
.envelope-panel .sprig { display: none; }
/* jasmine branches in the cover's top corners */
.sprig {
  position: absolute;
  top: 8px;
  width: 64px;
  height: auto;
  pointer-events: none;
  /* a faint outline so the white flowers read on the pale sage */
  filter: drop-shadow(0 0 0.6px rgba(70, 95, 60, 0.45));
}
.sprig-left { left: 4px; }
.sprig-right { right: 4px; transform: scaleX(-1); }

.hero-inner { position: relative; z-index: 1; }

.hero-invocation {
  margin-bottom: 8px;
  font-family: var(--font-bn);
  font-size: 0.85rem;
  color: var(--leaf);
}

.hero-monogram {
  width: min(48vw, 190px);
  height: auto;
  margin: 0 auto 6px;
}

.hero-name {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.1rem, 10vw, 3rem);
  line-height: 1.1;
  color: var(--maroon);
}
.hero-name-ampersand {
  display: block;
  margin: 2px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
body.lang-bn .hero-name { font-family: var(--font-bn); font-weight: 600; font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1.45; }

.hero-couple {
  width: min(52vw, 210px);
  margin: 14px auto 0;
}
.hero-couple img { width: 100%; height: auto; }

.hero-headlines { margin-top: 14px; }
.hero-headline-en {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: var(--maroon);
}
.hero-headline-bn {
  margin-top: 4px;
  font-family: var(--font-bn);
  font-size: 1rem;
  color: var(--ink-soft);
}
body.lang-bn .hero-headline-en { font-family: var(--font-bn); letter-spacing: 0.02em; font-size: 1.15rem; font-weight: 600; }
body.lang-bn .hero-headline-bn { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.2em; }

.hero-date-plaque {
  max-width: 400px;
  margin: 12px auto 0;
}
.hero-date-line {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--maroon);
}
.hero-venue-line {
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
body.lang-bn .hero-date-line { font-family: var(--font-bn); font-size: 0.95rem; }
body.lang-bn .hero-venue-line { font-family: var(--font-bn); font-size: 0.9rem; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Floating decorations on the cover: lilies, lotus, green flower, gold stars.
   They drift slowly up and down at different speeds. On phones they stay on the
   card's outer edges and below it, never over the text column.
   -------------------------------------------------------------------------- */
.floaters {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.floater {
  position: absolute;
  height: auto;
  max-width: none;
  filter: drop-shadow(0 12px 14px rgba(20, 30, 15, 0.35));
  animation: floatDrift 7s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes floatDrift {
  from { transform: translateY(0) rotate(var(--r0, -3deg)); }
  to   { transform: translateY(-14px) rotate(var(--r1, 3deg)); }
}
.fl-star {
  filter: drop-shadow(0 6px 8px rgba(20, 30, 15, 0.35));
  animation-name: floatTwinkle;
}
@keyframes floatTwinkle {
  from { transform: translateY(0) scale(0.92) rotate(var(--r0, 0deg)); opacity: 0.75; }
  to   { transform: translateY(-8px) scale(1.06) rotate(var(--r1, 8deg)); opacity: 1; }
}

/* phones: small, on the edges */
.fl-rajanigandha { width: 112px; left: -14px; top: 68px; --r0: -3deg; --r1: 2deg; animation-duration: 7.5s; }
.fl-shankha      { width: 82px;  right: -14px; top: 32%; --r0: 3deg; --r1: -3deg; animation-duration: 7s; animation-delay: -2s; }
.fl-kulo         { width: 80px;  left: -16px; top: 44%; --r0: -2deg; --r1: 3deg; animation-duration: 8.5s; animation-delay: -1s; }
.fl-haatpakha       { width: 86px;  right: -10px; bottom: 22%; --r0: -3deg; --r1: 2deg; animation-duration: 8s; animation-delay: -3s; }
.fl-hand-lotus      { display: none; }
.fl-lotus-vine      { width: 66px;  bottom: 0; top: auto; --r0: 0deg; --r1: 0deg; animation: none; }
.fl-lotus-vine-right { right: 0; }
.fl-lotus-vine-left  { left: 0; scale: -1 1; }
.fl-star   { width: 20px; }
.fl-star-1 { left: 6px;  top: 19%; animation-duration: 4s; }
.fl-star-2 { right: 2px; top: 24%; width: 16px; animation-duration: 5s; animation-delay: -1.5s; }
.fl-star-3 { left: 2px;  top: 56%; width: 15px; animation-duration: 4.5s; animation-delay: -3s; }
.fl-star-4 { display: none; }

/* wide screens: bigger, in the open green space either side of the card */
@media (min-width: 900px) {
  .floaters { display: block; }
  .envelope-panel { --card-w: min(calc(100vw - 32px), 440px); }
  .hero-couple { width: min(46vw, 188px); margin-top: 10px; }
  .hero-headlines { margin-top: 10px; }
  .fl-rajanigandha     { width: 240px; left: 3%; top: 9%; }
  .fl-kulo             { width: 175px; left: 15%; top: 54%; }
  .fl-hand-lotus       { display: block; width: 230px; left: 0; top: 34%; bottom: auto; right: auto; --r0: -1.5deg; --r1: 1.5deg; animation-duration: 8.5s; animation-delay: -1.5s; }
  .fl-shankha         { width: 195px; right: 15%; top: 10%; }
  .fl-haatpakha       { width: 200px; right: 14%; top: 42%; bottom: auto; }
  .fl-lotus-vine      { width: 175px; bottom: 0; top: auto; }
  .fl-lotus-vine-right { right: 0; }
  .fl-lotus-vine-left  { left: 0; scale: -1 1; }
  .fl-star   { width: 40px; }
  .fl-star-1 { left: 27%; top: 6%; }
  .fl-star-2 { right: 27%; top: 72%; width: 34px; }
  .fl-star-3 { left: 4%; top: 36%; width: 28px; }
  .fl-star-4 { display: block; right: 8%; bottom: 10%; width: 46px; animation-duration: 5.5s; animation-delay: -2.5s; }
}

/* the palki walks along the bottom of the countdown band, left to right, then starts again */
.palki-track {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 92px;
  opacity: 0.42;
  overflow: hidden;
  pointer-events: none;
}
.palki {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
  animation: palkiWalk 26s linear infinite;
  will-change: transform;
}
@keyframes palkiWalk {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100vw); }
}

.hero-scroll-btn {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--sage-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card-white);
  animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll-btn svg { width: 20px; height: 20px; stroke: var(--maroon); }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

@media (min-width: 720px) {
  .section-hero { align-items: center; padding-bottom: 96px; }
  .hero-scroll-btn { bottom: 32px; }
  .palki-track { height: 124px; }
  .palki { animation-duration: 34s; }

  .sprig { width: 92px; }
}

/* --------------------------------------------------------------------------
   2. Countdown band (plain sage, with the palki walking behind the text)
   -------------------------------------------------------------------------- */
.section-countdown {
  position: relative;
  padding: 48px 16px 52px;
  overflow: hidden;
  text-align: center;
  background: var(--sage);
  border-top: 1px solid var(--sage-line);
  border-bottom: 1px solid var(--sage-line);
}
.countdown-block { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; }
.countdown-heading {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--maroon);
}
body.lang-bn .countdown-heading { font-family: var(--font-bn); font-style: normal; font-size: 1.1rem; }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
/* numbers sit straight on the sage, no boxes around them */
.countdown-item {
  padding: 8px 4px;
}
.countdown-number {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 7.5vw, 2.3rem);
  line-height: 1.1;
  color: var(--maroon);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
body.lang-bn .countdown-label { font-family: var(--font-bn); font-size: 0.8rem; letter-spacing: 0; }

.countdown-closing-line {
  max-width: 440px;
  margin: 20px auto 0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  line-height: 1.9;
  color: var(--maroon-deep);
}
body.lang-bn .countdown-closing-line { font-family: var(--font-bn); font-size: 0.95rem; letter-spacing: 0; line-height: 1.7; }

/* --------------------------------------------------------------------------
   3. Blessings & invitation
   -------------------------------------------------------------------------- */
.section-story { overflow: hidden; }
.story-container { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

.story-floaters {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.story-floaters .floater { opacity: 0.72; }
.st-star-1     { width: 18px; left: 10px; top: 18%; animation-duration: 4.2s; }
.st-star-2     { width: 16px; right: 10px; top: 44%; animation-duration: 5s; animation-delay: -1.5s; }
.st-star-3     { width: 16px; left: 12px; bottom: 14%; animation-duration: 4.6s; animation-delay: -2.5s; }

@media (min-width: 980px) {
  .story-floaters { display: block; }
  .story-floaters .floater { opacity: 0.92; }
  .st-star-1     { width: 32px; left: 11%; top: 28%; }
  .st-star-2     { width: 28px; right: 10%; top: 48%; }
  .st-star-3     { width: 30px; left: 8%; bottom: 16%; }
}

.sanskrit-shloka-box {
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 0 8px;
  text-align: center;
}
.shloka-text {
  font-family: var(--font-bn);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--maroon);
}
.shloka-meaning {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
body.lang-bn .shloka-meaning { font-family: var(--font-bn); font-style: normal; font-size: 0.95rem; }

.invitation-letter-box {
  margin-bottom: 40px;
  padding: 52px 26px 44px;
  background: var(--card-white);
  box-shadow: inset 0 0 0 6px var(--card-white), inset 0 0 0 7px rgba(194,160,74,0.55), 0 14px 34px rgba(70,58,36,0.1);
}
.letter-salutation {
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--maroon);
}
body.lang-bn .letter-salutation { font-family: var(--font-bn); font-size: 1rem; }

.story-p-bn {
  margin: 0 0 18px;
  font-size: 1.12rem;
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
}
body.lang-bn .story-p-bn { font-size: 1rem; line-height: 2; }

.story-blessing-italic {
  padding: 16px 6px;
  border-top: 1px solid var(--sage-line);
  border-bottom: 1px solid var(--sage-line);
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}
body.lang-bn .story-blessing-italic { font-style: normal; }

.letter-closing {
  margin-top: 22px;
  text-align: right;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.letter-closing strong { color: var(--maroon); font-weight: 600; }

/* family cards: sage panels like the card's inside */
.family-lineage-grid { display: grid; gap: 22px; }
.lineage-card {
  position: relative;
  margin-top: 26px;
  padding: 44px 22px 26px;
  text-align: center;
  background: var(--sage-pale);
  border: 1px solid var(--gold);
  border-radius: 140px 140px 10px 10px / 70px 70px 10px 10px;
  box-shadow: inset 0 0 0 5px var(--sage-pale), inset 0 0 0 6px rgba(194,160,74,0.45);
}
.lineage-crest {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-bn);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--maroon);
  background: var(--card-white);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px var(--pearl), 0 0 0 4px rgba(194,160,74,0.5);
}
.lineage-tag {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--leaf);
}
.lineage-name {
  margin: 8px 0 14px;
  font-family: var(--font-bn);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--maroon);
}
.lineage-detail {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.6;
}
.lineage-detail strong { color: var(--maroon-deep); font-weight: 600; }
body.lang-bn .lineage-detail { font-size: 0.92rem; }

@media (min-width: 720px) {
  .family-lineage-grid { grid-template-columns: 1fr 1fr; }
  .invitation-letter-box { padding: 60px 56px 50px; }
}

/* --------------------------------------------------------------------------
   4. Programme timeline (sage plaster + 16:9 couple background)
   -------------------------------------------------------------------------- */
.section-details {
  padding: 56px 16px 64px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(28, 42, 20, 0.25) 100%),
    #5A744B url("../assets/rsvp-bg-mobile.webp") center / cover no-repeat;
}
.section-details .damask-layer { display: none; }
.section-details .section-header {
  max-width: 520px;
}
.section-details .section-header .heading-primary {
  color: var(--card-white);
  text-shadow: 0 1px 4px rgba(20, 28, 12, 0.45);
}
.section-details .section-header .heading-bengali {
  color: var(--gold-light);
  text-shadow: 0 1px 3px rgba(20, 28, 12, 0.45);
}
@media (min-width: 960px) {
  .section-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vw * 575 / 1024);
    padding: 24px 16px 28px;
    background: #5A744B url("../assets/rsvp-bg-desktop.webp") right bottom / cover no-repeat;
  }
  .section-details .section-header,
  .section-details .rituals-stack {
    width: 100%;
    max-width: 520px;
    margin-left: clamp(24px, 4vw, 64px);
    margin-right: auto;
  }
  .section-details .section-header { margin-bottom: 16px; }
  .section-details .rituals-stack { gap: 12px; }
  .section-details .ritual-body { padding: 14px 16px; }
  .section-details .ritual-actions { padding-top: 10px; gap: 8px; }
  .section-details .ritual-actions .btn-pill { min-height: 40px; padding: 6px 10px; font-size: 0.7rem; }
}

.rituals-stack {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.ritual-card {
  position: relative;
  display: flex;
}
.ritual-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--card-white);
  border: 1px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(24, 30, 12, 0.22);
}
.ritual-card-main .ritual-body {
  box-shadow: inset 0 0 0 4px var(--card-white), inset 0 0 0 5px rgba(194,160,74,0.55), 0 12px 28px rgba(24, 30, 12, 0.28);
}

@media (min-width: 720px) {
  .rituals-stack {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .ritual-card-main {
    grid-column: 1 / -1;
    text-align: center;
  }
  .ritual-card-main .ritual-actions {
    justify-content: center;
  }
}

.ritual-line-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--maroon);
}
.ritual-line-bn {
  display: block;
  margin-top: 3px;
  font-family: var(--font-bn);
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--leaf);
}
body.lang-bn .ritual-line-title { font-family: var(--font-bn); font-weight: 600; font-size: 1.05rem; }
body.lang-bn .ritual-line-bn { font-family: var(--font-serif); font-style: italic; font-size: 1rem; }

.ritual-line-date {
  margin-top: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}
.ritual-line-time-venue {
  margin-top: 2px;
  font-size: 1rem;
  color: var(--ink-soft);
}
body.lang-bn .ritual-line-date,
body.lang-bn .ritual-line-time-venue { font-size: 0.92rem; }

.ritual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.ritual-actions .btn-pill { flex: 1 1 100%; }
@media (min-width: 520px) {
  .ritual-actions .btn-pill { flex: 1 1 140px; }
}

/* --------------------------------------------------------------------------
   5. Reception: terracotta alpana border card on pearl section backdrop
   -------------------------------------------------------------------------- */
.reception-card {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 52px 34px;
  text-align: center;
  color: var(--pearl);
  background:
    linear-gradient(rgba(40, 10, 4, 0.14), rgba(40, 10, 4, 0.22)),
    #A93317 url("../assets/reception-red-port.webp") center / 100% 100% no-repeat;
  box-shadow: 0 16px 36px rgba(61, 53, 41, 0.18);
  text-shadow: 0 1px 3px rgba(40, 10, 4, 0.45);
}
.reception-city {
  margin-bottom: 10px;
  font-family: var(--font-script);
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--gold-light);
}
.reception-detail-line {
  margin-bottom: 6px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--pearl);
}
#reception-date { font-weight: 600; color: var(--card-white); font-size: 1.12rem; }
.reception-dress-code {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  background: rgba(65, 16, 6, 0.48);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}
body.lang-bn .reception-detail-line { font-size: 0.95rem; }
body.lang-bn #reception-date { font-size: 1rem; }
body.lang-bn .reception-dress-code { font-family: var(--font-bn); font-size: 0.85rem; letter-spacing: 0; }

.reception-note {
  margin: 18px 0 4px;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(251, 248, 240, 0.95);
}
body.lang-bn .reception-note { font-style: normal; font-size: 0.92rem; }
.reception-card .ritual-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.reception-card .btn-pill {
  flex: 1 1 180px;
  border-color: var(--gold-light);
  color: var(--card-white);
  background: rgba(65, 16, 6, 0.42);
}
.reception-card .btn-pill:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--maroon-deep);
}
@media (min-width: 720px) {
  .reception-card {
    max-width: 680px;
    padding: 56px 58px;
    background:
      linear-gradient(rgba(40, 10, 4, 0.14), rgba(40, 10, 4, 0.22)),
      #A93317 url("../assets/reception-red-land.webp") center / 100% 100% no-repeat;
  }
}

/* --------------------------------------------------------------------------
   6. RSVP (sage plaster + 16:9 couple on left, content on right on desktop)
   -------------------------------------------------------------------------- */
.section-rsvp {
  padding: 64px 16px 72px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(28, 42, 20, 0.25) 100%),
    #5A744B url("../assets/rsvp-bg-mobile.webp") center / cover no-repeat;
}
.section-rsvp .damask-layer { display: none; }
.section-rsvp .section-header {
  max-width: 500px;
  margin-bottom: 16px;
}
.section-rsvp .section-header .heading-primary {
  color: var(--card-white);
  text-shadow: 0 1px 4px rgba(20, 28, 12, 0.45);
}
.section-rsvp .section-header .heading-bengali {
  color: var(--gold-light);
  text-shadow: 0 1px 3px rgba(20, 28, 12, 0.45);
}
@media (min-width: 960px) {
  .section-rsvp {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vw * 575 / 1024);
    padding: 28px 16px 32px;
    background: #5A744B url("../assets/rsvp-couple-bg.webp") left bottom / cover no-repeat;
  }
  .section-rsvp .section-header,
  .section-rsvp .rsvp-card {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: clamp(24px, 5vw, 80px);
  }
  .section-rsvp .rsvp-card { padding: 30px 22px 24px; }
  .section-rsvp .rsvp-note { margin-bottom: 14px; font-size: 1.02rem; }
  .section-rsvp .rsvp-form-group { gap: 10px; margin-bottom: 14px; }
  .section-rsvp .rsvp-hosts-box { margin-top: 20px; padding-top: 16px; }
  .section-rsvp .rsvp-hosts-subheading { margin-bottom: 10px; }
  .section-rsvp .host-item { padding: 10px 8px; }
  .section-rsvp .rsvp-phones-box { margin-top: 12px; }
}

.rsvp-card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 50px 24px 34px;
  text-align: center;
  background: var(--card-white);
  box-shadow: inset 0 0 0 6px var(--card-white), inset 0 0 0 7px rgba(194,160,74,0.55), 0 18px 40px rgba(60,70,50,0.16);
}
.rsvp-note {
  margin: 0 0 22px;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
body.lang-bn .rsvp-note { font-size: 0.95rem; }

.rsvp-form-group { display: grid; gap: 16px; margin-bottom: 22px; }
.rsvp-field { display: grid; gap: 4px; }
.rsvp-field-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
body.lang-bn .rsvp-field-label {
  font-family: var(--font-bn);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}
.rsvp-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 4px;
  border: none;
  border-bottom: 1px dotted var(--maroon);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.rsvp-input::placeholder {
  color: #A08F7A;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
body.lang-bn .rsvp-input::placeholder { font-family: var(--font-bn); font-size: 0.9rem; letter-spacing: 0; }
.rsvp-input:focus { outline: none; border-bottom: 2px solid var(--maroon); }

.btn-rsvp-now {
  width: 100%;
  min-height: 52px;
  border: none;
  background: var(--maroon);
  color: var(--card-white);
  font-size: 0.82rem;
}
.btn-rsvp-now:hover { background: var(--maroon-deep); color: var(--card-white); }

.rsvp-hosts-box {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--sage-line);
}
.rsvp-hosts-heading {
  margin: 0;
  font-family: var(--font-bn);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--maroon);
}
.rsvp-hosts-subheading {
  margin: 4px 0 18px;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--leaf);
}
.hosts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) {
  .hosts-grid { grid-template-columns: 1fr; }
}
.host-item {
  padding: 14px 8px;
  background: var(--sage-pale);
  border: 1px solid var(--sage-line);
  border-radius: 40px 40px 6px 6px;
}
.host-name {
  font-family: var(--font-bn);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--maroon);
}
.host-role { font-size: 0.92rem; color: var(--ink-soft); }

.rsvp-phones-box { margin-top: 18px; }
.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  color: var(--maroon);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.phone-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.phone-btn:hover { background: var(--maroon); color: var(--card-white); }

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 56px 16px 40px;
  text-align: center;
  background: var(--sage-pale);
  border-top: 1px solid var(--sage-line);
}
.footer-container { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; }
.footer-monogram { width: 110px; height: auto; margin: 0 auto 8px; }
.footer-signature {
  font-family: var(--font-script);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--maroon);
}
body.lang-bn .footer-signature { font-family: var(--font-bn); font-size: 1.2rem; }
.footer-closing-en {
  margin: 18px 0 8px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  line-height: 1.9;
  color: var(--maroon-deep);
}
body.lang-bn .footer-closing-en { font-family: var(--font-bn); font-size: 0.95rem; letter-spacing: 0; line-height: 1.7; }
.footer-closing-bn {
  font-family: var(--font-bn);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
body.lang-bn .footer-closing-bn { font-family: var(--font-sans); font-size: 0.66rem; letter-spacing: 0.14em; line-height: 1.9; }
.footer-credit { margin-top: 28px; }
.footer-credit a {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--leaf);
  text-decoration: none;
}
.footer-credit a:hover { color: var(--maroon); }

/* --------------------------------------------------------------------------
   Wider screens
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .section-ivory, .section-details, .section-rsvp { padding-top: 96px; padding-bottom: 104px; }
  .countdown-grid { gap: 16px; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-on-scroll { opacity: 1; transform: none; }
  /* the palki stands still in the middle instead of walking across */
  .palki { left: 50%; transform: translateX(-50%); }
}
