/* =========================================================
   Base: reset, typography, language switching, layout primitives
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.65;
  color: var(--ink-700); background: var(--ivory); text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest-700); text-underline-offset: 3px; }
a:hover { color: var(--forest-900); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink-900); line-height: 1.18; font-weight: 700; }
h1, h2 { font-family: var(--font-serif); letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.005em; }
/* Devanagari needs extra line height so matras are not clipped */
[lang="mr"] { line-height: inherit; }
h1 [lang="mr"], h2 [lang="mr"], h3 [lang="mr"] { line-height: 1.38; }
:focus-visible { outline: 3px solid var(--saffron-500); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-300); color: var(--ink-900); }

/* ---------- Bilingual content ----------
   Content is written as sibling elements with lang="mr" / lang="en".
   html[data-lang] decides which one is shown. .always keeps both. */
html[data-lang="en"] body [lang="mr"]:not(.always),
html[data-lang="mr"] body [lang="en"]:not(.always) { display: none !important; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.section { padding-block: var(--section-y); position: relative; }
.section--cream { background: var(--cream); }
.section--sand { background: var(--sand-200); }
.section--dark { background: var(--forest-900); color: rgba(255, 253, 247, .82); }
.section--dark h2, .section--dark h3 { color: var(--ivory); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: var(--fs-lead); color: var(--ink-500); margin: 0; }
.section--dark .section-head p { color: rgba(255, 253, 247, .72); }
.section-head__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-5); max-width: none; }
.section-head__row > div { max-width: 680px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: var(--s-4);
  font-size: var(--fs-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--saffron-600);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section--dark .eyebrow, .eyebrow--light { color: var(--gold-300); }
.section-head--center .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }

.lead { font-size: var(--fs-lead); color: var(--ink-500); }
.prose p { max-width: 68ch; }
.prose p + p { margin-top: -.2em; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1.05fr .95fr; } .split--reverse > :first-child { order: 2; } }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .75rem 1.25rem; border-radius: var(--r-sm);
  background: var(--forest-900); color: var(--ivory); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--ivory); }

/* Numbers: lining figures everywhere (Playfair defaults to old-style figures) */
body { font-variant-numeric: lining-nums; }

/* ---------- Marathi (Devanagari) typography ----------
   Letter-spacing breaks Devanagari conjuncts/matras and there is no true
   Devanagari italic (browsers fake a slant), so neutralise both for Marathi. */
body [lang="mr"] { letter-spacing: 0 !important; }
body [lang="mr"] em, em[lang="mr"] { font-style: normal !important; }
.eyebrow [lang="mr"] { font-size: 1.08em; }

/* Sticky side column – only when it really sits beside its content (2 columns).
   On one-column layouts it must scroll normally, otherwise it overlaps the list. */
@media (min-width: 960px) {
  .sticky-col { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* Scroll reveal – used only on section-level blocks (not on every card).
   Short distance + quick fade so content never feels delayed. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  /* Never animate a sticky element's transform – it fights with sticky positioning */
  .js .reveal.sticky-col { transform: none; }

  /* Hero entrance: one short, staggered fade-up on first paint (CSS only) */
  .hero__grid > div:first-child > * { animation: rise .6s var(--ease) both; }
  .hero__grid > div:first-child > :nth-child(2) { animation-delay: .06s; }
  .hero__grid > div:first-child > :nth-child(3) { animation-delay: .12s; }
  .hero__grid > div:first-child > :nth-child(n+4) { animation-delay: .18s; }
  .hero__visual { animation: fade .8s .15s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes fade { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
