/* =============================================================
   AYANAM — Design System
   "Ritucharya" palette: parchment · turmeric-saffron · indigo-night
   Cyclical, dharmic, scholarly. Light + dark themes.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Type scale (fluid) */
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-deva: "Noto Serif Devanagari", var(--font-serif);

  --step--1: clamp(0.83rem, 0.78rem + 0.22vw, 0.95rem);
  --step-0:  clamp(1rem, 0.94rem + 0.30vw, 1.18rem);
  --step-1:  clamp(1.20rem, 1.09rem + 0.55vw, 1.55rem);
  --step-2:  clamp(1.44rem, 1.25rem + 0.95vw, 2.05rem);
  --step-3:  clamp(1.73rem, 1.42rem + 1.55vw, 2.70rem);
  --step-4:  clamp(2.07rem, 1.58rem + 2.45vw, 3.55rem);
  --step-5:  clamp(2.49rem, 1.72rem + 3.85vw, 4.70rem);

  /* Spacing */
  --sp-1: 0.5rem;  --sp-2: 0.75rem; --sp-3: 1rem;   --sp-4: 1.5rem;
  --sp-5: 2rem;    --sp-6: 3rem;    --sp-7: 4.5rem;  --sp-8: 7rem;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --measure: 68ch;
  --header-h: 70px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.55s;

  /* ---- Light theme (Uttarāyaṇa — the bright ascent) ---- */
  --bg:        #F7F1E6;
  --bg-tint:   #F1E8D7;
  --surface:   #FFFDF8;
  --surface-2: #FBF5EA;
  --ink:       #241E18;
  --ink-soft:  #4A4038;
  --muted:     #756758;
  --line:      #E4D8C3;
  --line-soft: #EFE6D5;

  --saffron:   #C85A16;   /* agni / turmeric-saffron */
  --saffron-2: #E07C2B;
  --indigo:    #2E3572;   /* nīla / night */
  --indigo-2:  #4A54A6;
  --tulsi:     #4E6B4A;   /* sage green */
  --gold:      #B98A2E;

  --accent:    var(--saffron);
  --accent-ink:#FFFFFF;

  --shadow-sm: 0 1px 2px rgba(58, 42, 22, 0.06), 0 2px 8px rgba(58, 42, 22, 0.05);
  --shadow-md: 0 4px 12px rgba(58, 42, 22, 0.08), 0 14px 40px rgba(58, 42, 22, 0.10);
  --shadow-lg: 0 10px 30px rgba(40, 30, 18, 0.12), 0 30px 70px rgba(40, 30, 18, 0.14);

  --glow: radial-gradient(120% 120% at 50% -10%, rgba(224,124,43,0.14), transparent 55%);
  color-scheme: light;
}

[data-theme="dark"] {
  /* ---- Dark theme (Dakṣiṇāyana — the deep night) ---- */
  --bg:        #14110C;
  --bg-tint:   #1A160F;
  --surface:   #1E1912;
  --surface-2: #241E15;
  --ink:       #F1E8D6;
  --ink-soft:  #D6C9B2;
  --muted:     #A5967E;
  --line:      #342C1F;
  --line-soft: #2A2318;

  --saffron:   #EC9445;
  --saffron-2: #F5AC5E;
  --indigo:    #93A0E6;
  --indigo-2:  #A9B4EE;
  --tulsi:     #8FB187;
  --gold:      #D8B45E;

  --accent:    var(--saffron);
  --accent-ink:#1A1006;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 10px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.45), 0 18px 50px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 34px rgba(0,0,0,0.55), 0 34px 80px rgba(0,0,0,0.6);

  --glow: radial-gradient(120% 120% at 50% -10%, rgba(236,148,69,0.16), transparent 55%);
  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 560; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 var(--sp-3); }
