/* ==========================================================================
   AATMA TRIPT — design system v2  ·  "The Lesson Book"
   A 1990s Indian classroom (chalkboard, ruled notebook, brown paper, rubber
   stamps) carrying two folk traditions that are kept apart, never blended:
   · Odisha Pattachitra — bold outlined bands of lotus, temple-tooth and beads,
     in full colour.
   · Maharashtra Warli — white circles, triangles and lines on a mud-red wall.
   Mobile-first: base rules target ~360px phones; min-width queries add room.
   Palette is locked to the five brand colours; tints are mixes of those five.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --terracotta: #B85C38;
  --turmeric: #E4A72C;
  --indigo: #2F5685;
  --charcoal: #2F2F2D;
  --cream: #F4EBDD;

  --board: var(--charcoal);
  --paper: var(--cream);
  --kraft: color-mix(in srgb, var(--turmeric) 34%, var(--terracotta) 22%, var(--cream));
  --ink: var(--charcoal);
  --ink-soft: color-mix(in srgb, var(--charcoal) 72%, var(--cream));
  --chalk: var(--cream);
  --chalk-soft: color-mix(in srgb, var(--cream) 70%, var(--charcoal));
  --rule: color-mix(in srgb, var(--indigo) 24%, transparent);
  --margin-rule: color-mix(in srgb, var(--terracotta) 60%, transparent);

  --serif: "Playfair Display", "Tiro Devanagari Hindi", "Iowan Old Style", Georgia, serif;
  --sans: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* fluid type: 360px → 1440px */
  --t-xs: clamp(.72rem, .69rem + .12vw, .8rem);
  --t-sm: clamp(.86rem, .83rem + .14vw, .95rem);
  --t-md: clamp(1rem, .96rem + .2vw, 1.12rem);
  --t-lg: clamp(1.18rem, 1.08rem + .45vw, 1.45rem);
  --t-xl: clamp(1.55rem, 1.3rem + 1.1vw, 2.3rem);
  --t-2xl: clamp(2rem, 1.55rem + 2vw, 3.4rem);
  --t-3xl: clamp(2.5rem, 1.8rem + 3.3vw, 5.2rem);
  --t-hero: clamp(2.9rem, 1.9rem + 5vw, 7rem);

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 6.5rem;
  --section: clamp(3.75rem, 2.6rem + 5vw, 8rem);
  --gutter: clamp(1.15rem, .8rem + 1.6vw, 2.5rem);
  --max: 1200px;
  --header-h: 60px;
  --line: 32px;                    /* notebook ruling */
  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-paper: 0 1px 0 rgba(47,47,45,.06), 0 10px 24px -14px rgba(47,47,45,.35);

  /* textures */
  --tex-chalk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.92 0 0 0 0 0.87 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.18 0 0 0 0 0.17 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --mask-chalk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.1 2.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --patta-lotus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23E4A72C'/%3E%3Cpath d='M0 1.5H32M0 30.5H32' stroke='%232F2F2D' stroke-width='3'/%3E%3Cpath d='M16 5.5C23.5 10.5 22.5 21.5 16 26.5C9.5 21.5 8.5 10.5 16 5.5Z' fill='%23B85C38' stroke='%232F2F2D' stroke-width='1.4'/%3E%3Cpath d='M16 11C19 14 19 19.5 16 22C13 19.5 13 14 16 11Z' fill='%23F4EBDD'/%3E%3Ccircle cx='0' cy='16' r='2.6' fill='%232F5685' stroke='%232F2F2D' stroke-width='1'/%3E%3Ccircle cx='32' cy='16' r='2.6' fill='%232F5685' stroke='%232F2F2D' stroke-width='1'/%3E%3C/svg%3E");
  --patta-tooth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect width='20' height='14' fill='%23F4EBDD'/%3E%3Cpath d='M0 13L10 1.5L20 13Z' fill='%23B85C38' stroke='%232F2F2D' stroke-width='1.2' stroke-linejoin='round'/%3E%3Ccircle cx='10' cy='9' r='1.6' fill='%23F4EBDD'/%3E%3Cpath d='M0 13.4H20' stroke='%232F2F2D' stroke-width='1.2'/%3E%3C/svg%3E");
  --patta-beads: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Crect width='12' height='10' fill='%232F2F2D'/%3E%3Ccircle cx='6' cy='5' r='2.1' fill='%23F4EBDD'/%3E%3C/svg%3E");
  --warli-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='96' viewBox='0 0 120 96'%3E%3Cg fill='%23F4EBDD' stroke='%23F4EBDD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='28' cy='18' r='3.6'/%3E%3Cpath d='M21 24.5H35L28 35Z'/%3E%3Cpath d='M28 35L21 45.5H35Z'/%3E%3Cpath d='M24.5 45.5L21 57M31.5 45.5L35 57M21 24.5L14 18M35 24.5L42 31' fill='none'/%3E%3Ccircle cx='88' cy='54' r='3.6'/%3E%3Cpath d='M81 60.5H95L88 71Z'/%3E%3Cpath d='M88 71L81 81.5H95Z'/%3E%3Cpath d='M84.5 81.5L81 93M91.5 81.5L95 93M81 60.5L74 67M95 60.5L102 54' fill='none'/%3E%3Ccircle cx='70' cy='14' r='1.3' stroke='none'/%3E%3Ccircle cx='78' cy='20' r='1.3' stroke='none'/%3E%3Ccircle cx='10' cy='78' r='1.3' stroke='none'/%3E%3Ccircle cx='48' cy='86' r='1.3' stroke='none'/%3E%3Ccircle cx='112' cy='30' r='1.3' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  --chalk-underline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='12' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8C40 4 80 9 120 6S180 4 198 7' fill='none' stroke='%23E4A72C' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}
@media (min-width: 64em) { :root { --header-h: 72px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 400 var(--t-md)/1.65 var(--sans); color: var(--ink);
  background: var(--paper) var(--tex-paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); line-height: 1.2; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--terracotta); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
::selection { background: var(--turmeric); color: var(--charcoal); }
:focus-visible { outline: 2px dashed var(--turmeric); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--turmeric); color: var(--charcoal); padding: 10px 16px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 780px; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .55); position: relative; }
.muted { color: var(--ink-soft); }
.serif-italic { font-family: var(--serif); font-style: italic; }
.lede { font-size: var(--t-lg); line-height: 1.55; max-width: 38em; }
.prose p { max-width: 38em; }
.prose p + p { margin-top: -.2em; }

