:root {
  --ink: #1B1512;
  --white: #FFFDF8;
  --paper: #F3E7D0;
  --beige: #EADBC0;
  --sepia: #8A6A44;
  --verm: #D9392B;
  --saffron: #F2A007;
  --f-bn: "Noto Serif Bengali", serif;
  --f-disp: "Instrument Serif", Georgia, serif;
  --f-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}

img { display: block; }
.paper-bg { background: var(--paper) url("../assets/opt/parchment.webp") center / cover no-repeat; }

/* loader */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--paper); transition: opacity .6s ease; }
#loader.done { opacity: 0; pointer-events: none; }
#loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--verm); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(.6); opacity: .4 } 50% { transform: scale(1.4); opacity: 1 } }

/* stage */
#prologue { position: relative; }
#stage { position: relative; width: 100%; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); }
.layer { position: absolute; inset: 0; }

/* paper grain + traditional frame over every scene */
#paper {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: url("../assets/opt/parchment.webp") center / cover no-repeat;
  mix-blend-mode: multiply; opacity: .32;
}
#frame { position: absolute; inset: 10px; z-index: 21; pointer-events: none; border: 1px solid rgba(138,106,68,.35); }
#frame::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(217,57,43,.28); }
#frame .corner { position: absolute; width: 64px; height: 64px; color: var(--verm); opacity: .38; }
#frame .tl { left: 6px; top: 6px; }
#frame .tr { right: 6px; top: 6px; transform: scaleX(-1); }
#frame .bl { left: 6px; bottom: 6px; transform: scaleY(-1); }
#frame .br { right: 6px; bottom: 6px; transform: scale(-1, -1); }

/* ---------- Scene 1 · eyes ---------- */
#eyes-layer { z-index: 6; display: grid; place-items: center; pointer-events: none; }
#eyes { width: min(92vw, 460px); overflow: visible; margin-top: -8svh; will-change: transform; }
#eyes .ink { fill: var(--ink); }
#eyes .paper { fill: var(--white); }
#eyes .verm { fill: var(--verm); }
#arcs { fill: none; stroke: var(--sepia); stroke-width: 1; opacity: .35; }
.eye .lidset { transform-box: fill-box; transform-origin: 50% 55%; }

#copy1 { position: absolute; left: 0; right: 0; bottom: 18svh; text-align: center; }
#copy1 .bn { font-family: var(--f-bn); font-weight: 600; font-size: 26px; color: var(--verm); }
#copy1 .en { margin-top: 8px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(27,21,18,.55); }
#scroll-cue { position: absolute; left: 50%; bottom: 7svh; width: 1px; height: 44px; background: rgba(27,21,18,.18); overflow: hidden; }
#scroll-cue span { position: absolute; left: 0; top: -16px; width: 1px; height: 16px; background: var(--verm); animation: cue 1.6s cubic-bezier(.7,0,.3,1) infinite; }
@keyframes cue { to { transform: translateY(60px); } }

/* ---------- Scene 2 · burst ---------- */
#burst { z-index: 5; pointer-events: none; visibility: hidden; }
#burst .r {
  position: absolute; left: 50%; top: 50%;
  width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax;
  border-radius: 50%; transform: scale(0);
}
.r1 { background: var(--ink); }
.r2 { background: var(--saffron); }
.r3 { background: var(--verm); }
.r4 { background: var(--beige); }
.r5 { background: var(--paper) url("../assets/opt/parchment.webp") center / 100vw auto; }
#burst-rays {
  position: absolute; inset: -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,253,248,.55) 0 .6deg, transparent .6deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 6%, #000 7%, #000 30%, transparent 55%);
          mask: radial-gradient(circle, transparent 6%, #000 7%, #000 30%, transparent 55%);
  opacity: 0;
}

/* ---------- Scene 3 · Mayapur ---------- */
#mayapur { z-index: 4; visibility: hidden; }
#sun {
  position: absolute; left: 50%; top: 50%;
  width: 96vw; height: 96vw; max-width: 470px; max-height: 470px;
  border-radius: 50%; background: var(--saffron);
  transform: translate(-50%, -50%);
}
#sun i { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(217,57,43,.45); }
#sun i::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1px dashed rgba(138,106,68,.4); }
#sun-rays {
  position: absolute; left: 50%; top: 50%;
  width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, rgba(217,57,43,.12) 0 .6deg, transparent .6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 18%, #000 19%, transparent 44%);
          mask: radial-gradient(circle, transparent 18%, #000 19%, transparent 44%);
}
.orn { position: absolute; color: var(--verm); }
.lotus-row { left: 50%; top: 4.5svh; width: 44px; height: 30px; margin-left: -22px; opacity: .6; }
#copy3 { position: absolute; left: 0; right: 0; top: 9svh; text-align: center; z-index: 2; }
#copy3 .n89 { font-family: var(--f-disp); font-size: 124px; line-height: .82; color: var(--verm); letter-spacing: -.02em; }
#copy3 .l1 { font-family: var(--f-disp); font-size: 32px; line-height: 1.1; color: var(--ink); margin-top: 6px; }
#copy3 .l2 { font-family: var(--f-disp); font-style: italic; font-size: 20px; color: var(--ink); opacity: .78; margin-top: 8px; padding: 0 28px; }
#temple-wrap {
  position: absolute; left: 50%; bottom: 5svh;
  width: min(84vw, 420px); transform: translateX(-50%);
}
#temple { width: 100%; height: auto; will-change: transform; filter: drop-shadow(0 18px 24px rgba(138,106,68,.25)); }
#door-dark { position: absolute; inset: 0; background: #0E0A08; opacity: 0; pointer-events: none; }
#inspired {
  position: absolute; left: 0; right: 0; bottom: 2.2svh;
  text-align: center; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(27,21,18,.55);
}

