/* ==========================================================================
   Pavan Kalyan & Suchita — a printed Telugu subhalekha, shot as a slow film
   One serif. Ivory and night. Gold as a hairline, never a fill.
   ========================================================================== */


:root {
  --ivory: #F3EADA;
  --paper: #F6EFE2;
  --night: #0F0E24;
  --night-deep: #0A0918;
  --glint-x: 50%;
  --glint-y: 50%;
  --gold: #B8923A;
  --gold-light: #D9BC77;
  --gold-pale: #EADFC2;
  --ink: #1B1A17;
  --ink-soft: #5B554A;
  --ink-faint: #8E877A;
  --crimson: #8F112B;
  --hairline: rgba(184, 146, 58, 0.55);
  --hairline-light: rgba(217, 188, 119, 0.45);

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --telugu: 'Noto Serif Telugu', serif;
  --telugu-verse: 'Suranna', 'Noto Serif Telugu', serif;

  --measure: 34em;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--night-deep); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  background: var(--night);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga', 'kern';
}
body.doors-locked { overflow: hidden; height: 100vh; height: 100dvh; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.6em; vertical-align: 0.5em; }

html[data-lang="en"] .lang-te { display: none !important; }
html[data-lang="te"] .lang-en { display: none !important; }
html[data-lang="te"] body { font-family: var(--telugu); }
.lang-te { font-family: var(--telugu); }
.danda { font-size: 0.7em; vertical-align: 0.08em; display: inline-block; margin: 0 1px; }

.br-wide { display: none; }

/* ---------- Shared typographic parts ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.eyebrow--gold {
  color: var(--gold-light);
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-light) 40%, #FFF3CF 50%, var(--gold-light) 60%, var(--gold) 100%);
  background-size: 260% 100%;
  background-position: calc(100% - var(--glint-x)) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow .lang-te { font-size: 13px; letter-spacing: 0.12em; text-transform: none; }

.rule {
  display: block;
  width: 100%;
  max-width: 240px;
  height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
  transform-origin: 50% 50%;
}
.rule--short { max-width: 72px; margin: 18px auto; }
.chapter--night .rule { background: linear-gradient(90deg, transparent, var(--hairline-light), transparent); }

.chapter-title {
  font-weight: 300;
  font-size: clamp(30px, 6.4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: 10px;
}
.chapter-title .lang-te { font-weight: 400; font-size: 0.86em; }
.chapter-sub {
  margin-top: 8px;
  font-size: 17px;
  font-style: italic;
  color: var(--ink-soft);
}
.chapter-sub .lang-te { font-style: normal; font-size: 15px; }

.text-link {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.text-link:hover { border-color: var(--ink); }
.text-link .lang-te { letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
.text-link--light { color: var(--gold-pale); border-color: var(--hairline-light); font-size: 12px; }
.text-link--light:hover { border-color: var(--gold-pale); }

/* language switch: just words and a dot */
.lang-switch { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch button {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(234, 223, 194, 0.6);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.lang-switch button.te { font-family: var(--telugu); letter-spacing: 0.02em; text-transform: none; font-size: 13px; }
.lang-switch button.active { color: var(--gold-pale); border-bottom-color: var(--hairline-light); }
.lang-sep { color: rgba(234, 223, 194, 0.45); }

/* ---------- Corner controls (after the gate) ---------- */
.corner-controls {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold-pale);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
  pointer-events: none;
}
body:not(.doors-locked) .corner-controls { opacity: 1; transform: none; pointer-events: auto; }
.corner-controls .lang-switch button { color: rgba(234, 223, 194, 0.55); }
.corner-controls .lang-switch button.active { color: var(--gold-pale); border-bottom-color: var(--hairline-light); }
.glyph-btn { color: rgba(234, 223, 194, 0.8); display: inline-flex; padding: 4px; transition: color 0.3s; filter: drop-shadow(0 1px 6px rgba(0,0,0,0.6)); }
.glyph-btn:hover { color: #fff; }
.glyph-btn.is-playing .mute-line { display: none; }

/* ==========================================================================
   THE GATE
   ========================================================================== */
#temple-doors-gate {
  --iris: 0%;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--night-deep);
  overflow: hidden;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent calc(var(--iris) - 14%), #000 var(--iris));
  mask-image: radial-gradient(circle at 50% 50%, transparent calc(var(--iris) - 14%), #000 var(--iris));
}
#temple-doors-gate.is-opened { display: none; }
#intro-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#temple-doors-gate.no-gl #intro-gl { display: none; }
.intro-css-fallback {
  position: absolute; inset: 0; display: none;
  background:
    radial-gradient(circle at 50% 46%, rgba(217, 188, 119, 0.22) 0%, transparent 46%),
    linear-gradient(180deg, #0D1B45 0%, #0A1430 55%, #060C22 100%);
}
#temple-doors-gate.no-gl .intro-css-fallback { display: block; }
#intro-flash {
  position: absolute; inset: 0; z-index: 20; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, #FBF3DC 40%, #E8D2A0 100%);
}

.gate-topbar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 20px; right: 20px;
  z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
}

