/* Samverse / Shruti v2
   World: a manuscript read at night. Kajal-black ground, gold line work,
   sindoor vermilion, palm-leaf tan. Flat colour only, no blends. */

:root {
  --ink: #100d17;
  --cloth: #7c1912;
  --cloth-deep: #5a100c;
  --cloth-line: rgba(243, 232, 207, 0.22);
  --ink-soft: #4a3a24;
  --ink-2: #17131f;
  --gold: #d8a948;
  --gold-dim: #8f7134;
  --gold-line: rgba(243, 232, 207, 0.28);
  --bone: #f3e8cf;
  --bone-dim: #dcc7a2;
  --verm: #d23a1f;
  --verm-close: #b32e19;
  --verm-deep: #6e1a0e;
  --leaf: #dcc188;
  --leaf-lit: #e7d2a0;
  --leaf-edge: #b99a5c;
  --leaf-ink: #1b140e;
  --red-ink: #96190f;

  --display: "Rozha One", "Nirmala UI", Georgia, serif;
  --text: "Anek Latin", "Segoe UI", system-ui, sans-serif;
  --deva-font: "Anek Devanagari", "Nirmala UI", sans-serif;

  --pad: clamp(20px, 5vw, 84px);
  --fi: clamp(6px, 0.9vw, 14px);
  --nav-h: 72px;
  --max: 1440px;
  --sec: clamp(110px, 14vw, 210px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.95  0 0 0 0 0.85  0 0 0 0.9 -0.32'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.005 0.6' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.30  0 0 0 0 0.19  0 0 0 0 0.06  1.1 0 0 0 -0.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.02  0 0 0 0 0.01  0.9 0 0 0 -0.34'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --jaali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23d8a948' stroke-opacity='0.6' stroke-width='1.2'%3E%3Ccircle cx='0' cy='0' r='48'/%3E%3Ccircle cx='96' cy='0' r='48'/%3E%3Ccircle cx='0' cy='96' r='48'/%3E%3Ccircle cx='96' cy='96' r='48'/%3E%3Ccircle cx='48' cy='48' r='48'/%3E%3Ccircle cx='48' cy='48' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
@media (max-width: 899px) { :root { --nav-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--leaf-edge) var(--cloth-deep);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-loading { overflow: hidden; }

body {
  margin: 0;
  background: var(--cloth);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.9s var(--ease);
}
body.is-final { background: var(--leaf); color: var(--leaf-ink); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--weave); transition: opacity 0.9s var(--ease); }
body.is-final::before { opacity: 0.35; }

::selection { background: var(--gold); color: var(--ink); }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.24em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.deva { font-family: var(--deva-font); }
.z { position: relative; z-index: 2; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 70;
  background: var(--bone); color: var(--ink); padding: 10px 16px;
  font-weight: 600; text-decoration: none; border-radius: 999px;
}
.skip:focus { top: 16px; }

/* ---------- fixed layers ---------- */
.chakra { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.grain { position: fixed; inset: 0; z-index: 45; pointer-events: none; background-image: var(--grain); opacity: 0.04; }
.frame {
  position: fixed; inset: var(--fi); z-index: 46; pointer-events: none;
  border: 1px solid rgba(243, 232, 207, 0.4);
  transition: border-color 0.9s var(--ease);
}
.frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(243, 232, 207, 0.14); }
.frame i { position: absolute; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); transition: background-color 0.9s var(--ease); }
.frame i:nth-child(1) { left: -5px; top: -5px; }
.frame i:nth-child(2) { right: -5px; top: -5px; }
.frame i:nth-child(3) { left: -5px; bottom: -5px; }
.frame i:nth-child(4) { right: -5px; bottom: -5px; }
body.is-final .frame { border-color: rgba(27, 20, 14, 0.45); }
body.is-final .frame::before { border-color: rgba(27, 20, 14, 0.15); }
body.is-final .frame i { background: var(--red-ink); }

/* ---------- loader ---------- */
.loader {
  --hole: 0px;
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--cloth);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 0.5px));
  mask-image: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 0.5px));
}
html:not(.motion) .loader { display: none; }
.loader__ring { position: absolute; width: min(46vmin, 300px); height: min(46vmin, 300px); overflow: visible; }
.loader__ring circle { fill: none; stroke: var(--gold); stroke-width: 1.2; }
.loader__num { font-family: var(--display); font-size: clamp(3rem, 10vmin, 5.5rem); line-height: 1; color: var(--bone); }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 50;
  top: var(--fi); left: var(--fi); right: var(--fi);
  height: var(--nav-h);
  display: flex; align-items: center; gap: 36px;
  padding: 0 calc(var(--pad) - var(--fi));
  transition: transform 0.55s var(--ease), background-color 0.5s var(--ease);
}
.nav.is-solid { background: var(--cloth); box-shadow: 0 1px 0 var(--cloth-line); }
body.is-final .nav.is-solid { background: var(--leaf); box-shadow: 0 1px 0 rgba(27, 20, 14, 0.2); }
body.is-final .nav__brand { color: var(--leaf-ink); }
.nav.is-hidden { transform: translateY(calc(-100% - var(--fi) - 2px)); }
.nav__brand { font-family: var(--display); font-size: 1.65rem; line-height: 1; text-decoration: none; color: var(--bone); margin-right: auto; }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  position: relative; padding: 6px 0;
  text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--leaf); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current] { color: var(--bone); }