/* ---------- 3. Surfaces ---------- */
/* Chalkboard: charcoal slate, chalk dust and two faint eraser sweeps. */
.board, .on-dark, .page-hero--board {
  color: var(--chalk);
  background-color: var(--board);
  background-image:
    var(--tex-chalk),
    radial-gradient(120% 60% at 18% 22%, rgba(244,235,221,.07), transparent 60%),
    radial-gradient(90% 50% at 82% 78%, rgba(244,235,221,.05), transparent 65%),
    linear-gradient(172deg, transparent 38%, rgba(244,235,221,.035) 46%, transparent 54%);
}
.board .muted, .on-dark .muted, .page-hero--board .muted { color: var(--chalk-soft); }
.board h1 em, .board h2 em, .on-dark h2 em, .page-hero--board h1 em { color: var(--turmeric); }

/* Ruled notebook: indigo lines every --line, terracotta margin at the left. */
.paper-ruled, .notebook {
  --m: clamp(28px, 6vw, 84px);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--m) - 1px), var(--margin-rule) calc(var(--m) - 1px), var(--margin-rule) calc(var(--m) + 1px), transparent calc(var(--m) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line)),
    var(--tex-paper);
  background-position: 0 0, 0 18px, 0 0;
}
/* keep text off the red margin line */
.paper-ruled > .wrap, .notebook > .wrap { padding-left: max(var(--gutter), calc(var(--m) + 16px)); }
/* Brown-paper notebook cover */
.kraft { background: var(--kraft) var(--tex-paper); }

.on-indigo { color: var(--cream); background: var(--indigo) var(--tex-chalk); }
.on-indigo h2 em, .on-indigo .eyebrow { color: var(--turmeric); }

/* Warli wall: white figures on a mud-red ground (never mixed with Pattachitra colour). */
.warli-wall, .on-terracotta, .warli-ground { position: relative; color: var(--cream); background-color: var(--terracotta); isolation: isolate; }
.warli-wall::before, .on-terracotta::before, .warli-ground::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--warli-tile) 0 0 / 132px 106px repeat, var(--tex-paper); opacity: .09;
}
.on-terracotta .eyebrow, .warli-wall .eyebrow, .on-terracotta > .wrap > .label, .warli-wall > .wrap > .label { color: var(--cream); }
.on-terracotta h2 em, .warli-wall h2 em { color: var(--charcoal); }

/* ---------- 4. Pattachitra borders ---------- */
/* A Pattachitra border reads outside-in: black rule, bead row, lotus band, temple teeth. */
.patta-band { height: 32px; background: var(--patta-lotus) 0 0 / 32px 32px repeat-x; }
.patta-band--sm { height: 20px; background-size: 20px 20px; }
.patta-band--tooth { height: 14px; background: var(--patta-tooth) 0 0 / 20px 14px repeat-x; }
.patta-band--beads { height: 10px; background: var(--patta-beads) 0 0 / 12px 10px repeat-x; }
.patta-border { display: grid; }
.patta-border > span { display: block; }
.patta-border--flip { transform: scaleY(-1); }
.border-strip { position: absolute; top: 0; bottom: 0; width: 20px; background: var(--patta-lotus) 0 0 / 20px 20px repeat-y; z-index: 1; }
.border-strip--left { left: 0; } .border-strip--right { right: 0; }
@media (min-width: 48em) { .border-strip { width: 28px; background-size: 28px 28px; } }
/* A framed panel: double black outline with a lotus band inside it. */
.patta-frame { position: relative; padding: 18px; background: var(--patta-lotus) 0 0 / 18px 18px; border: 3px solid var(--charcoal); box-shadow: inset 0 0 0 1px var(--charcoal); }
.patta-frame > * { position: relative; background: var(--paper); border: 2px solid var(--charcoal); }

/* ---------- 5. Typography components ---------- */
.eyebrow, .label {
  display: inline-flex; align-items: center; gap: .6em; margin-bottom: var(--s-4);
  font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta);
}
.label__no { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 1.35em; color: inherit; }
.label::before, .eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.board .eyebrow, .board .label, .on-dark .eyebrow, .on-dark .label, .page-hero--board .eyebrow { color: var(--turmeric); }

/* Chalk lettering: cream text with a grain mask so it reads as chalk, not ink. */
.chalk-text { color: var(--chalk); -webkit-mask-image: var(--mask-chalk); mask-image: var(--mask-chalk); -webkit-mask-size: 140px; mask-size: 140px; }
.chalk-line { position: relative; display: inline-block; padding-bottom: .35em; }
.chalk-line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--chalk-underline) 0 0 / 100% 100% no-repeat; }
.hand { font-family: var(--serif); font-style: italic; color: var(--indigo); font-size: var(--t-xl); line-height: 1.25; }
.pull { font-family: var(--serif); font-style: italic; font-size: var(--t-xl); line-height: 1.3; }
.num { font-family: var(--serif); font-style: italic; font-variant-numeric: lining-nums; }

/* Rubber stamp: uppercase, inked border, a little crooked. */
.stamp {
  display: inline-flex; align-items: center; gap: .4em; padding: .38em .75em .32em;
  font: 700 var(--t-xs)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); border: 2px solid currentColor; border-radius: 4px; transform: rotate(-2.5deg);
  -webkit-mask-image: var(--mask-chalk); mask-image: var(--mask-chalk); -webkit-mask-size: 90px; mask-size: 90px;
}
.stamp--indigo { color: var(--indigo); } .stamp--turmeric { color: var(--turmeric); } .stamp--cream { color: var(--cream); }
.stamp--flat { transform: none; }