.gate-tap-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 24px 20px calc(40px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 50%, rgba(6, 12, 34, 0.55) 76%, rgba(6, 12, 34, 0.92) 100%);
  cursor: pointer;
}
.chakra-cue {
  position: absolute;
  left: 50%;
  top: var(--seal-y, 48.2%);
  width: var(--seal-d, min(36vw, 230px));
  height: var(--seal-d, min(36vw, 230px));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.chakra-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 221, 158, 0.78);
  box-shadow: 0 0 22px rgba(217, 188, 119, 0.35);
  animation: chakraRipple 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.chakra-ring--2 { animation-delay: 1.4s; }
@keyframes chakraRipple {
  0% { transform: scale(0.96); opacity: 0.9; }
  80% { transform: scale(1.36); opacity: 0; }
  100% { transform: scale(1.36); opacity: 0; }
}
.chakra-badge {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  transform: translateX(-50%);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(8, 15, 38, 0.82);
  border: 1px solid rgba(217, 188, 119, 0.58);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-pale);
  animation: badgeFloat 2.8s ease-in-out infinite;
}
.chakra-badge .lang-te { letter-spacing: 0.05em; text-transform: none; font-size: 12.5px; }
.chakra-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F3DD9E;
  box-shadow: 0 0 8px #F3DD9E;
}
@keyframes badgeFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 4px); }
}
.gate-plaque { text-align: center; max-width: 560px; width: 100%; }
.gate-names {
  margin-top: 10px;
  font-weight: 300;
  font-size: clamp(34px, 9vw, 60px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--ivory);
}
.gate-names em { font-style: italic; font-weight: 300; color: var(--gold-light); }
.gate-names .lang-te { font-weight: 400; font-size: 0.8em; }
.gate-meta {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(234, 223, 194, 0.75);
}
.gate-meta .lang-te { letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
.gate-enter {
  margin-top: 30px;
  padding: 14px 34px;
  border: 1px solid var(--hairline-light);
  color: var(--gold-pale);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  animation: enterBreath 3.6s ease-in-out infinite;
}
.gate-enter:hover { background: rgba(217, 188, 119, 0.12); border-color: var(--gold-light); }
.gate-enter .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 15px; }
@keyframes enterBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 188, 119, 0); }
  50% { box-shadow: 0 0 0 10px rgba(217, 188, 119, 0.07), 0 0 40px rgba(217, 188, 119, 0.12); }
}
.gate-hint { margin-top: 14px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(234, 223, 194, 0.4); }
.gate-hint .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 12px; }

/* ==========================================================================
   CHAPTERS
   ========================================================================== */