h1 { font-size: var(--step-5); font-optical-sizing: auto; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 var(--sp-3); max-width: var(--measure); }
a  { color: var(--accent); text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
img, svg { max-width: 100%; display: block; }
::selection { background: color-mix(in oklab, var(--saffron) 30%, transparent); }

:focus-visible { outline: 2.5px solid var(--indigo-2); outline-offset: 3px; border-radius: 4px; }

.deva { font-family: var(--font-deva); font-weight: 500; }
.serif { font-family: var(--font-serif); }
.eyebrow {
  font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--saffron);
  display: inline-flex; align-items: center; gap: 0.6em; margin: 0 0 var(--sp-3);
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: currentColor; opacity: 0.7; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--sp-8); position: relative; }
.section--tight { padding-block: var(--sp-7); }
.stack > * + * { margin-top: var(--sp-3); }
.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; max-width: 60ch; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--indigo); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--accent); --_fg: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-sans); font-weight: 600; font-size: var(--step-0);
  padding: 0.72em 1.4em; border-radius: 100px; border: 1px solid transparent;
  background: var(--_bg); color: var(--_fg); cursor: pointer;
  text-decoration: none; line-height: 1; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost {
  --_bg: transparent; --_fg: var(--ink);
  border-color: var(--line); box-shadow: none; backdrop-filter: blur(4px);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn--lg { font-size: var(--step-1); padding: 0.85em 1.7em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 120;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__mark circle, .brand__mark path { transition: stroke 0.4s var(--ease), fill 0.4s var(--ease); }
.brand > span { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.brand__name { font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: 0; line-height: 1; }
.brand__name b { color: var(--saffron); font-weight: 600; }
.brand__tag { font-size: 0.5rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 4px; white-space: nowrap; }

.nav__links { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 500; font-size: 0.97rem; color: var(--ink-soft); text-decoration: none;
  padding: 0.5rem 0.85rem; border-radius: 100px; position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav__link.is-active { color: var(--saffron); }
.nav__link .chev { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Mega dropdown */
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, 8px);
  width: min(92vw, 640px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 0.6rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}
.has-mega:hover .mega, .mega.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.mega::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.mega__item {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.mega__item:hover { background: var(--surface-2); text-decoration: none; transform: translateX(2px); }
.mega__num { font-family: var(--font-serif); font-size: 0.95rem; color: var(--saffron); flex: none; width: 1.4em; padding-top: 0.1em; }
.mega__t { font-weight: 600; font-size: 0.94rem; line-height: 1.25; display: block; }
.mega__d { font-size: 0.78rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mega__foot { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0.9rem 0.4rem; margin-top: 0.3rem; border-top: 1px solid var(--line-soft); }
.mega__foot span { font-size: 0.8rem; color: var(--muted); }

/* Nav controls */
.nav__ctl { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: 100px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; transition: all 0.25s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
/* Dark theme temporarily disabled — hide the toggle. To re-enable: remove this
   rule, flip DARK_ENABLED to true in main.js, and restore the inline theme
   script in each page's <head>. */
.theme-toggle { display: none; }

.nav__toggle { display: none; }

/* Dim backdrop behind the mobile menu */
.nav__scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(20, 14, 8, 0.35);
  backdrop-filter: blur(2px); opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.nav__scrim.is-open { opacity: 1; visibility: visible; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav__links {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 0 max(1rem, env(safe-area-inset-bottom));
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); z-index: 110;
    transform: translateY(-14px); opacity: 0; visibility: hidden;
    transition: transform 0.38s var(--ease), opacity 0.28s var(--ease), visibility 0.38s var(--ease);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__links > li { width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav__links > li:last-child { border-bottom: 0; }

  /* Whole row is the tap target */
  .nav__link {
    display: flex; width: 100%; justify-content: space-between; align-items: center;
    padding: 1.05rem 1.4rem; font-size: 1.06rem; font-weight: 600; border-radius: 0;
    color: var(--ink); background: transparent;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
  }
  .nav__link:hover, .nav__link:active { background: var(--surface-2); color: var(--ink); }
  .nav__link.is-active {
    color: var(--saffron);
    box-shadow: inset 3px 0 0 var(--saffron);
    background: color-mix(in oklab, var(--saffron) 9%, var(--surface));
  }
  .nav__link .chev { width: 18px; height: 18px; }

  /* Readings sub-menu = accordion */
  .mega {
    position: static; transform: none; width: auto; opacity: 1; visibility: visible;
    pointer-events: auto; box-shadow: none; border: none; border-radius: 0; padding: 0;
    background: var(--surface-2); max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  .mega::before { content: none; }
  /* Beat the desktop `.mega.is-open { transform: translate(-50%,0) }` rule,
     which would otherwise shift the accordion 50% left and clip the text. */
  .has-mega .mega, .has-mega .mega.is-open { transform: none; left: auto; right: auto; }
  .mega.is-open { max-height: 720px; }
  .mega__grid { grid-template-columns: 1fr; gap: 0; padding: 0.25rem 0; }
  .mega__item {
    padding: 0.9rem 1.4rem 0.9rem 1.9rem; border-radius: 0; align-items: center;
    border-bottom: 1px solid var(--line-soft);
  }
  .mega__item:last-child { border-bottom: 0; }
  .mega__item:hover { transform: none; background: var(--surface); }
  .mega__num { padding-top: 0; }
  .mega__d { display: none; }               /* keep sub-rows compact & legible on mobile */
  .mega__item.is-current { background: color-mix(in oklab, var(--saffron) 12%, var(--surface)); }
  .mega__item.is-current .mega__t { color: var(--saffron); }
  .mega__foot { padding: 0.9rem 1.4rem; margin-top: 0; border-top: 1px solid var(--line-soft); }

  .nav__toggle { display: inline-grid; }
}

/* Desktop: highlight the current reading inside the mega */
.mega__item.is-current { background: var(--surface-2); }
.mega__item.is-current .mega__t { color: var(--saffron); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--sp-8) var(--sp-7); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; background: var(--glow); pointer-events: none; }
.hero__sky { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; opacity: 0.9; pointer-events: none; }
.hero__inner { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; }
.hero h1 { max-width: 16ch; margin-bottom: var(--sp-4); }
.hero h1 .accent { color: var(--saffron); font-style: italic; position: relative; }
.hero__sub { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; margin-bottom: var(--sp-5); }
.hero__cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }
.hero__scroll { margin-top: var(--sp-6); color: var(--muted); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hero__scroll .dot { width: 5px; height: 5px; border-radius: 100px; background: var(--saffron); animation: fall 1.8s var(--ease) infinite; }
@keyframes fall { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* Sanskrit ghost word behind hero */
.hero__deva {
  position: absolute; z-index: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-deva); font-size: clamp(6rem, 28vw, 20rem); color: var(--ink);
  opacity: 0.035; white-space: nowrap; pointer-events: none; user-select: none; font-weight: 600;
}

/* ---------- Journeys triad ---------- */
.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
@media (max-width: 820px) { .triad { grid-template-columns: 1fr; } }
.jcard {
  position: relative; padding: var(--sp-5); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.jcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, color-mix(in oklab, var(--saffron) 45%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s var(--ease);
}
.jcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.jcard:hover::after { opacity: 1; }
.jcard__glyph { width: 48px; height: 48px; margin-bottom: var(--sp-3); color: var(--saffron); }
.jcard__prep { font-family: var(--font-serif); font-style: italic; font-size: var(--step-2); color: var(--saffron); }
.jcard h3 { margin-top: 0.2rem; margin-bottom: var(--sp-2); }
.jcard p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }

/* ---------- Generic section header ---------- */
.sec-head { max-width: 62ch; margin-bottom: var(--sp-6); }
.sec-head--center { margin-inline: auto; text-align: center; }

/* ---------- Feature / principles ---------- */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4) var(--sp-5); }
@media (max-width: 720px) { .principles { grid-template-columns: 1fr; } }
.principle { display: flex; gap: var(--sp-3); }
.principle__ic { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--saffron); }
.principle__ic svg { width: 22px; height: 22px; }
.principle h3 { font-size: var(--step-0); font-family: var(--font-sans); font-weight: 700; margin-bottom: 0.35rem; }
.principle p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- Readings grid ---------- */
.reads { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
@media (max-width: 960px) { .reads { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .reads { grid-template-columns: 1fr; } }
.read-card {
  display: flex; flex-direction: column; padding: var(--sp-4); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden; min-height: 210px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.read-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); text-decoration: none; border-color: color-mix(in oklab, var(--saffron) 40%, var(--line)); }
.read-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-3); }
.read-card__num { font-family: var(--font-serif); font-size: 1.7rem; color: color-mix(in oklab, var(--saffron) 70%, var(--muted)); line-height: 1; }
.read-card__tag { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 0.25em 0.6em; border-radius: 100px; }
.read-card h3 { font-size: var(--step-1); margin-bottom: 0.5rem; line-height: 1.15; }
.read-card p { font-size: 0.88rem; color: var(--muted); margin: 0 0 var(--sp-3); }
.read-card__more { margin-top: auto; font-size: 0.85rem; font-weight: 600; color: var(--saffron); display: inline-flex; align-items: center; gap: 0.4em; }
.read-card__more .arrow { transition: transform 0.3s var(--ease); }
.read-card:hover .read-card__more .arrow { transform: translateX(4px); }

/* ---------- Article (reading) page ---------- */
.article-hero { padding-block: var(--sp-7) var(--sp-5); position: relative; overflow: hidden; }
.article-hero__bg { position: absolute; inset: 0; background: var(--glow); z-index: 0; }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.82rem; color: var(--muted); margin-bottom: var(--sp-4); position: relative; z-index: 1; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--saffron); }
.article-hero__inner { position: relative; z-index: 1; max-width: 60ch; }
.article-hero h1 { font-size: var(--step-4); margin-bottom: var(--sp-4); }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: var(--sp-4); }
.chip { font-size: 0.78rem; padding: 0.35em 0.85em; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.chip--accent { background: color-mix(in oklab, var(--saffron) 14%, var(--surface)); border-color: color-mix(in oklab, var(--saffron) 35%, var(--line)); color: var(--saffron); font-weight: 600; }

/* Thesis band */
.thesis {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: clamp(1.85rem, 1.1rem + 2.8vw, 3.1rem) clamp(1.5rem, 0.9rem + 3vw, 3.4rem);
  color: #F4F1FA;
  background:
    radial-gradient(135% 130% at 100% -10%, color-mix(in oklab, var(--saffron) 30%, transparent), transparent 50%),
    linear-gradient(142deg, color-mix(in oklab, var(--indigo) 90%, #000) 0%, var(--indigo) 52%, color-mix(in oklab, var(--indigo) 74%, #171445) 100%);
}
[data-theme="dark"] .thesis {
  color: var(--ink); border: 1px solid var(--line);
  background:
    radial-gradient(135% 130% at 100% -10%, color-mix(in oklab, var(--saffron) 22%, transparent), transparent 50%),
    linear-gradient(142deg, color-mix(in oklab, var(--indigo) 32%, var(--surface)), var(--surface));
}
/* Large decorative closing quote — fills the right side, ties in the saffron */
.thesis::after {
  content: "\201D";
  position: absolute; top: -0.32em; right: 0.06em; z-index: -1;
  font-family: var(--font-serif); font-weight: 600; line-height: 1;
  font-size: clamp(8rem, 19vw, 15rem);
  color: color-mix(in oklab, var(--saffron) 42%, transparent);
  opacity: 0.5; pointer-events: none; user-select: none;
}
.thesis__label {
  display: inline-flex; align-items: center; gap: 0.65em;
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--saffron-2); font-weight: 700; margin-bottom: var(--sp-3);
}
.thesis__label::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.thesis p:not(.thesis__label) {
  font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.42;
  max-width: 36ch; margin: 0; color: inherit; text-wrap: pretty;
}

/* At-a-glance stats */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
@media (max-width: 680px) { .glance { grid-template-columns: 1fr; } }
.stat { text-align: center; padding: var(--sp-4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat__n { font-family: var(--font-serif); font-size: var(--step-3); color: var(--saffron); line-height: 1; margin-bottom: 0.4rem; }
.stat__l { font-size: 0.85rem; color: var(--muted); }

/* Key-argument cards (infographic tenets) */
.tenets { display: grid; gap: var(--sp-3); counter-reset: tenet; }
.tenet {
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start;
  padding: var(--sp-4) var(--sp-5); border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tenet:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.tenet__n { counter-increment: tenet; font-family: var(--font-serif); font-size: 1.2rem; color: var(--saffron); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 100px; border: 1.5px solid color-mix(in oklab, var(--saffron) 40%, var(--line)); }
.tenet__n::before { content: counter(tenet, decimal-leading-zero); }
.tenet h3 { font-size: var(--step-0); font-family: var(--font-sans); font-weight: 700; margin-bottom: 0.35rem; }
.tenet p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Pull quote */
.pullquote { text-align: center; max-width: 44rem; margin-inline: auto; padding-inline: var(--sp-3); }
.pullquote__mark { font-family: var(--font-serif); font-size: 4rem; color: var(--saffron); line-height: 0.5; opacity: 0.5; }
.pullquote p {
  font-family: var(--font-serif); font-style: italic; line-height: 1.3; color: var(--ink);
  font-size: clamp(1.35rem, 1.05rem + 1.6vw, 2.1rem);
  max-width: 26ch; margin-inline: auto; text-wrap: balance;
}

/* Nyaya lens callout */
.lens { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); padding: var(--sp-5); border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 620px) { .lens { grid-template-columns: 1fr; } }
.lens__glyph { width: 60px; height: 60px; color: var(--indigo-2); }
.lens h3 { font-size: var(--step-1); }
.lens h3 .deva { color: var(--saffron); font-size: 0.9em; }
.lens p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* Prev / next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 620px) { .prevnext { grid-template-columns: 1fr; } }
.pn {
  display: block; padding: var(--sp-4); border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pn:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--saffron); text-decoration: none; }
.pn__dir { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.pn__t { font-family: var(--font-serif); font-size: var(--step-0); }
.pn--next { text-align: right; }

/* ---------- CTA band ---------- */
.cta {
  text-align: center; padding: var(--sp-7); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in oklab, var(--saffron) 16%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta p { margin-inline: auto; margin-bottom: var(--sp-5); color: var(--ink-soft); }

/* ---------- About ---------- */
.about-quote { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1.3; max-width: 24ch; }
.about-quote .accent { color: var(--saffron); font-style: italic; }
.locs { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); }
.loc { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.loc__dot { width: 9px; height: 9px; border-radius: 100px; background: var(--saffron); box-shadow: 0 0 0 4px color-mix(in oklab, var(--saffron) 20%, transparent); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; border-top: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--saffron) 6%, transparent), transparent 60%),
    var(--surface);
  margin-top: var(--sp-7);
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: min(90%, 640px); height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--saffron) 75%, transparent), transparent);
}
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: var(--sp-6) var(--sp-5); padding-block: var(--sp-6) var(--sp-5); }
.footer__brand p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; margin-top: var(--sp-3); line-height: 1.6; }
.footer__col h4 {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--saffron); font-weight: 700; margin-bottom: var(--sp-3);
}
.footer__col h4::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer__col a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; transition: color 0.2s var(--ease), padding-left 0.2s var(--ease); }
.footer__col a:hover { color: var(--saffron); padding-left: 5px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding-block: var(--sp-4); border-top: 1px solid var(--line-soft); font-size: 0.82rem; color: var(--muted); }
.footer__legal b { color: var(--ink-soft); font-weight: 600; letter-spacing: 0.02em; }

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: 0; padding-bottom: var(--sp-4); }
  .footer__brand { padding-bottom: var(--sp-5); }
  .footer__col { padding-block: var(--sp-4); border-top: 1px solid var(--line-soft); }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }

/* ---------- Page navigation ----------
   Cross-document View Transitions were removed: on this multi-page site the
   outgoing snapshot briefly showed the open mobile menu ghosting over the new
   page. Navigation is already near-instant via hover/viewport link prefetch. */

/* ---------- Divider motif ---------- */
.rule { display: flex; align-items: center; gap: 1rem; color: var(--line); margin-block: var(--sp-6); }
.rule::before, .rule::after { content: ""; height: 1px; background: currentColor; flex: 1; }
.rule svg { width: 22px; height: 22px; color: var(--saffron); opacity: 0.8; }

/* Two-column split (e.g. About) — stacks on mobile */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-6); align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* Nicer line-breaking where supported (progressive enhancement) */
h1, h2, h3, .pullquote p, .about-quote { text-wrap: balance; }
p, .lede { text-wrap: pretty; }

/* ---------- Mobile spacing & typography refinements ---------- */
@media (max-width: 620px) {
  :root { --sp-8: 4.25rem; --sp-7: 3rem; --sp-6: 2.25rem; }
  .wrap { width: min(100% - 2.2rem, var(--maxw)); }
  .hero { padding-block: var(--sp-7) var(--sp-6); }
  .hero__sub { font-size: var(--step-0); }
  .lede { font-size: var(--step-0); }
  .article-hero { padding-block: var(--sp-6) var(--sp-4); }
  .thesis p:not(.thesis__label) { font-size: var(--step-1); max-width: 30ch; }
  .thesis::after { font-size: 7rem; opacity: 0.38; top: -0.18em; }
  .tenet { grid-template-columns: 1fr; padding: var(--sp-4); gap: var(--sp-2); }
  .tenet__n { margin-bottom: 0.15rem; }
  .lens { padding: var(--sp-4); gap: var(--sp-3); }
  .cta { padding: var(--sp-6) var(--sp-4); }
  .pullquote p { max-width: 20ch; }
  .about-quote { font-size: var(--step-2); }
}

/* utility */
.center { text-align: center; }
.mt-6 { margin-top: var(--sp-6); }
.text-muted { color: var(--muted); }
.hide { display: none !important; }