/* ---------- 6. Buttons and links ---------- */
.btn {
  --bg: var(--charcoal); --fg: var(--cream);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8em 1.35em; border: 0; border-radius: var(--radius);
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  font: 600 var(--t-sm)/1 var(--sans); letter-spacing: .04em;
  transition: transform .25s var(--ease), background-color .25s, color .25s;
}
/* the chalk outline drawn just inside the slate */
.btn::before { content: ""; position: absolute; inset: 4px; border: 1px dashed color-mix(in srgb, var(--fg) 45%, transparent); border-radius: 2px; pointer-events: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(0); }
.btn--turmeric { --bg: var(--turmeric); --fg: var(--charcoal); }
.btn--paper { --bg: var(--cream); --fg: var(--charcoal); }
.btn--ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost::before { display: none; }
.board .btn:not(.btn--ghost), .on-dark .btn:not(.btn--ghost), .on-indigo .btn:not(.btn--ghost) { --bg: var(--turmeric); --fg: var(--charcoal); }
.on-terracotta .btn:not(.btn--ghost) { --bg: var(--cream); --fg: var(--charcoal); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; font-size: var(--t-sm); text-decoration: none; padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: background-size .3s var(--ease); }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover { background-size: 40% 1.5px; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- 7. Loading screen (first visit per session only) ---------- */
.loader { display: none; }
.is-loading .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 300; color: var(--cream);
  background-color: var(--board); background-image: var(--tex-chalk);
}
.is-loading body { overflow: hidden; }
.loader__inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.loader__ring { width: min(56vw, 220px); aspect-ratio: 1; }
.loader__ring .dancers { transform-origin: 100px 100px; animation: tarpa 9s linear infinite; }
.loader__ring .ring { stroke-dasharray: 540; stroke-dashoffset: 540; animation: draw 1.1s var(--ease) forwards; }
.loader__count { font: italic 500 var(--t-xl)/1 var(--serif); font-variant-numeric: tabular-nums; }
.loader__count small { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; display: block; margin-top: 10px; color: var(--chalk-soft); }
.loader__band { position: absolute; left: 0; right: 0; height: 20px; background: var(--patta-lotus) 0 0 / 20px 20px repeat-x; }
.loader__band--top { top: 0; } .loader__band--bottom { bottom: 0; }
.loader.is-done { animation: lift .7s var(--ease) forwards; }
@keyframes tarpa { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes lift { to { transform: translateY(-100%); visibility: hidden; } }

/* ---------- 8. Header and navigation ---------- */
/* The blur lives on a pseudo-element: a backdrop-filter on the header itself would make it the
   containing block of the fixed menu overlay and squash the overlay to the header's 60px height. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); transition: transform .35s var(--ease), color .3s; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--cream) 94%, transparent); border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
  transition: background-color .3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-dark { color: var(--cream); }
.site-header.is-dark::before { background: color-mix(in srgb, var(--charcoal) 90%, transparent); border-bottom-color: rgba(244,235,221,.12); }
.nav-open .site-header { color: var(--cream); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__emblem { height: 42px; padding: 3px 6px; display: grid; place-items: center; border-radius: 8px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--rule); }
.brand__emblem img { width: auto; height: 36px; }
.brand__name { font: 500 1.2rem/1 var(--serif); letter-spacing: .01em; }
.menu-toggle { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: 0 1em; border: 1.5px solid currentColor; border-radius: 999px; background: transparent; font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; }
.menu-toggle__bars { width: 16px; height: 10px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 60% 2px no-repeat; }

/* Mobile/tablet: full-screen chalkboard menu */
.nav {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px; color: var(--cream);
  background-color: var(--board); background-image: var(--tex-chalk);
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
}
.nav::before { content: ""; position: absolute; inset: 0 0 auto; height: 20px; background: var(--patta-lotus) 0 0 / 20px 20px repeat-x; }
.nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; text-decoration: none; border-bottom: 1px solid rgba(244,235,221,.12); font: 500 clamp(1.6rem, 6.4vw, 2.4rem)/1.1 var(--serif); }
.nav a .n { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .14em; color: var(--turmeric); min-width: 2.2em; }
.nav a[aria-current="page"] { color: var(--turmeric); }
.nav a[aria-current="page"]::after { content: "← aaj ka paath"; margin-left: auto; font: italic 400 var(--t-sm)/1 var(--serif); color: var(--chalk-soft); }
.nav__close { align-self: flex-end; position: absolute; top: 28px; right: var(--gutter); min-height: 44px; padding: 0 1em; border: 1.5px solid currentColor; border-radius: 999px; background: none; font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; z-index: 2; }
.nav__warli { margin-top: auto; padding-top: 28px; color: var(--cream); opacity: .55; }
.nav__warli { display: flex; justify-content: center; overflow: hidden; }
.nav__warli svg { flex: none; width: auto; height: 76px; max-width: none; }
@media (min-width: 75em) {
  .menu-toggle, .nav__close, .nav__warli, .nav a .n, .nav::before { display: none; }
  .nav { position: static; inset: auto; flex-direction: row; align-items: center; gap: 2px; padding: 0; overflow: visible; color: inherit; background: none; visibility: visible; opacity: 1; transform: none; transition: none; }
  .nav a { border: 0; padding: 10px 11px; font: 500 var(--t-sm)/1 var(--sans); position: relative; }
  .nav a::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 6px; background: var(--chalk-underline) 0 0 / 100% 100% no-repeat; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); content: ""; margin: 0; }
  .nav a[aria-current="page"] { color: inherit; }
  .nav .nav__cta { margin-left: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--charcoal); color: var(--cream); }
  .site-header.is-dark .nav .nav__cta { background: var(--turmeric); color: var(--charcoal); }
  .nav .nav__cta::after { display: none; }
}

