/* ==========================================================================
   Rahul weds Tanya — photoreal designs (/1, /2, /3)
   Door photo opens onto a painted scene, then a paper invitation with watercolours.
   ========================================================================== */

:root {
  --ar: 0.5581;                 /* door/reveal image aspect (1536 / 2752) */
  --font-script: "Great Vibes", "Snell Roundhand", cursive;
  --font-caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Cormorant Garamond", Garamond, Georgia, serif;
  --font-hi: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  --font-hi-display: "Amita", "Tiro Devanagari Hindi", serif;
  --gutter: 18px;
}

/* ---------- Themes ---------- */

.theme-mahal {
  --paper: #fbf6ec;
  --paper-2: #f3e9d6;
  --ink: #3e2c20;
  --ink-soft: #6f5a48;
  --accent: #a87a2a;
  --accent-soft: rgba(168, 122, 42, 0.42);
  --title: #7b4a1c;
  --btn: linear-gradient(100deg, #a47327, #d8b161 48%, #b98a36);
  --btn-ink: #fffdf6;
  --plate: transparent;
  --door-ink: #fffaf0;
  --door-shadow: 0 2px 14px rgba(70, 38, 0, 0.8), 0 0 3px rgba(70, 38, 0, 0.75);
  --intro-veil: 0.5;
  --meta: rgba(62, 44, 32, 0.08);
}

.theme-utsav {
  --paper: #2c0a12;
  --paper-2: #3b1019;
  --ink: #f7ead2;
  --ink-soft: rgba(247, 234, 210, 0.74);
  --accent: #dcb05a;
  --accent-soft: rgba(220, 176, 90, 0.42);
  --title: #f1d48f;
  --btn: linear-gradient(100deg, #b98a35, #f5dc92 45%, #c9983f);
  --btn-ink: #3a0911;
  --plate: radial-gradient(circle at 50% 42%, #fff8ea, #f3e6cc 70%);
  --door-ink: #fbe7b5;
  --door-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.8);
  --meta: rgba(255, 255, 255, 0.05);
}

.theme-bagh {
  --paper: #fcf4f1;
  --paper-2: #f6e5e1;
  --ink: #4a2d33;
  --ink-soft: #7c5b61;
  --accent: #b0776a;
  --accent-soft: rgba(176, 119, 106, 0.42);
  --title: #8d4b5b;
  --btn: linear-gradient(100deg, #b0776a, #e2b2a4 48%, #a86a5d);
  --btn-ink: #fffafa;
  --plate: transparent;
  --door-ink: #fffafa;
  --door-shadow: 0 2px 14px rgba(90, 30, 45, 0.8), 0 0 3px rgba(90, 30, 45, 0.7);
  --intro-veil: 0.46;
  --meta: rgba(74, 45, 51, 0.07);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #140305; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="hi"] body { font-family: var(--font-hi); font-size: 17.5px; line-height: 1.7; }
.js.is-locked, .js.is-locked body { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #1a0508;
  color: #e9cf8e;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__ring { width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(233, 207, 142, 0.25); border-top-color: #e9cf8e; animation: spin 1.1s linear infinite; }
.loader__text { font-family: var(--font-script); font-size: 30px; }
@keyframes spin { to { transform: rotate(360deg); } }
.no-js .loader { display: none; }

/* ---------- Stage (door → scene) ---------- */

.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #140305; }
.stage::after {
  content: "";
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 22px;
  background: var(--paper);
  -webkit-mask: radial-gradient(22px at 50% 0, #0000 98%, #000) 50% 0 / 42px 100% repeat-x;
  mask: radial-gradient(22px at 50% 0, #0000 98%, #000) 50% 0 / 42px 100% repeat-x;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.stage.is-open::after { opacity: 1; }
.stage__backdrop {
  position: absolute;
  inset: -40px;
  background-image: var(--doors);
  background-position: center;
  background-size: cover;
  filter: blur(26px) brightness(0.55) saturate(1.1);
  transform: scale(1.1);
}
.stage__viewport { position: relative; width: 100%; height: 100%; overflow: hidden; }

/* The door art and the living scene always cover the screen, whatever its shape: a little is trimmed at the
   top/bottom on short or wide screens, or at the sides on tall ones, never bars. */
.scene, .art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, calc(100vh * var(--ar)));
  width: max(100%, calc(100svh * var(--ar)));
  height: max(100%, calc(100vw / var(--ar)));
  translate: -50% -50%;
}
.scene { overflow: hidden; left: 0; top: 0; width: 100%; height: 100%; translate: none; }
.scene__media { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--scene-x, 50%) 55%; transform-origin: 50% 60%; pointer-events: none; }
.scene__media::-webkit-media-controls,
.scene__media::-webkit-media-controls-panel,
.scene__media::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.scene__light {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 55%, rgba(255, 214, 140, 0.18), transparent 70%);
  mix-blend-mode: screen;
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.art { perspective: 1300px; perspective-origin: 50% 55%; }
.art__frame, .art__leaf { position: absolute; background-image: var(--doors); background-repeat: no-repeat; }
.art__frame {
  inset: 0;
  background-size: 100% 100%;
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    calc(var(--L) + 1px) calc(var(--T) + 1px), calc(var(--R) - 1px) calc(var(--T) + 1px), calc(var(--R) - 1px) calc(var(--B) - 1px),
    calc(var(--L) + 1px) calc(var(--B) - 1px), calc(var(--L) + 1px) calc(var(--T) + 1px));
}
.art__leaf {
  top: var(--T);
  height: var(--H);
  background-size: var(--bgw-l) var(--bgh);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.art__leaf--l { left: var(--L); width: var(--WL); background-position: var(--bgx-l) var(--bgy); transform-origin: 0% 50%; }
.art__leaf--r { left: var(--S); width: var(--WR); background-size: var(--bgw-r) var(--bgh); background-position: var(--bgx-r) var(--bgy); transform-origin: 100% 50%; }
.art__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15)); opacity: 0; }
.art__leaf--r .art__shade { background: linear-gradient(270deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15)); }
.art__glow {
  position: absolute;
  left: var(--L);
  top: var(--T);
  width: calc(var(--R) - var(--L));
  height: var(--H);
  background: radial-gradient(closest-side, rgba(255, 246, 214, 0.95), rgba(255, 206, 120, 0.55) 45%, rgba(255, 170, 60, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

.stage__fx { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 30; }

/* Words on the doors: the invocation above the brass knockers, the names below (real.js places them). */
.intro {
  position: absolute;
  inset: 0;
  z-index: 4;
  text-align: center;
  color: var(--door-ink);
  text-shadow: var(--door-shadow);
  pointer-events: none;
}
.intro__group {
  position: absolute;
  left: 50%;
  top: 36%;
  width: min(88%, 420px);
  translate: -50% 0;
}
#introMain { top: 50%; }
.intro__group::before {
  content: "";
  position: absolute;
  inset: -22% -12%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(20, 8, 2, var(--intro-veil, 0.34)), transparent);
}
.intro__om { font-family: var(--font-hi); font-size: 14px; letter-spacing: 0.04em; opacity: 0.95; }
.intro__dear { font-family: var(--font-script); font-size: clamp(26px, 7.4vw, 34px); line-height: 1.2; margin-top: 8px; }
.intro__eyebrow { font-family: var(--font-caps); font-weight: 600; font-size: 12.5px; letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase; margin-top: 10px; }
.intro__names { font-family: var(--font-script); font-weight: 400; font-size: clamp(44px, 13vw, 64px); line-height: 1.15; margin: 4px 0 0; }
.intro__names .amp { font-size: 0.62em; padding: 0 0.08em; }
.intro__date { font-family: var(--font-caps); font-weight: 600; font-size: 13px; letter-spacing: 0.34em; text-indent: 0.34em; margin-top: 6px; }
html[lang="hi"] .intro__eyebrow { font-family: var(--font-hi); letter-spacing: 0.08em; text-indent: 0; font-size: 16px; text-transform: none; }
html[lang="hi"] .intro__names { font-family: var(--font-hi-display); font-size: clamp(38px, 11vw, 54px); line-height: 1.35; }
html[lang="hi"] .intro__dear { font-family: var(--font-hi-display); font-size: clamp(22px, 6vw, 28px); }
html[lang="hi"] .intro__date { font-family: var(--font-hi); letter-spacing: 0.06em; text-indent: 0; font-size: 15px; }

.tap {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: var(--tap-top, 74%);
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  background: none;
  color: var(--door-ink);
  text-shadow: var(--door-shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tap__icon { position: relative; display: block; width: 52px; height: 52px; }
.tap__icon svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 6px rgba(70, 38, 0, 0.75)); transform-origin: 46% 18%; animation: tap-press 2.6s ease-in-out infinite; }
/* rings leave the fingertip each time the hand presses */
.tap__ripple {
  position: absolute;
  left: 46%;
  top: 14%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: tap-ripple 2.6s ease-out infinite;
}
.tap__ripple + .tap__ripple { animation-delay: 0.22s; }
@keyframes tap-press { 0%, 36%, 70%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(4px) scale(0.94); } }
@keyframes tap-ripple { 0%, 48% { transform: scale(0.3); opacity: 0; } 53% { opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }

/* A soft light breathing on the brass knockers — the place to tap. */
.knock {
  position: absolute;
  top: var(--ky);
  height: var(--kd);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 228, 156, 0.6), rgba(255, 204, 116, 0.2) 55%, transparent 74%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: knock-glow 2.6s ease-in-out infinite;   /* glows as the hand presses */
}
.art__leaf--l .knock { left: var(--kxl); }
.art__leaf--r .knock { left: var(--kxr); }
@keyframes knock-glow { 0%, 100% { opacity: 0.2; transform: scale(0.9); } 50% { opacity: 0.85; transform: scale(1.06); } }

/* Names over the living scene after the doors open (the scene stays visible down to the monogram). */
.stage__shade {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(28, 13, 4, 0.84), rgba(28, 13, 4, 0.56) 40%, rgba(28, 13, 4, 0.18) 72%, rgba(28, 13, 4, 0));
  opacity: 0;
  pointer-events: none;
}
.rise {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 24px calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  color: #fff8ec;
  text-shadow: 0 2px 16px rgba(36, 16, 4, 0.6), 0 1px 3px rgba(36, 16, 4, 0.55);
}
.js .rise { visibility: hidden; }
.monogram { position: relative; width: 92px; height: 92px; margin: 0 auto 4px; display: grid; place-items: center; color: #f3d690; }
.spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff5cf;
  box-shadow: 0 0 8px 2px rgba(255, 222, 146, 0.85);
  opacity: 0;
  animation: twinkle 2.8s ease-in-out infinite;
}
.spark:nth-of-type(1) { top: 2%; left: 22%; }
.spark:nth-of-type(2) { top: 18%; right: -4%; animation-delay: 0.6s; }
.spark:nth-of-type(3) { bottom: 8%; left: -6%; animation-delay: 1.2s; }
.spark:nth-of-type(4) { bottom: -4%; right: 20%; animation-delay: 1.8s; }
.spark:nth-of-type(5) { top: 46%; left: 104%; width: 3px; height: 3px; animation-delay: 2.3s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
.monogram svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.monogram span { font-family: var(--font-caps); font-size: 19px; letter-spacing: 0.18em; text-indent: 0.18em; text-shadow: 0 1px 8px rgba(36, 16, 4, 0.8); }
.monogram svg { filter: drop-shadow(0 1px 4px rgba(36, 16, 4, 0.7)); }
.rise__names { font-family: var(--font-script); font-size: clamp(42px, 11.5vw, 60px); line-height: 1.2; color: #fff8ec; }
html[lang="hi"] .rise__names { font-family: var(--font-hi-display); font-size: clamp(32px, 9vw, 42px); line-height: 1.45; }
.rise__date { font-family: var(--font-caps); font-size: 12px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; color: rgba(255, 246, 226, 0.9); margin-top: 4px; }
html[lang="hi"] .rise__date { font-family: var(--font-hi); letter-spacing: 0.04em; text-indent: 0; font-size: 16px; text-transform: none; }
.rise__cue { display: inline-grid; justify-items: center; gap: 2px; margin-top: 14px; font-family: var(--font-caps); font-size: 10.5px; letter-spacing: 0.3em; text-indent: 0.3em; color: #f3d690; text-decoration: none; text-transform: uppercase; }
.rise__cue svg { width: 18px; height: 18px; animation: nudge 1.8s ease-in-out infinite; }
html[lang="hi"] .rise__cue { font-family: var(--font-hi); letter-spacing: 0.04em; text-indent: 0; font-size: 14px; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Top bar: language + music */
.topbar {
  position: fixed;
  z-index: 40;
  top: max(12px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}
.chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(24, 10, 6, 0.58);
  color: #fff8ea;
  font-family: var(--font-caps);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip .hi { font-family: var(--font-hi); font-size: 15px; letter-spacing: 0; }
.chip[aria-pressed="true"] .bars i { animation-play-state: running; }
.bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.bars i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; transform: scaleY(0.35); animation: eq 1s ease-in-out infinite paused; }
.bars i:nth-child(2) { animation-delay: -0.45s; }
.bars i:nth-child(3) { animation-delay: -0.75s; }
.bars i:nth-child(4) { animation-delay: -0.2s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* ---------- Paper ---------- */

.paper {
  position: relative;
  z-index: 1;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 60% at 50% 0%, var(--paper), var(--paper-2));
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
.js .paper .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .paper .reveal.is-in { opacity: 1; transform: none; }
.lead:empty { display: none; }

.sheet { position: relative; max-width: 600px; margin: 0 auto; padding: 56px var(--gutter) 10px; text-align: center; }
.sheet + .sheet { padding-top: 34px; }

.frame {
  position: relative;
  padding: 38px 22px 34px;
  border: 1px solid var(--accent-soft);
  outline: 1px solid var(--accent-soft);
  outline-offset: -7px;
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid var(--accent);
}
.frame::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }

.eyebrow {
  font-family: var(--font-caps);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}
html[lang="hi"] .eyebrow { font-family: var(--font-hi); font-size: 16px; letter-spacing: 0.04em; text-indent: 0; text-transform: none; }
.title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 54px);
  line-height: 1.2;
  color: var(--title);
  margin: 2px 0 4px;
}
html[lang="hi"] .title { font-family: var(--font-hi-display); font-size: clamp(30px, 8.4vw, 40px); line-height: 1.45; }
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 18px;
  color: var(--accent);
}
.rule::before, .rule::after { content: ""; width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.rule::after { transform: scaleX(-1); }
.rule svg { width: 16px; height: 16px; }

.art-img { margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(80, 40, 10, 0.08)); }
.theme-utsav .art-img { filter: none; }
.plate { display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: var(--plate); }
.theme-utsav .plate { padding: 16px; box-shadow: 0 0 0 1px rgba(220, 176, 90, 0.55), 0 0 0 6px rgba(44, 10, 18, 0.9), 0 0 0 7px rgba(220, 176, 90, 0.35), 0 16px 34px rgba(0, 0, 0, 0.45); }

/* Invocation */
.ganesha { width: min(168px, 44vw); }
.om { font-family: var(--font-hi); font-size: 20px; color: var(--title); margin-top: 6px; }
.shloka { font-family: var(--font-hi); font-size: 16.5px; line-height: 1.9; color: var(--ink-soft); margin-top: 6px; }
.shloka span { display: block; }

/* Invitation */
.lead { font-style: italic; font-size: 19px; color: var(--ink-soft); max-width: 28em; margin: 0 auto; }
html[lang="hi"] .lead { font-style: normal; font-size: 17.5px; }
.lead--after { margin-top: 14px; }
.dear { font-family: var(--font-script); font-size: 32px; color: var(--title); margin-bottom: 6px; }
html[lang="hi"] .dear { font-family: var(--font-hi-display); font-size: 25px; line-height: 1.5; }
.couple { margin: 16px 0 6px; }
.person__name { font-family: var(--font-script); font-size: clamp(56px, 16vw, 78px); line-height: 1.15; color: var(--title); padding: 0 0.15em; }
html[lang="hi"] .person__name { font-family: var(--font-hi-display); font-size: clamp(40px, 11vw, 52px); line-height: 1.45; }
.person__parents { font-size: 16.5px; color: var(--ink-soft); text-wrap: balance; }
html[lang="hi"] .person__parents { font-size: 16px; }
.weds { font-family: var(--font-caps); font-size: 12px; letter-spacing: 0.45em; text-indent: 0.45em; text-transform: uppercase; color: var(--accent); margin: 14px 0 6px; }
html[lang="hi"] .weds { font-family: var(--font-hi-display); font-size: 22px; letter-spacing: 0; text-indent: 0; text-transform: none; }
.when {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 22px auto 6px;
  font-family: var(--font-caps);
  color: var(--ink);
}
.when__day { font-size: 60px; line-height: 1; color: var(--title); padding-right: 16px; border-right: 1px solid var(--accent-soft); }
.when__rest { display: grid; gap: 7px; text-align: left; }
.when__month { font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }
.when__weekday { font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-soft); }
html[lang="hi"] .when__month, html[lang="hi"] .when__weekday { font-family: var(--font-hi); font-size: 17px; letter-spacing: 0.02em; text-transform: none; }
.time { font-family: var(--font-caps); font-size: 12.5px; letter-spacing: 0.24em; text-indent: 0.24em; text-transform: uppercase; color: var(--ink-soft); margin: 6px 0 12px; }
html[lang="hi"] .time { font-family: var(--font-hi); letter-spacing: 0.02em; text-indent: 0; font-size: 16px; text-transform: none; }
.place__name { font-family: var(--font-caps); font-size: 18px; letter-spacing: 0.08em; color: var(--ink); }
html[lang="hi"] .place__name { font-family: var(--font-hi); font-size: 20px; letter-spacing: 0; font-weight: 600; }
.place__addr { font-style: italic; color: var(--ink-soft); font-size: 16.5px; }
html[lang="hi"] .place__addr { font-style: normal; font-size: 15.5px; }

/* Countdown */
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; margin: 8px auto 0; }
.count__unit {
  display: grid;
  place-content: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--accent-soft);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--accent-soft);
}
.count__num { font-family: var(--font-caps); font-size: clamp(22px, 7vw, 32px); line-height: 1; color: var(--title); font-variant-numeric: tabular-nums; }
.count__label { font-family: var(--font-caps); font-size: 9.5px; letter-spacing: 0.18em; text-indent: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 5px; }
html[lang="hi"] .count__label { font-family: var(--font-hi); font-size: 13px; letter-spacing: 0; text-indent: 0; text-transform: none; }
.count__diya { width: 92px; margin: 16px auto 0; }