/* ---------- Scene 4 · sanctum ---------- */
#sanctum { z-index: 3; visibility: hidden; background: #0E0A08; }
#halo { position: absolute; left: 50%; top: 21svh; width: 0; height: 0; }
#halo i { position: absolute; border-radius: 50%; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s); }
#halo .h1 { --s: 220vmax; background: var(--verm); }
#halo .h2 { --s: 118vw; background: var(--saffron); }
#halo .h3 { --s: 96vw; background: var(--paper); }
#halo .h4 { --s: 80vw; border: 1.5px solid var(--verm); }
#halo-rays {
  position: absolute; left: -75vw; top: -75vw; width: 150vw; height: 150vw;
  background: repeating-conic-gradient(from 0deg, rgba(217,57,43,.35) 0 .8deg, transparent .8deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 32%, #000 33%, #000 40%, transparent 41%);
          mask: radial-gradient(circle, transparent 32%, #000 33%, #000 40%, transparent 41%);
  border-radius: 50%;
}
#ma {
  position: absolute; left: 50%; top: 3svh;
  height: 74svh; width: auto; max-width: 100vw; object-fit: contain;
  transform: translateX(-50%); will-change: transform, opacity;
}
#shiuli { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#copy4 { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 0 6svh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#copy4 .bn { font-family: var(--f-bn); font-weight: 600; font-size: 38px; line-height: 1.25; color: var(--white); }
.logo-slot { font-family: var(--f-body); font-weight: 600; font-size: 11px; letter-spacing: .4em; color: var(--white); padding: 8px 0 0 .4em; border-top: 1px solid var(--saffron); }

/* next */
#next { position: relative; z-index: 1; min-height: 70svh; padding: 0 24px 80px; color: var(--ink); text-align: center; }
.laal-paar { height: 6px; margin: 0 -24px 40px; background: var(--verm); box-shadow: 0 2px 0 var(--saffron); }
.lotus-next { position: relative; display: block; width: 48px; height: 32px; margin: 0 auto 14px; opacity: .7; }
.next-title { font-family: var(--f-disp); font-size: 40px; }
.next-sub { margin: 12px auto 0; max-width: 30ch; font-size: 15px; line-height: 1.55; color: #4a3d30; }

@media (min-width: 700px) {
  #stage, #next { max-width: 480px; margin: 0 auto; }
  #halo .h2 { --s: 560px; } #halo .h3 { --s: 456px; } #halo .h4 { --s: 380px; }
  #halo-rays { left: -360px; top: -360px; width: 720px; height: 720px; }
}
@media (prefers-reduced-motion: reduce) { #scroll-cue span, #loader i { animation: none; } }

/* =====================================================================
   v4 — real Mayapur, the golden pandal, Ma's photo, dial, days, epilogue
   ===================================================================== */
.lining { fill: none; stroke: var(--verm); stroke-width: 2.4; stroke-linecap: round; }

/* Scene 3 */
#copy3 { top: 6svh; }
#copy3 .n89 { font-size: 112px; }
#window {
  position: absolute; left: 50%; top: 31svh;
  width: min(74vw, 360px); height: 50svh; margin-left: calc(min(74vw, 360px) / -2);
  border-radius: 999px 999px 0 0; overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--saffron), 0 0 0 7px rgba(243,231,208,.9), 0 0 0 8.5px var(--verm), 0 24px 40px rgba(138,106,68,.3);
}
#tovp { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
#copy3b {
  position: absolute; left: 0; right: 0; top: 13svh; text-align: center; padding: 0 30px;
  font-family: var(--f-disp); font-style: italic; font-size: 30px; line-height: 1.15; color: var(--ink);
}
#copy3b::after { content: ""; display: block; width: 40px; height: 2px; margin: 14px auto 0; background: var(--verm); box-shadow: 0 3px 0 var(--saffron); }
#temple-wrap { width: 168vw; max-width: 820px; bottom: 9svh; }
#temple { mix-blend-mode: multiply; filter: none; }

/* Scene 4 — Ma's real face in a cusped arch */
#ma-frame {
  position: absolute; left: 50%; top: 5svh;
  width: min(80vw, 380px); height: 66svh; margin-left: calc(min(80vw, 380px) / -2);
  border-radius: 999px 999px 18px 18px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--saffron), 0 0 0 9px var(--paper), 0 0 0 11px var(--verm), 0 30px 60px rgba(0,0,0,.35);
  visibility: hidden;
}
#ma-frame #ma { position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 38%; transform: none; }
#halo { top: 34svh; }
#copy4 { padding-bottom: 4svh; gap: 8px; }
#copy4 .bn { font-size: 36px; text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.logo-small { width: 34px; height: auto; opacity: .95; }