.chapter { position: relative; }
.chapter:not(#ch-portrait) { content-visibility: auto; contain-intrinsic-size: auto 100vh; contain-intrinsic-size: auto 100svh; }
.chapter--paper { background: var(--ivory); color: var(--ink); padding: clamp(72px, 12vh, 140px) 24px; }
.chapter--night {
  background: var(--night);
  color: var(--ivory);
  padding: clamp(72px, 12vh, 140px) 24px;
  --ink: var(--ivory);
  --ink-soft: rgba(243, 234, 218, 0.74);
  --ink-faint: rgba(243, 234, 218, 0.5);
  --hairline: rgba(217, 188, 119, 0.42);
  --crimson: #C9304F;
}
/* one diya just out of frame: a warm off-centre glow per chapter, alternating sides */
.chapter--night::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 12%, rgba(184, 120, 50, 0.16) 0%, rgba(184, 120, 50, 0) 70%),
    radial-gradient(50% 40% at 88% 100%, rgba(143, 17, 43, 0.12) 0%, rgba(143, 17, 43, 0) 70%);
}
.chapter--night:nth-of-type(even)::before {
  background:
    radial-gradient(60% 50% at 84% 10%, rgba(184, 120, 50, 0.16) 0%, rgba(184, 120, 50, 0) 70%),
    radial-gradient(50% 40% at 10% 100%, rgba(143, 17, 43, 0.12) 0%, rgba(143, 17, 43, 0) 70%);
}
.chapter--night > * { position: relative; }
.chapter--center { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* subtle paper grain on ivory chapters */
.chapter--paper::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.chapter--paper > * { position: relative; }

.page { max-width: 680px; margin: 0 auto; text-align: center; }
.card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) clamp(22px, 5vw, 56px);
  background: var(--paper);
  color: var(--ink);
  --ink: #1B1A17;
  --ink-soft: #5B554A;
  --ink-faint: #8E877A;
  --hairline: rgba(184, 146, 58, 0.55);
  --crimson: #8F112B;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(184, 146, 58, 0.35);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* foil glint: a sheen that follows the light */
