/* ------------------------------------------------------------------
   She Who Is Nature — site styles
   Layout: a night-dark hero split ember | pearl like the book cover,
   opening onto deckled parchment pages where each image dissolves
   into the same paper it sits on.
------------------------------------------------------------------- */

@font-face { font-family: "Rozha One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/rozha-one-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Rozha One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/rozha-one-devanagari-400-normal.woff2) format("woff2");
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: "Tiro Devanagari Sanskrit"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/tiro-devanagari-sanskrit-devanagari-400-normal.woff2) format("woff2");
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/spectral-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/spectral-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/fonts/spectral-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/fonts/spectral-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/spectral-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/spectral-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* palette: the cover's two halves + the images' paper */
  --night: #130B0C;          /* Kalaratri's night */
  --night-2: #21120F;
  --ember: #E2672B;          /* her fire */
  --sindoor: #A31F1A;        /* vermilion, the bindu */
  --sindoor-hi: #BE2A22;
  --gold: #C9A04A;           /* crown and mandala gold */
  --gold-soft: #E3C988;
  --pearl: #F5EFE3;          /* Mahagauri's pearls */
  --paper: #EFE5CF;          /* the exact paper the images sit on */
  --paper-deep: #E5D6B4;
  --ink: #2B1B13;
  --ink-soft: #5E4737;
  --rule: rgba(43, 27, 19, 0.16);

  /* type */
  --font-display: "Rozha One", "Tiro Devanagari Sanskrit", Georgia, "Times New Roman", serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-sanskrit: "Tiro Devanagari Sanskrit", "Rozha One", "Noto Serif Devanagari", "Kohinoor Devanagari", serif;

  --t-xs: 0.8125rem;   /* 13 */
  --t-sm: 0.9375rem;   /* 15 */
  --t-md: 1.125rem;    /* 18 */
  --t-lg: 1.375rem;    /* 22 */
  --t-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
  --t-2xl: clamp(2rem, 1.3rem + 3vw, 3rem);
  --t-3xl: clamp(2.7rem, 1.4rem + 5.6vw, 5.4rem);

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --measure: 62ch;
  --wrap: 1180px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 64px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sindoor);
}
.deva { font-family: var(--font-sanskrit); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.7em 1.4em;
  font-family: var(--font-body); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--sindoor); color: var(--pearl);
  box-shadow: inset 0 0 0 1px rgba(227, 201, 136, .45), 0 10px 30px -12px rgba(163, 31, 26, .8);
}
.btn-primary:hover { background: var(--sindoor-hi); }
.btn-ghost { border-color: rgba(201, 160, 74, .6); color: var(--gold-soft); background: rgba(19, 11, 12, .35); }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--pearl); }
.btn-ink { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ink:hover { background: var(--ink); color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mark { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-soft); text-decoration: none; line-height: 1; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.topnav a.link { color: rgba(245, 239, 227, .78); text-decoration: none; font-size: var(--t-sm); letter-spacing: .03em; }
.topnav a.link:hover { color: var(--pearl); }
.topnav .btn { min-height: 40px; padding: .45em 1.1em; font-size: var(--t-xs); }
@media (max-width: 760px) { .topnav a.link { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--pearl);
  padding-top: calc(76px + env(safe-area-inset-top, 0px));
  padding-bottom: 92px;
}
.hero::before { /* the cover's split: ember on the left, pearl on the right */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 70% at 22% 46%, rgba(226, 103, 43, .30), transparent 70%),
    radial-gradient(40% 50% at 30% 80%, rgba(163, 31, 26, .35), transparent 70%),
    radial-gradient(55% 65% at 78% 40%, rgba(245, 239, 227, .13), transparent 70%),
    linear-gradient(90deg, #1b0c0b 0%, var(--night) 50%, #17110f 100%);
}
.hero-deva { /* huge faint name behind the face */
  position: absolute; z-index: -1; left: 50%; top: 13%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: clamp(5rem, 19vw, 17rem); line-height: 1;
  white-space: nowrap; color: var(--gold); opacity: .085; pointer-events: none; user-select: none;
}
#embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-inner { display: grid; justify-items: center; text-align: center; --face-w: min(82vw, 400px); }
@media (min-width: 700px) { .hero-inner { --face-w: clamp(300px, 40vw, 540px); } }
@supports (height: 100svh) {
  /* on laptops keep the title and buttons inside the first screen */
  @media (min-width: 700px) { .hero-inner { --face-w: clamp(300px, min(44vw, (100svh - 300px) * 0.665), 590px); } }
}
.hero-face, .dl-face { /* the cover is cropped at both sides: dissolve the edges into the night */
  --face-fade:
    radial-gradient(50% 72% at 50% 50%, #000 67%, rgba(0,0,0,.8) 77%, rgba(0,0,0,.45) 88%, rgba(0,0,0,.14) 95%, transparent 100%),
    radial-gradient(26% 22% at 98% 80%, transparent 35%, #000 100%), /* hides cut-out flecks on the saree */
    linear-gradient(to bottom, #000 62%, rgba(0,0,0,.55) 78%, transparent 94%);
}
.hero-face {
  position: relative; z-index: 0;
  width: var(--face-w);
  aspect-ratio: 1200 / 1805; max-width: 100%;
  animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both;
}
.hero-face::before { /* her fire keeps glowing where the image fades out */
  content: ""; position: absolute; z-index: -1; inset: 22% 46% 16% -18%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226,103,43,.36), rgba(163,31,26,.18) 58%, transparent);
  filter: blur(22px);
}
.hero-face img {
  width: 100%; height: 100%; object-fit: contain;
  -webkit-mask-image: var(--face-fade); -webkit-mask-composite: source-in;
          mask-image: var(--face-fade);         mask-composite: intersect;
}
@keyframes rise { from { opacity: .6; transform: translateY(14px) scale(1.015); } to { opacity: 1; transform: none; } }
.hero-copy { margin-top: calc(var(--face-w) * -0.3); position: relative; display: grid; justify-items: center; gap: 14px; }
.hero-copy .eyebrow { color: var(--gold); }
.hero h1 { font-size: var(--t-3xl); color: var(--pearl); letter-spacing: .005em; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.hero .sub { font-size: var(--t-lg); font-style: italic; color: var(--gold-soft); }
.hero .sub .deva { font-style: normal; color: var(--pearl); opacity: .9; }
.hero .by { font-size: var(--t-sm); letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 239, 227, .7); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.hero-facts {
  margin: 18px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: rgba(245,239,227,.62);
}
.hero-facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sindoor); margin-right: 9px; vertical-align: 2px; box-shadow: 0 0 0 2px rgba(201,160,74,.35); }
@media (prefers-reduced-motion: reduce) { .hero-face { animation: none; } }

/* deckled paper edge where night meets the page */
.edge { position: absolute; left: 0; right: 0; height: 34px; background-size: 100% 100%; background-repeat: no-repeat; pointer-events: none; }
.edge-bottom { bottom: -1px; background-image: url(/img/edge-paper.svg); }
.edge-top { top: -1px; background-image: url(/img/edge-paper.svg); transform: scaleY(-1); }

/* ---------- verse ---------- */
.verse { text-align: center; padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.verse .wrap { display: grid; justify-items: center; gap: 14px; }
.verse .sanskrit { font-family: var(--font-sanskrit); font-size: clamp(1.45rem, 1rem + 2.1vw, 2.35rem); line-height: 1.5; color: var(--ink); }
.verse .translit { font-style: italic; color: var(--ink-soft); font-size: var(--t-md); }
.verse .meaning { max-width: 46ch; font-size: var(--t-md); }
.verse .source { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.lotus-rule { width: 120px; height: 18px; color: var(--gold); }

/* ---------- feature (image + text) ---------- */
.feature { padding-block: clamp(40px, 7vw, 96px); }
.feature .wrap { display: grid; gap: clamp(24px, 5vw, 72px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .feature .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .feature.flip .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .feature.flip .feature-art { order: 2; }
}
.feature-art { max-width: 520px; width: 100%; justify-self: center; }
.feature-art img { width: 100%; height: auto; aspect-ratio: 1000 / 1506; }
.feature-text { display: grid; gap: 18px; min-width: 0; max-width: var(--measure); }
.feature-text h2 { font-size: var(--t-2xl); color: var(--ink); }
.feature-text p { color: var(--ink); }
.feature-text .note { font-size: var(--t-sm); color: var(--ink-soft); font-style: italic; }

.inside { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.inside li { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.inside li::before { content: ""; width: 10px; height: 10px; margin-top: .55em; border-radius: 50%; background: var(--sindoor); box-shadow: 0 0 0 3px rgba(201,160,74,.45); }
.inside strong { font-weight: 600; display: block; }
.inside span { display: block; grid-column: 2; color: var(--ink-soft); font-size: var(--t-sm); }

/* ---------- nine nights gallery ---------- */
.nights { padding-block: clamp(48px, 7vw, 100px) clamp(24px, 4vw, 48px); }
.section-head { display: grid; gap: 12px; max-width: 60ch; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head h2 { font-size: var(--t-2xl); }
.section-head p { color: var(--ink-soft); }
.grid { display: grid; gap: clamp(18px, 3vw, 40px) clamp(12px, 2.4vw, 32px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { margin: 0; min-width: 0; }
.card button {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 8px; width: 100%;
  border-radius: 10px;
}
.card .art { position: relative; overflow: hidden; }
.card img { width: 100%; height: auto; aspect-ratio: 1000 / 1506; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card button:hover img, .card button:focus-visible img { transform: scale(1.03); }
.card .night { display: flex; align-items: baseline; gap: 10px; font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--sindoor); font-weight: 600; }
.card .night .num { font-family: var(--font-sanskrit); font-size: 1.35rem; letter-spacing: 0; color: var(--gold); line-height: 1; text-transform: none; }
.card h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); color: var(--ink); }
.card h3 .deva { display: block; font-size: .62em; color: var(--ink-soft); margin-top: 4px; }
.card .essence { font-style: italic; color: var(--ink-soft); font-size: var(--t-sm); }
.card .more { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* ---------- tenth day ---------- */
.tenth .feature-text h2 .deva { display: block; font-size: .5em; color: var(--ink-soft); margin-top: 8px; }
.tenth .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- download + support (night again) ---------- */
.night-band {
  position: relative; background: var(--night); color: var(--pearl);
  padding-block: clamp(80px, 10vw, 130px) clamp(56px, 8vw, 96px);
  overflow: hidden; isolation: isolate;
}
.night-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 18% 30%, rgba(226,103,43,.18), transparent 70%),
              radial-gradient(45% 55% at 85% 70%, rgba(245,239,227,.08), transparent 70%);
}
.offer { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) {
  .offer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
  .offer .support { /* the lamp card becomes a strip under the book and the offer */
    grid-column: 1 / -1; align-items: center; column-gap: clamp(18px, 3vw, 32px); row-gap: 4px;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon title btn" "icon text btn";
  }
  .offer .support .diya { grid-area: icon; }
  .offer .support h3 { grid-area: title; align-self: end; }
  .offer .support p { grid-area: text; align-self: start; max-width: 68ch; }
  .offer .support .btn { grid-area: btn; justify-self: end; }
}

/* the book itself, in 3D: front cover, page edges, back cover */
.book3d {
  --bw: min(58vw, 250px); --bt: calc(var(--bw) * .075);
  position: relative; z-index: 0; display: grid; place-items: center;
  padding: 8px 0 34px; perspective: 1500px;
}
@media (min-width: 860px) { .book3d { --bw: clamp(230px, 24vw, 300px); } }
.book3d::before { /* ember light behind the book */
  content: ""; position: absolute; z-index: -1; inset: -12% -8%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226,103,43,.30), rgba(163,31,26,.12) 55%, transparent);
  filter: blur(10px);
}
.book3d::after { /* its shadow on the ground */
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: 12px; pointer-events: none;
  width: calc(var(--bw) * 1.1); height: calc(var(--bw) * .12); transform: translateX(-46%);
  background: radial-gradient(closest-side, rgba(0,0,0,.7), transparent); filter: blur(4px);
}
.book {
  position: relative; width: var(--bw); aspect-ratio: 2 / 3;
  transform-style: preserve-3d; transform: rotateY(-26deg) rotateX(2deg);
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
@media (hover: hover) { .book:hover { transform: rotateY(-10deg); } }
.book-cover {
  position: absolute; inset: 0; overflow: hidden; border-radius: 2px 5px 5px 2px;
  transform: translateZ(calc(var(--bt) / 2));
}
.book-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-cover::after { /* hinge crease by the spine, and a soft sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.45) 0, rgba(255,255,255,.14) 1.6%, rgba(0,0,0,.28) 3%, rgba(255,255,255,.06) 4.6%, transparent 7%),
    linear-gradient(115deg, transparent 35%, rgba(255,255,255,.07) 48%, transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.book::before { /* page edges */
  content: ""; position: absolute; top: 1.2%; bottom: 1.2%; left: 0; width: var(--bt);
  transform: translateX(calc(var(--bw) - var(--bt) / 2 - 3px)) rotateY(90deg);
  background:
    linear-gradient(90deg, rgba(0,0,0,.25), transparent 25%, transparent 75%, rgba(0,0,0,.3)),
    repeating-linear-gradient(90deg, #f1e8d4 0 1px, #d9cbac 1px 2px);
}
.book::after { /* back cover, which also casts the drop shadow */
  content: ""; position: absolute; inset: 0; border-radius: 2px 5px 5px 2px;
  transform: translateZ(calc(var(--bt) / -2));
  background: #1b0f0d; box-shadow: -18px 22px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(201,160,74,.12);
}
@media (prefers-reduced-motion: reduce) { .book { transition: none; } }
.offer h2 { font-size: var(--t-2xl); color: var(--pearl); }
.offer-main { display: grid; gap: 18px; min-width: 0; }
.offer-main p { color: rgba(245,239,227,.82); max-width: 52ch; }
.offer-main .eyebrow { color: var(--gold); }
.offer-main .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }
.offer-main .small { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: rgba(245,239,227,.55); }
.support {
  border: 1px solid rgba(201,160,74,.35); border-radius: 18px; padding: clamp(22px, 3vw, 32px);
  background: linear-gradient(160deg, rgba(201,160,74,.10), rgba(201,160,74,.02));
  display: grid; gap: 14px; min-width: 0;
}
.support h3 { font-size: var(--t-xl); color: var(--gold-soft); }
.support p { color: rgba(245,239,227,.8); font-size: var(--t-sm); }
.support .btn { justify-self: start; }
.diya { width: 44px; height: 44px; color: var(--gold); }

.footer { border-top: 1px solid rgba(201,160,74,.18); margin-top: clamp(56px, 8vw, 96px); padding-top: 28px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.footer .deva { font-size: var(--t-lg); color: var(--gold-soft); }
.footer p { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: rgba(245,239,227,.5); }
.footer a { color: rgba(245,239,227,.75); }

/* ---------- viewer (story dialog) ---------- */
dialog.viewer {
  width: min(1100px, 100vw - 24px); max-width: none; max-height: min(92vh, 900px);
  padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
dialog.viewer::backdrop { background: rgba(19, 11, 12, .82); backdrop-filter: blur(3px); }
.viewer-body { display: grid; grid-template-columns: 1fr; max-height: inherit; overflow: auto; overscroll-behavior: contain; }
@media (min-width: 820px) { .viewer-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; } }
.viewer-art { background: var(--paper); display: grid; place-items: center; padding: 20px 20px 0; }
.viewer-art img { width: 100%; max-width: 440px; height: auto; aspect-ratio: 1000/1506; }
@media (min-width: 820px) { .viewer-art { padding: 24px; max-height: min(92vh, 900px); } .viewer-art img { max-height: calc(min(92vh, 900px) - 48px); width: auto; } }
.viewer-text { padding: clamp(20px, 3vw, 44px); display: grid; align-content: start; gap: 14px; min-width: 0; }
@media (min-width: 820px) { .viewer-text { overflow: auto; max-height: min(92vh, 900px); padding-top: 64px; } }
.viewer-text h3 { font-size: var(--t-2xl); }
.viewer-text h3 .deva { display: block; font-size: .5em; color: var(--ink-soft); margin-top: 6px; }
.viewer-text .attrs { font-size: var(--t-sm); color: var(--ink-soft); font-style: italic; }
.mantra { margin-top: 8px; padding: 18px 20px; border-radius: 12px; background: rgba(201,160,74,.14); border: 1px solid rgba(201,160,74,.35); display: grid; gap: 6px; }
.mantra .label { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--sindoor); font-weight: 600; }
.mantra .sanskrit { font-family: var(--font-sanskrit); font-size: 1.5rem; line-height: 1.45; }
.mantra .translit { font-style: italic; }
.mantra .meaning { font-size: var(--t-sm); color: var(--ink-soft); }
.viewer-close, .viewer-nav button {
  all: unset; box-sizing: border-box; cursor: pointer; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); background: rgba(239,229,207,.92); border: 1px solid var(--rule);
}
.viewer-close:hover, .viewer-nav button:hover { background: var(--ink); color: var(--paper); }
.viewer-close:focus-visible, .viewer-nav button:focus-visible { outline: 2px solid var(--sindoor); outline-offset: 2px; }
.viewer-close svg, .viewer-nav svg { width: 18px; height: 18px; }
.viewer-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.viewer-nav { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.viewer-nav .pos { font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- download page ---------- */
.dl-page { min-height: 100%; background: var(--night); color: var(--pearl); }
.dl-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: calc(90px + env(safe-area-inset-top, 0px)) 72px; }
.dl-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 25% 40%, rgba(226,103,43,.25), transparent 70%), radial-gradient(45% 55% at 78% 45%, rgba(245,239,227,.10), transparent 70%); }
.dl-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .dl-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } }
.dl-face { width: min(380px, 70vw); height: auto; justify-self: center;
  -webkit-mask-image: var(--face-fade); -webkit-mask-composite: source-in; mask-image: var(--face-fade); mask-composite: intersect; }
.dl-text { display: grid; gap: 18px; min-width: 0; }
.dl-text h1 { font-size: var(--t-2xl); color: var(--pearl); }
.dl-text p { color: rgba(245,239,227,.82); max-width: 50ch; }
.dl-text .eyebrow { color: var(--gold); }
.dl-status { display: flex; align-items: center; gap: 12px; font-size: var(--t-sm); color: var(--gold-soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(201,160,74,.3); border-top-color: var(--gold-soft); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.dl-text .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dl-text .back { font-size: var(--t-sm); color: rgba(245,239,227,.7); }
.dl-text .alink { color: var(--gold-soft); text-underline-offset: 3px; }
.dl-text .alink:hover { color: var(--pearl); }

/* ---------- glossary tooltips on Sanskrit words and names ---------- */
.term {
  position: relative; cursor: help; border-radius: 2px;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  text-decoration-color: rgba(163, 31, 26, .55);
}
.night-band .term { text-decoration-color: rgba(227, 201, 136, .6); }
.term:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.term .tip {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%;
  width: max-content; max-width: min(250px, 72vw); padding: 9px 12px; border-radius: 8px;
  transform: translateX(calc(-50% + var(--tx, 0px)));
  background: var(--night); color: var(--pearl); border: 1px solid rgba(201, 160, 74, .5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  font: 400 var(--t-xs)/1.45 var(--font-body); letter-spacing: 0; text-transform: none; text-align: left;
  text-decoration: none; font-style: normal; white-space: normal;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease;
}
.term:hover .tip, .term:focus .tip, .term:focus-within .tip { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .term .tip { transition: none; } }

/* ---------- prelude: A World Full of Gods, before chapter one ---------- */
.prelude { text-align: center; padding-block: clamp(40px, 6vw, 72px); }
.prelude .wrap { display: grid; justify-items: center; gap: 16px; }
.prelude p { width: 100%; max-width: 74ch; text-wrap: pretty; }  /* wider than the 62ch --measure used elsewhere */
.prelude .eyebrow { color: var(--sindoor); }
.prelude h2 { font-size: var(--t-2xl); color: var(--ink); }
.prelude p { color: var(--ink); }
.trinity {
  margin: 14px 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: start; gap: 22px clamp(8px, 4vw, 48px);
  --god-size: clamp(112px, 33vw, 184px);
}
.trinity li { display: grid; grid-template-rows: var(--god-size) auto auto; justify-items: center; gap: 6px; text-align: center; }
@media (max-width: 520px) { .trinity li { width: min-content; } }  /* labels wrap under the drawing so all three fit in one row */
/* the Trimurti drawings share one scale (Brahma, the tallest, is 683 units) so their faces match */
.trinity .god-art { height: calc(var(--h) / 683 * var(--god-size)); width: auto; align-self: end; color: var(--ink); }
.trinity strong { font-family: var(--font-display); font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.15; color: var(--ink); }
.trinity li > span { font-size: var(--t-sm); letter-spacing: .02em; color: var(--ink-soft); }