.nav__links a:hover::after, .nav__links a[aria-current]::after { transform: scaleX(1); }
body.is-final .nav__links a { color: var(--leaf-ink); }
body.is-final .nav__links a::after { background: var(--red-ink); }
@media (max-width: 899px) { .nav__links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border-radius: 999px;
  background: var(--leaf); color: var(--leaf-ink);
  box-shadow: 0 12px 24px -16px rgba(20, 3, 2, 0.95);
  font-weight: 600; font-size: 1.05rem; white-space: nowrap; text-decoration: none;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--bone); transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 10px 20px; font-size: 0.95rem; }
body.is-final .nav .btn { background: var(--cloth); color: var(--bone); }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-weight: 500; font-size: 1.05rem; color: var(--bone);
}
.ghost-btn__dot {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--leaf); color: var(--leaf);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.ghost-btn:hover .ghost-btn__dot { background: var(--leaf); color: var(--leaf-ink); }
.ghost-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ghost-btn__label { text-decoration: underline; text-decoration-color: var(--bone-dim); text-underline-offset: 0.3em; }

.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }

/* the play button that sits on the chakra's hub */
.hub {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 16%; min-width: 58px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--leaf-ink); color: var(--leaf-lit);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--cloth), 0 0 0 8px var(--leaf), 0 22px 40px -14px rgba(20, 3, 2, 0.95);
  transition: transform 0.45s var(--ease), background-color 0.3s var(--ease);
}
.hub:hover { transform: translate(-50%, -50%) scale(1.06); background: #2b2016; }
.hub:active { transform: translate(-50%, -50%) scale(0.96); }
.hub svg { width: 36%; height: 36%; fill: currentColor; }
.hub::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1px solid var(--leaf); opacity: 0; pointer-events: none;
}
.hub.is-playing::after { animation: hubpulse 1.8s var(--ease) infinite; }
@keyframes hubpulse {
  from { opacity: 0.9; transform: scale(0.9); }
  to { opacity: 0; transform: scale(1.7); }
}

/* ---------- shared type ---------- */
.h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  line-height: 1.02; letter-spacing: -0.01em;
  color: var(--bone);
}
/* plain lists shown only when JavaScript is off (the script replaces them) */
.ring-static, .vy-static { list-style: none; display: grid; gap: 14px; max-width: 60ch; margin-top: 24px; color: var(--bone-dim); line-height: 1.5; }
.ring-static h3 { font-family: var(--display); font-weight: 400; font-size: 1.4rem; color: var(--bone); }
.vy-static b { color: var(--bone); font-weight: 600; }
.lede { margin-top: 20px; max-width: 46ch; font-size: clamp(1.05rem, 1.25vw, 1.2rem); line-height: 1.5; color: var(--bone-dim); }

