/* 12D School demo — self-contained stylesheet, independent of /assets/site.css
   and every other /demo/*/style.css. critical.css (inlined per page) covers the
   above-the-fold banner/header/hero shape so first paint never waits on this.

   Every color pairing below was computed and verified against WCAG AA (4.5:1
   for text) before this file was written — the discipline established since
   real estate/accounting/physio/doctor, all of which hit accessibility 100 on
   their first Lighthouse measurement this way. */

/* ---------- self-hosted fonts (Latin subset) ---------- */
@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/demo/school/fonts/bitter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/demo/school/fonts/karla-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- fallback metric overrides, so Bitter/Karla don't visibly reflow
   the page when they finish loading on an uncached visit.

   Karla's fallbacks (Arial/Roboto) are computed from average LOWERCASE
   character width weighted by English letter frequency (the Capsize/
   next/font method), derived from each font's own cmap+hmtx glyph advance
   widths — correct here because Karla's variable font default instance
   (wght=400) matches its real usage (body text, always weight 400):
     size-adjust    = (webFont.avgLowercaseWidth/webFont.unitsPerEm) / (fallback.avgLowercaseWidth/fallback.unitsPerEm)
     ascent-override  = (webFont.ascender/webFont.unitsPerEm)  / size-adjust
     descent-override = (webFont.descender/webFont.unitsPerEm) / size-adjust (abs)
   Karla vs Arial:  size-adjust 103.41%, ascent-override 88.67%, descent-override 24.37%
   Karla vs Roboto: size-adjust 103.19%, ascent-override 88.86%, descent-override 24.42%

   Bitter's fallbacks needed a DIFFERENT method: Bitter is only ever used at
   weight 700 (headings), but Bitter's own variable-font default instance is
   wght=100 (Thin) — so measuring its static tables (as above) calibrates
   against the wrong instance entirely. Fixed by measuring real rendered
   width directly in the browser instead: the same sample string (a-z plus a
   typical heading sentence) rendered in real Bitter at weight 700, and in
   each fallback at weight 700 with NO overrides (letting normal OS weight
   matching resolve true Bold — confirmed Georgia Bold/Noto Serif Bold exist
   as distinct faces, not synthesized), then size-adjust = BitterWidth /
   fallbackWidth directly, with ascent/descent-override recomputed from
   Bitter's own static ascender/descender (assumed weight-invariant, the
   same assumption Capsize/next-font make) divided by that size-adjust. The
   @font-face src lines below now explicitly request the Bold face by name
   (local('Georgia Bold') etc.) since local('Georgia') alone pins to Regular
   only on Windows regardless of the requested font-weight — confirmed via
   document.fonts inspection, the root cause of an early measurement that
   was off by 30%+.
   Bitter vs Georgia:    size-adjust 83.92%, ascent-override 111.42%, descent-override 31.58%
   Bitter vs Noto Serif: size-adjust 84.39%, ascent-override 110.79%, descent-override 31.40% */
@font-face {
  font-family: 'Bitter Fallback Georgia';
  font-weight: 700;
  src: local('Georgia Bold'), local('Georgia');
  size-adjust: 83.92%;
  ascent-override: 111.42%;
  descent-override: 31.58%;
}
@font-face {
  font-family: 'Bitter Fallback NotoSerif';
  font-weight: 700;
  src: local('Noto Serif Bold'), local('Noto Serif');
  size-adjust: 84.39%;
  ascent-override: 110.79%;
  descent-override: 31.40%;
}
@font-face {
  font-family: 'Karla Fallback Arial';
  src: local('Arial');
  size-adjust: 103.41%;
  ascent-override: 88.67%;
  descent-override: 24.37%;
}
@font-face {
  font-family: 'Karla Fallback Roboto';
  src: local('Roboto');
  size-adjust: 103.19%;
  ascent-override: 88.86%;
  descent-override: 24.42%;
}
/* The two blocks above cover body text at 400 — .eyebrow and .btn actually
   render Karla at 700 (confirmed true Bold auto-selected on Arial at this
   weight) and had no calibration of their own until now, same class of bug
   fixed for wellness's Work Sans eyebrow — here the widest weight gap of
   this pass (declared range was 400-500, usage is 700). Measured by direct
   render this time rather than the average-lowercase-width method above;
   cross-checked against it via the back-calculated intrinsic ascent/
   descent fraction, which matched to the decimal (91.70%/25.20%). Also:
   critical.css's own .eyebrow/.btn/.school-brand rules were pointing
   straight at the generic family instead of these fallback names at all —
   fixed alongside this (school-brand's own weight, 700, already had a
   calibrated Bitter face; it just wasn't being referenced).
   Karla@700 vs Arial:  size-adjust 96.53%,  ascent-override 95.00%, descent-override 26.10%
   Karla@700 vs Roboto: size-adjust 102.96%, ascent-override 89.07%, descent-override 24.48% */