/* Scene 5 — the Pujo dial */
#dial { z-index: 7; visibility: hidden; }
#ink { position: absolute; right: -30%; top: 6%; width: 110%; height: 88%; }
#dial-copy { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 54%; color: var(--ink); }
#dial-copy .kicker { font-family: var(--f-disp); font-style: italic; font-size: 24px; margin-bottom: 10px; color: var(--verm); }
#day-index { list-style: none; }
#day-index button {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px;
  width: 100%; padding: 9px 0; background: none; border: 0; border-bottom: 1px solid rgba(138,106,68,.35);
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
#day-index .bn { color: var(--verm); grid-row: span 2; font-family: var(--f-bn); font-weight: 600; font-size: 26px; line-height: 1.2; min-width: 74px; }
#day-index .en { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; align-self: end; }
#day-index .dt { font-family: var(--f-disp); font-size: 20px; color: var(--ink); }
@media (max-width: 379px) { #dial-copy { width: auto; left: 24px; } #ink { right: -10%; width: 130%; } }

/* day rail */
#rail {
  position: fixed; right: 8px; top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .4s;
}
#rail.show { opacity: 1; pointer-events: auto; }
#rail button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(217,57,43,.6);
  background: rgba(243,231,208,.85); color: var(--verm); font-family: var(--f-bn); font-size: 14px; cursor: pointer;
  backdrop-filter: blur(4px); transition: background .3s, color .3s;
}
#rail button.on { background: var(--verm); color: var(--white); border-color: var(--verm); }
@media (min-width: 700px) { #rail { right: calc(50% - 240px + 8px); } }

/* ===== Act II · days ===== */
#days, #people, #home { max-width: 480px; margin: 0 auto; }
.day .intro { position: relative; height: 100svh; overflow: hidden; background: var(--verm); }
.day .media { position: absolute; inset: 0; will-change: clip-path, transform; }
.day .bg { width: 100%; height: 100%; object-fit: cover; }
.day .fx { position: absolute; inset: 0; pointer-events: none; }
.day .dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,10,8,.35), rgba(14,10,8,.85)); opacity: 0; }
.day .title { position: absolute; left: 0; right: 0; bottom: 12svh; text-align: center; color: var(--white); z-index: 2; }
.t-bn { font-family: var(--f-bn); font-weight: 600; font-size: 78px; line-height: 1.15; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.t-en { margin-top: 2px; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; padding-left: .4em; }
.t-date { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--saffron); }
.t-date .num { font-family: var(--f-disp); font-size: 72px; line-height: .8; color: var(--saffron); }
.t-date .mo { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; text-align: left; line-height: 1.6; }