/* ---------- 9. Reveal on scroll (only when JS is running, so content is never lost) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.js .reveal-stagger.is-in > * { opacity: 1; transform: none; }
.js .reveal-stagger.is-in > *:nth-child(2) { transition-delay: .08s; } .js .reveal-stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
.js .reveal-stagger.is-in > *:nth-child(4) { transition-delay: .24s; } .js .reveal-stagger.is-in > *:nth-child(5) { transition-delay: .32s; }

/* ---------- 10. Home: hero chalkboard ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding-top: var(--header-h); overflow: hidden; }
.hero__frame { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; padding-block: clamp(36px, 8vh, 96px) clamp(56px, 10vh, 110px); }
.hero__frame::before, .hero__frame::after { content: ""; position: absolute; left: 0; right: 0; height: 20px; background: var(--patta-lotus) 0 0 / 20px 20px repeat-x; }
.hero__frame::before { top: 0; } .hero__frame::after { bottom: 0; }
.hero__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-bottom: clamp(20px, 4vh, 40px); font: italic 400 var(--t-md)/1.3 var(--serif); }
.hero__top b { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--turmeric); font-style: normal; display: block; margin-bottom: 6px; }
.hero__title { font-size: var(--t-hero); line-height: .98; letter-spacing: -.02em; margin: 0; max-width: 11ch; }
.hero__title .line { display: block; }
.hero__en { margin: clamp(14px, 2.4vh, 24px) 0 0; font: italic 400 var(--t-xl)/1.2 var(--serif); color: var(--turmeric); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: clamp(22px, 4vh, 40px) 0 clamp(22px, 4vh, 34px); font-size: var(--t-sm); color: var(--chalk-soft); }
.hero__ledge { position: absolute; left: 0; right: 0; bottom: 20px; height: 12px; background: linear-gradient(var(--terracotta), color-mix(in srgb, var(--terracotta) 70%, var(--charcoal))); box-shadow: 0 -1px 0 rgba(0,0,0,.25); }
.hero__ledge i { position: absolute; bottom: 10px; height: 6px; border-radius: 3px; background: var(--cream); }
.hero__ledge i:nth-child(1) { left: 14%; width: 30px; } .hero__ledge i:nth-child(2) { left: 18%; width: 18px; background: var(--turmeric); }
.hero__ledge i:nth-child(3) { right: 12%; width: 64px; height: 14px; border-radius: 3px; background: linear-gradient(var(--indigo) 55%, var(--cream) 55%); }
.hero__cue { position: absolute; right: var(--gutter); bottom: 46px; display: none; align-items: center; gap: 10px; font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-soft); text-decoration: none; }
.hero__cue i { width: 1px; height: 38px; background: currentColor; transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (min-width: 48em) { .hero__cue { display: inline-flex; } .hero__title { max-width: 12ch; } }
.hero__art { display: none; }
@media (min-width: 64em) {
  .hero__art { display: block; position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: 50%; width: min(34vw, 430px); margin: 0; transform: translateY(-46%); color: var(--chalk); text-align: center; }
  .hero__art svg { width: 100%; height: auto; opacity: .88; -webkit-mask-image: var(--mask-chalk); mask-image: var(--mask-chalk); -webkit-mask-size: 140px; mask-size: 140px; }
  .hero__art figcaption { margin-top: 10px; font: italic 400 var(--t-sm)/1.3 var(--serif); color: var(--chalk-soft); }
  .hero__art .tarpa__outer { transform-origin: 200px 200px; animation: tarpa 80s linear infinite; }
  .hero__art .tarpa__inner { transform-origin: 200px 200px; animation: tarpa 60s linear infinite reverse; }
}
/* chalk being written: each line wipes in left → right */
.js .hero__title .line, .js .hero__en, .js .hero__top { clip-path: inset(0 100% 0 0); animation: write 1.1s var(--ease) forwards; }
.js .hero__top { animation-delay: .05s; } .js .hero__title .line:nth-child(1) { animation-delay: .25s; }
.js .hero__title .line:nth-child(2) { animation-delay: .7s; } .js .hero__en { animation-delay: 1.15s; }
.js.is-loading .hero__title .line, .js.is-loading .hero__en, .js.is-loading .hero__top { animation-play-state: paused; }
@keyframes write { to { clip-path: inset(0 0 0 0); } }

/* subject ticker under the hero */
.ticker { overflow: hidden; background: var(--turmeric); color: var(--charcoal); border-block: 2px solid var(--charcoal); }
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker__track span { display: inline-flex; align-items: center; gap: 18px; padding: 11px 18px; font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.ticker__track span::after { content: ""; width: 14px; height: 14px; background: var(--patta-lotus) center / 26px 26px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--charcoal); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 11. Home: manifesto page ---------- */
.manifesto { padding-block: var(--section); }
.manifesto__q { font-size: var(--t-3xl); line-height: 1.04; max-width: 14ch; margin-bottom: .35em; }
.manifesto__q .w { transition: opacity .35s linear; }
.manifesto__en { font: italic 400 var(--t-lg)/1.4 var(--serif); color: var(--ink-soft); margin-bottom: var(--s-6); }
.manifesto__body { font-size: var(--t-lg); line-height: var(--line); max-width: 34em; }
@media (min-width: 64em) { .manifesto__body { line-height: calc(var(--line) * 1); } }
.manifesto__sign { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

/* ---------- 12. Home: attendance register (the menu) ---------- */
.register { position: relative; }
.register__book { background: var(--paper) var(--tex-paper); color: var(--ink); border: 2px solid var(--charcoal); box-shadow: 8px 8px 0 var(--turmeric); }
.register__book .muted { color: var(--ink-soft); }
.register__book .btn { --bg: var(--charcoal); --fg: var(--cream); }
.register__cover { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 20px; padding: 18px 18px 14px; background: var(--kraft) var(--tex-paper); border-bottom: 2px solid var(--charcoal); }
.register__cover h3 { margin: 0; font-size: var(--t-xl); }
.register__cover p { margin: 0; font-size: var(--t-sm); }
.register__head { display: none; }
.register__list { list-style: none; margin: 0; padding: 0; }
.reg-row { border-bottom: 1px solid var(--rule); }
.reg-row:last-child { border-bottom: 0; }
.reg-row > details > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 4px 14px; align-items: center; padding: 16px 16px 16px 0; }
.reg-row > details > summary::-webkit-details-marker { display: none; }
.reg-row__no { align-self: stretch; display: grid; place-items: center; border-right: 2px solid var(--margin-rule); font: italic 500 var(--t-lg)/1 var(--serif); color: var(--terracotta); }
.reg-row__name { font: 500 var(--t-lg)/1.2 var(--serif); }
.reg-row__home { grid-column: 2; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.reg-row__mark { grid-column: 3; grid-row: 1 / span 2; display: grid; justify-items: end; gap: 8px; }
.reg-row__toggle { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--charcoal); display: grid; place-items: center; font-size: 18px; line-height: 1; transition: transform .3s var(--ease), background-color .2s; }
.reg-row__when { display: none; }
details[open] .reg-row__toggle { transform: rotate(45deg); background: var(--turmeric); }
.reg-row summary:hover .reg-row__name { text-decoration: underline; text-decoration-color: var(--turmeric); text-decoration-thickness: 2px; }
.reg-row__more { padding: 0 16px 20px calc(3.2rem + 14px); }
.reg-row__more p { max-width: 42em; }
.reg-row__more dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: var(--t-sm); }
.reg-row__more dt { font-weight: 600; } .reg-row__more dd { margin: 0; }
.register__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-top: 2px solid var(--charcoal); }
@media (min-width: 56em) {
  .register__head, .reg-row > details > summary { grid-template-columns: 4.5rem minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.2fr) 44px; }
  .register__head { display: grid; gap: 14px; padding: 10px 16px 10px 0; border-bottom: 2px solid var(--charcoal); font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
  .register__head span:first-child { text-align: center; }
  .reg-row > details > summary { gap: 14px; padding-block: 18px; }
  .reg-row__home { grid-column: auto; font-size: var(--t-sm); letter-spacing: 0; text-transform: none; color: var(--ink); }
  .reg-row__when { display: block; font-size: var(--t-sm); color: var(--ink-soft); }
  .reg-row__mark { grid-column: auto; grid-row: auto; }
  .reg-row__mark .stamp { display: none; }
  .reg-row__more { padding-left: calc(4.5rem + 14px); }
}