@font-face {
  font-family: 'Karla Fallback Arial';
  font-weight: 700;
  src: local('Arial Bold'), local('Arial');
  size-adjust: 96.53%;
  ascent-override: 95.00%;
  descent-override: 26.10%;
}
@font-face {
  font-family: 'Karla Fallback Roboto';
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto');
  size-adjust: 102.96%;
  ascent-override: 89.07%;
  descent-override: 24.48%;
}

/* ---------- tokens ---------- */
:root {
  --ink: #2B2118;
  --ink-soft: #5C4A38;
  --paper: #FCFAF5;
  --cream: #F1EADA;
  --crimson: #B5392E;
  --crimson-dark: #A33128;
  --leaf: #3E6B3E;
  --leaf-dark: #366038;
  --line: #E6DFCE;
  --font-display: 'Bitter', 'Bitter Fallback Georgia', 'Bitter Fallback NotoSerif', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', 'Karla Fallback Arial', 'Karla Fallback Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 64px);
  --nav-breakpoint: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--crimson-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 0.45em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(52px, 8vw, 104px) 0; }
.eyebrow { font-family: var(--font-body); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.74rem; color: var(--crimson-dark); margin: 0 0 0.9em; }
.section-head { max-width: 640px; margin: 0 0 3em; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- focus & skip link ---------- */
:focus-visible { outline: 3px solid var(--crimson-dark); outline-offset: 2px; border-radius: 2px; }
.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--ink); color: #fff;
  padding: 10px 18px; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- demo banner ---------- */