/* word masks used by the reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.w > span { display: inline-block; }
.motion .h2 .w > span { transform: translateY(110%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.motion .h2.is-in .w > span { transform: none; }

/* ---------- hero: वाक् filled with water, on the red cloth ---------- */
.vak { position: relative; }
.vak__stage {
  position: relative; z-index: 2;
  height: 100vh; height: 100dvh; overflow: hidden;
  isolation: isolate; background: #16181e;
}
/* the hero ground is the water itself, dimmed; the word shows the same water lit up */
.vak__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.42) saturate(0.85); }
.vak__word-cv, .vak__scrim, .vak__hero, .vak__statement { z-index: 2; }
.vak__word-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* never shown: it only makes the browser load the display face the canvas draws with */
.vak__word { position: absolute; left: 0; top: 0; font-family: var(--display); font-size: 40px; line-height: 1; visibility: hidden; pointer-events: none; }
.vak__scrim { position: absolute; inset: 0; background: rgba(16, 13, 23, 0.5); opacity: 0; }

.vak__hero {
  position: absolute; z-index: 2;
  left: var(--pad); right: var(--pad); bottom: clamp(26px, 6vh, 64px);
  max-width: var(--max); margin: 0 auto;
}
.hero__gloss { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; color: var(--bone-dim); font-size: 0.98rem; }
.hero__gloss .deva { font-size: 1.35rem; color: var(--leaf); }
.vak__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: end; gap: 28px 56px; }
.hero__title { font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 4.6vw, 4.6rem); line-height: 1; letter-spacing: -0.012em; }
.hero__title .line { display: block; }
.hero__title .line:last-child { color: var(--leaf); }
.hero__sub { max-width: 40ch; font-size: clamp(1.02rem, 1.2vw, 1.18rem); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 24px; }
.hero__caption {
  margin-top: 16px; min-height: 1.55em; max-width: 54ch;
  color: var(--bone-dim); font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero__caption b { color: var(--leaf); font-weight: 600; margin-right: 6px; }

.vak__statement { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(48px, 12vh, 140px); pointer-events: none; }
.vak__line { font-family: var(--display); font-size: clamp(2.8rem, 7.4vw, 6rem); line-height: 1.02; color: var(--bone); }
.vak__line--gold { color: var(--leaf); }
html:not(.motion) .vak__statement { display: none; }

@media (max-width: 899px) {
  .vak__row { grid-template-columns: 1fr; gap: 16px; }
  .hero__title { font-size: clamp(2.2rem, 9.6vw, 3.2rem); }
  .hero__gloss { margin-bottom: 12px; font-size: 0.9rem; }
  .hero__actions { margin-top: 16px; }
  .hero__caption { display: none; }
}
html:not(.motion) .vak__scrim { opacity: 1; }

/* ---------- agents ---------- */
.agents { position: relative; --card: clamp(220px, min(22vw, 34vh), 300px); }
.agents__stage {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + var(--fi) + 18px) var(--pad) 28px;
}
.ring-wrap { flex: 1; min-height: 0; display: flex; align-items: center; margin-top: 24px; }
.ring {
  display: flex; gap: 16px; width: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px 4px 24px;
}
.ring::-webkit-scrollbar { display: none; }
.agents__hub { display: none; }