.card::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 32% at var(--glint-x) var(--glint-y), rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
}
.card > * { position: relative; }
.card .rule, .chapter--night .rule {
  background: linear-gradient(90deg, transparent 0%, var(--hairline) 35%, #FFF3CF 50%, var(--hairline) 65%, transparent 100%);
  background-size: 300% 100%;
  background-position: calc(100% - var(--glint-x)) 0;
}
.page--wide { max-width: 760px; }

/* ---------- I · Portrait ---------- */
.chapter--portrait {
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--ivory);
}
.portrait-media { position: absolute; inset: -6% 0; will-change: transform; }
.portrait-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transform-origin: 50% 35%; }
.portrait-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 14, 36, 0.42) 0%, rgba(15, 14, 36, 0) 28%, rgba(15, 14, 36, 0) 45%, rgba(15, 14, 36, 0.78) 78%, rgba(15, 14, 36, 0.97) 100%);
}
.portrait-copy {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px calc(98px + env(safe-area-inset-bottom));
  text-align: center;
}
.display-names {
  margin-top: 10px;
  font-weight: 300;
  font-size: clamp(44px, 12vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.005em;
  color: var(--ivory);
}
.display-names em { font-style: italic; font-weight: 300; color: var(--gold-light); font-size: 0.78em; margin-right: 0.08em; }
.display-names .lang-te { font-weight: 400; font-size: 0.74em; line-height: 1.16; }
.portrait-meta {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(234, 223, 194, 0.8);
}
.portrait-meta .lang-te { letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  transition: opacity 0.5s ease;
}
.scroll-cue.is-scrolled { opacity: 0 !important; pointer-events: none; }
.scroll-cue-label {
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-pale);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}
.scroll-cue-label .lang-te { letter-spacing: 0.05em; text-transform: none; font-size: 12.5px; }
.scroll-cue-chev {
  display: inline-flex;
  color: var(--gold-light);
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.85));
  animation: cueBob 2s ease-in-out infinite;
}
@keyframes cueBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.scroll-cue-line {
  position: relative;
  width: 1px;
  height: 28px;
  background: rgba(217, 188, 119, 0.32);
  overflow: hidden;
}
.scroll-cue-line span {
  position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--gold-light); animation: cueDrop 2.4s ease-in-out infinite;
}
@keyframes cueDrop { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* ---------- II · Subhalekha ---------- */
.card-head { margin-bottom: 44px; }
.deity-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.deity-row img { width: 52px; height: 60px; object-fit: contain; opacity: 0.92; }
.invocation { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.invocation .lang-te { letter-spacing: 0.08em; text-transform: none; font-size: 14px; font-family: var(--telugu-verse); }
.slokam { margin-top: 20px; font-family: var(--telugu-verse); font-size: 17px; line-height: 1.7; color: var(--ink-soft); }

.ancestors { font-style: italic; font-size: 17px; color: var(--ink-soft); }
.ancestors .lang-te { font-style: normal; font-size: 15px; }
.hosts {
  margin-top: 22px;
  font-weight: 400;
  font-size: clamp(26px, 5.6vw, 36px);
  line-height: 1.2;
  color: var(--ink);
}
.hosts .lang-te { font-size: 0.82em; font-weight: 500; }
.solicit { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: var(--measure); margin-left: auto; margin-right: auto; }
.solicit .lang-te { font-size: 16px; }

.couple-block { margin-top: 44px; }
.couple-block .role { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.couple-block .role .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 14px; }
.couple-block .name {
  font-weight: 300;
  font-size: clamp(44px, 11vw, 76px);
  line-height: 1.02;
  color: var(--ink);
  margin: 6px 0 2px;
}
.couple-block .name .lang-te { font-weight: 400; font-size: 0.78em; }
.couple-block .name small { font-size: 0.42em; color: var(--ink-soft); font-weight: 400; margin-left: 6px; }
.couple-block .with { margin: 14px 0 22px; font-size: 24px; color: var(--gold); }
.couple-block .with em { font-style: italic; font-weight: 300; }
.couple-block .parents { margin-top: 18px; font-size: 16.5px; font-style: italic; line-height: 1.6; color: var(--ink-soft); }
.couple-block .parents .lang-te { font-style: normal; font-size: 15px; }

.panchangam { font-size: 19px; line-height: 1.6; color: var(--ink); max-width: var(--measure); margin: 0 auto; }
.panchangam .lang-te { font-size: 16px; line-height: 1.85; color: var(--ink-soft); }
.venue-line { margin-top: 14px; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.venue-line .lang-te { letter-spacing: 0.04em; text-transform: none; font-size: 14px; }

/* ---------- III · Muhurtham ---------- */
.diya { width: 80px; height: 130px; margin-bottom: 14px; }
.muhurtham-time {
  margin-top: 10px;
  font-weight: 300;
  font-size: clamp(84px, 24vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ivory);
  font-variant-numeric: lining-nums;
}
.muhurtham-time .colon { color: var(--gold-light); font-weight: 300; margin: 0 0.02em; animation: colonBreath 2.4s ease-in-out infinite; }
.muhurtham-time .ampm { font-size: 0.22em; font-style: italic; color: var(--gold-light); margin-left: 0.2em; letter-spacing: 0; }
@keyframes colonBreath { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.muhurtham-when { margin-top: 22px; font-size: 18px; font-style: italic; color: rgba(246, 239, 226, 0.82); max-width: 30em; }
.muhurtham-when .lang-te { font-style: normal; font-size: 15px; }
.muhurtham-nakshatram { margin-top: 10px; font-size: 12.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-light); }
.muhurtham-nakshatram .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 14px; }
.countdown-sentence { font-size: 17px; font-style: italic; color: rgba(246, 239, 226, 0.62); }
.countdown-sentence .lang-te { font-style: normal; font-size: 14.5px; }

/* ---------- IV · Programme ---------- */
.programme-wrap { max-width: 1040px; margin: 0 auto; }
.programme-head { text-align: center; margin-bottom: 48px; }
.programme-grid { display: block; }
.programme-visual { display: none; }
.programme { list-style: none; }
.programme-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 26px 0;
  border-top: 1px solid var(--hairline);
}
.programme-row:last-child { border-bottom: 1px solid var(--hairline); }
.programme-row .time {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.1;
  color: var(--gold-light);
  font-variant-numeric: lining-nums tabular-nums;
  margin-bottom: 2px;
}
.programme-row .time > span {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.programme-row .time-num {
  font-family: var(--serif);
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--gold-light);
  line-height: 1;
}
.programme-row .time-period {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.programme-row .time .lang-te .time-period {
  font-family: var(--telugu);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 14px;
  font-weight: 400;
}
.programme-row--muhurtham .time-num {
  font-size: clamp(27px, 5.6vw, 34px);
  color: #F5DFA0;
  text-shadow: 0 2px 16px rgba(217, 188, 119, 0.32);
}
.programme-row h3 { font-weight: 400; font-size: clamp(24px, 5.4vw, 32px); line-height: 1.15; color: var(--ink); }
.programme-row h3 .lang-te { font-size: 0.84em; font-weight: 500; }
.programme-row .what p { margin-top: 6px; font-size: 17px; line-height: 1.55; color: var(--ink-soft); max-width: 30em; }
.programme-row .what p .lang-te { font-size: 15px; }
.row-figure { margin: 0 0 14px; overflow: hidden; }
.row-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 25%; cursor: zoom-in; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.programme-row.is-in .row-figure img { transform: scale(1); }
.programme-row--muhurtham h3 { color: var(--crimson); }
.chapter--night .programme-visual img { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.chapter--night .row-figure img, .chapter--night .map-frame { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }

/* ---------- V · Portraits ---------- */
.portraits-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.portraits-quote { margin-top: 12px; font-weight: 300; font-size: clamp(26px, 6vw, 40px); line-height: 1.2; color: var(--ivory); }
.portraits-quote .lang-te { font-size: 0.74em; font-weight: 400; }
.portrait-strip {
  display: flex;
  gap: 16px;
  margin: 0 -24px;
  padding: 0 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.portrait-strip::-webkit-scrollbar { display: none; }
.portrait-strip figure { flex: 0 0 82vw; max-width: 520px; scroll-snap-align: center; cursor: zoom-in; }
.portrait-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.portrait-strip figcaption { margin-top: 12px; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-light); }
.portrait-strip figcaption .lang-te { letter-spacing: 0.05em; text-transform: none; font-size: 13px; }
.portraits-note { max-width: 560px; margin: 44px auto 0; text-align: center; font-size: 17px; line-height: 1.65; color: rgba(246, 239, 226, 0.72); font-style: italic; }
.portraits-note .lang-te { font-style: normal; font-size: 15px; }

/* ---------- VI · Venue & blessing ---------- */
.map-frame {
  margin: 34px auto 0;
  padding: 6px;
  border: 1px solid var(--hairline);
}
.map-frame iframe {
  display: block; width: 100%; height: 300px; border: 0;
  filter: grayscale(1) sepia(0.4) contrast(0.9) brightness(0.72);
  transition: filter 0.6s ease;
}
.map-frame:hover iframe { filter: none; }
.text-links { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; }

.cordial { margin-top: 6px; }
.cordial-hosts { margin-top: 10px; font-size: clamp(22px, 5vw, 28px); font-weight: 400; color: var(--ink); }
.cordial-hosts .lang-te { font-size: 0.82em; font-weight: 500; }
.cordial-address { margin-top: 8px; font-size: 16px; color: var(--ink-soft); }
.cordial-phones { margin-top: 6px; font-size: 16px; color: var(--ink); font-variant-numeric: lining-nums; letter-spacing: 0.04em; }
.cordial-phones a { border-bottom: 1px solid var(--hairline); }
.cordial-compliments { margin-top: 12px; font-style: italic; font-size: 15px; color: var(--ink-faint); }
.cordial-compliments .lang-te { font-style: normal; font-size: 14px; }

.closing-quote {
  margin: 44px auto 0;
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink-soft);
}
.closing-quote .lang-te { font-style: normal; font-size: 15.5px; line-height: 1.85; }

.closing { margin-top: 56px; }
.namaste { width: 84px; margin: 0 auto 12px; opacity: 0.9; mix-blend-mode: screen; }
.closing-line { font-size: 17px; font-style: italic; color: var(--ink-soft); }
.closing-line .lang-te { font-style: normal; font-size: 15px; }
.monogram { margin-top: 26px; font-weight: 300; font-size: 34px; letter-spacing: 0.18em; color: var(--ink); }
.monogram em { font-style: italic; color: var(--gold); font-size: 0.8em; }
.colophon { margin-top: 10px; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); line-height: 1.8; }
.colophon .lang-te { letter-spacing: 0.03em; text-transform: none; font-size: 12.5px; }

/* ---------- Lightbox & toast ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(6, 12, 34, 0.96);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(92vw, 900px); max-height: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; object-fit: contain; }
.lightbox figcaption { margin-top: 14px; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-light); }
.lightbox-close {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 18px;
  color: var(--gold-pale); font-size: 22px; padding: 8px;
}
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 420; padding: 10px 18px; font-size: 13px; letter-spacing: 0.08em;
  color: var(--ivory); background: rgba(10, 20, 48, 0.92); border: 1px solid var(--hairline-light);
}
.toast[hidden] { display: none; }

/* ---------- Reveal defaults (GSAP drives them) ---------- */
.rv { opacity: 0; }
.no-js .rv { opacity: 1; }

/* Safety net: if scripts never arrive (CDN blocked, runtime error), show everything, plainly. */
html.js-failed .rv, html.js-failed .ink, html.js-failed .seal-stamp, html.js-failed .live-word { opacity: 1 !important; filter: none !important; transform: none !important; }
html.js-failed #temple-doors-gate { display: none !important; }
html.js-failed body.doors-locked { overflow: auto !important; height: auto !important; }
html.js-failed .corner-controls, html.js-failed .thread { opacity: 1 !important; pointer-events: auto !important; }
html.js-failed .portrait-media img { transform: none !important; }

/* ==========================================================================
   WIDE SCREENS
   ========================================================================== */
@media (min-width: 760px) {
  .br-wide { display: inline; }
  .chapter--paper, .chapter--night { padding-left: 48px; padding-right: 48px; }
  .chapter--portrait { align-items: flex-start; }
  .portrait-media img { object-position: 62% 38%; }
  .portrait-veil {
    background:
      linear-gradient(90deg, rgba(15, 14, 36, 0.66) 0%, rgba(15, 14, 36, 0.3) 40%, rgba(15, 14, 36, 0) 68%),
      linear-gradient(180deg, rgba(15, 14, 36, 0.62) 0%, rgba(15, 14, 36, 0.2) 38%, rgba(15, 14, 36, 0) 55%, rgba(15, 14, 36, 0.6) 100%);
  }
  .portrait-copy {
    margin: 0;
    max-width: 46vw;
    text-align: left;
    padding: 13vh 0 0 max(48px, calc((100vw - 1180px) / 2));
  }
  .portrait-copy .portrait-meta { color: rgba(246, 239, 226, 0.92); text-shadow: 0 1px 12px rgba(10, 20, 48, 0.8); }
  .portrait-copy .rule { margin-left: 0; }
  .display-names { font-size: clamp(72px, 8.4vw, 118px); }
  .display-names br { display: none; }
  .display-names .lang-te br { display: none; }

  .page { max-width: 760px; }
  .solicit, .panchangam, .closing-quote { font-size: 21px; }
  .hosts { font-size: 38px; }
  .couple-block .name { font-size: clamp(60px, 7vw, 84px); }
  .programme-row .what p { font-size: 18px; }

  .programme-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) 1.1fr;
    gap: 64px;
    align-items: start;
  }
  .programme-visual {
    display: block;
    position: sticky;
    top: 10vh;
    height: 80vh;
  }
  .programme-visual img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 25%;
    opacity: 0; transition: opacity 0.9s ease; 
  }
  .programme-visual img.is-active { opacity: 1; }
  .row-figure { display: none; }
  .programme-row {
    grid-template-columns: 196px 1fr;
    gap: 28px;
    padding: 30px 0;
  }
  .programme-row .time { padding-top: 2px; flex-direction: column; align-items: flex-start; gap: 4px; }

  .portrait-strip { gap: 24px; margin: 0; padding: 0 0 0 max(24px, calc((100vw - 1180px) / 2)); }
  .portrait-strip figure { flex-basis: 420px; }
  .map-frame iframe { height: 380px; }
}