/* ---------- 13. Home: postcards (regional journey, native swipe) ---------- */
.rail { position: relative; }
.rail__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 24px; margin-bottom: var(--s-6); }
.rail__head h2 { margin: 0; }
.rail__controls { display: flex; align-items: center; gap: 10px; }
.rail__count { font: italic 500 var(--t-lg)/1 var(--serif); min-width: 4.2em; text-align: center; font-variant-numeric: tabular-nums; }
.rail__btn { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 18px; transition: background-color .2s, color .2s; }
.rail__btn:hover:not(:disabled) { background: var(--charcoal); color: var(--cream); }
.rail__btn:disabled { opacity: .3; cursor: default; }
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78%, 1fr); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 8px var(--gutter) 26px; margin-inline: calc(var(--gutter) * -1) calc(50% - 50vw); scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail__track::-webkit-scrollbar { display: none; }
@media (min-width: 40em) { .rail__track { grid-auto-columns: minmax(46%, 1fr); } }
@media (min-width: 64em) { .rail__track { grid-auto-columns: calc((100% - 2 * 20px) / 3.15); gap: 20px; } }
.postcard { scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper) var(--tex-paper); border: 1.5px solid var(--charcoal); box-shadow: var(--shadow-paper); transition: transform .35s var(--ease), box-shadow .35s; }
.postcard:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 18px 30px -18px rgba(47,47,45,.6); }
.postcard__art { aspect-ratio: 16 / 10; border-bottom: 1.5px solid var(--charcoal); overflow: hidden; background: var(--charcoal); position: relative; }
.postcard__art svg, .postcard__art > div { width: 100%; height: 100%; }
.postcard__body { position: relative; padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.postcard__no { position: absolute; top: -20px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 1.5px dashed var(--terracotta); font: italic 500 1rem/1 var(--serif); color: var(--terracotta); }
.postcard h3 { font-size: var(--t-xl); margin: 6px 0 8px; }
.postcard p { margin: 0 0 10px; font-size: var(--t-sm); }
.postcard__dishes { margin-top: auto !important; padding-top: 10px; border-top: 1px dashed var(--rule); font-family: var(--serif); font-style: italic; color: var(--indigo); }

/* ---------- 14. Home: art of dum (a science lesson on the board) ---------- */
.lesson-steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; position: relative; counter-reset: step; }
.lesson-steps::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 34px; width: 2px; background: repeating-linear-gradient(180deg, rgba(244,235,221,.25) 0 6px, transparent 6px 12px); }
.lesson-steps::after { content: ""; position: absolute; left: 21px; top: 10px; width: 2px; height: calc((100% - 44px) * var(--p, 0)); background: var(--turmeric); }
.lesson-step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 6px 18px; padding-bottom: clamp(26px, 4vh, 44px); }
.lesson-step:last-child { padding-bottom: 0; }
.lesson-step__no { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--board); border: 2px solid var(--chalk); font: italic 500 1.05rem/1 var(--serif); transition: background-color .4s, color .4s, border-color .4s; }
.lesson-step.is-on .lesson-step__no { background: var(--turmeric); border-color: var(--turmeric); color: var(--charcoal); }
.lesson-step__icon { grid-column: 2; width: 64px; height: 40px; color: var(--chalk); opacity: .85; margin-bottom: 6px; }
.lesson-step h3 { grid-column: 2; margin: 0; font-size: var(--t-xl); }
.lesson-step .tag { grid-column: 2; font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--turmeric); }
.lesson-step p { grid-column: 2; margin: 6px 0 0; color: var(--chalk-soft); max-width: 36em; }
@media (min-width: 64em) {
  .dum-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: start; }
  .dum-grid__intro { position: sticky; top: calc(var(--header-h) + 40px); }
  .lesson-steps { margin-top: 0; }
}

/* ---------- 15. Home: classroom memories (a pinboard of notebook cards) ---------- */
.memories { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: var(--s-6); }
@media (min-width: 40em) { .memories { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) { .memories { grid-template-columns: repeat(6, 1fr); } .memory { grid-column: span 2; } .memory:nth-child(4), .memory:nth-child(5) { grid-column: span 3; } }
.memory { position: relative; padding: 22px 20px 20px; background: var(--paper) var(--tex-paper); border: 1.5px solid var(--charcoal); box-shadow: var(--shadow-paper); }
.memory:nth-child(odd) { transform: rotate(-.6deg); } .memory:nth-child(even) { transform: rotate(.5deg); }
.memory::before { content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in srgb, var(--turmeric) 55%, transparent); }
.memory__icon { width: 56px; height: 56px; margin-bottom: 12px; color: var(--charcoal); }
.memory h3 { font-size: var(--t-lg); margin-bottom: 6px; }
.memory p { margin: 0; font-size: var(--t-sm); color: var(--ink-soft); }
.memory--board { color: var(--chalk); background: var(--board) var(--tex-chalk); }
.memory--board p { color: var(--chalk-soft); }
.memory--board .memory__icon { color: var(--chalk); }

