/* ==========================================================================
   bharatitirtha.com — design system
   Palette: forest, parchment, sandalwood, antique brass, charcoal, maroon.
   Motif: the palm-leaf manuscript (tāḷapatra) — long leaves, binding holes,
   folio numbers, ruled margins.
   ========================================================================== */

:root {
  --forest-950: #111a14;
  --forest-900: #16211b;
  --forest-800: #1d2b23;
  --forest-700: #28392f;
  --forest-500: #4b6353;
  --moss: #7c8c74;

  --ivory: #faf6ee;
  --parchment: #f3ecdf;
  --parchment-deep: #e9dfcc;
  --sand: #dccbad;
  --sandal: #c4a57a;
  --brass: #a8844a;
  --brass-deep: #7a5c2b;
  --brass-light: #d3b67f;

  --ink: #211f1b;
  --ink-soft: #4a453d;
  --ink-mute: #6c655a;
  --maroon: #6b2a26;

  --line: rgba(33, 31, 27, 0.14);
  --line-strong: rgba(33, 31, 27, 0.28);
  --line-light: rgba(243, 236, 223, 0.18);

  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-deva: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", "Nirmala UI", serif;

  --fs-body: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.78rem;
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.45rem + 2.2vw, 3.35rem);
  --fs-h3: clamp(1.45rem, 1.25rem + 0.8vw, 1.95rem);
  --fs-lead: clamp(1.3rem, 1.1rem + 0.9vw, 1.85rem);

  --gutter: clamp(1rem, 0.5rem + 2.6vw, 3rem);
  --max: 1320px;
  --measure: 38rem;
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 76px;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0 0.18  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.72;
  color: var(--ink);
  background: var(--ivory);
  background-image: var(--grain);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 400; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1.15em; text-wrap: pretty; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.2em; }
figure { margin: 0; }
blockquote { margin: 0; }
em, i { font-style: italic; }
strong { font-weight: 600; }
hr { border: 0; }
::selection { background: var(--sand); color: var(--ink); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--forest-900); color: var(--ivory); padding: 0.7rem 1rem; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout primitives ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 52rem); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.measure { max-width: var(--measure); }
.center { text-align: center; }
.center.measure, .center .measure { margin-inline: auto; }

.tone-forest { background-color: var(--forest-900); color: var(--parchment); }
.tone-forest a { color: var(--parchment); }
.tone-parchment { background-color: var(--parchment); }
.tone-sand { background-color: var(--parchment-deep); }
.tone-forest, .tone-parchment, .tone-sand { background-image: var(--grain); }

/* ---------- Typographic furniture ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-sans); font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-deep);
  margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: currentColor; opacity: 0.7; }
.tone-forest .eyebrow, .hero .eyebrow { color: var(--brass-light); }
.eyebrow--plain::before { display: none; }

.folio {
  font-family: var(--font-serif); font-style: italic; font-size: 1.05rem;
  color: var(--brass-deep); letter-spacing: 0.04em;
}
.tone-forest .folio { color: var(--brass-light); }

.lead { font-family: var(--font-serif); font-size: var(--fs-lead); line-height: 1.45; font-weight: 400; color: var(--ink); }
.tone-forest .lead { color: var(--ivory); }
.muted { color: var(--ink-mute); }
.tone-forest .muted { color: rgba(243, 236, 223, 0.72); }
.small { font-size: var(--fs-small); }
.serif { font-family: var(--font-serif); }
.deva { font-family: var(--font-deva); font-weight: 400; line-height: 1.6; }
.iast { font-style: italic; }

.dropcap::first-letter {
  float: left; font-family: var(--font-serif); font-size: 4.6em; line-height: 0.82;
  padding: 0.08em 0.12em 0 0; color: var(--maroon); font-weight: 500;
}

/* Palm-leaf rule: a long line with two binding holes */
.leaf-rule {
  position: relative; height: 14px; margin: 3rem 0; color: var(--brass);
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  opacity: 0.8;
}
.leaf-rule::before, .leaf-rule::after {
  content: ""; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid currentColor; background: var(--ivory); transform: translate(-50%, -50%);
}
.leaf-rule::before { left: 30%; }
.leaf-rule::after { left: 70%; }
.tone-forest .leaf-rule::before, .tone-forest .leaf-rule::after { background: var(--forest-900); }
.tone-parchment .leaf-rule::before, .tone-parchment .leaf-rule::after { background: var(--parchment); }
.tone-sand .leaf-rule::before, .tone-sand .leaf-rule::after { background: var(--parchment-deep); }