/* panchami: string lights */
.fx-panchami .bulb { position: absolute; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #FFE3A3; box-shadow: 0 0 6px 2px rgba(255,190,80,.9), 0 0 16px 4px rgba(242,160,7,.45); opacity: 0; transform: scale(.4); }
.fx-panchami .beat { position: absolute; left: 50%; top: 60%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; border: 2px solid var(--saffron); opacity: 0; }
/* shashthi: the red veil */
.fx-shashthi .veil { position: absolute; left: -10%; right: -10%; top: -5%; height: 78%; background: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 9px), linear-gradient(180deg, #B3261C, #D9392B 60%, #C02E22); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.fx-shashthi .veil i { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: repeating-linear-gradient(90deg, var(--saffron) 0 10px, #E8B23A 10px 12px); border-top: 2px solid #F6E7C8; }
.fx-shashthi .eye-glow { position: absolute; left: 50%; top: 45%; width: 70%; height: 22%; margin-left: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,210,120,.55), transparent); mix-blend-mode: screen; opacity: 0; }
/* saptami: dawn, mist, ripples */
.fx-saptami .dawn { position: absolute; left: 50%; top: 30%; width: 120vw; height: 120vw; max-width: 600px; max-height: 600px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,226,160,.85), rgba(242,160,7,.25) 50%, transparent); mix-blend-mode: screen; }
.fx-saptami .mist { position: absolute; left: -30%; width: 160%; height: 30%; background: radial-gradient(ellipse at center, rgba(255,253,248,.55), transparent 70%); filter: blur(10px); }
.fx-saptami .m1 { top: 52%; } .fx-saptami .m2 { top: 66%; opacity: .6; }
.fx-saptami .ripples { position: absolute; left: 0; width: 100%; bottom: 8%; height: 18%; overflow: visible; }
.fx-saptami .ripples ellipse { fill: none; stroke: rgba(255,240,210,.8); stroke-width: .6; vector-effect: non-scaling-stroke; }
/* ashtami: 108 lamps */
.fx-ashtami .lamps { position: absolute; left: 50%; top: 4%; width: 110%; transform: translateX(-50%); overflow: visible; }
.fx-ashtami .dish { fill: #8a5a22; }
.fx-ashtami .flame { fill: #FFD27A; opacity: 0; transition: opacity .25s; filter: drop-shadow(0 0 2px #F2A007) drop-shadow(0 0 5px rgba(242,160,7,.8)); }
.fx-ashtami .lamp.lit .flame { opacity: 1; }
.fx-ashtami .lamp.lit .dish { fill: #c9862e; }
.fx-ashtami .counter { position: absolute; left: 0; right: 0; top: 50%; text-align: center; color: var(--white); font-family: var(--f-disp); }
.fx-ashtami .counter span { font-size: 84px; line-height: 1; color: #FFD27A; text-shadow: 0 0 24px rgba(242,160,7,.7); }
.fx-ashtami .counter small { display: block; font-size: 16px; letter-spacing: .3em; opacity: .8; }
/* navami: smoke + aarti */
.fx-navami .smoke { position: absolute; left: 50%; width: 70%; height: 40%; margin-left: -35%; bottom: 30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,214,160,.45), transparent); filter: blur(18px); }
.fx-navami .s2 { margin-left: -50%; } .fx-navami .s3 { margin-left: -15%; }
.fx-navami .aarti { position: absolute; left: 50%; top: 14%; width: 46%; transform: translateX(-50%); overflow: visible; }
.fx-navami .ring { fill: none; stroke: rgba(255,210,120,.65); stroke-width: 1; stroke-dasharray: 189; }
.fx-navami .flame-dot { fill: #FFE3A3; filter: drop-shadow(0 0 4px #F2A007) drop-shadow(0 0 10px #F2A007); }
/* dashami: sindoor bloom */
.fx-dashami .bloom { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, #D9392B 60%, rgba(217,57,43,0)); mix-blend-mode: multiply; }
.fx-dashami .b1 { left: 20%; top: 30%; width: 160vh; height: 160vh; margin: -80vh 0 0 -80vh; }
.fx-dashami .b2 { left: 80%; top: 70%; width: 140vh; height: 140vh; margin: -70vh 0 0 -70vh; }
.fx-dashami .b3 { left: 50%; top: 50%; width: 200vh; height: 200vh; margin: -100vh 0 0 -100vh; }
.fx-dashami .aschhe { position: absolute; left: 0; right: 0; top: 14svh; text-align: center; font-family: var(--f-bn); font-weight: 600; font-size: 28px; color: var(--white); }

/* details panel */
.details { position: relative; padding: 0 26px 64px; overflow: hidden; }
.details .laal-paar, #people .laal-paar { margin: 0 -26px 34px; }
.laal-paar.thin { height: 3px; margin: 26px 0 24px !important; box-shadow: 0 1.5px 0 var(--saffron); }
.watermark { position: absolute; right: -24px; top: 60px; width: 150px; opacity: .06; pointer-events: none; }
.d-head { display: flex; align-items: baseline; gap: 12px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--sepia); }
.d-head .bn { font-family: var(--f-bn); font-size: 34px; letter-spacing: 0; text-transform: none; color: var(--verm); font-weight: 600; }
.date-block { margin-top: 18px; }
.date-block + .date-block { margin-top: 34px; padding-top: 26px; border-top: 1px dashed rgba(138,106,68,.45); }
.date-block .sub { font-family: var(--f-disp); font-size: 24px; color: var(--ink); }
.tithi { margin-top: 4px; font-size: 13px; color: var(--sepia); font-style: italic; }
.note { margin-top: 10px; display: inline-block; padding: 6px 12px; border: 1px solid var(--verm); border-radius: 999px; font-size: 13px; color: var(--verm); font-weight: 600; }
.details h3, #people h3 { margin: 24px 0 10px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--verm); font-weight: 600; }
.sched { list-style: none; }
.sched li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(138,106,68,.22); font-size: 15px; line-height: 1.4; }
.sched time { font-family: var(--f-disp); font-size: 19px; color: var(--ink); white-space: nowrap; }
.culture { padding-left: 20px; }
.culture li { padding: 6px 0; font-size: 15px; line-height: 1.5; }
.culture li::marker { color: var(--verm); font-family: var(--f-disp); }

/* ===== Act III ===== */
#people { position: relative; padding: 0 26px 70px; overflow: hidden; }
.eyebrow { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--sepia); }
.sec-title { font-family: var(--f-disp); font-weight: 400; font-size: 52px; line-height: 1; margin-top: 6px; }
#people dl .row { display: grid; grid-template-columns: 1fr; padding: 9px 0; border-bottom: 1px solid rgba(138,106,68,.22); }
#people dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sepia); }
#people dd { font-size: 16px; line-height: 1.45; margin-top: 2px; }
.names { list-style: none; columns: 2; column-gap: 18px; font-size: 14.5px; line-height: 1.9; }
.spot { margin-top: 16px; font-size: 14px; }

#home { position: relative; min-height: 100svh; padding: 64px 26px 90px; background: #0E0A08; color: var(--paper); text-align: center; overflow: hidden; }
#eyes-small { width: 150px; margin: 0 auto 26px; display: block; overflow: visible; }
#eyes-small .ln { fill: var(--paper); }
#eyes-small .pp { fill: #0E0A08; }
#eyes-small .iris-s { fill: var(--paper); }
#eyes-small .vm { fill: var(--verm); }
.logo-big { width: 110px; margin: 0 auto; }
.org { margin-top: 18px; font-family: var(--f-disp); font-size: 26px; line-height: 1.15; }
.org-bn { font-family: var(--f-bn); font-size: 15px; color: rgba(243,231,208,.75); margin-top: 4px; }
.big89 { margin-top: 26px; font-family: var(--f-disp); font-size: 140px; line-height: .85; color: var(--saffron); }
.big89 sup { font-size: 40px; vertical-align: top; position: relative; top: 14px; }
.celebration { font-family: var(--f-disp); font-style: italic; font-size: 26px; }
.span-dates { margin-top: 8px; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--saffron); }
.venue { margin-top: 18px; font-size: 15px; line-height: 1.6; color: rgba(243,231,208,.85); }
.actions { display: grid; gap: 10px; margin: 30px auto 0; max-width: 320px; }
.btn { display: block; padding: 15px 18px; border-radius: 999px; border: 1px solid rgba(243,231,208,.4); background: transparent; color: var(--paper); font: 600 15px var(--f-body); text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--verm); border-color: var(--verm); color: var(--white); }
.btn.wa { border-color: var(--saffron); color: var(--saffron); }
.also { margin: 40px auto 0; max-width: 340px; text-align: left; border-top: 1px solid rgba(243,231,208,.2); padding-top: 18px; }
.also-title { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--saffron); margin-bottom: 8px; }
.also ul { list-style: none; }
.also li { padding: 8px 0; font-size: 15px; border-bottom: 1px solid rgba(243,231,208,.12); }
.also li span { display: block; font-size: 12px; color: rgba(243,231,208,.6); }
.contact { margin-top: 28px; font-size: 13.5px; line-height: 1.9; color: rgba(243,231,208,.7); }
.contact a { color: inherit; }
.ashchhe { margin-top: 36px; font-family: var(--f-bn); font-weight: 600; font-size: 24px; color: var(--verm); }