.demo-banner {
  background: var(--ink); color: #fff;
  font-size: 0.86rem; padding: 10px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: center;
  text-align: center; position: relative; z-index: 60;
}
.demo-banner p { margin: 0; font-weight: 400; }
.demo-banner a { color: #fff; text-decoration: underline; font-weight: 500; }
.demo-banner__cta {
  background: var(--crimson-dark); color: #fff;
  text-decoration: none; padding: 0.35rem 0.8rem; border-radius: 999px;
  font-weight: 500; white-space: nowrap; min-height: 44px;
  display: inline-flex; align-items: center;
}
.demo-banner__cta:hover { background: #8A2A22; }


.demo-banner__book { display: inline-flex; align-items: center; min-height: 24px; }
.demo-banner__link-short { display: none; }
@media (max-width: 1023px) {
  .demo-banner__link-full { display: none; }
  .demo-banner__link-short { display: inline; }
}/* ---------- header / nav ---------- */
.school-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 245, 0.95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
  padding: 20px 0;
}
.school-header.is-scrolled { padding: 10px 0; box-shadow: 0 8px 24px rgba(43, 33, 24, 0.1); }
.school-header__wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.school-brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.36rem; color: var(--ink);
  margin-right: auto; white-space: nowrap;
}
.school-brand span { color: var(--crimson-dark); }
.school-nav__links {
  list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center;
}
.school-nav__links a { color: var(--ink); font-weight: 500; font-size: 0.91rem; white-space: nowrap; }
.school-nav__links a:hover { color: var(--crimson-dark); text-decoration: none; }
.school-header__actions { display: flex; align-items: center; gap: 14px; }
.school-nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; font-size: 1.25rem; line-height: 1;
  background: transparent; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--ink);
}
@media (max-width: 899px) {
  .school-nav__toggle { display: flex; }
  .school-nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 20px;
  }
  .school-nav__links.is-open { display: flex; }
  .school-nav__links li { width: 100%; }
  .school-nav__links a { display: block; padding: 11px 4px; width: 100%; }
}
@media (min-width: 900px) {
  .school-nav__links { display: flex !important; position: static; }
}
@media (max-width: 479px) {
  .school-cta-full { display: none; }
  .school-brand { font-size: 1.08rem; }
  .school-header__wrap { gap: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.92rem;
  line-height: inherit; padding: 14px 28px; border-radius: 6px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #1A140D; }
.btn--crimson { background: var(--crimson-dark); color: #fff; }
.btn--crimson:hover { background: #7C241D; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--crimson-dark); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost-light:hover { border-color: #fff; }
.btn--small { padding: 10px 20px; font-size: 0.84rem; line-height: normal; }
.btn--whatsapp { background: #2E7D4F; color: #fff; }
.btn--whatsapp:hover { background: #255F3D; }

/* ---------- hero (asymmetric, full-bleed media) ---------- */
.hero { padding: 0; position: relative; }
.hero__wrap {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__media { border-radius: 8px; overflow: hidden; }
.hero__media img { width: 100%; height: auto; }
.hero__media picture img { aspect-ratio: 1088 / 1360; }
@media (min-width: 641px) { .hero__media picture img { aspect-ratio: 2400 / 1344; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8em; }
.hero__meta { margin-top: 1.6em; display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 899px) {
  .hero__wrap { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
}

/* ---------- learning/about/admissions/transport top image — hero-grade ---------- */
.page-hero { padding: 0; }
.page-hero__wrap {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.page-hero__media { border-radius: 8px; overflow: hidden; background: var(--cream); }
.page-hero__media img { width: 100%; height: auto; display: block; }
@media (max-width: 899px) { .page-hero__wrap { grid-template-columns: 1fr; } .page-hero__media { order: -1; } }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 16px 36px rgba(43, 33, 24, 0.1); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card__body h2, .card__body h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.3em; }
.card__meta { font-size: 0.84rem; color: var(--ink-soft); margin: 0 0 0.6em; }

.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2, .section--ink .eyebrow { color: #fff; }
.section--ink .lede { color: #D9CFBE; }

/* ---------- principal profile ---------- */
.profile-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0.6em 0; }
.profile-card__qual { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em; color: var(--crimson-dark); background: var(--cream); padding: 4px 12px; border-radius: 20px; }

/* ---------- checklist / steps ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; top: 0.1em; color: var(--leaf-dark); font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { position: relative; padding-left: 46px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--crimson-dark); color: #fff; font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; }
@media (max-width: 639px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- reviews ---------- */
.review-card { background: #fff; border: 1px solid var(--line); padding: 22px 24px; }
.review-card__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crimson-dark); margin: 0 0 0.6em; }
.review-card__stars { color: var(--leaf); letter-spacing: 2px; margin-bottom: 0.4em; }

/* ---------- mandatory disclosure table ---------- */
.disclosure-group { margin-bottom: 2.4em; }
.disclosure-table { width: 100%; border-collapse: collapse; }
.disclosure-table th, .disclosure-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.disclosure-table th { width: 45%; font-weight: 600; color: var(--ink-soft); }
.disclosure-table td { color: var(--ink); font-weight: 600; }
.disclosure-placeholder { color: var(--ink-soft); font-weight: 400; font-style: italic; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 1.02rem; color: var(--ink); }
.faq-item p { margin: 0.8em 0 0; color: var(--ink-soft); }

/* ---------- contact / enquiry form ---------- */
.contact-form { display: grid; gap: 16px; max-width: 520px; }
.contact-form label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--font-body); font-size: 0.95rem; background: #fff; color: var(--ink);
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form__note { font-size: 0.84rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.school-footer { background: var(--ink); color: #D9CFBE; padding: 56px 0 30px; }
.school-footer__wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; }
.school-footer a { color: #D9CFBE; }
.school-footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: 0.4em; }
.school-footer__heading { color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.9em; }
.school-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.school-footer__legal { max-width: var(--max); margin: 38px auto 0; padding: 20px var(--gutter) 0; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.76rem; color: #B3A992; }
@media (max-width: 760px) { .school-footer__wrap { grid-template-columns: 1fr; } }

/* ---------- booking modal (built by script.js) ---------- */
.booking-overlay {
  position: fixed; inset: 0; background: rgba(43, 33, 24, 0.6); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.booking-modal {
  background: var(--paper); max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 32px clamp(20px, 4vw, 38px); position: relative;
  border-top: 3px solid var(--crimson);
}
.booking-modal__close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.booking-step__title { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--crimson-dark); margin-bottom: 0.7em; }
.booking-options { display: grid; gap: 10px; margin-top: 18px; }
.booking-option {
  text-align: left; padding: 13px 16px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-family: var(--font-body); font-size: 0.94rem; color: var(--ink);
}
.booking-option:hover { border-color: var(--crimson-dark); }
.booking-option[aria-pressed="true"] { border-color: var(--crimson-dark); background: var(--cream); font-weight: 700; }
.booking-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 18px; }
.booking-date {
  padding: 11px 6px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-family: var(--font-body); font-size: 0.8rem; text-align: center; line-height: 1.3;
}
.booking-date:hover { border-color: var(--crimson-dark); }
.booking-date[aria-pressed="true"] { border-color: var(--crimson-dark); background: var(--cream); font-weight: 700; }
.booking-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 18px; }
.booking-nav { display: flex; justify-content: space-between; margin-top: 26px; gap: 10px; }
.booking-final { text-align: center; }
.booking-final p { font-size: 1rem; }
.booking-final__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.booking-final__cal { margin-top: 12px; font-size: 0.88rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