.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--brass); margin: 2.5rem auto; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 4.5rem; background: currentColor; opacity: 0.6; }
.ornament span { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid currentColor; }

/* Links */
.text-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--forest-700); padding-block: 0.35rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.text-link::after { content: "→"; font-family: var(--font-serif); letter-spacing: 0; transition: transform 0.4s var(--ease); }
.text-link:hover { background-size: 100% 1px; }
.text-link:hover::after { transform: translateX(4px); }
.tone-forest .text-link, .hero .text-link { color: var(--brass-light); }

.prose a:not(.text-link), .inline-link {
  color: var(--forest-700); text-decoration: underline; text-decoration-color: var(--sandal);
  text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: text-decoration-color 0.3s;
}
.prose a:not(.text-link):hover, .inline-link:hover { text-decoration-color: var(--forest-700); }
.tone-forest .prose a:not(.text-link) { color: var(--brass-light); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  min-height: 52px; padding: 0.85rem 1.8rem; border: 1px solid transparent; border-radius: 0;
  font-weight: 600; font-size: 0.86rem; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.btn--brass { background: var(--brass); color: var(--forest-950); border-color: var(--brass); }
.btn--brass:hover { background: var(--brass-light); border-color: var(--brass-light); }
.btn--ghost { border-color: rgba(243, 236, 223, 0.45); color: var(--parchment); }
.btn--ghost:hover { border-color: var(--parchment); background: rgba(243, 236, 223, 0.08); }
.btn--forest { background: var(--forest-800); color: var(--parchment); }
.btn--forest:hover { background: var(--forest-700); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  color: var(--ink);
  transition: background-color 0.45s var(--ease), box-shadow 0.45s var(--ease), color 0.45s var(--ease), transform 0.45s var(--ease);
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.site-header.is-solid, .site-header:not(.is-overlay) {
  background-color: rgba(250, 246, 238, 0.94);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
}
.site-header.is-overlay:not(.is-solid) { color: var(--parchment); }

.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: inherit; min-width: 0; }
.brand__mark { width: 38px; height: 38px; flex: none; color: var(--brass); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-family: var(--font-serif); font-size: 1.28rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.brand__sub { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.75; margin-top: 0.2rem; white-space: nowrap; }

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link, .nav__toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.9rem; min-height: 44px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; background: none; border: 0; cursor: pointer; color: inherit; position: relative;
}
.nav__link::after, .nav__toggle::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.4rem; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease);
}
.nav__link:hover::after, .nav__toggle:hover::after, .nav__item.is-current > .nav__link::after, .nav__item.is-current > .nav__toggle::after { transform: scaleX(1); }
.nav__toggle .chev { width: 9px; height: 9px; transition: transform 0.3s; }
.nav__item.is-open .chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute; top: calc(100% + 0.4rem); left: 50%; min-width: 17rem;
  list-style: none; margin: 0; padding: 0.8rem 0;
  background: var(--ivory); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 24px 50px -24px rgba(17, 26, 20, 0.35);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.nav__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -0.6rem; height: 0.6rem; }
.nav__item.is-open .nav__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 1101px) {
  .nav__item--has-menu:hover .nav__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.nav__menu a {
  display: block; padding: 0.65rem 1.5rem; text-decoration: none;
  font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.25; transition: background 0.25s, color 0.25s;
}
.nav__menu a small { display: block; font-family: var(--font-sans); font-size: 0.78rem; color: var(--ink-mute); letter-spacing: 0.02em; margin-top: 0.15rem; }
.nav__menu a:hover, .nav__menu a:focus-visible { background: var(--parchment); color: var(--forest-800); }
.nav__menu a[aria-current="page"] { color: var(--maroon); }

.menu-button {
  display: none; align-items: center; gap: 0.7rem; min-height: 44px; min-width: 44px; padding: 0.5rem 0.2rem 0.5rem 0.6rem;
  background: none; border: 0; cursor: pointer; color: inherit;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
}
.menu-button__lines { width: 26px; height: 12px; position: relative; }
.menu-button__lines::before, .menu-button__lines::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.menu-button__lines::before { top: 0; }
.menu-button__lines::after { bottom: 0; width: 70%; left: 30%; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 150; background: var(--forest-900); background-image: var(--grain); color: var(--parchment);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); flex: none; }
.drawer__close {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; min-width: 44px; justify-content: flex-end;
  background: none; border: 0; color: inherit; cursor: pointer;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
}
.drawer__close svg { width: 20px; height: 20px; }
.drawer__body { padding-block: 1rem 3rem; display: grid; gap: 2.2rem; }
.drawer__group h2 { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 0.6rem; font-weight: 600; }
.drawer__group ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.drawer__group a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line-light); text-decoration: none;
  font-family: var(--font-serif); font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); line-height: 1.2;
}
.drawer__group a span { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--moss); text-transform: uppercase; }
.drawer__group a[aria-current="page"] { color: var(--brass-light); }
.drawer .drawer__item { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.drawer.is-open .drawer__item { opacity: 1; transform: none; }
.drawer.is-open .drawer__item:nth-child(2) { transition-delay: 0.06s; }
.drawer.is-open .drawer__item:nth-child(3) { transition-delay: 0.12s; }
.drawer.is-open .drawer__item:nth-child(4) { transition-delay: 0.18s; }
body.drawer-open { overflow: hidden; }

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-button { display: inline-flex; }
}
@media (max-width: 420px) {
  .brand__sub { display: none; }
  .brand__name { font-size: 1.12rem; }
  .menu-button__label { display: none; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 7rem)); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); position: relative; }
