/* Sankhya: lamplight on a dark ground, as in the app (lib/ui/style.dart). */

@font-face { font-family: 'Tiro'; src: url('../fonts/tiro-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: 'Tiro'; src: url('../fonts/tiro-deva.woff2') format('woff2'); font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Tiro'; src: url('../fonts/tiro-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url('../fonts/hanken-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url('../fonts/hanken-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url('../fonts/hanken-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ground: #120a07;
  --deep: #090403;
  --raise: #1b100b;
  --ink: #f2e6d6;
  --muted: #b39d88;
  --dim: #9a8673;
  --faint: rgba(242, 230, 214, 0.15);
  --hair: rgba(242, 230, 214, 0.09);
  --brass: #dcaa5c;
  --thread: #c4261a;
  --display: 'Tiro', 'Noto Serif Devanagari', Georgia, serif;
  --ui: 'Hanken', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* One fluid type scale, 360px to 1440px wide. */
  --fs-0: clamp(16.5px, 16px + 0.139vw, 19.5px);
  --fs-1: clamp(19px, 17.67px + 0.37vw, 27px);
  --fs-2: clamp(22px, 20px + 0.556vw, 34px);
  --fs-3: clamp(24px, 20px + 0.9vw, 44px);
  --fs-4: clamp(32px, 22px + 1.9vw, 70px);
  --fs-5: clamp(28px, 17px + 2.3vw, 74px);
  --fs-6: clamp(48px, 24px + 4.9vw, 150px);
  --small: clamp(13.5px, 13.2px + 0.09vw, 16px);

  /* One grid for everything: the same outer edge on every screen, text and pictures alike. */
  --edge: clamp(20px, 5vw, 150px);
  --gap: clamp(14px, 1.8vw, 44px);
  --nav-h: 72px;
  --top: calc(var(--nav-h) + clamp(14px, 3vh, 36px));   /* where every scene's chapter mark sits */
  --base: clamp(36px, 8vh, 100px);                       /* where every scene's lowest line sits */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ground); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--fs-0)/1.62 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
p, h1, h2, h3, figure, ol { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
a { color: var(--brass); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size 0.5s var(--ease), color 0.3s; }
a:hover { color: var(--ink); background-size: 0 1px; background-position: 100% 100%; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 4px; }
[hidden] { display: none !important; }
[lang='sa'] { font-family: var(--display); }
::selection { background: rgba(220, 170, 92, 0.35); color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--edge); top: -60px; z-index: 50; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-left: max(var(--edge), env(safe-area-inset-left, 0px)); padding-right: max(var(--edge), env(safe-area-inset-right, 0px)); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
.lede { font-size: var(--fs-1); line-height: 1.5; color: var(--muted); max-width: 36ch; }
h2 { font-size: var(--fs-4); line-height: 1.04; letter-spacing: -0.012em; }
h3 { font-size: var(--fs-2); line-height: 1.2; }

/* The chapter mark: the same type, the same place, in every scene of the story. */
.chapter { display: flex; align-items: baseline; gap: 12px; font: 500 var(--small)/1 var(--ui); color: var(--muted); letter-spacing: 0.01em; }
.chapter span { font: 400 20px/1 var(--display); color: var(--brass); min-width: 1.1em; }
.stage > .chapter { position: absolute; z-index: 3; left: var(--edge); top: var(--top); grid-column: auto; }
.grid > .chapter { margin-bottom: clamp(26px, 4vw, 48px); }

/* Headings rise through a mask as they arrive. */
.rise { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.rise > span { display: block; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 26px;
  font: 500 16px/1 var(--ui); cursor: pointer; border: 0; white-space: nowrap; background-image: none;
  transition: background-color 0.4s var(--ease), color 0.3s, box-shadow 0.4s var(--ease);
}
.btn.primary { background-color: var(--ink); color: var(--ground); }
.btn.primary:hover { background-color: #fff7ea; color: var(--ground); }
.btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--faint); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--brass); }
.btn > span { display: inline-block; pointer-events: none; }

/* ---------------------------------------------------------------- nav: always there, never jumping */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); transition: background-color 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.nav.solid { background-color: rgba(12, 6, 4, 0.66); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 1px 0 var(--hair); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 30px; padding: env(safe-area-inset-top, 0px) var(--edge) 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 400 21px/1 var(--display); margin-right: auto; background: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav nav { display: flex; gap: 28px; font-size: 15px; }
.nav nav a { color: var(--muted); background-size: 0 1px; background-position: 100% 100%; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); background-size: 100% 1px; background-position: 0 100%; }
.nav-get { font: 500 14px/1 var(--ui); color: var(--ground); background: var(--ink); padding: 11px 16px; border-radius: 20px; }
.nav-get:hover { color: var(--ground); background: #fff7ea; }
@media (max-width: 760px) { :root { --nav-h: 64px; } .nav-in { gap: 18px; } .nav nav { gap: 18px; font-size: 14px; } .nav nav a:not(.keep) { display: none; } }
@media (max-width: 420px) { .brand-name { display: none; } }

/* ---------------------------------------------------------------- the mala as the page's progress */
.progress { position: fixed; z-index: 25; right: calc(var(--edge) * 0.42 - 3px); top: 50%; transform: translateY(-50%); display: grid; gap: 9px; justify-items: center; pointer-events: none; }
.progress i { width: 6px; height: 6px; border-radius: 50%; background: rgba(242, 230, 214, 0.16); transition: background-color 0.4s, transform 0.4s var(--ease); }
.progress i.on { background: var(--brass); }
.progress i.now { transform: scale(1.5); }
.progress b { width: 9px; height: 11px; border-radius: 45% 45% 50% 50%; background: #c96f32; margin-bottom: 3px; }
@media (max-width: 1100px), (max-height: 620px) { .progress { display: none; } }

/* ---------------------------------------------------------------- cursor: a brass bead, only for a mouse, only when the page moves */
.cursor { position: fixed; z-index: 60; left: 0; top: 0; pointer-events: none; display: none; }
.cursor i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.cursor b { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(220, 170, 92, 0.55); transition: transform 0.45s var(--ease), background-color 0.3s, opacity 0.3s; }
.cursor em { position: absolute; left: 26px; top: -9px; font: 500 13px/1 var(--ui); font-style: normal; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity 0.3s; }
.cursor.link b { transform: scale(1.7); background: rgba(220, 170, 92, 0.1); }
.cursor.tap em { opacity: 1; }
.cursor.tap b { transform: scale(1.3); }
@media (hover: hover) and (pointer: fine) {
  .moving .cursor { display: block; }
  .moving body, .moving a, .moving button, .moving canvas { cursor: none; }
  .moving input { cursor: text; }
}

/* Fine grain over everything, as on film. */
.grain { position: fixed; inset: -50%; z-index: 55; pointer-events: none; opacity: 0.07; 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.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- 1. hero */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: #000; isolation: isolate; }
.hero-poster, #diya {
  position: absolute; top: 0; right: 0; width: 60%; height: 100%; transform: scale(1.4); transform-origin: 50% 58%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 26%); mask-image: linear-gradient(90deg, transparent, #000 26%);
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
#diya { opacity: 0; transition: opacity 0.8s ease; }
.moving .hero-poster { opacity: 0; }
.moving.no-gl .hero-poster { opacity: 1; transition: opacity 0.8s; }
#diya.on { opacity: 1; }
.hero-dev { position: absolute; z-index: 1; left: 70%; top: 47%; transform: translate(-50%, -50%); mix-blend-mode: screen; width: min(46vw, 76svh); pointer-events: none; }
.hero-dev svg { width: 100%; height: auto; fill: rgba(220, 170, 92, 0.05); }
/* The same word, lit only where the flame reaches it. */
.hero-dev .lit {
  position: absolute; inset: 0; fill: rgba(255, 170, 90, 0.34); opacity: var(--glow, 0.9);
  -webkit-mask-image: radial-gradient(closest-side at 50% 62%, #000 0%, rgba(0, 0, 0, 0.55) 32%, transparent 78%);
  mask-image: radial-gradient(closest-side at 50% 62%, #000 0%, rgba(0, 0, 0, 0.55) 32%, transparent 78%);
}
.hero-copy { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 30px) var(--edge) calc(var(--base) + 120px); }
.hero-copy > * { max-width: 44vw; }
.hero-kicker { font: 500 var(--small)/1.4 var(--ui); color: var(--brass); margin-bottom: 22px; }
h1 { font-size: var(--fs-6); line-height: 0.96; letter-spacing: -0.02em; }
h1 .mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
h1 .mask > span { display: block; white-space: nowrap; }
.hero-copy h1 { max-width: none; }
.moving h1 .mask > span { animation: rise 1.6s var(--ease) both; }
.moving h1 .mask:nth-child(2) > span { animation-delay: 0.12s; }
.moving .hero-kicker, .moving .hero-lede, .moving .cta, .moving .cta-note { animation: arrive 1.4s var(--ease) both; }
.moving .hero-kicker { animation-delay: 0.3s; } .moving .hero-lede { animation-delay: 0.45s; } .moving .cta { animation-delay: 0.55s; } .moving .cta-note { animation-delay: 0.65s; }
.moving .hero-dev { animation: glow-in 2.8s ease-out both; }
@keyframes rise { from { transform: translateY(108%); } }
@keyframes arrive { from { opacity: 0; transform: translateY(24px); } }
@keyframes glow-in { from { opacity: 0; } }
.hero-lede { margin-top: 28px; font-size: var(--fs-1); line-height: 1.5; color: var(--muted); max-width: 31ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cta-note { margin-top: 14px; font-size: var(--small); color: var(--dim); }
.lamp-tap { position: absolute; z-index: 3; left: 70%; top: 40%; height: 40%; width: 22%; transform: translateX(-50%); background: none; border: 0; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; color: rgba(242, 230, 214, 0.4); font: 400 var(--small) var(--ui); }
.lamp-tap span { transition: opacity 0.6s; }
.lamp-tap.counted span { opacity: 0; }
.lamp-tap b { display: block; min-height: 1em; font: 400 clamp(36px, 3vw, 64px)/1 var(--display); color: rgba(242, 230, 214, 0.6); font-variant-numeric: tabular-nums; transition: color 0.8s; }
.lamp-tap b.lift { color: var(--ink); transition: none; }
/* Three facts along the foot of the hero, on the grid's columns. */
.hero-facts { position: absolute; z-index: 3; left: var(--edge); right: var(--edge); bottom: var(--base); margin: 0; padding: 22px 0 0; list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); border-top: 1px solid var(--hair); }
.hero-facts li { grid-column: span 3; display: grid; gap: 4px; font-size: var(--small); color: var(--dim); }
.hero-facts b { font: 500 var(--small)/1.3 var(--ui); color: var(--ink); }
.moving .hero-facts li { animation: arrive 1.4s var(--ease) both; }
.moving .hero-facts li:nth-child(1) { animation-delay: 0.8s; } .moving .hero-facts li:nth-child(2) { animation-delay: 0.9s; } .moving .hero-facts li:nth-child(3) { animation-delay: 1s; }
@media (max-width: 760px) {
  .hero-poster, #diya { width: 100%; top: auto; bottom: 0; height: 60%; transform-origin: 50% 60%; -webkit-mask-image: linear-gradient(transparent, #000 28%); mask-image: linear-gradient(transparent, #000 28%); }
  .hero-dev { left: 50%; top: 64%; width: 74vw; }
  .hero-copy { justify-content: flex-start; padding-top: calc(var(--nav-h) + 30px); }
  .hero-copy > * { max-width: none; }
  .hero-lede { margin-top: 18px; }
  .cta { margin-top: 24px; }
  .lamp-tap { left: 50%; top: 55%; width: 60%; height: 34%; }
  .hero-facts { display: none; }
  .hero-copy { padding-bottom: var(--base); }
}

/* ---------------------------------------------------------------- shared scene frame */
.scene { position: relative; }
.stage { position: relative; height: 100svh; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The text of a scene sits on the grid's first column, centred in the height left below the chapter mark. */
.copy { position: absolute; z-index: 2; left: var(--edge); top: 50%; width: 38vw; }
.copy > * { position: absolute; left: 0; top: 0; width: 100%; transform: translateY(-50%); }
.corner { position: absolute; z-index: 2; right: var(--edge); bottom: var(--base); }

/* ---------------------------------------------------------------- 2. count */
.count { background: #000; }
.moving #heldCanvas { opacity: 0; }
.still #heldCanvas { display: none; }
.count .veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 4, 2, 0.92), rgba(8, 4, 2, 0.5) 40%, transparent 66%), linear-gradient(rgba(8, 4, 2, 0.6), transparent 26%, transparent 72%, rgba(8, 4, 2, 0.82)); }
.beat { font: 400 var(--fs-5)/1.06 var(--display); letter-spacing: -0.012em; text-wrap: balance; }
.ring { width: clamp(170px, 17vw, 270px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: rgba(242, 230, 214, 0.16); transition: fill 0.25s; }
.ring circle.on { fill: var(--brass); }
.ring circle.sumeru { fill: #c96f32; }
.ring-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-n b { font: 400 clamp(46px, 4.4vw, 72px)/1 var(--display); font-variant-numeric: tabular-nums; }
.ring-n span { color: var(--muted); font-size: clamp(16px, 1.4vw, 20px); margin-top: 4px; }

/* ---------------------------------------------------------------- 3. name */
.name { background: linear-gradient(#000, var(--ground) 30%); padding: clamp(80px, 9vw, 160px) 0; overflow: hidden; }
/* One merged outline, so no seams show where the letters' parts overlap. */
.name-big { display: block; width: min(100%, 1900px); height: auto; overflow: visible; fill: none; stroke: rgba(220, 170, 92, 0.42); stroke-width: 1; margin-bottom: clamp(36px, 5vw, 76px); }
.name-copy { grid-column: 5 / -1; }
.lit { font: 400 var(--fs-3)/1.32 var(--display); }
.lit .w { color: rgba(242, 230, 214, 0.17); transition: color 0.25s; }
.lit .w.on { color: var(--ink); }
.name-root { margin-top: 28px; color: var(--muted); font-size: var(--fs-1); }

/* ---------------------------------------------------------------- 4. malas */
.malas { background: var(--ground); }
.malas-pin { position: relative; min-height: 100svh; padding: var(--top) 0 var(--base); display: flex; flex-direction: column; overflow: hidden; }
.malas-head { width: 100%; align-items: end; margin-bottom: clamp(24px, 3.4vw, 50px); }
.malas-head h2 { grid-column: 1 / 7; }
.malas-head .lede { grid-column: 8 / 12; font-size: var(--fs-0); max-width: 44ch; }
.malas-track { display: flex; gap: var(--gap); padding: 0 var(--edge); width: max-content; margin-top: auto; }
.mala-panel { width: min(24vw, 44svh * 0.69, 380px); min-width: 200px; flex: 0 0 auto; }
.mala-panel picture { display: block; overflow: hidden; border-radius: 3px; aspect-ratio: 9 / 13; background: var(--raise); }
.mala-panel img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 62%; transition: scale 1.2s var(--ease); }
.mala-panel:hover img { scale: 1.04; }
.mala-panel figcaption { display: grid; gap: 4px; margin-top: 18px; color: var(--muted); font-size: var(--small); max-width: 34ch; }
.mala-dev { font-size: var(--fs-2); color: var(--brass); line-height: 1.2; }
.mala-panel strong { font: 400 var(--fs-1)/1.2 var(--display); color: var(--ink); }
.mala-panel em { font-style: normal; color: var(--dim); }

/* ---------------------------------------------------------------- 6. eyes closed */
.eyes { background: #000; }
#incense { opacity: 0; }
.whispers { position: absolute; z-index: 2; left: var(--edge); right: var(--edge); top: 30%; }
.whisper { position: absolute; left: 0; right: 0; top: 0; margin: 0 auto; max-width: 20ch; text-align: center; font: 400 var(--fs-4)/1.12 var(--display); color: rgba(242, 230, 214, 0.78); text-wrap: balance; opacity: 0; transform: translateY(-50%); }
.eyes-count { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--base); text-align: center; color: rgba(242, 230, 214, 0.18); }
.eyes-count span { display: block; font-size: 20px; }
.eyes-count b { display: block; font: 400 52px/1.15 var(--display); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 7. days */
.days { background: var(--ground); }
.days .stage { align-content: center; row-gap: 40px; padding-top: var(--nav-h); }
.days-copy { grid-column: 1 / 6; align-self: center; }
.days-copy h2 { margin-bottom: 22px; }
.days-status { margin-top: 30px; color: var(--muted); }
.days-status b { font: 400 var(--fs-3)/1 var(--display); color: var(--ink); margin-right: 12px; font-variant-numeric: tabular-nums; }
.days-art { grid-column: 7 / -1; position: relative; align-self: center; aspect-ratio: 4 / 3; }
.days-art canvas, .days-still, .days-still img { position: absolute; inset: 0; width: 100%; height: 100%; }
.days-still img { object-fit: cover; border-radius: 4px; }
#daysCanvas { border-radius: 4px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.moving .days-still { visibility: hidden; }
.still #daysCanvas { display: none; }
.fulfilled { position: absolute; left: 0; right: 0; top: 100%; margin-top: 18px; text-align: center; font: 400 var(--fs-2)/1.2 var(--display); }
.still .fulfilled { position: relative; top: auto; }

/* ---------------------------------------------------------------- 8. screens */
.screens { background: var(--deep); }
.screens-pin { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding: var(--top) 0 var(--base); overflow: hidden; }
.screens-head { width: 100%; align-items: end; margin-bottom: clamp(24px, 3.4vw, 50px); }
.screens-head h2 { grid-column: 1 / 7; }
.screens-head .lede { grid-column: 8 / 12; font-size: var(--fs-0); }
.phones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--edge); margin-top: auto; align-items: end; }
.phone { width: 100%; max-width: 250px; justify-self: center; transition: translate 0.6s var(--ease); }
.phone:hover { translate: 0 -8px; }
.phone picture { display: block; padding: 7px; border-radius: 30px; background: #0d0806; box-shadow: inset 0 0 0 1px rgba(242, 230, 214, 0.12), 0 40px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6); }
.phone img { border-radius: 23px; width: 100%; height: auto; aspect-ratio: 360 / 763; object-fit: cover; max-height: 52svh; }
.phone figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: var(--small); }

/* ---------------------------------------------------------------- 9. seva */
.seva { background: var(--ground); padding: clamp(80px, 9vw, 160px) 0; }
.seva .statement { grid-column: 1 / 11; font-size: var(--fs-5); line-height: 1.12; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- reading sections: one rhythm, one rule above each */
.block { padding: clamp(64px, 7vw, 120px) 0; }
.block > .grid { border-top: 1px solid var(--hair); padding-top: clamp(28px, 3vw, 44px); background-clip: content-box; }
.how { background: var(--ground); }
.how-head { grid-column: 1 / 5; }
.how-head .lede { margin-top: 18px; font-size: var(--fs-0); }
.steps { grid-column: 6 / -1; list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: clamp(52px, 5vw, 76px) minmax(0, 1fr); column-gap: 18px; padding: 22px 0; border-top: 1px solid var(--hair); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before { content: counter(s, devanagari); grid-row: span 2; font: 400 var(--fs-3)/1 var(--display); color: var(--brass); }
.steps p { color: var(--muted); margin-top: 6px; max-width: 52ch; }
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(56px, 7vw, 100px); padding-top: clamp(24px, 2.6vw, 36px); border-top: 1px solid var(--hair); }
.facts h3 { font-size: var(--fs-1); margin-bottom: 10px; }
.facts p { color: var(--muted); font-size: 16px; }

.library { background: var(--ground); }
.lib-head { grid-column: 1 / 8; }
.lib-head .lede { margin-top: 18px; font-size: var(--fs-0); max-width: 52ch; }
.lib-tools { grid-column: 1 / -1; margin-top: 36px; position: sticky; top: var(--nav-h); z-index: 5; padding: 14px 0 8px; background: linear-gradient(var(--ground) 82%, rgba(18, 10, 7, 0)); }
.search { display: block; max-width: 560px; }
.search input {
  width: 100%; height: 54px; border-radius: 27px; border: 1px solid var(--faint); background: rgba(242, 230, 214, 0.04); color: var(--ink);
  font: 400 16px var(--ui); padding: 0 22px 0 50px; outline: none; transition: border-color 0.3s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b39d88' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 20px 50%;
}
.search input:focus { border-color: var(--brass); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--faint); background: transparent; color: var(--muted); font: 400 14px var(--ui); cursor: pointer; white-space: nowrap; transition: border-color 0.3s, color 0.3s, background-color 0.3s; }
.chip:hover { color: var(--ink); border-color: rgba(242, 230, 214, 0.3); }
.chip[aria-pressed='true'] { border-color: var(--brass); color: var(--ink); background: rgba(220, 170, 92, 0.12); }
.tally { font-size: var(--small); color: var(--dim); margin-top: 8px; }
.mantras { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 16px; }
.mantra { background: var(--ground); padding: 26px 26px 22px; display: flex; flex-direction: column; transition: background-color 0.4s; }
.mantra:hover { background: #170d09; }
.mantras.short .mantra.extra { display: none; }
.m-text { font: 400 clamp(21px, 1.7vw, 24px)/1.45 var(--display); }
.m-latin { font: italic 400 16px/1.45 var(--display); color: var(--muted); margin-top: 6px; }
.m-meaning { font-size: 15px; color: var(--muted); margin-top: 10px; }
.m-meta { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--brass); }
.lib-more { grid-column: 1 / -1; margin-top: 28px; }
.lib-more .btn { background-color: var(--ground); }
.more { grid-column: 1 / -1; margin-top: 26px; color: var(--muted); }

.faq { background: var(--ground); }
.faq h2 { grid-column: 1 / 5; }
.faq-list { grid-column: 6 / -1; }
details { border-top: 1px solid var(--hair); }
details:first-child { border-top: 0; }
details:last-child { border-bottom: 1px solid var(--hair); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font: 400 var(--fs-1)/1.3 var(--display); transition: color 0.3s; }
details:first-child summary { padding-top: 0; }
summary:hover { color: #fff7ea; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 300 26px/1 var(--ui); color: var(--brass); transition: transform 0.4s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 0 24px; max-width: 60ch; }

.support { background: var(--raise); }
.give-copy { grid-column: 1 / 7; }
.give-copy p { color: var(--muted); max-width: 52ch; margin-top: 18px; }
.give-copy h2 { margin-bottom: 8px; }
.jar { grid-column: 8 / -1; align-self: start; display: grid; gap: 18px; padding: clamp(24px, 3vw, 36px); border-radius: 22px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--hair); }
.upi { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.upi p { color: var(--muted); }
.upi .btn { margin-top: 12px; }
.qr { width: 148px; height: 148px; padding: 10px; border-radius: 16px; background: #fff7ea; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.upi-id { margin-top: 12px; font-size: 14px; word-break: break-all; }
.upi-id button { background: none; border: 0; color: var(--brass); font: 500 14px var(--ui); cursor: pointer; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.jar-soon { color: var(--muted); font: 400 var(--fs-1)/1.4 var(--display); }

.closing { text-align: center; padding: clamp(80px, 10vw, 170px) var(--edge); background: radial-gradient(60% 60% at 50% 40%, #2a130b, var(--ground) 70%); }
.closing-dev { font: 400 clamp(110px, 16vw, 220px)/1 var(--display); color: transparent; -webkit-text-stroke: 1px rgba(220, 170, 92, 0.55); }
.closing-line { font: 400 var(--fs-4)/1.1 var(--display); margin: 10px 0 34px; }

.foot { padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 36px); color: var(--dim); font-size: var(--small); }
.foot .grid { align-items: center; row-gap: 14px; border-top: 1px solid var(--hair); padding-top: 32px; background-clip: content-box; }
.foot p { grid-column: 1 / 5; }
.foot nav { grid-column: 5 / 10; display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.motion-toggle { grid-column: 10 / -1; justify-self: end; background: none; border: 1px solid var(--faint); color: var(--muted); border-radius: 18px; padding: 8px 14px; font: 400 13px var(--ui); cursor: pointer; }
.motion-toggle:hover { color: var(--ink); border-color: var(--brass); }

.motion-note {
  position: fixed; z-index: 40; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 18px; border-radius: 28px; background: rgba(27, 16, 11, 0.92); box-shadow: inset 0 0 0 1px var(--faint), 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 14px; color: var(--muted);
}
.motion-note button { border: 0; border-radius: 20px; padding: 9px 14px; font: 500 14px var(--ui); cursor: pointer; background: var(--ink); color: var(--ground); white-space: nowrap; }
.motion-note .x { background: none; color: var(--muted); padding: 9px 8px; }
@media (max-width: 600px) { .motion-note { flex-wrap: wrap; row-gap: 10px; width: calc(100vw - 32px); border-radius: 22px; padding: 14px 12px 10px 18px; } .motion-note span { flex-basis: 100%; } }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1000px) {
  .how-head, .steps, .faq h2, .faq-list, .lib-head, .give-copy, .jar { grid-column: 1 / -1; }
  .steps, .faq-list { margin-top: 32px; }
  .jar { margin-top: 36px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .malas-head h2, .malas-head .lede, .screens-head h2, .screens-head .lede { grid-column: 1 / -1; }
  .malas-head .lede, .screens-head .lede { margin-top: 14px; }
  .name-copy { grid-column: 1 / -1; }
  .days-copy, .days-art { grid-column: 1 / -1; }
  .days .stage { row-gap: 18px; }
  .seva .statement { grid-column: 1 / -1; }
  .foot p, .foot nav, .motion-toggle { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 760px) {
  .count .veil { background: linear-gradient(rgba(8, 4, 2, 0.9), rgba(8, 4, 2, 0.42) 46%, rgba(8, 4, 2, 0.15) 64%, rgba(8, 4, 2, 0.75)); }
  .copy { right: var(--edge); width: auto; top: 30%; }
  .corner { right: auto; left: 50%; transform: translateX(-50%); }
  .ring { width: 186px; }
  .mala-panel { width: min(70vw, 44svh * 0.69); }
  .phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { width: 56vw; flex: 0 0 auto; scroll-snap-align: center; }
  .days-copy .lede { font-size: var(--fs-0); }
  .fulfilled { font-size: var(--fs-0); margin-top: 12px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .upi { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- the still page: every scene composed, nothing moving */
.still .stage { height: auto; min-height: 0; overflow: visible; }
.still .count .stage, .still .held .stage, .still .eyes .stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: 100svh; }
.still .count canvas, .still .held canvas, .still .eyes canvas { position: relative; inset: auto; grid-column: 2; grid-row: 1 / span 2; height: 100svh; opacity: 1; }
.still .count .veil { display: none; }
.still .stage > .chapter { position: relative; left: auto; top: auto; grid-column: 1; grid-row: 1; align-self: end; margin: 0 0 24px var(--edge); }
.still .copy, .still .whispers { position: relative; inset: auto; top: auto; left: auto; right: auto; width: auto; grid-column: 1; grid-row: 2; align-self: start; display: grid; gap: 22px; padding: 0 var(--gutter, 0) 0 var(--edge); }
.still .copy > *, .still .whisper { position: relative; top: auto; left: auto; transform: none; opacity: 1; margin: 0; font-size: var(--fs-3); line-height: 1.2; max-width: 22ch; text-align: left; }
.still .copy > :first-child { font-size: var(--fs-4); }
.still .corner, .still .eyes-count, .still .progress { display: none; }
.still .lit .w { color: var(--ink); }
.still .days .stage { padding: clamp(90px, 11vw, 150px) 0; }
.still .malas-track, .still .phones { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.still .malas-track { width: auto; }
.still .mala-panel, .still .phone { scroll-snap-align: start; }
.still #diya { transition: none; }
@media (max-width: 760px) {
  .still .count .stage, .still .held .stage, .still .eyes .stage { grid-template-columns: minmax(0, 1fr); padding-top: 90px; }
  .still .count canvas, .still .held canvas, .still .eyes canvas { grid-column: 1; grid-row: 3; height: 80svh; }
  .still .copy, .still .whispers { padding-right: var(--edge); margin-bottom: 30px; }
}