@media (min-width: 1100px) {
  .page { max-width: 800px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line span, .scroll-cue-chev, .chakra-ring, .chakra-badge, .gate-enter, .muhurtham-time .colon { animation: none; }
}


/* ==========================================================================
   v4 — the thread, ink reveals, drag gallery, day-of marks, seal stamp
   ========================================================================== */

/* ---------- the thread ---------- */
.thread {
  position: fixed;
  top: 0; bottom: 0;
  left: max(14px, calc((100vw - 1180px) / 2 - 36px));
  width: 1px;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
}
body:not(.doors-locked) .thread { opacity: 1; }
.thread-line {
  position: absolute; left: 0; top: 0; width: 1px; height: 100%;
  background: rgba(217, 188, 119, 0.5);
  transform-origin: 50% 0;
  transform: scaleY(0);
}
.thread-bead {
  position: absolute; left: 50%; width: 5px; height: 5px;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 50%;
  background: rgba(217, 188, 119, 0.35);
  transition: transform 0.6s var(--ease), background 0.6s ease, box-shadow 0.6s ease;
}
.thread-bead.is-lit {
  transform: translate(-50%, -50%) scale(1);
  background: var(--gold-light);
  box-shadow: 0 0 10px rgba(217, 188, 119, 0.8);
}
@media (max-width: 759px) { .thread { left: 10px; } }

/* ---------- ink reveals ---------- */
.ink { opacity: 0; filter: blur(6px); transform: translateY(8px); }
.ink.is-inked { opacity: 1; filter: blur(0); transform: none; transition: opacity 1.4s ease, filter 1.6s ease, transform 1.4s var(--ease); }
.name--bride { position: relative; display: inline-block; }
.bindu {
  position: absolute; left: 50%; top: -0.04em;
  width: 0.14em; height: 0.14em; margin-left: -0.07em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #C2213F, var(--crimson) 70%);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s;
}
.name--bride.is-inked .bindu { transform: scale(1); }

/* ---------- drag gallery ---------- */
.portrait-strip { scroll-snap-type: none; cursor: grab; user-select: none; -webkit-user-select: none; overscroll-behavior-x: contain; }
.portrait-strip.is-dragging { cursor: grabbing; }
.portrait-strip.is-dragging figure { pointer-events: none; }
.portrait-strip figure { position: relative; overflow: hidden; transition: transform 0.6s var(--ease); }
.portrait-strip figure .frame { overflow: hidden; aspect-ratio: 4 / 5; }
.portrait-strip figure img { width: 112%; max-width: none; height: 100%; margin-left: -6%; will-change: transform; }
.portrait-strip img { -webkit-user-drag: none; user-drag: none; }
@media (pointer: coarse) { .portrait-strip { scroll-snap-type: x proximity; } .portrait-strip figure { scroll-snap-align: center; } }
.strip-progress { height: 1px; max-width: 240px; margin: 26px auto 0; background: rgba(217, 188, 119, 0.2); position: relative; overflow: hidden; }
.strip-progress span { position: absolute; left: 0; top: 0; height: 100%; width: 30%; background: var(--gold-light); transform-origin: 0 50%; }
.strip-hint { margin-top: 10px; text-align: center; font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(217, 188, 119, 0.5); }
.strip-hint .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 12px; }