.page-hero h1 { max-width: 17ch; }
.page-hero .lead { max-width: 40rem; margin-top: 1.5rem; }
.breadcrumb { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 2.2rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; opacity: 0.5; }
.breadcrumb a { text-decoration: none; opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--brass-deep); }
.tone-forest .breadcrumb [aria-current] { color: var(--brass-light); }

/* ---------- Framed images (never crop the subject) ---------- */
.frame { position: relative; }
.frame img { width: 100%; height: auto; }
.frame--mat { background: var(--parchment); padding: clamp(0.6rem, 0.4rem + 0.8vw, 1.1rem); box-shadow: 0 30px 60px -35px rgba(17, 26, 20, 0.45); }
.frame--mat::after { content: ""; position: absolute; inset: clamp(0.25rem, 0.15rem + 0.3vw, 0.45rem); border: 1px solid rgba(168, 132, 74, 0.45); pointer-events: none; }
.frame--arch img { border-radius: 999px 999px 0 0; }
.frame--arch.frame--mat { border-radius: 999px 999px 0 0; }
.frame--arch.frame--mat::after { border-radius: 999px 999px 0 0; }
.frame--line { padding: 0.75rem; border: 1px solid var(--line-strong); }
.tone-forest .frame--mat { background: var(--forest-800); }
figcaption, .caption {
  margin-top: 1rem; font-size: 0.86rem; line-height: 1.55; color: var(--ink-mute); letter-spacing: 0.01em;
  display: block; padding-left: 2.2rem; position: relative;
}
figcaption::before, .caption::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 1.4rem; height: 1px; background: var(--brass); }
.tone-forest figcaption { color: rgba(243, 236, 223, 0.66); }

/* ---------- Reveal motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="mask"] { opacity: 1; transform: none; }
.js [data-reveal="mask"] > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease); }
.js [data-reveal="mask"].is-in > * { clip-path: inset(0 0 0 0); }
.js [data-reveal="line"] { opacity: 1; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.js [data-reveal="line"].is-in { transform: scaleX(1); }
.js [data-delay="1"] { transition-delay: 0.12s; }
.js [data-delay="2"] { transition-delay: 0.24s; }
.js [data-delay="3"] { transition-delay: 0.36s; }
.js [data-delay="4"] { transition-delay: 0.48s; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-950); background-image: var(--grain); color: rgba(243, 236, 223, 0.8); padding-top: clamp(4rem, 3rem + 4vw, 7rem); font-size: 0.98rem; }
.site-footer a { color: var(--parchment); text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); }
.footer__statement { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: end; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line-light); }
.footer__statement > p:first-child { font-family: var(--font-serif); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.25; color: var(--parchment); margin: 0; }
.footer__statement .deva { font-size: 1.25rem; color: var(--brass-light); display: block; margin-bottom: 0.8rem; }
.footer__note { font-size: 0.9rem; color: rgba(243, 236, 223, 0.62); margin: 0; }
.footer__note a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(211, 182, 127, 0.5); }
.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; padding-block: 3.5rem; }
.footer__col h2 { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass-light); font-weight: 600; margin-bottom: 1.2rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer__col a { display: inline-block; padding-block: 0.1rem; }
.footer__contact-name { font-family: var(--font-serif); font-size: 1.4rem; color: var(--parchment); margin-bottom: 0.5rem; }
.social { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.social a, .social span {
  width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 50%;
  transition: border-color 0.3s, background 0.3s, color 0.3s; color: var(--parchment);
}
.social a:hover { border-color: var(--brass-light); background: rgba(211, 182, 127, 0.1); color: var(--brass-light); }
.social span[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; }
.social svg { width: 18px; height: 18px; }
.footer__small { font-size: 0.82rem; color: rgba(243, 236, 223, 0.55); line-height: 1.55; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; padding-block: 1.8rem 2.2rem; border-top: 1px solid var(--line-light); font-size: 0.86rem; color: rgba(243, 236, 223, 0.6); }
.footer__bottom p { margin: 0; }
.footer__lock { background: none; border: 1px solid var(--line-light); color: rgba(243, 236, 223, 0.75); padding: 0.45rem 0.95rem; min-height: 40px; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; transition: border-color 0.3s, color 0.3s; }
.footer__lock:hover { border-color: var(--brass-light); color: var(--brass-light); }
.footer__credit a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(211, 182, 127, 0.5); }

@media (max-width: 960px) {
  .footer__statement { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Continue / next-page band ---------- */
