/* Shared design tokens for every homepage variation.
   Fonts: Gotu (English headings), Karma (English body), Noto Serif Devanagari (Sanskrit). */
@import url("https://fonts.googleapis.com/css2?family=Gotu&family=Karma:wght@300;400;500;600;700&family=Noto+Serif+Devanagari:wdth,wght@62.5..100,100..900&display=swap");

:root {
  /* Phoenix bright palette, dark -> light */
  --p0: #240400;
  --p1: #570A00;
  --p2: #8F1400;
  --p3: #C42200;
  --p4: #F03800;
  --p5: #FF5E1F;
  --p6: #FF9433;
  --p7: #FFCB57;
  --p8: #FFF7C2;

  --font-heading: "Gotu", Georgia, serif;
  --font-body: "Karma", Georgia, serif;
  --font-sanskrit: "Noto Serif Devanagari", "Tiro Devanagari Sanskrit", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.dev, [lang="sa"] { font-family: var(--font-sanskrit); }
.heading { font-family: var(--font-heading); font-weight: 400; }

/* Back-to-gallery pill shown on every variation */
.variant-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 9999;
  font: 500 12px/1 var(--font-body); letter-spacing: .08em;
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  background: rgba(36, 4, 0, .82); color: var(--p8);
  border: 1px solid rgba(255, 203, 87, .35);
  backdrop-filter: blur(6px);
}
.variant-badge:hover { background: var(--p2); }

/* ---------- Shared large footer (same markup on every variation) ----------
   Each page themes it by overriding these variables on .site-footer. */
footer.site-footer {
  --sf-bg: var(--p0);
  --sf-bg-image: none;
  --sf-ink: rgba(255, 247, 194, .72);
  --sf-strong: var(--p8);
  --sf-accent: var(--p7);
  --sf-rule: rgba(255, 203, 87, .16);
  --sf-hover: var(--p6);
  position: relative; isolation: isolate;
  background-color: var(--sf-bg);
  background-image: var(--sf-bg-image);
  background-size: cover; background-position: center;
  color: var(--sf-ink);
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.6;
  text-align: left; margin: 0; padding: 0;
  border-top: 1px solid var(--sf-rule);
}
.site-footer .sf-inner { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 24px 0; }
.site-footer .sf-grid {
  display: grid; gap: 40px 32px;
  grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(140px, 1fr));
}
.site-footer .sf-brand .sf-mark { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; color: var(--sf-strong); text-decoration: none; }
.site-footer .sf-brand .sf-mark .dev { font-size: 26px; color: var(--sf-accent); line-height: 1; }
.site-footer .sf-brand .sf-mark span:last-child { font-family: var(--font-heading); font-size: 20px; }
.site-footer .sf-brand p { margin: 0; max-width: 30ch; }
.site-footer h2 {
  font-family: var(--font-heading); font-weight: 400; font-size: 13px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--sf-accent);
  margin: 0 0 18px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--sf-ink); text-decoration: none; transition: color .25s ease; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--sf-hover); }
.site-footer a:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 3px; border-radius: 2px; }
.site-footer .sf-contact a { color: var(--sf-strong); word-break: break-word; }
.site-footer .sf-contact small { display: block; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--sf-ink); opacity: .8; }
.site-footer .sf-bottom {
  margin-top: clamp(48px, 6vw, 72px); padding: 22px 0 88px; /* bottom room for the variant badge */
  border-top: 1px solid var(--sf-rule);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
  font-size: 13.5px;
}
.site-footer .sf-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (max-width: 1000px) {
  .site-footer .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer .sf-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .site-footer .sf-contact { grid-column: 1 / -1; }
  .site-footer .sf-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Intro statement: two lines of equal style. On wide screens each sentence shrinks just enough to sit on one line; on narrow screens it keeps full size and wraps. */
:where(*):has(> .st-line) { container-type: inline-size; width: 100%; }
.st-line { display: block; text-wrap: balance; }
.st-line + .st-line { margin-top: .75em; }
/* Font size tracks the container width with no floor, so each sentence stays on one line at every zoom level.
   Only phone-width containers (under 440px) fall back to wrapping at a readable size. */
@container (min-width: 440px) { .st-line { font-size: min(1em, 3.38cqi); white-space: nowrap; } }

/* ---------- Exposure reveal: device-aware tuning ----------
   Pages use  filter: var(--exp-from, brightness(2.4) blur(5px))  for the start state. */
/* Large images blur less (blur cost scales with area) */
:is(.rv, .reveal):has(img, picture, video), img:is(.rv, .reveal) { --exp-from: brightness(2.4) blur(3px); }
/* Desktop: hint the GPU only while an element is still waiting to reveal */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .js :is(.rv, .reveal):not(.in) { will-change: opacity, filter; }
  .js .scene:is(.on, .seen) .rv { will-change: auto; }
}
/* Phones and tablets: keep the brightness-and-fade, drop the blur */
@media (max-width: 900px), (pointer: coarse) {
  :is(.rv, .reveal), :is(.rv, .reveal):has(img, picture, video), img:is(.rv, .reveal) { --exp-from: brightness(2.4); }
}