/* ---------- day-of programme marks ---------- */
.programme-row { position: relative; }
.programme-row .time::after {
  content: attr(data-mark);
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--crimson);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.programme-row.is-now .time::after,
.programme-row.is-next .time::after { opacity: 1; }
.programme-row.is-now::before {
  content: '';
  position: absolute; left: -18px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 0 rgba(143, 17, 43, 0.5);
  animation: nowPulse 2.4s ease-out infinite;
}
@keyframes nowPulse { 0% { box-shadow: 0 0 0 0 rgba(143, 17, 43, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(143, 17, 43, 0); } }
.programme-row.is-past { opacity: 0.55; }

/* ---------- lightbox: FLIP + arrows ---------- */
.lightbox img { transform-origin: 0 0; }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--gold-pale); font-size: 22px; padding: 14px;
  opacity: 0.7; transition: opacity 0.3s;
}
.lightbox-arrow:hover { opacity: 1; }
.lightbox-arrow--prev { left: 8px; }
.lightbox-arrow--next { right: 8px; }
@media (pointer: coarse) { .lightbox-arrow { display: none; } }

/* ---------- the seal returns ---------- */
.seal-stamp-wrap { position: relative; width: 150px; height: 150px; margin: 26px auto 0; }
.seal-stamp { width: 100%; height: 100%; display: block; opacity: 0; transform: scale(1.4); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18)); }
.seal-bloom {
  position: absolute; inset: -40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 172, 62, 0.45) 0%, rgba(217, 172, 62, 0) 65%);
  opacity: 0; pointer-events: none;
}