.gcard {
  position: relative; flex: none;
  width: var(--card); height: var(--card);
  padding: 0; border: 0; background: none; border-radius: 50%;
  cursor: pointer; scroll-snap-align: center;
  -webkit-tap-highlight-color: transparent;
}
.agents:not(.is-ring) .gcard { perspective: 1200px; }
.gcard__in { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.gcard.is-turned .gcard__in { transform: rotateY(180deg); }
.gcard__face {
  position: absolute; inset: 0; border-radius: 50%;
  container-type: inline-size;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5em;
  padding: 15%; text-align: center;
  background: var(--c); color: var(--t);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  opacity: var(--o, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 34px 60px -34px rgba(0, 0, 0, 0.95);
}
.gcard__back { transform: rotateY(180deg); gap: 0.35em; }
.gcard__rim { position: absolute; inset: 3.5%; width: 93%; height: 93%; fill: none; stroke: var(--rim); pointer-events: none; overflow: visible; }
.gcard__rim .r1 { stroke-width: 0.8; }
.gcard__rim .r2 { stroke-width: 0.35; }
.gcard__rim .dots { stroke-width: 1.2; stroke-dasharray: 0 2.6; stroke-linecap: round; }
.gcard__glyph { display: inline-block; font-family: var(--display); font-size: 19cqi; line-height: 1.15; color: var(--rim); white-space: nowrap; }
.gcard__legend { font-size: 4.2cqi; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }
.gcard__name { font-family: var(--display); font-size: 9.5cqi; line-height: 1; margin-top: 2cqi; }
.gcard__line { font-size: 4.7cqi; line-height: 1.32; max-width: 64cqi; }
.gcard__fact { display: block; font-size: 4.3cqi; line-height: 1.3; max-width: 68cqi; }
.gcard__fact b { display: block; font-size: 3.3cqi; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.78; }
.gcard:focus-visible { outline-offset: 6px; }

.agents.is-ring .ring-wrap { justify-content: center; perspective: 1800px; perspective-origin: 50% 46%; position: relative; }
.agents.is-ring .ring { display: block; position: relative; width: var(--card); height: var(--card); padding: 0; overflow: visible; transform-style: preserve-3d; }
.agents.is-ring .gcard { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.agents.is-ring .agents__hub { display: block; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------- listen ---------- */
.listen { position: relative; padding: var(--sec) var(--pad); }
.listen__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.16; filter: grayscale(1) contrast(1.15); pointer-events: none; }
.listen__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 110px); align-items: start;
}
.voice { position: relative; width: min(100%, 42vh, 400px); aspect-ratio: 1; margin: clamp(26px, 5vh, 52px) 0 clamp(18px, 3vh, 30px); }
.voices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gold-line); background: transparent;
  color: var(--bone-dim); font-weight: 500; font-size: 0.95rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.chip:hover { color: var(--bone); border-color: var(--bone-dim); }
.chip.is-on { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); font-weight: 600; }
.player { display: flex; align-items: center; gap: 16px; margin-top: 16px; max-width: 420px; }
.seek { flex: 1; min-width: 120px; height: 24px; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.seek::-webkit-slider-runnable-track { height: 2px; background: var(--bone-dim); }
.seek::-moz-range-track { height: 2px; background: var(--bone-dim); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: var(--leaf); border: 0; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--leaf); border: 0; }
.time { min-width: 3.2em; color: var(--bone-dim); font-weight: 500; font-variant-numeric: tabular-nums; }

.listen__page { padding-top: clamp(8px, 4vh, 40px); }
.scribe {
  position: relative;
  min-height: clamp(340px, 54vh, 540px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 24px;
  padding: clamp(34px, 4vw, 52px) clamp(26px, 4vw, 56px) clamp(30px, 4vw, 46px) clamp(56px, 6vw, 88px);
  background-color: var(--leaf); background-image: var(--fibre); background-size: 100% 240px;
  color: var(--leaf-ink); border-radius: 26px;
  box-shadow: inset 0 1px 0 var(--leaf-lit), inset 0 -1px 0 var(--leaf-edge), 0 30px 50px -30px rgba(20, 3, 2, 0.95);
}
.scribe::before, .scribe::after {
  content: ""; position: absolute; left: clamp(22px, 2.6vw, 36px);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cloth-deep); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--leaf-edge);
}
.scribe::before { top: 22%; }
.scribe::after { bottom: 22%; }
.sline { animation: lineup 0.7s var(--ease) both; }
@keyframes lineup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.sline__who { display: block; margin-bottom: 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-ink); }
.sline--them .sline__who { color: var(--ink-soft); }
.sline__text { font-family: var(--display); font-size: clamp(1.5rem, 2.5vw, 2.35rem); line-height: 1.2; color: var(--leaf-ink); max-width: 30ch; }
.sline.is-past .sline__text { font-family: var(--text); font-size: 1.05rem; line-height: 1.45; color: var(--ink-soft); max-width: 62ch; }
.sline.is-past { animation: none; }
.sline--idle { color: var(--ink-soft); font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.2; max-width: 22ch; }
.wd { opacity: 0.13; filter: blur(5px); transition: opacity 0.4s var(--ease), filter 0.5s var(--ease); }
.wd.on { opacity: 1; filter: none; }