/* ---------- 16. Community on the Warli wall ---------- */
.community-grid { display: grid; gap: 18px; margin-top: var(--s-6); }
@media (min-width: 56em) { .community-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.programme { position: relative; padding: 24px 22px 22px; background: var(--paper) var(--tex-paper); color: var(--ink); border: 2px solid var(--charcoal); box-shadow: 6px 6px 0 var(--charcoal); }
.programme h3 { font-size: var(--t-xl); }
.programme ul { margin: 10px 0 14px; padding-left: 1.2em; }
.programme li { margin-bottom: 4px; }
.programme .status { font-family: var(--serif); font-style: italic; color: var(--indigo); }
.warli-scene { margin-top: var(--s-7); color: var(--cream); }
.warli-scene svg { width: 100%; height: auto; max-height: 220px; }

/* ---------- 17. Closing board ---------- */
.closing { text-align: center; padding-block: 0; }
.closing__inner { padding-block: clamp(70px, 14vh, 150px); }
.closing h2 { font-size: var(--t-3xl); letter-spacing: .06em; margin-bottom: .2em; }
.closing__line { font: italic 400 var(--t-xl)/1.3 var(--serif); color: var(--turmeric); margin-bottom: .4em; }
.closing .btn-row { justify-content: center; margin-top: var(--s-6); }

/* ---------- 18. Footer ---------- */
.site-footer { color: var(--cream); background: var(--board) var(--tex-chalk); }
.footer-warli { position: relative; padding-top: 26px; background: var(--terracotta); color: var(--cream); overflow: hidden; }
.footer-warli { display: flex; justify-content: center; }
.footer-warli svg { flex: none; width: auto; height: clamp(64px, 7vw, 96px); max-width: none; }
.footer-grid { display: grid; gap: 30px; padding-block: 48px 30px; grid-template-columns: 1fr; }
@media (min-width: 40em) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-logo { width: 176px; background: var(--cream); padding: 6px; border-radius: 6px; }
.footer-ethos { margin-top: 16px; font: italic 400 var(--t-md)/1.5 var(--serif); color: var(--chalk-soft); max-width: 22em; }
.footer-title { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--turmeric); margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--t-sm); }
.footer-list a { text-decoration: none; } .footer-list a:hover { text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 18px 28px; border-top: 1px solid rgba(244,235,221,.14); font-size: var(--t-xs); color: var(--chalk-soft); }
.back-top { color: inherit; text-decoration: none; }

/* ---------- 19. Inner pages ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(44px, 9vh, 110px)) 0 clamp(44px, 8vh, 96px); overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { max-width: 14ch; }
.page-hero .lede { margin-top: var(--s-4); }
.page-hero.paper-ruled .wrap { padding-left: calc(var(--m) + 18px); }
.page-hero--board::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px; background: var(--patta-lotus) 0 0 / 20px 20px repeat-x; }
.page-hero--board .border-strip { display: none; }
@media (min-width: 48em) { .page-hero .border-strip { display: block; } .page-hero--board .wrap { padding-left: calc(var(--gutter) + 28px); } }

.split { display: grid; gap: var(--s-6); }
@media (min-width: 56em) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; } .split--top { align-items: start; } }

.def-list { margin: 0; display: grid; gap: 0; }
.def-list > div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.def-list dt { font: 500 var(--t-xl)/1.1 var(--serif); color: var(--terracotta); }
.def-list dd { margin: 6px 0 0; }

.notice { padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--charcoal); border-left: 6px solid var(--terracotta); font-size: var(--t-sm); }
.on-dark .notice, .board .notice { background: rgba(244,235,221,.06); border-color: rgba(244,235,221,.3); border-left-color: var(--turmeric); color: var(--chalk); }
.notice h3 { font-size: var(--t-lg); }
.menu-note { display: grid; gap: 14px; margin-top: var(--s-6); }
@media (min-width: 48em) { .menu-note { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72em) { .menu-note { grid-template-columns: repeat(var(--cols, 3), 1fr); } }

.loading-line { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.loading-line::after { content: "…"; animation: dots 1.2s steps(3) infinite; display: inline-block; width: 1em; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } }
.skeleton { background: linear-gradient(90deg, rgba(47,47,45,.06), rgba(47,47,45,.12), rgba(47,47,45,.06)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; border: 1.5px solid var(--rule); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Menu page: index cards */
.menu-filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: var(--s-5); scrollbar-width: none; }
.menu-filters::-webkit-scrollbar { display: none; }
.menu-filters button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--charcoal); background: transparent; font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; }
.menu-filters button[aria-pressed="true"] { background: var(--charcoal); color: var(--cream); }
.menu-group { margin-bottom: var(--s-8); }
.menu-group__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; margin-bottom: var(--s-5); border-bottom: 2px solid var(--charcoal); }
.menu-group__title h2 { margin: 0; font-size: var(--t-xl); }
.menu-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 40em) { .menu-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72em) { .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.menu-card { display: flex; flex-direction: column; background: var(--paper) var(--tex-paper); border: 1.5px solid var(--charcoal); box-shadow: var(--shadow-paper); scroll-margin-top: calc(var(--header-h) + 20px); }
.menu-card__art { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 112px; padding: 34px 18px 14px; color: var(--cream); background: var(--board) var(--tex-chalk); border-bottom: 1.5px solid var(--charcoal); }
.menu-card__art::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px; background: var(--patta-lotus) 0 0 / 16px 16px repeat-x; }
.menu-card__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu-card__no { position: relative; font: italic 500 3rem/.9 var(--serif); color: var(--turmeric); }
.menu-card__cat { position: relative; text-align: right; font: 600 var(--t-xs)/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-soft); }
.menu-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; border-left: 3px double var(--margin-rule); }
.menu-card__region { font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); }
.menu-card h3 { font-size: var(--t-xl); margin: 8px 0 4px; }
.menu-card__flavour { font: italic 400 var(--t-md)/1.4 var(--serif); color: var(--indigo); margin-bottom: 8px; }
.menu-card__desc { font-size: var(--t-sm); }
.menu-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: var(--t-sm); margin: 4px 0 14px; }
.menu-card dt { font-weight: 600; } .menu-card dd { margin: 0; }
.menu-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .04em; border: 1.5px solid currentColor; }
.chip--veg { color: var(--indigo); }
.chip--veg::before { content: ""; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 1px; background: radial-gradient(circle, currentColor 40%, transparent 45%); }
.chip--season { color: var(--terracotta); background: color-mix(in srgb, var(--turmeric) 25%, transparent); }
.price { margin-left: auto; font: italic 500 var(--t-lg)/1 var(--serif); }