/* ==========================================================================
   v5 — the sky that night, akshintalu, muhurtham live
   ========================================================================== */
.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#ch-muhurtham { overflow: hidden; }
#ch-muhurtham > :not(.sky) { position: relative; }
.sky-note { margin-top: 22px; max-width: 30em; font-size: 15px; font-style: italic; color: rgba(243, 234, 218, 0.6); line-height: 1.6; }
.sky-note .lang-te { font-style: normal; font-size: 14px; }

/* akshintalu */
.akshintalu-wrap { position: relative; max-width: 560px; margin: 40px auto 0; cursor: pointer; touch-action: none; }
.akshintalu-wrap img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; display: block; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); -webkit-user-drag: none; user-select: none; }
.akshintalu-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.akshintalu-hint { margin-top: 18px; text-align: center; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(217, 188, 119, 0.6); transition: opacity 0.6s; }
.akshintalu-hint .lang-te { letter-spacing: 0.06em; text-transform: none; font-size: 13px; }
.akshintalu-done { margin-top: 14px; text-align: center; font-size: 19px; font-style: italic; color: var(--gold-light); opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease, transform 1.2s var(--ease); }
.akshintalu-done .lang-te { font-style: normal; font-size: 16px; }
.akshintalu-wrap.is-blessed ~ .akshintalu-hint { opacity: 0; }
.akshintalu-wrap.is-blessed ~ .akshintalu-done { opacity: 1; transform: none; }