.seals { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-height: 128px; margin-top: 30px; padding-left: clamp(22px, 3vw, 46px); }
.seals__empty { color: var(--bone); font-size: 0.95rem; max-width: 34ch; }
.seal {
  position: relative; width: 118px; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 14px; text-align: center;
  background: var(--leaf); color: var(--red-ink);
  box-shadow: 0 16px 26px -16px rgba(20, 3, 2, 0.95);
  transform: rotate(var(--rot, -6deg));
}
.seal::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(150, 25, 15, 0.6); }
.seal b { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.seal span { font-family: var(--display); font-size: 1.05rem; line-height: 1.05; }
.seal--final { background: var(--leaf-ink); color: var(--leaf-lit); }
.seal--final::before { border-color: rgba(231, 210, 160, 0.5); }
.seal.is-new { animation: stamp 0.75s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.8) rotate(-20deg); }
  55% { opacity: 1; transform: scale(0.93) rotate(var(--rot, -6deg)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--rot, -6deg)); }
}

/* ---------- vyuha ---------- */
.vyuha { position: relative; }
.vyuha__stage {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center; gap: clamp(24px, 5vw, 80px);
  padding: calc(var(--nav-h) + var(--fi) + 16px) var(--pad) 28px;
}
.vyuha__svg { width: min(100%, 84vh); justify-self: center; overflow: visible; }
.vy-ring { fill: none; stroke: rgba(243, 232, 207, 0.1); stroke-width: 1; }
.vy-bg { fill: none; stroke: rgba(243, 232, 207, 0.2); stroke-width: 2; }
.vy-fg { fill: none; stroke: var(--gold); stroke-width: 3.2; stroke-linecap: round; }
.vy-head { fill: var(--leaf-lit); stroke: var(--leaf-ink); stroke-width: 3; }
.vy-center { font-family: var(--deva-font); font-size: 30px; fill: var(--gold); }
.mk { cursor: pointer; outline: none; }
.mk circle { fill: var(--cloth); stroke: var(--bone-dim); stroke-width: 2; transition: fill 0.35s, stroke 0.35s; }
.mk text { font-family: var(--text); font-size: 23px; font-weight: 500; fill: var(--bone-dim); transition: fill 0.35s; }
.mk.on circle { fill: var(--gold); stroke: var(--gold); }
.mk.on text { fill: var(--bone); }
.mk.is-current circle { fill: var(--leaf-ink); stroke: var(--leaf-lit); stroke-width: 3; }
.mk:focus-visible circle { stroke: var(--bone); stroke-width: 4; }
.vy-panel {
  position: relative; margin-top: clamp(26px, 5vh, 52px);
  padding: 26px 30px 26px 56px; max-width: 470px;
  background-color: var(--leaf); background-image: var(--fibre); background-size: 100% 240px;
  color: var(--leaf-ink); border-radius: 22px;
  box-shadow: inset 0 1px 0 var(--leaf-lit), inset 0 -1px 0 var(--leaf-edge), 0 24px 40px -26px rgba(20, 3, 2, 0.95);
}
.vy-panel::before {
  content: ""; position: absolute; left: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: var(--cloth-deep); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--leaf-edge);
}
.vy-panel > * { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.vy-panel.is-swapping > * { opacity: 0; transform: translateY(8px); }
.vy-panel__num { display: block; font-size: 1.3rem; color: var(--red-ink); line-height: 1; }
.vy-panel__name { margin-top: 8px; font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.05; }
.vy-panel__line { margin-top: 10px; font-size: 1.12rem; line-height: 1.45; max-width: 36ch; }
.vy-panel__agents { margin-top: 12px; font-weight: 600; font-size: 0.95rem; color: var(--red-ink); }

/* ---------- method ---------- */
.method { position: relative; max-width: var(--max); margin: 0 auto; padding: var(--sec) var(--pad) 0; }
.method .h2 { margin-bottom: clamp(44px, 7vh, 80px); }
.leaves { display: grid; gap: 14vh; padding-bottom: 16vh; }
.pleaf {
  position: sticky; z-index: 2;
  top: calc(var(--nav-h) + var(--fi) + 5vh + var(--i) * 26px);
  min-height: clamp(190px, 29vh, 270px);
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: clamp(20px, 4vw, 64px);
  padding: 28px clamp(64px, 9vw, 150px);
  border-radius: 140px / 50%;
  background-color: var(--leaf); background-image: var(--fibre); background-size: 100% 240px;
  color: var(--leaf-ink);
  box-shadow: inset 0 1px 0 var(--leaf-lit), inset 0 -1px 0 var(--leaf-edge), 0 28px 50px -30px rgba(0, 0, 0, 0.95);
  transform-origin: 50% 0;
  overflow: hidden;
}
.pleaf::before, .pleaf::after {
  content: ""; position: absolute; top: 50%; z-index: 1;
  width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: var(--cloth-deep); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--leaf-edge);
}
.pleaf::before { left: clamp(28px, 4vw, 56px); }
.pleaf::after { right: clamp(28px, 4vw, 56px); }
.pleaf__shade { position: absolute; inset: 0; z-index: 3; background: var(--cloth-deep); opacity: 0; pointer-events: none; }
.pleaf__num, .pleaf__body { position: relative; z-index: 2; }
.pleaf__num { font-size: clamp(3.6rem, 8vw, 6rem); line-height: 0.9; color: var(--red-ink); font-weight: 600; }
.pleaf h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1; }
.pleaf p { margin-top: 10px; max-width: 42ch; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.42; }