@media (min-width: 700px) {
  #ma-frame { width: 360px; margin-left: -180px; }
  #window { width: 340px; margin-left: -170px; }
  #temple-wrap { width: 760px; }
}


/* v5 · serene reference-style eyes */
#eyes { width: min(94vw, 470px); margin-top: -4svh; }
#eyes .maroon, #eyes .brow { fill: #8E2323; }
#eyes .band { fill: #E9A23B; }
#eyes .sclera { fill: #FFFDF8; }
#eyes .iris { fill: #D98E2B; stroke: #8a4b12; stroke-width: 1.5; }
#eyes .pupil { fill: var(--ink); }
#eyes .glint { fill: #fff; }
#eyes .kajal { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
#eyes .lowlid { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
#eyes .flick { fill: var(--ink); }
#eyes .dot { fill: #E9A23B; }
#eyes .verm { fill: var(--verm); }
#nose { fill: none; stroke: #8E2323; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
#nath .ring { fill: none; stroke: var(--ink); stroke-width: 2.2; }
#nath .bead { fill: #B3261C; stroke: #6d130d; stroke-width: .8; }
#copy1 { bottom: 14svh; }


/* =====================================================================
   v5 — fly-through Mayapur, dial layout, torn reveals, tilt, sequences
   ===================================================================== */
#copy3 { z-index: 3; }
.lotus-row, #inspired { z-index: 3; }
#window {
  position: absolute; inset: 0; left: 0; top: 0; width: auto; height: auto; margin: 0;
  z-index: 1; border-radius: 0; box-shadow: none; overflow: hidden;
  clip-path: inset(100% 13% 17% 13% round 200px 200px 0px 0px);
}
#window .tilt { position: absolute; inset: 0; transform-origin: 50% 60%; }
#tovp { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.seq { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; }
.seq.ready { opacity: 1; }
#copy3b {
  top: 0; padding: 9svh 30px 14svh; z-index: 2; color: var(--white);
  background: linear-gradient(180deg, rgba(14,10,8,.55), transparent);
  text-shadow: 0 2px 18px rgba(0,0,0,.45); opacity: 0;
}
#copy3b::after { background: var(--saffron); box-shadow: 0 3px 0 var(--verm); }
#door-dark { z-index: 4; background: radial-gradient(circle at 50% 55%, #3a2410, #0E0A08 70%); }