.continue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.continue a {
  display: block; padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) var(--gutter); text-decoration: none; position: relative;
  transition: background 0.4s var(--ease);
}
.continue a + a { border-left: 1px solid var(--line); text-align: right; }
.continue a:hover { background: var(--parchment); }
.continue span { display: block; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-deep); font-weight: 600; margin-bottom: 0.6rem; }
.continue strong { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.15; display: block; }
@media (max-width: 640px) {
  .continue { grid-template-columns: 1fr; }
  .continue a + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
}

/* ---------- Shared content modules ---------- */
.ledger { display: grid; margin: 0; border-top: 1px solid var(--line-strong); }
.ledger > div { display: grid; grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.6fr); gap: 1rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.ledger dt { font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-deep); font-weight: 600; padding-top: 0.3rem; }
.ledger dd { margin: 0; font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.35; }
.tone-forest .ledger { border-color: var(--line-light); }
.tone-forest .ledger > div { border-color: var(--line-light); }
.tone-forest .ledger dt { color: var(--brass-light); }
@media (max-width: 480px) { .ledger > div { grid-template-columns: 1fr; gap: 0.2rem; } }

.source-note { font-size: 0.86rem; color: var(--ink-mute); border-left: 2px solid var(--sand); padding: 0.2rem 0 0.2rem 1rem; margin-top: 2rem; }
.tone-forest .source-note { color: rgba(243, 236, 223, 0.6); border-color: var(--forest-500); }

.sloka { text-align: center; }
.sloka .deva { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.85rem); color: var(--maroon); margin: 0 0 1rem; }
.tone-forest .sloka .deva { color: var(--brass-light); }
.sloka .iast { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink-soft); display: block; margin-bottom: 1rem; }
.tone-forest .sloka .iast { color: rgba(243, 236, 223, 0.75); }
.sloka .gloss { font-size: 0.98rem; color: var(--ink-mute); max-width: 36rem; margin: 0 auto; }
.tone-forest .sloka .gloss { color: rgba(243, 236, 223, 0.66); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.quote {
  font-family: var(--font-serif); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.35rem); line-height: 1.35; font-style: italic;
  position: relative; padding-left: clamp(1.4rem, 1rem + 2vw, 3rem); border-left: 1px solid var(--brass);
}
.quote cite { display: block; margin-top: 1.2rem; font-family: var(--font-sans); font-style: normal; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-deep); }
.tone-forest .quote cite { color: var(--brass-light); }
.quote cite a { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal="mask"] > *, .js [data-reveal="line"] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

@media print {
  .site-header, .drawer, .site-footer, .continue { display: none !important; }
  body { background: #fff; }
}

/* ---------- Language switcher ---------- */
.lang-switch { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; flex: none; }
.site-header__inner > .nav { margin-left: auto; }
.nav + .lang-switch { margin-left: 0.4rem; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.5rem; text-decoration: none; color: inherit; opacity: 0.62; position: relative; transition: opacity 0.3s; }
.lang-switch a[lang="hi"] { font-family: var(--font-deva); font-size: 0.98rem; letter-spacing: 0; font-weight: 400; }
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current] { opacity: 1; }
.lang-switch a[aria-current]::after { content: ""; position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.45rem; height: 1px; background: var(--brass); }
.lang-switch span { opacity: 0.35; font-weight: 400; }
.menu-button { margin-left: 0.2rem; }
.drawer__lang { padding-bottom: 0.4rem; border-bottom: 1px solid var(--line-light); }
.lang-switch--drawer { margin: 0; font-size: 0.95rem; color: var(--parchment); }
.lang-switch--drawer a[lang="hi"] { font-size: 1.2rem; }
@media (max-width: 1100px) { .site-header__inner > .lang-switch { margin-left: auto; } }
@media (max-width: 420px) { .site-header__inner { gap: 0.6rem; } .lang-switch a { padding-inline: 0.4rem; } }