/* ---------- questions ---------- */
.yaksha { position: relative; padding: var(--sec) 0; }
.ripples { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.yaksha__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 110px); align-items: start;
}
.yaksha__head { position: sticky; top: calc(var(--nav-h) + var(--fi) + 40px); }
.qa details { border-top: 1px solid var(--gold-line); }
.qa details:last-child { border-bottom: 1px solid var(--gold-line); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0;
  font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.2;
  color: var(--bone); transition: color 0.3s var(--ease);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--bone-dim); color: var(--leaf);
  font-family: var(--text); font-size: 1.4rem; line-height: 1;
  transition: transform 0.5s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.qa summary:hover, .qa details[open] summary { color: var(--bone); }
.qa details[open] summary::after { transform: rotate(45deg); background: var(--leaf); color: var(--leaf-ink); border-color: var(--leaf); }
.qa details p {
  margin-bottom: 26px; padding: 20px 28px 20px 54px; max-width: 60ch;
  font-size: 1.12rem; line-height: 1.55; color: var(--leaf-ink); position: relative;
  background-color: var(--leaf); background-image: var(--fibre); background-size: 100% 240px; border-radius: 18px;
  box-shadow: inset 0 1px 0 var(--leaf-lit), inset 0 -1px 0 var(--leaf-edge), 0 18px 30px -22px rgba(20, 3, 2, 0.95);
}
.qa details p::before {
  content: ""; position: absolute; left: 20px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--cloth-deep); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--leaf-edge);
}
.qa details[open] p { animation: lineup 0.6s var(--ease) both; }