/* Regional stories */
.story { display: grid; gap: var(--s-5); padding-block: var(--s-7); border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 20px); }
.story__art { aspect-ratio: 16 / 10; border: 1.5px solid var(--charcoal); overflow: hidden; background: var(--charcoal); box-shadow: 8px 8px 0 var(--turmeric); }
.story__art svg, .story__art > div { width: 100%; height: 100%; }
.story__region { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta); display: block; margin: 0 0 12px; }
.story h2 { font-size: var(--t-2xl); }
.story__dishes { font-family: var(--serif); font-style: italic; color: var(--indigo); }
@media (min-width: 56em) { .story { grid-template-columns: 5fr 6fr; gap: var(--s-8); align-items: center; } .story:nth-child(even) .story__art { order: 2; box-shadow: -8px 8px 0 var(--turmeric); } }

/* Classroom / Chef lesson lists */
.lesson { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.lesson li { counter-increment: l; position: relative; padding: 12px 0 12px 48px; border-bottom: 1px solid var(--rule); }
.lesson li::before { content: counter(l, decimal-leading-zero); position: absolute; left: 0; top: 10px; font: italic 500 1.2rem/1 var(--serif); color: var(--terracotta); }
.board .lesson li { border-color: rgba(244,235,221,.18); } .board .lesson li::before { color: var(--turmeric); }

/* Gallery */
.gallery-grid { columns: 1; column-gap: 18px; }
@media (min-width: 40em) { .gallery-grid { columns: 2; } }
@media (min-width: 72em) { .gallery-grid { columns: 3; } }
.gallery-item { break-inside: avoid; display: block; width: 100%; margin: 0 0 18px; padding: 10px 10px 0; border: 1.5px solid var(--charcoal); background: var(--paper); cursor: zoom-in; text-align: left; box-shadow: var(--shadow-paper); }
.gallery-item img { width: 100%; }
.gallery-item figcaption { display: block; padding: 10px 2px 12px; font: italic 400 var(--t-sm)/1.4 var(--serif); }
.lightbox { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 6vh 5vw; background: rgba(47,47,45,.95); color: var(--cream); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox img { max-height: 78vh; width: auto; margin-inline: auto; }
.lightbox p { text-align: center; margin-top: 12px; font-family: var(--serif); font-style: italic; }
.lightbox button { position: absolute; top: 16px; right: 16px; min-height: 44px; padding: 0 16px; border: 1.5px solid currentColor; border-radius: 999px; background: none; cursor: pointer; }

/* Visit + form: writing on ruled lines */
.visit-grid { display: grid; gap: var(--s-7); }
@media (min-width: 60em) { .visit-grid { grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; } }
.info-card { padding: 22px; background: var(--board) var(--tex-chalk); color: var(--chalk); border: 2px solid var(--charcoal); }
.info-row { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px dashed rgba(244,235,221,.2); }
.info-row dt { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--turmeric); }
.info-row dd { margin: 0; font-family: var(--serif); font-size: var(--t-lg); }
.form-card { padding: clamp(20px, 4vw, 40px); background: var(--paper); border: 2px solid var(--charcoal); box-shadow: 8px 8px 0 var(--charcoal); }
.form-field { margin-bottom: 20px; }
.form-field label, .form-field .label { display: block; margin-bottom: 6px; font: 600 var(--t-sm)/1.3 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.form-field label::before { display: none; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 48px; padding: 10px 2px; font: 400 var(--t-md)/1.4 var(--sans); color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--indigo); border-radius: 0;
}
.form-field select { appearance: none; background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 14px) 52% / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--ink) 50%) calc(100% - 8px) 52% / 6px 6px no-repeat; padding-right: 28px; }
.form-field textarea { min-height: 160px; resize: vertical; line-height: 32px; padding-top: 4px; background: repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px); border: 0; border-bottom: 2px solid var(--indigo); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-bottom-color: var(--turmeric); box-shadow: 0 2px 0 var(--turmeric); }
.form-field [aria-invalid="true"] { border-bottom-color: var(--terracotta); }
.form-field .err { margin: 6px 0 0; color: var(--terracotta); font-size: var(--t-sm); font-weight: 600; }
.form-field .help { margin: 6px 0 0; font-size: var(--t-xs); color: var(--ink-soft); }
.form-check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.form-check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; accent-color: var(--terracotta); flex: none; }
.req { color: var(--terracotta); margin-left: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { padding: 12px 14px; margin-bottom: 18px; border-left: 4px solid var(--terracotta); background: color-mix(in srgb, var(--terracotta) 10%, transparent); }
.form-thanks { padding: 10px 0; }
.form-thanks h3 { font-size: var(--t-2xl); color: var(--terracotta); }

.prose ul { padding-left: 1.2em; }
.nf { min-height: 80vh; min-height: 80svh; display: flex; align-items: center; }

/* ---------- 20. Scroll-driven extras (only where the browser supports them) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .ink-in { animation: inkIn linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes inkIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- 21. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; }
  .js .hero__title .line, .js .hero__en, .js .hero__top { clip-path: none; animation: none; }
  .ticker__track { animation: none; }
  .memory { transform: none !important; }
}

/* ---------- 22. Print ---------- */
@media print {
  .site-header, .nav, .loader, .ticker, .rail__controls, .site-footer .footer-warli { display: none !important; }
  .board, .on-dark, .page-hero--board, .on-terracotta, .on-indigo { background: #fff !important; color: #000 !important; }
}

/* ---------- 23. Coming soon, badges, availability ---------- */
.countdown { margin: clamp(20px, 3.5vh, 34px) 0; }
.countdown__units { display: flex; gap: 10px; }
.countdown__unit { min-width: 76px; padding: 12px 10px 10px; border: 1.5px dashed rgba(244,235,221,.4); text-align: center; }
.countdown__unit b { display: block; font: italic 500 var(--t-2xl)/1 var(--serif); color: var(--turmeric); font-variant-numeric: tabular-nums; }
.countdown__unit span { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-soft); }
.countdown__date, .countdown__tbd { margin: 12px 0 0; font: italic 400 var(--t-lg)/1.3 var(--serif); color: var(--chalk-soft); }
.countdown__tbd strong { color: var(--turmeric); font-weight: 500; }
.report { list-style: none; margin: var(--s-6) 0 0; padding: 0; max-width: 760px; background: var(--paper); border: 2px solid var(--charcoal); box-shadow: 8px 8px 0 var(--charcoal); }
.report li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.report li:last-child { border-bottom: 0; }
.report h3 { margin: 0; font-size: var(--t-lg); }
.report p { grid-column: 1; margin: 0; font-size: var(--t-sm); color: var(--ink-soft); }
.report .stamp { grid-column: 2; grid-row: 1 / span 2; }
.syllabus { list-style: none; margin: var(--s-6) 0 var(--s-5); padding: 0; counter-reset: s; }
.syllabus li { counter-increment: s; display: grid; grid-template-columns: 2.6em 1fr; gap: 0 12px; padding: 12px 0; border-bottom: 1px dashed rgba(244,235,221,.2); break-inside: avoid; }
.syllabus li::before { content: counter(s, decimal-leading-zero); grid-row: 1 / span 2; font: italic 500 var(--t-lg)/1.2 var(--serif); color: var(--turmeric); }
.syllabus b { font: 500 var(--t-lg)/1.25 var(--serif); }
.syllabus span { grid-column: 2; font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-soft); }
@media (min-width: 56em) { .syllabus { columns: 2; column-gap: 48px; } }
.join { display: grid; gap: var(--s-6); }
@media (min-width: 60em) { .join { grid-template-columns: 5fr 6fr; gap: var(--s-8); align-items: start; } }
.perks { list-style: none; margin: 18px 0 0; padding: 0; }
.perks li { position: relative; padding: 8px 0 8px 30px; }
.perks li::before { content: "✓"; position: absolute; left: 0; top: 7px; font-weight: 700; color: var(--charcoal); }
.join .form-card { color: var(--ink); }
.share-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s-5); }
.tag-badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 4px 9px; border-radius: 999px; font: 700 var(--t-xs)/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--cream); background: var(--terracotta); }
.tag-badge--out { background: var(--charcoal); }
.menu-card .tag-badge { align-self: flex-start; margin-left: 0; }
.reg-row.is-out .reg-row__no, .reg-row.is-out .reg-row__home, .reg-row.is-out .reg-row__when { opacity: .55; }
.menu-card.is-out .menu-card__art, .menu-card.is-out h3, .menu-card.is-out .menu-card__desc { opacity: .6; }