/* Events */
.event { padding: 8px 0 30px; }
.event + .event { border-top: 1px solid var(--meta); padding-top: 34px; }
.event__art { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-bottom: 8px; }
.event__art .plate img { width: 150px; }
.event__art--pair .plate img { width: 128px; }
.event__name { font-family: var(--font-caps); font-size: 15px; letter-spacing: 0.26em; text-indent: 0.26em; text-transform: uppercase; color: var(--ink); margin-top: 6px; }
html[lang="hi"] .event__name { font-family: var(--font-hi); font-size: 21px; letter-spacing: 0; text-indent: 0; font-weight: 600; text-transform: none; }
.event__quote { font-style: italic; color: var(--ink-soft); margin-top: 4px; }
html[lang="hi"] .event__quote { font-style: normal; font-size: 16px; }
.event__day { font-family: var(--font-script); font-size: clamp(25px, 7.4vw, 34px); line-height: 1.3; color: var(--title); margin-top: 4px; white-space: nowrap; }
html[lang="hi"] .event__day { font-family: var(--font-hi-display); font-size: 24px; line-height: 1.6; }
.event__line { color: var(--ink-soft); }
.event__place { margin-top: 6px; }
.event__art .plate img { animation: float-soft 5.5s ease-in-out infinite alternate; }
.event__art--pair .plate + .plate img { animation-delay: -2.7s; }
@keyframes float-soft { from { transform: translateY(0); } to { transform: translateY(-7px); } }
.events { display: grid; gap: 26px; }
.venue { margin: 18px auto 0; }
.venue__frame { overflow: hidden; }
.venue__art { display: block; width: 100%; height: auto; transform-origin: 50% 62%; animation: ken-burns 16s ease-in-out infinite alternate; }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1.2%); } }
.venue .event__place { display: grid; gap: 2px; margin-top: 12px; }
@media (min-width: 900px) {
  .sheet--wide { max-width: 1120px; }
  .events { grid-template-columns: 1fr 1fr; align-items: stretch; gap: 36px; }
  .events > .event { margin-top: 0 !important; display: flex; flex-direction: column; }
  .events > .event + .event { border-top: 0; }
  .events > .event .actions { margin-top: auto; padding-top: 16px; }
}
@media (min-width: 900px) and (min-height: 640px) {
  .intro__group { width: min(60%, 560px); }
  .intro__om { font-size: 16px; }
  .intro__eyebrow { font-size: 14px; }
  .intro__names { font-size: clamp(56px, 5.4vw, 84px); }
  .intro__date { font-size: 15px; }
  .tap__icon { width: 58px; height: 58px; }
  .monogram { width: 108px; height: 108px; }
  .monogram span { font-size: 22px; }
  .rise__names { font-size: clamp(58px, 5.6vw, 84px); }
  .rise__date { font-size: 14px; }
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-caps);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background-color: var(--meta); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; color: var(--accent); }
html[lang="hi"] .btn { font-family: var(--font-hi); font-size: 15px; letter-spacing: 0.02em; text-transform: none; }
.btn--solid { border-color: transparent; background: var(--btn); background-size: 200% auto; color: var(--btn-ink); box-shadow: 0 10px 22px rgba(90, 60, 10, 0.22); }
.btn--solid svg { color: currentColor; }
.btn--solid:hover { background-color: transparent; background-position: 100% center; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.cal { position: relative; }
.cal > summary { list-style: none; }
.cal > summary::-webkit-details-marker { display: none; }
.cal__menu {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  display: grid;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--accent-soft);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  text-align: left;
}
.cal__menu a { padding: 11px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.cal__menu a:hover { background: var(--meta); }

/* Venue */

/* RSVP */
.rsvp-intro { color: var(--ink-soft); margin-bottom: 18px; }
.rsvp-intro strong { color: var(--ink); font-weight: 600; }
.form { text-align: left; }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > label:not(.check), .field > legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-family: var(--font-caps);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
html[lang="hi"] .field > label:not(.check), html[lang="hi"] .field > legend { font-family: var(--font-hi); font-size: 15px; letter-spacing: 0.02em; text-transform: none; }
.opt { font-family: var(--font-body); font-style: italic; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
html[lang="hi"] .opt { font-family: var(--font-hi); font-style: normal; }
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--accent-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
}
.input:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.input::placeholder { color: var(--ink-soft); opacity: 0.55; }
textarea.input { min-height: 88px; resize: vertical; line-height: 1.45; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; flex: 1 1 210px; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  color: var(--ink-soft);
  text-align: center;
  transition: all 0.2s ease;
}
.pill input:checked + span { border-color: var(--accent); background: var(--btn); color: var(--btn-ink); box-shadow: 0 6px 16px rgba(90, 60, 10, 0.18); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper { display: inline-grid; grid-template-columns: 46px 64px 46px; align-items: center; border: 1px solid var(--accent-soft); border-radius: 999px; }
.stepper button { height: 46px; border: 0; background: none; color: var(--accent); font-size: 22px; cursor: pointer; }
.stepper input { width: 100%; border: 0; background: none; text-align: center; font-size: 20px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 15.5px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.submit { width: 100%; min-height: 52px; font-size: 13px; }
.status { min-height: 1.5em; margin-top: 12px; text-align: center; color: var(--ink-soft); }
.status.is-error { color: #b3261e; }
.theme-utsav .status.is-error { color: #ffb8aa; }
.thanks { text-align: center; }
.thanks__title { font-family: var(--font-script); font-size: 58px; line-height: 1.2; color: var(--title); }
html[lang="hi"] .thanks__title { font-family: var(--font-hi-display); font-size: 40px; line-height: 1.5; }
.thanks__text { color: var(--ink-soft); margin: 4px auto 18px; max-width: 24em; }

/* RSVP contacts: picking a family opens a line with whom to reply to. The row grows smoothly (0fr → 1fr), the gold
   rules draw outwards, and the names rise in with one sweep of light; switching family cross-fades the names in place. */
.hosts { --shine: #e8c572; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s cubic-bezier(0.22, 0.8, 0.24, 1); }
.theme-utsav .hosts { --shine: #fff4d6; }
.theme-bagh .hosts { --shine: #efc39c; }
.hosts__clip { min-height: 0; overflow: hidden; text-align: center; visibility: hidden; transition: visibility 0s linear 0.6s; }
.hosts__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding-top: 16px;
  font-family: var(--font-caps);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hosts__label span { padding-left: 0.34em; }
.hosts__label::before, .hosts__label::after {
  content: "";
  flex: 0 0 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.3s ease;
}
.hosts__label::after { background: linear-gradient(270deg, transparent, var(--accent)); transform-origin: 0 50%; }
.hosts__names { display: grid; justify-items: center; margin: 0; padding: 0 0 6px; }
.hosts__name {
  grid-area: 1 / 1;
  font-family: var(--font-script);
  font-size: clamp(22px, 6.6vw, 30px);
  line-height: 1.4;
  color: var(--title);
  text-shadow: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
html[lang="hi"] .hosts__label { font-family: var(--font-hi); font-size: 15px; letter-spacing: 0.04em; text-transform: none; }
html[lang="hi"] .hosts__label span { padding-left: 0; }
html[lang="hi"] .hosts__name { font-family: var(--font-hi-display); font-size: clamp(21px, 6vw, 25px); line-height: 1.7; }
.hosts[data-side="rahul"], .hosts[data-side="tanya"] { grid-template-rows: 1fr; }
:is(.hosts[data-side="rahul"], .hosts[data-side="tanya"]) .hosts__clip { visibility: visible; transition-delay: 0s; }
:is(.hosts[data-side="rahul"], .hosts[data-side="tanya"]) .hosts__label { opacity: 1; transition: opacity 0.5s ease 0.12s; }
:is(.hosts[data-side="rahul"], .hosts[data-side="tanya"]) .hosts__label::before,
:is(.hosts[data-side="rahul"], .hosts[data-side="tanya"]) .hosts__label::after { transform: none; transition: transform 0.8s cubic-bezier(0.22, 0.8, 0.24, 1) 0.2s; }
.hosts[data-side="rahul"] .hosts__name[data-for="rahul"],
.hosts[data-side="tanya"] .hosts__name[data-for="tanya"] {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.5s ease 0.2s, transform 0.75s cubic-bezier(0.22, 0.8, 0.24, 1) 0.2s, visibility 0s;
}
/* The sweep of light lives on the inner ink span, apart from the moving span (Safari mis-paints clipped text that moves). */
.hosts__ink { display: inline-block; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hosts__ink {
    background: linear-gradient(100deg, var(--title) 0 38%, var(--shine) 50%, var(--title) 62% 100%) 100% 0 / 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .hosts[data-side="rahul"] [data-for="rahul"] .hosts__ink,
  .hosts[data-side="tanya"] [data-for="tanya"] .hosts__ink { animation: host-shine 1.6s ease-in-out 0.55s both; }
}
@keyframes host-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Blessings */
.wishes { display: flex; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 16px; overflow-x: auto; scroll-snap-type: x mandatory; text-align: left; }
.wish { flex: 0 0 min(78vw, 300px); margin: 0; padding: 22px 20px 18px; scroll-snap-align: center; border: 1px solid var(--accent-soft); border-radius: 18px; background: var(--meta); }
.wish blockquote { margin: 0 0 10px; font-style: italic; white-space: pre-line; overflow-wrap: anywhere; }
.wish figcaption { font-family: var(--font-caps); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.wishes__empty { flex: 1; text-align: center; font-style: italic; color: var(--ink-soft); }
.wishes__empty a { color: var(--accent); }

/* Closing */
.garland { width: min(520px, 100%); margin: 0 auto; }
.closing__script { font-family: var(--font-script); font-size: clamp(34px, 9vw, 44px); line-height: 1.25; color: var(--title); margin-top: 6px; }
html[lang="hi"] .closing__script { font-family: var(--font-hi-display); font-size: 30px; line-height: 1.5; }
.closing__from { margin-top: 10px; color: var(--ink-soft); }
.closing__from strong { display: block; text-wrap: balance; font-family: var(--font-caps); font-weight: 500; font-size: 16px; letter-spacing: 0.08em; color: var(--ink); }
html[lang="hi"] .closing__from strong { font-family: var(--font-hi); font-size: 19px; letter-spacing: 0; }
.kalash { width: 88px; margin: 26px auto 0; }
.tag { font-family: var(--font-script); font-size: 30px; color: var(--title); margin-top: 8px; }

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 28px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: #2b1a10;
  color: #fff4dc;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  translate: -50% 12px;
  transition: opacity 0.3s ease, translate 0.3s ease;
}
.toast.is-on { opacity: 1; translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Decorative animations pause when off screen (see data-anim in real.js). */
[data-anim]:not(.in-view), [data-anim]:not(.in-view) * { animation-play-state: paused !important; }

.lead, .rsvp-intro, .event__quote, .closing__script { text-wrap: balance; }


/* Panorama behind the paper cards: it sticks to the screen while the cards scroll over it, and its layers
   drift at their own speeds (--sp from real.js). Transform/opacity only. */
.scenery {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin-bottom: -100vh;
  margin-bottom: -100svh;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}
.paper--scenic > :not(.scenery) { position: relative; z-index: 1; }
.scenery__far {
  position: absolute;
  inset: -5% -2% -9%;
  background: var(--pano-far) 66% 58% / cover no-repeat;
  transform: translate3d(0, calc(var(--sp, 0) * -5%), 0);
  will-change: transform;
}
.scenery__near {
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: -7%;
  height: 36%;
  background: var(--pano-near) 8% 100% / cover no-repeat;
  transform: translate3d(0, calc(var(--sp, 0) * -14%), 0);
  will-change: transform;
}
@media (min-width: 900px) { .scenery__far { background-position: center 58%; } .scenery__near { background-position: center bottom; } }
.scenery__latkan, .scenery__spray { position: absolute; display: none; }
.scenery__latkan { top: -14px; width: clamp(92px, 8.5vw, 150px); transform-origin: 50% 0; animation: sway-soft 7s ease-in-out infinite alternate; }
.scenery__latkan--l { left: 7vw; }
.scenery__latkan--r { right: 7vw; animation-delay: -3.5s; }
.scenery__spray { bottom: -24px; width: clamp(170px, 17vw, 280px); transform: translate3d(0, calc(var(--sp, 0) * 22px), 0); }
.scenery__spray--l { left: -18px; scale: 1 -1; }
.scenery__spray--r { right: -18px; scale: -1 -1; }
@keyframes sway-soft { from { transform: rotate(-1.8deg); } to { transform: rotate(1.8deg); } }
@media (min-width: 900px) { .scenery__latkan, .scenery__spray { display: block; } }
@media (prefers-reduced-motion: reduce) { .scenery__far, .scenery__near, .scenery__spray { transform: none; } }

/* Jaimala — a living scene near the end of the invitation */
.finale__media { position: relative; overflow: hidden; border-radius: 18px; background: #1f1109; box-shadow: 0 12px 28px rgba(70, 40, 10, 0.24); }
.finale__media::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(243, 214, 144, 0.55); border-radius: 13px; pointer-events: none; }
.finale__video { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 72%; }
.finale__video::-webkit-media-controls, .finale__video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* QA pass (phones, landscape, tablets) */
/* Short screens (phones on their side, tiny in-app browsers): smaller words on the doors and over the lake. */
@media (max-height: 480px) {
  .intro__om { font-size: 12px; }
  .intro__eyebrow { font-size: 10.5px; margin-top: 4px; }
  .intro__names { font-size: 36px; }
  .intro__date { font-size: 11px; margin-top: 2px; }
  .tap { padding: 4px 12px; }
  .tap__icon { width: 40px; height: 40px; }
  .rise { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .monogram { width: 60px; height: 60px; }
  .monogram span { font-size: 14px; }
  .rise__names { font-size: 38px; }
  .rise__cue { margin-top: 6px; }
}
/* Words that sit straight on the panorama get a soft paper halo so they stay easy to read. */
.paper--scenic .card--plain { isolation: isolate; }
.paper--scenic .card--plain::before {
  content: "";
  position: absolute;
  inset: -34px -10px;
  z-index: -1;
  border-radius: 44px;
  background: radial-gradient(ellipse 72% 64% at 50% 50%, rgba(251, 244, 228, 0.96) 58%, rgba(251, 244, 228, 0.82) 76%, rgba(251, 244, 228, 0) 100%);
  pointer-events: none;
}
.paper--scenic .sheet > .eyebrow, .paper--scenic .sheet > .title { text-shadow: 0 0 14px rgba(251, 244, 228, 0.95), 0 0 5px rgba(251, 244, 228, 0.95); }
.eyebrow, .closing__from { text-wrap: balance; }
/* Blessings: a lone blessing sits in the middle, many scroll sideways as before. */
.wish:first-of-type { margin-left: auto; }
.wish:last-of-type { margin-right: auto; }
/* RSVP: fields sit on ivory (the pressed lattice stays out of the typing), the button above the corner roses. */
.skin-floral .input { background: rgba(255, 252, 244, 0.94); padding-left: 10px; padding-right: 10px; border-radius: 8px 8px 0 0; }
.submit { position: relative; z-index: 4; }
/* Wide screens: events breathe a little and never touch the edges; the paintings line up. */
.events { margin-top: 26px; }
@media (min-width: 900px) {
  .sheet--wide { padding-left: clamp(24px, 4vw, 48px); padding-right: clamp(24px, 4vw, 48px); }
  .events > .event .venue { margin-top: auto; }
  .events > .event .actions { margin-top: 0; }
}
.pill span { white-space: nowrap; }
.event__name { text-wrap: balance; }
.card .title, .finale .title { text-wrap: balance; }