/* ---------- close ---------- */
.close {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + var(--fi) + 40px) var(--pad) 0;
  text-align: center;
}
/* the conch reads as a faint ink drawing on the leaf: inverted so its dark ground drops out under multiply */
.close__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; pointer-events: none; filter: grayscale(1) invert(1) contrast(1.35) brightness(1.08); opacity: 0.22; }
.close__visual { position: absolute; left: 50%; top: 50%; width: min(92vw, 92vh); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; visibility: hidden; }
.close__inner { margin: auto 0; display: flex; flex-direction: column; align-items: center; }
.close__iti { font-size: 1.5rem; color: var(--red-ink); margin-bottom: 18px; }
.close__title { font-size: clamp(3rem, 8vw, 6rem); color: var(--leaf-ink); }
.close__gloss { margin-top: 22px; max-width: 44ch; font-size: 1.12rem; line-height: 1.5; color: var(--leaf-ink); }
.conch {
  --p: 0;
  position: relative; margin-top: 44px;
  width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background: var(--cloth); color: var(--bone);
  box-shadow: 0 22px 40px -20px rgba(20, 3, 2, 0.9);
  touch-action: none; user-select: none; -webkit-user-select: none;
  transform: scale(calc(1 + var(--p) * 0.08));
  transition: background-color 0.3s var(--ease);
}
.conch svg { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); overflow: visible; }
.conch__track { fill: none; stroke: rgba(27, 20, 14, 0.25); stroke-width: 1.5; }
.conch__fill { fill: none; stroke: var(--cloth); stroke-width: 3; stroke-linecap: round; }
.conch__label { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.conch.is-done { background: var(--leaf-ink); color: var(--leaf-lit); }
.conch.is-nudge { animation: nudge 0.5s var(--ease); }
@keyframes nudge { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.close__help { margin-top: 20px; font-size: 0.92rem; color: var(--ink-soft); }
.close__direct { margin-top: 10px; font-weight: 600; color: var(--red-ink); }

.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px;
  margin-top: 60px; padding: 26px 0 calc(30px + var(--fi));
  border-top: 1px solid rgba(27, 20, 14, 0.25);
  text-align: left; color: var(--leaf-ink); font-size: 0.98rem;
}
.foot__brand { font-family: var(--display); font-size: 1.35rem; margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__pages { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 14px; border-top: 1px solid rgba(27, 20, 14, 0.15); font-size: 0.92rem; }

/* ---------- small screens ---------- */
@media (max-width: 899px) {
  .listen__grid, .yaksha__inner { grid-template-columns: 1fr; }
  .voice { width: min(70vw, 300px); margin-left: auto; margin-right: auto; }
  .scribe { min-height: 300px; }
  .yaksha__head { position: static; }
  .vyuha__stage { grid-template-columns: 1fr; align-content: start; gap: 16px; }
  .vyuha__svg { order: -1; width: min(86vw, 46vh); }
  .vyuha__text .lede { display: none; }
  .vy-panel { margin-top: 8px; padding: 14px 18px; }
  .mk text { display: none; }
  .pleaf { grid-template-columns: 1fr; gap: 6px; padding: 30px 48px; border-radius: 70px / 50%; }
  .pleaf::before { left: 18px; } .pleaf::after { right: 18px; }
  .conch { width: 136px; height: 136px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .wd { opacity: 1; filter: none; }
}

/* ---------- reading thread (scroll progress, the cord of the pothi) ---------- */
.thread { position: fixed; z-index: 46; left: calc(var(--fi) + 18px); top: calc(var(--fi) + var(--nav-h) + 20px); bottom: calc(var(--fi) + 20px); width: 2px; margin-left: -1px; background: rgba(243, 232, 207, 0.14); pointer-events: none; }
.thread i { position: absolute; inset: 0; background: var(--bone); transform-origin: 50% 0; transform: scaleY(0); }
body.is-final .thread { background: rgba(27, 20, 14, 0.14); }
body.is-final .thread i { background: var(--red-ink); }
@media (max-width: 899px) { .thread { left: calc(var(--fi) + 6px); } }

/* ---------- epic: folios fly out of the chakra ---------- */
.epic { position: relative; }
.epic__stage { position: relative; z-index: 2; padding: var(--sec) var(--pad); max-width: var(--max); margin: 0 auto; }
.epic__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; mix-blend-mode: multiply; }
.has-video .epic__video { opacity: 0.55; }
.epic__title { margin-bottom: clamp(36px, 6vh, 64px); }
.epic__list { display: grid; gap: clamp(48px, 8vh, 90px); }
.folio { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
/* a single palm leaf: ink word in the middle, two string holes, ruled margins */
.pcard {
  position: relative; justify-self: center;
  width: min(100%, 760px); aspect-ratio: 3.3 / 1;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; align-items: center;
  padding: 0 clamp(28px, 6%, 64px);
  border-radius: 7% / 50%;
  background-color: var(--leaf); background-image: var(--fibre);
  color: var(--leaf-ink);
  box-shadow: inset 0 0 0 1px var(--leaf-edge), inset 0 -10px 22px -16px rgba(60, 35, 10, 0.55), 0 50px 70px -40px rgba(20, 3, 2, 0.95);
}
.pcard::before {
  content: ""; position: absolute; left: 11%; right: 11%; top: 14%; bottom: 14%;
  border-top: 1px solid rgba(150, 25, 15, 0.45); border-bottom: 1px solid rgba(150, 25, 15, 0.45);
  pointer-events: none;
}
.pcard__hole {
  position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--cloth-deep); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--leaf-edge);
}
.pcard__hole:first-of-type { left: 30%; }
.pcard__hole:nth-of-type(2) { left: 70%; }
.pcard__num { grid-row: 1 / 3; font-size: clamp(1.6rem, 3.2vw, 2.6rem); color: var(--red-ink); padding-right: clamp(14px, 3%, 30px); align-self: center; }
.pcard__sa { position: relative; z-index: 1; justify-self: center; align-self: end; font-family: var(--display); font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.3; }
.pcard__en { justify-self: center; align-self: start; padding-bottom: 4%; font-size: clamp(0.72rem, 1vw, 0.9rem); letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-ink); }
.folio__num, .ecap .folio__num { display: block; font-size: 1.4rem; color: var(--leaf); line-height: 1; }
.folio__cap h3, .ecap h3 { margin-top: 10px; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.02; color: var(--bone); }
.folio__cap p, .ecap p { margin-top: 12px; max-width: 34ch; font-size: clamp(1.05rem, 1.3vw, 1.22rem); line-height: 1.45; color: var(--bone-dim); }
.epic__caps { display: none; }