/* Scene 5 — dial sits below Ma */
#ink { right: auto; left: -20%; top: auto; bottom: -8%; width: 140%; height: 72%; }
#dial-copy { left: 24px; right: 24px; top: auto; bottom: 5svh; transform: none; width: auto; }
#dial-copy .kicker { text-align: center; font-size: 26px; }
#day-index { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
#day-index button { padding: 10px 0; }
#day-index .bn { font-size: 24px; min-width: 64px; }
#day-index .en { font-size: 10px; letter-spacing: .12em; }
#day-index .dt { font-size: 18px; }
@media (max-width: 379px) { #day-index { grid-template-columns: 1fr; } #dial-copy { left: 24px; } #ink { left: -20%; width: 140%; } }

/* Act II — torn parchment reveal, tilt, sequences */
.day .intro { background: var(--paper) url("../assets/opt/parchment.webp") center / cover; }
.day .media { clip-path: polygon(0 120%, 100% 120%, 100% 120%, 0 120%); }
.day .tilt {
  position: absolute; inset: -5%;
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 5deg)) rotateX(calc(var(--ty, 0) * -4deg))
             translate3d(calc(var(--tx, 0) * -12px), calc(var(--ty, 0) * -10px), 0);
  will-change: transform;
}
.day .tilt .bg { position: absolute; inset: 0; }
.day .fx { transform: translate3d(calc(var(--tx, 0) * 16px), calc(var(--ty, 0) * 12px), 0); }
.tear-edge {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #FBF3E3 url("../assets/opt/parchment.webp") center / cover;
  filter: drop-shadow(0 -2px 2px rgba(138,106,68,.4));
  clip-path: polygon(0 0, 0 0, 0 0);
}
#d-saptami .tilt { inset: -9%; transform: perspective(900px) rotateY(calc(var(--tx, 0) * 9deg)) rotateX(calc(var(--ty, 0) * -7deg)) translate3d(calc(var(--tx, 0) * -22px), calc(var(--ty, 0) * -16px), 0); }
#d-saptami .fx { transform: translate3d(calc(var(--tx, 0) * 34px), calc(var(--ty, 0) * 22px), 0); }
.tilt-hint {
  position: absolute; left: 50%; top: 7svh; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: rgba(14,10,8,.45); backdrop-filter: blur(6px);
  color: var(--white); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}

/* Shashthi — a sheer red chiffon veil you can see her through */
.fx-shashthi .veil {
  left: -12%; right: -12%; top: -6%; height: 84%;
  background:
    repeating-linear-gradient(97deg, rgba(255,255,255,.07) 0 3px, transparent 3px 11px),
    repeating-linear-gradient(90deg, rgba(120,10,10,.18) 0 18px, transparent 18px 46px),
    linear-gradient(180deg, rgba(190,30,25,.78), rgba(217,57,43,.62) 70%, rgba(200,40,30,.7));
  -webkit-backdrop-filter: blur(5px) saturate(1.2); backdrop-filter: blur(5px) saturate(1.2);
  border-radius: 0 0 46% 54% / 0 0 10% 12%;
  box-shadow: 0 18px 36px rgba(0,0,0,.35);
}
.fx-shashthi .veil .zari {
  position: absolute; left: 0; right: 0; bottom: 2%; height: 16px;
  background: repeating-linear-gradient(90deg, #F2A007 0 8px, #FFD27A 8px 10px, #F2A007 10px 18px);
  border-top: 1.5px solid #FFE9B8; border-bottom: 1.5px solid #FFE9B8; opacity: .9;
  border-radius: 50%;
}

/* Ashtami — lamps on the sanctum floor before the full protima */
.fx-ashtami .lamps { top: auto; bottom: 3%; width: 118%; }
.fx-ashtami .halo-l { fill: rgba(255,190,90,.0); transition: fill .3s; }
.fx-ashtami .lamp.lit .halo-l { fill: rgba(255,190,90,.22); }
#d-ashtami .bg { object-position: 50% 30%; }

/* Panchami — dhak beats ripple from the drums */
.fx-panchami .beat { position: absolute; left: 30%; top: 46%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; border: 2px solid rgba(255,214,140,.85); opacity: 0; }
.fx-panchami .beat + .beat { left: 72%; top: 50%; }
#dial-copy {
  padding: 18px 18px 8px; border-radius: 18px;
  background: var(--paper) url("../assets/opt/parchment.webp") center / cover;
  box-shadow: 0 0 0 1px rgba(217,57,43,.35), 0 0 0 5px rgba(243,231,208,.6), 0 20px 40px rgba(60,10,5,.35);
}
#day-index li:nth-last-child(-n+2) button { border-bottom: 0; }

/* v6 · opening masthead: the very first frame carries BCA's name, logo and the title */
#masthead {
  position: absolute; left: 0; right: 0; top: 4.5svh; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 28px;
}
#masthead img { width: 40px; height: auto; flex: none; }
#masthead .m-org { font-family: var(--f-disp); font-size: 21px; line-height: 1.05; color: var(--ink); }
#masthead .m-org-bn { font-family: var(--f-bn); font-size: 11.5px; color: var(--sepia); margin-top: 3px; }
#m-title {
  position: absolute; left: 0; right: 0; top: calc(4.5svh + 72px); z-index: 2; text-align: center; padding: 0 24px;
}
#m-title .m-t1 { font-family: var(--f-disp); font-style: italic; font-size: 25px; line-height: 1.15; color: var(--verm); }
#m-title .m-t1 sup { font-size: 13px; }
#m-title .m-t2 { margin-top: 6px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--sepia); }
#m-title::after { content: ""; display: block; width: 44px; height: 2px; margin: 12px auto 0; background: var(--verm); box-shadow: 0 3px 0 var(--saffron); }
#eyes { margin-top: 10svh; }
#copy1 { bottom: 11svh; }

/* Scene 3 · the clip is revealed by a parchment tear (no still image, no jump) */
#window { clip-path: polygon(0 120%, 100% 120%, 100% 120%, 0 120%); }
#window-edge { z-index: 2; }