/* muhurtham live */
#live { position: fixed; inset: 0; z-index: 300; background: var(--night-deep); color: var(--ivory); display: none; align-items: center; justify-content: center; text-align: center; padding: 24px; overflow: hidden; }
body.is-live #live { display: flex; }
#live .sky { opacity: 0.9; }
.live-inner { position: relative; max-width: 640px; }
.live-clock { font-weight: 300; font-size: clamp(64px, 18vw, 150px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; margin-top: 10px; }
.live-clock .sec { font-size: 0.42em; color: var(--gold-light); margin-left: 0.1em; }
.live-word { font-weight: 300; font-size: clamp(44px, 12vw, 110px); line-height: 1.05; opacity: 0; transform: scale(1.08); margin-top: 10px; }
.live-word .lang-te { font-weight: 400; }
.live-sub { margin-top: 18px; font-style: italic; font-size: 17px; color: rgba(243, 234, 218, 0.7); }
.live-sub .lang-te { font-style: normal; font-size: 15px; }
.live-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.live-leave { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; }


/* ==========================================================================
   v6 — three knots, the kanuka line, gold anjali
   ========================================================================== */
.knots { width: min(320px, 78vw); height: auto; margin-bottom: 6px; overflow: visible; }
.knot-thread { fill: none; stroke: url(#knot-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.knot-bead { fill: #F3DD9E; opacity: 0; filter: drop-shadow(0 0 6px rgba(243, 221, 158, 0.9)); }
.knot-pendant { fill: none; stroke: #D9BC77; stroke-width: 1.2; opacity: 0; }
.knot-pendant circle { fill: #C9304F; stroke: none; }

.kanuka { margin: 40px auto 0; max-width: 30em; text-align: center; }
.kanuka-text {
  display: block;
  font-family: var(--telugu-verse);
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.6;
  color: var(--gold-light);
  padding: 22px 0;
  text-shadow: 0 2px 18px rgba(217, 188, 119, 0.25);
}
.kanuka-rule { display: block; width: 72px; height: 1px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); }

.anjali { position: relative; width: clamp(150px, 34vw, 210px); margin: 0 auto 6px; perspective: 800px; }
.anjali img { position: relative; z-index: 2; width: 100%; display: block; transform-style: preserve-3d; will-change: transform; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); }
.anjali-shadow { position: absolute; left: 10%; right: 10%; bottom: -4px; height: 18px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 70%); z-index: 1; }
.anjali-glint {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(28% 22% at var(--glint-x) var(--glint-y), rgba(255, 246, 214, 0.35) 0%, rgba(255, 246, 214, 0) 70%);
  mix-blend-mode: screen;
  -webkit-mask-image: url('../assets/img/anjali-gold-420.webp'); mask-image: url('../assets/img/anjali-gold-420.webp');
  -webkit-mask-size: 100% auto; mask-size: 100% auto; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