.epic.is-tunnel .epic__stage { height: 100vh; height: 100dvh; max-width: none; padding: 0; overflow: hidden; }
.epic.is-tunnel .epic__title { position: absolute; left: var(--pad); top: calc(var(--nav-h) + var(--fi) + 18px); margin: 0; }
.epic.is-tunnel .epic__list { position: absolute; inset: 0; display: block; perspective: 1100px; perspective-origin: 50% 50%; }
.epic.is-tunnel .folio { position: absolute; left: 50%; top: 52%; display: block; will-change: transform, opacity; }
.epic.is-tunnel .pcard { width: min(62vw, 820px); }
.epic.is-tunnel .folio__cap { display: none; }
.epic.is-tunnel .epic__caps { display: block; position: absolute; left: var(--pad); bottom: clamp(36px, 8vh, 90px); width: min(420px, 38vw); min-height: 200px; }
.ecap { position: absolute; left: 0; bottom: 0; opacity: 0; transform: translateY(22px); transition: opacity 0.5s var(--ease), transform 0.7s var(--ease); pointer-events: none; }
.ecap.is-on { opacity: 1; transform: none; }
@media (max-width: 899px) {
  .folio { grid-template-columns: 1fr; }
  .epic.is-tunnel .pcard { width: 84vw; }
  .epic.is-tunnel .folio { top: 46%; }
  .epic.is-tunnel .epic__caps { width: auto; right: var(--pad); bottom: 28px; min-height: 150px; }
  .folio__cap h3, .ecap h3 { font-size: 1.9rem; }
}

/* ---------- plate: Ganesha opens from a circle ---------- */
.motion .plate__frame { box-shadow: none; }

/* ---------- verse: the Gita's opening words ---------- */
.verse { position: relative; overflow: hidden; padding: clamp(80px, 12vh, 150px) 0; }
.verse__line { white-space: nowrap; font-size: clamp(4rem, 13vw, 12rem); line-height: 1.15; font-weight: 600; will-change: transform; }
.verse__line--a { color: var(--leaf); }
.verse__line--b { color: transparent; -webkit-text-stroke: 1.5px rgba(243, 232, 207, 0.55); margin-left: -30vw; }
.verse__gloss { max-width: 46ch; margin: clamp(28px, 5vh, 56px) auto 0; padding: 0 var(--pad); text-align: center; font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.5; color: var(--bone); }

/* ---------- footer credit ---------- */