/* v7 · closing eyes in the same hand as the opening, drawn light on black */
#eyes-small { width: 210px; }
#eyes-small .b { fill: #C9543E; }
#eyes-small .band { fill: #E9A23B; }
#eyes-small .w { fill: #FFF8EC; }
#eyes-small .ir { fill: #D98E2B; }
#eyes-small .pu { fill: #0E0A08; }
#eyes-small .kj { fill: none; stroke: #F3E7D0; stroke-width: 5; stroke-linecap: round; }
#eyes-small .fl { fill: #F3E7D0; }
#eyes-small .t3 { fill: #C9543E; }
#eyes-small .t3i { fill: #FFF8EC; }
#eyes-small .bd { fill: var(--verm); }
#eyes-small .lid { transform-box: fill-box; transform-origin: 50% 60%; }

/* dial title */
#dial-copy .kicker { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 8px; }
#dial-copy .k-bn { font-family: var(--f-bn); font-weight: 600; font-style: normal; font-size: 26px; color: var(--verm); }
#dial-copy .k-en { font-family: var(--f-body); font-style: normal; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sepia); }

/* the credit line now sits over the Mayapur video */
#inspired { color: rgba(255,253,248,.85); text-shadow: 0 1px 8px rgba(0,0,0,.6); }

/* v8 · scroll cue: a mouse-style pill with a falling dot and two cascading chevrons */
#scroll-cue {
  left: 50%; bottom: 4svh; width: auto; height: auto; margin: 0; transform: translateX(-50%);
  background: none; overflow: visible;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