/* ---------- Quotations shown with their original English (Hindi pages) ---------- */
.quote-orig { margin: 0.9rem 0 0 !important; font-family: var(--font-sans); font-style: normal; font-size: 0.86rem !important; line-height: 1.55 !important; color: var(--ink-mute) !important; letter-spacing: 0; }
.quote-orig span { font-weight: 600; margin-right: 0.3rem; }
.tone-forest .quote-orig { color: rgba(243, 236, 223, 0.6) !important; }
.leaf .quote-orig { color: #6b5a3a !important; text-align: center; }

/* Self-hosted Devanagari faces for Hindi pages (SIL Open Font License).
   size-adjust brings their visual scale in line with Cormorant Garamond / Source Sans 3. */
@font-face { font-family: "BT Deva Serif"; src: url("../fonts/tiro-devanagari-hindi-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; size-adjust: 86%; 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; }
@font-face { font-family: "BT Deva Sans"; src: url("../fonts/mukta-devanagari-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; size-adjust: 100%; 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; }
@font-face { font-family: "BT Deva Sans"; src: url("../fonts/mukta-devanagari-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; size-adjust: 100%; 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; }

/* ---------- Hindi (Devanagari) typography ---------- */
html[lang="hi"] {
  --font-serif: "Cormorant Garamond", "BT Deva Serif", "Tiro Devanagari Sanskrit", Georgia, serif;
  --font-sans: "Source Sans 3", "BT Deva Sans", "Nirmala UI", system-ui, sans-serif;
  font-synthesis: none;
}
html[lang="hi"] body { line-height: 1.85; }
/* Tracking breaks Devanagari conjuncts: remove it everywhere except explicit English runs. */
html[lang="hi"] body *:not([lang="en"]):not([lang="en"] *) { letter-spacing: normal !important; }
html[lang="hi"] :is(h1, h2, h3, h4), html[lang="hi"] :is(h1, h2, h3, h4) * { line-height: 1.34 !important; }
html[lang="hi"] .lead { line-height: 1.7; }
html[lang="hi"] .dropcap::first-letter { float: none; font: inherit; padding: 0; color: inherit; line-height: inherit; }
html[lang="hi"] .eyebrow, html[lang="hi"] .breadcrumb, html[lang="hi"] .nav__link, html[lang="hi"] .nav__toggle, html[lang="hi"] .btn, html[lang="hi"] .text-link { text-transform: none; }
html[lang="hi"] .eyebrow { font-size: 0.9rem; }
html[lang="hi"] .nav__link, html[lang="hi"] .nav__toggle { font-size: 0.95rem; font-weight: 600; }
html[lang="hi"] .btn { font-size: 1rem; }
html[lang="hi"] .text-link { font-size: 1.02rem; }
html[lang="hi"] .breadcrumb { font-size: 0.92rem; }
html[lang="hi"] .brand__sub { font-size: 0.78rem; }
/* Small tracked labels were sized for spaced Latin capitals; Devanagari needs a little more size to stay legible. */
html[lang="hi"] :is(.ledger dt, .year-track span, .footer__col h2, .drawer__group h2, .continue span, .ev-meta dt, .register__row--head span, .mv-row--head, .pp-chain span, .modern__dates, .contact-lines dt, .field label, .ev-entry__place, .gal-links span, .lineage-mini span, .lineage-mini em, .leaf figcaption, .quote cite, .nav__menu a small, .edu-figures__src, .footer__lock, .drawer__close, .menu-button, .home-hero__ledger p) { font-size: 0.88rem !important; }
html[lang="hi"] :is(.era__list i, .register__row span:nth-child(3), .footer__small, .footer__bottom, figcaption, .caption, .source-note) { font-size: 0.92rem; }
html[lang="hi"] .lineage-mini em, html[lang="hi"] .era__list i { font-style: normal; }
html[lang="hi"] .home-hero__title .hl { line-height: 1.24 !important; }
html[lang="hi"] .home-hero__title .hl--1 { margin-bottom: 0.25em; }
html[lang="hi"] .life-index span { min-width: 6.4rem; white-space: nowrap; }