/* ---------- 24. English ⇄ हिन्दी ---------- */
.lang-switch { display: inline-flex; margin-left: auto; padding: 3px; border: 1.5px solid currentColor; border-radius: 999px; }
.lang-switch button { min-height: 36px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: inherit; font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; }
.lang-switch button[lang="hi"] { font-family: "Noto Sans Devanagari", var(--sans); font-weight: 500; }
.lang-switch button[aria-pressed="true"] { background: var(--charcoal); color: var(--cream); }
.site-header.is-dark .lang-switch button[aria-pressed="true"] { background: var(--turmeric); color: var(--charcoal); }
.lang-switch button:focus-visible { outline: 2px solid var(--turmeric); outline-offset: 2px; }
.site-header .wrap { gap: 10px; }
@media (max-width: 26em) { .brand__name { display: none; } .lang-switch button { padding: 0 10px; } }
@media (min-width: 75em) { .site-header .nav { margin-left: auto; order: 2; } .lang-switch { order: 3; margin-left: 12px; } }
/* No flash of English while Hindi loads (never longer than 2.5s, see the head script). */
html.i18n-wait body > :not(.loader), html.i18n-wait .loader__count { visibility: hidden; }

/* Devanagari needs room for its matras, no tracking (it breaks conjuncts) and no fake italics. */
html[lang="hi"] { font-synthesis: none; }
html[lang="hi"] body { line-height: 1.8; }
html[lang="hi"] *, html[lang="hi"] *::before, html[lang="hi"] *::after { letter-spacing: 0 !important; }
html[lang="hi"] :is(h1, h2, h3, h4) { line-height: 1.35; font-weight: 400; }
html[lang="hi"] .hero__title { line-height: 1.25; }
html[lang="hi"] :is(p, li, dd, dt, summary, label, figcaption) { overflow-wrap: break-word; }
html[lang="hi"] :is(.label, .stamp, .ticker__track span, .hero__top b, .tag-badge, .footer-title, .reg-row__when, .menu-card__cat, .menu-card__region, .story__region, .postcard__dishes, .chip, .eyebrow, .loader__count small, .nav a .n) { text-transform: none; }
html[lang="hi"] .label, html[lang="hi"] .hero__top b, html[lang="hi"] .ticker__track span, html[lang="hi"] .loader__count small { font-size: calc(var(--t-xs) * 1.12); }
html[lang="hi"] .nav a[aria-current="page"]::after { content: "← आज का पाठ"; }
@media (min-width: 75em) { html[lang="hi"] .nav a[aria-current="page"]::after { content: ""; } html[lang="hi"] .nav a { padding-inline: 9px; } }