/* Official YouTube logo mark (keep its own red and white) */
.yt-logo { display: block; width: var(--yt-w, 72px); line-height: 0; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .55)); }
.yt-logo svg { width: 100%; height: auto; display: block; }

/* ---------- Levels of study (markup: shared/levels.html) ----------
   Desktop: a table-like grid (row labels + three columns, rows aligned with subgrid).
   Phones: three stacked cards. Pages theme it with the --lv-* variables. */
.lv-grid {
  --lv-ink: inherit; --lv-strong: inherit; --lv-accent: currentColor;
  --lv-line: rgba(127, 127, 127, .28); --lv-card: transparent; --lv-life: rgba(255, 148, 51, .10);
  display: grid; gap: 16px; text-align: left; color: var(--lv-ink);
}
.lv-heads { display: none; }
.lv-col { background: var(--lv-card); border: 1px solid var(--lv-line); border-radius: var(--lv-radius, 10px); padding: 22px 22px 6px; }
.lv-col--life { background: var(--lv-life); }
.lv-head { margin: 0 0 12px; }
.lv-dev { display: block; font-size: 1.25em; color: var(--lv-accent); line-height: 1.3; }
.lv-name { font-family: var(--font-heading); font-weight: 400; font-size: 1.45em; margin: 2px 0 0; color: var(--lv-strong); line-height: 1.2; }
.lv-sub { margin: 2px 0 0; font-size: .82em; letter-spacing: .14em; text-transform: uppercase; opacity: .78; }
.lv-col dl { margin: 0; }
.lv-col dl > div { padding: 12px 0; border-top: 1px solid var(--lv-line); }
.lv-col dt { font-size: .74em; letter-spacing: .16em; text-transform: uppercase; color: var(--lv-accent); margin-bottom: 3px; }
.lv-col dd { margin: 0; line-height: 1.5; }
.lv-fee strong { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 1.2em; color: var(--lv-strong); }
.lv-fee small { display: block; margin-top: 4px; font-size: .86em; opacity: .82; }
.lv-renounced { margin-top: 16px; border: 1px solid var(--lv-line, rgba(127,127,127,.28)); border-left: 3px solid var(--lv-accent, currentColor); border-radius: var(--lv-radius, 10px); padding: 18px 22px; text-align: left; background: var(--lv-card, transparent); }
.lv-renounced h3 { font-family: var(--font-heading); font-weight: 400; font-size: 1.2em; margin: 0 0 4px; color: var(--lv-strong, inherit); }
.lv-renounced h3 span { font-family: var(--font-body); font-size: .8em; opacity: .75; }
.lv-renounced p { margin: 0; }
.lv-note { margin: 14px 0 0; font-size: .86em; opacity: .75; text-align: left; }
@media (min-width: 900px) {
  .lv-grid { grid-template-columns: minmax(130px, .62fr) repeat(3, minmax(0, 1fr)); grid-template-rows: auto repeat(5, auto); gap: 0 14px; }
  .lv-heads, .lv-col { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; }
  .lv-heads span { padding: 12px 0; border-top: 1px solid var(--lv-line); font-size: .74em; letter-spacing: .16em; text-transform: uppercase; color: var(--lv-accent); align-self: stretch; }
  .lv-heads span:first-child { border-top: 0; }
  .lv-col { padding: 22px 20px 4px; }
  .lv-col dl { display: contents; }
  .lv-col dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lv-heads span:not(:first-child) { padding-top: 12px; }
}
/* Gurukul schedule inside the Q&A */
.schedule { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 0; text-align: left; }
.schedule li { display: grid; grid-template-columns: 6.2em 1fr; gap: 14px; padding: 7px 0; border-top: 1px solid var(--lv-line, rgba(127,127,127,.24)); }
.schedule li:first-child { border-top: 0; }
.schedule time { font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .85; }