#scroll-cue .lbl { font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--verm); padding-left: .32em; animation: cue-breathe 2.4s ease-in-out infinite; }
#scroll-cue .pill { position: relative; width: 22px; height: 34px; border: 1.6px solid var(--verm); border-radius: 12px; }
#scroll-cue .pill .dot { position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--verm); animation: cue-dot 1.8s cubic-bezier(.6,0,.3,1) infinite; }
#scroll-cue .chev { display: flex; flex-direction: column; align-items: center; margin-top: -2px; }
#scroll-cue .chev i { width: 10px; height: 10px; margin-top: -4px; border-right: 1.6px solid var(--verm); border-bottom: 1.6px solid var(--verm); transform: rotate(45deg); opacity: 0; animation: cue-chev 1.8s ease-in-out infinite; }
#scroll-cue .chev i + i { animation-delay: .25s; }
#scroll-cue span:not(.lbl):not(.pill):not(.chev) { display: none; }
@keyframes cue-dot { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(13px); opacity: 0 } 100% { transform: translateY(0); opacity: 0 } }
@keyframes cue-chev { 0%, 100% { opacity: 0; transform: translateY(-3px) rotate(45deg) } 50% { opacity: 1; transform: translateY(2px) rotate(45deg) } }
@keyframes cue-breathe { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
#copy1 { bottom: 15svh; }
@media (prefers-reduced-motion: reduce) { #scroll-cue .lbl, #scroll-cue .dot, #scroll-cue .chev i { animation: none; opacity: 1; } }
#scroll-cue > span { position: relative; left: auto; top: auto; width: auto; height: auto; background: none; animation: none; }
#scroll-cue { transition: opacity .4s ease, transform .4s ease; } #scroll-cue.gone { opacity: 0 !important; transform: translate(-50%, 10px); }


/* v9 · hosting-safe scrolling: the page must scroll the document itself (ScrollTrigger + Lenis
   listen to the window), even if a host wrapper sets heights or overflow on html/body */
html { height: auto !important; overflow-x: clip !important; overflow-y: visible !important; }
body { height: auto !important; min-height: 0 !important; overflow: visible !important; overflow-x: clip !important; }

/* =====================================================================
   v10 · loader ring, 7-day dial, rail clearance, credit
   ===================================================================== */
/* the loading ring sits where the scroll cue will appear, and hands over to it */
#preload {
  position: absolute; left: 50%; bottom: 5svh; z-index: 3; width: 46px; height: 46px; margin-left: -23px;
  display: grid; place-items: center; transition: opacity .5s ease, transform .5s ease;
}
#preload svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#preload .track { fill: none; stroke: rgba(217,57,43,.18); stroke-width: 2.5; }
#preload .fill { fill: none; stroke: var(--verm); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset .35s ease; }
#preload .pct { font: 600 10px/1 var(--f-body); color: var(--verm); font-variant-numeric: tabular-nums; }
#preload.done { opacity: 0; transform: scale(.7); pointer-events: none; }
#scroll-cue { opacity: 0; }
#scroll-cue.ready { opacity: 1; }

/* programme text clears the day-rail on narrow phones */
.details { padding-right: 52px; }

/* the dial card: two columns at every width, compact enough to leave Ma room above it */
#dial-copy { left: 16px; right: 16px; bottom: max(3svh, 14px); padding: 14px 14px 6px; }
#dial-copy .kicker { margin-bottom: 4px; }
#dial-copy .k-bn { font-size: clamp(21px, 6vw, 26px); }
#day-index { grid-template-columns: 1fr 1fr !important; column-gap: 14px; }
#day-index li:last-child { grid-column: 1 / -1; justify-self: center; min-width: 50%; }
#day-index li:last-child button { border-bottom: 0; }
#day-index li:nth-last-child(-n+2) button { border-bottom: 0; }
#day-index li:nth-last-child(2) button { border-bottom: 1px solid rgba(138,106,68,.35); }
#day-index button { padding: 7px 0; column-gap: 8px; }
#day-index .bn { font-size: clamp(18px, 5.4vw, 23px); min-width: 0; }
#day-index .en { font-size: 9.5px; letter-spacing: .08em; }
#day-index .dt { font-size: clamp(14px, 4.2vw, 17px); }
@media (max-width: 379px) { #day-index { grid-template-columns: 1fr 1fr !important; } #dial-copy { left: 12px; right: 12px; } }

/* closing credit */
.credit {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 40px; color: rgba(243,231,208,.75); text-decoration: none;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.credit img { width: 132px; height: auto; padding: 8px 14px; border-radius: 12px; background: #FFFDF8; }
.credit:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; border-radius: 12px; }
@media (max-height: 720px) { #copy1 { bottom: 18svh; } #eyes { margin-top: 6svh; } }

/* =====================================================================
   v11 · language toggle (বাংলা / English) and English-mode typography
   ===================================================================== */
#lang {
  position: absolute; top: max(12px, 1.6svh); left: 50%; transform: translateX(-50%); z-index: 4;
  display: inline-flex; padding: 3px; gap: 2px; pointer-events: auto;
  border: 1px solid rgba(217,57,43,.45); border-radius: 999px; background: rgba(251,243,227,.75);
  backdrop-filter: blur(4px);
}
#lang button {
  border: 0; border-radius: 999px; padding: 5px 13px; background: transparent; cursor: pointer;
  color: var(--verm); font: 600 11px/1 var(--f-body); letter-spacing: .08em;
}
#lang button[data-lang="bn"] { font-family: var(--f-bn); font-size: 12.5px; letter-spacing: 0; }
#lang button[aria-pressed="true"] { background: var(--verm); color: var(--white); }
#lang button:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
#masthead { top: calc(max(12px, 1.6svh) + 42px); }
#m-title { top: calc(max(12px, 1.6svh) + 42px + 70px); }

/* English mode: Benglish set in the display serif, Bangla-only duplicates hidden */
:root[data-lang="en"] [data-en] { font-family: var(--f-disp); font-weight: 400; }
:root[data-lang="en"] .bn-only, :root[data-lang="en"] .d-head .dup, :root[data-lang="en"] .t-en { display: none; }
:root[data-lang="en"] .t-bn { font-size: clamp(44px, 13vw, 72px); line-height: 1.05; }
:root[data-lang="en"] #copy1 .bn { font-size: 30px; font-style: italic; }
:root[data-lang="en"] #copy4 .bn { font-size: 42px; font-style: italic; }
:root[data-lang="en"] .aschhe, :root[data-lang="en"] #dial-copy .k-bn { font-style: italic; }
:root[data-lang="en"] #dial-copy .k-bn { font-size: clamp(26px, 7.5vw, 32px); }
:root[data-lang="en"] .d-head .bn { font-size: 38px; }
:root[data-lang="en"] #day-index button { grid-template-columns: 1fr; }
:root[data-lang="en"] #day-index .bn { grid-row: auto; font-size: clamp(19px, 5.6vw, 23px); line-height: 1.1; }
:root[data-lang="en"] #day-index .en { display: none; }
:root[data-lang="en"] #day-index li:nth-child(3) .bn::after { content: " · 1"; }
:root[data-lang="en"] #day-index li:nth-child(4) .bn::after { content: " · 2"; }
:root[data-lang="en"] #rail button { font-family: var(--f-body); font-size: 10px; font-weight: 600; }
:root[data-lang="en"] .m-t2 [data-en] { font-family: inherit; }

/* closing credit: logo 30% smaller */
.credit img { width: 92px; padding: 6px 10px; border-radius: 9px; }
#m-title .m-t2 { letter-spacing: .12em; padding: 0 8px; }
#eyes { margin-top: calc(10svh + 30px); }
@media (max-height: 720px) { #eyes { margin-top: calc(6svh + 34px); } }
#eyes { width: min(94vw, 410px, 50svh); }

/* v12 · language switch: larger, centred under Ma's face, above মা আসছেন */
#lang {
  top: auto; bottom: calc(15svh + 78px); padding: 4px; gap: 4px;
  border-width: 1.5px; box-shadow: 0 6px 18px rgba(138,106,68,.18);
}
#lang button { padding: 10px 22px; font-size: 14px; letter-spacing: .06em; }
#lang button[data-lang="bn"] { font-size: 16px; }
#masthead { top: 4.5svh; }
#m-title { top: calc(4.5svh + 72px); }
#eyes { margin-top: calc(-2svh - 20px); }
@media (max-height: 720px) { #lang { bottom: calc(18svh + 74px); } #eyes { margin-top: -6svh; } }
/* every programme page carries its date and weekday */
.date-block .sub { font-family: var(--f-disp); font-size: 22px; color: var(--ink); }
.date-block .sub .sub-d { color: var(--verm); font-size: 28px; }
.date-block .sub .sub-l { color: var(--sepia); font-size: 18px; }
@media (max-height: 720px) { #eyes { width: min(84vw, 40svh); margin-top: 1svh; } }
