/* =====================================================================
   School of Freestyle Martial Arts (SOFMA) - Mockup stylesheet
   Implements 03-design/design-system.md verbatim:
   belt-chart + Muay Thai red palette, Saira Condensed / Sora pairing,
   border-radius:0 everywhere, hard offset shadows, no blur, no glass.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens (design-system section 9, copy-paste block)
   --------------------------------------------------------------------- */
:root {
  /* ----- Fonts ----- */
  --font-display: "Saira Condensed", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --font-body: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  /* ----- Type scale (fluid) ----- */
  --fs-display: clamp(2.5rem, 1.2rem + 5.2vw, 5rem);
  --fs-h1:      clamp(2rem, 1.3rem + 2.8vw, 3.75rem);
  --fs-h2:      clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --fs-h3:      clamp(1.375rem, 1.1rem + 1.1vw, 2rem);
  --fs-h4:      clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem);
  --fs-h5:      1.25rem;
  --fs-h6:      1.0625rem;
  --fs-lead:    clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --fs-body:    clamp(1rem, 0.97rem + 0.18vw, 1.125rem);
  --fs-small:   0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-overline:0.8125rem;

  /* ----- Core palette (belt chart + Muay Thai red armband) ----- */
  --gi-cream:       #F4F0E6;
  --canvas:         #FBF8F1;
  --tatami:         #E7E0D0;
  --black-belt:     #15130F;
  --charcoal:       #2A2620;
  --smoke:          #5A5347;
  --brown-belt:     #6B4226;
  --tan-line:       #C9BCA0;
  --fight-red:      #C42127;
  --fight-red-deep: #9A171C;
  --gold-ka:        #C9A227;

  /* ----- Semantic tokens ----- */
  --bg:            var(--gi-cream);
  --bg-dark:       var(--black-belt);
  --surface:       var(--canvas);
  --surface-2:     var(--tatami);
  --surface-dark:  var(--charcoal);
  --ink:           var(--black-belt);
  --ink-invert:    var(--gi-cream);
  --muted:         var(--smoke);
  --muted-invert:  #C2B9A8;
  --accent:        var(--fight-red);
  --accent-strong: var(--fight-red-deep);
  --accent-ink:    var(--gi-cream);
  --award:         var(--gold-ka);
  --line:          var(--tan-line);
  --line-strong:   var(--brown-belt);
  --line-invert:   #3A352C;

  /* ----- Spacing (4px base) ----- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;

  /* ----- Layout ----- */
  --container: 1200px;
  --measure: 66ch;

  /* ----- Borders & elevation (no blur, hard offsets) ----- */
  --border-thin: 1px solid var(--line);
  --border-strong: 2px solid var(--ink);
  --shadow-stamp: 4px 4px 0 0 var(--ink);
  --shadow-stamp-accent: 4px 4px 0 0 var(--accent);

  /* ----- Motion ----- */
  --motion-fast: 120ms;
  --motion-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------------------------------------------------------------------
   2. Reset (design-system 6.1) - border-radius:0 enforced globally
   --------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1.04;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-h6); font-weight: var(--fw-semibold); }
p  { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; }
a { color: var(--accent); }

/* Prose links (design-system 2.6): underline always, never colour alone */
.prose a,
.rich a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness var(--motion-fast) var(--ease);
}
.prose a:hover,
.rich a:hover { text-decoration-thickness: 2px; }

.tabular { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}
.section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.section--tight { padding-top: var(--space-7); padding-bottom: var(--space-7); }
.section--dark {
  background: var(--bg-dark);
  color: var(--ink-invert);
}
.section--dark :where(h1, h2, h3, h4, h5, h6) { color: var(--ink-invert); }
.section--dark .lead,
.section--dark p { color: var(--muted-invert); }
.measure { max-width: var(--measure); }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 58ch;
  color: var(--ink);
}
.center { text-align: center; }
.stack > * + * { margin-top: var(--space-4); }

.section__head {
  max-width: 60ch;
  margin-bottom: var(--space-7);
}
.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (min-width: 1080px) {
  .container {
    padding-left: var(--space-7);
    padding-right: var(--space-7);
  }
  .section { padding-top: var(--space-9); padding-bottom: var(--space-9); }
}

/* ---------------------------------------------------------------------
   4. Signature motif - eyebrow rank-tick + corner chevron (4)
   --------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-overline);
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
  flex: 0 0 auto;
}
.eyebrow--invert { color: var(--accent); }

.has-chevron { position: relative; }
.has-chevron::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 28px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 2;
}
.has-chevron--accent::before { background: var(--accent); }

/* ---------------------------------------------------------------------
   5. Dividers (design-system 5.4)
   --------------------------------------------------------------------- */
.divider {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: var(--space-8) 0;
}
.divider--belt {
  border: 0;
  height: 3px;
  background:
    linear-gradient(to right,
      var(--line-strong) 0,
      var(--line-strong) 72px,
      var(--accent) 72px,
      var(--accent) 120px,
      var(--line) 120px,
      var(--line) 100%);
  background-repeat: no-repeat;
  margin: 0;
}

/* ---------------------------------------------------------------------
   6. Skip link (design-system 6.2)
   --------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1000;
  background: var(--ink);
  color: var(--ink-invert);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  text-decoration: none;
  transition: top var(--motion-fast) var(--ease);
}
.skip-link:focus { top: var(--space-4); }

/* Global focus-visible contract */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   7. Header / navigation (design-system 6.3)
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--motion-base) var(--ease),
              padding var(--motion-base) var(--ease);
}
.site-header.is-condensed {
  box-shadow: 0 1px 0 0 var(--line-strong);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  min-height: 72px;
  transition: min-height var(--motion-base) var(--ease);
}
.site-header.is-condensed .nav { min-height: 60px; }
.nav__logo {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.nav__logo img { height: 44px; width: auto; }
.nav__links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: var(--space-2) 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease);
}
.nav__link:hover { border-bottom-color: var(--accent); }
.nav__link[aria-current="page"] { border-bottom-color: var(--ink); }
.nav__phone {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  white-space: nowrap;
}
.nav__phone:hover { color: var(--accent); }
.nav__cta { display: inline-flex; }

/* Mobile toggle + drawer */
.nav__toggle {
  display: none;
  width: 48px; height: 48px;
  background: transparent;
  border: 2px solid var(--ink);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav__toggle-bar { width: 22px; height: 2px; background: var(--ink); display: block; }

.nav__drawer { display: none; }
.nav__drawer a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 var(--space-5);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav__drawer a:hover { background: var(--surface-2); }
.nav__drawer .btn--trial {
  margin: var(--space-4) var(--space-5);
  min-height: 52px;
}

@media (max-width: 900px) {
  .nav__links, .nav__phone--desktop, .nav__cta--desktop { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__drawer:not([hidden]) {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--line);
    animation: drawer-in var(--motion-base) var(--ease);
  }
}
@keyframes drawer-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------------------------------------------------------------------
   8. Buttons (design-system 6.5)
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  background: transparent;
  transition: transform var(--motion-fast) var(--ease),
              box-shadow var(--motion-fast) var(--ease),
              background var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease),
              border-color var(--motion-fast) var(--ease);
}
.btn--trial { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--trial:hover {
  background: var(--accent-strong); border-color: var(--accent-strong);
  transform: translate(-2px, -2px); box-shadow: var(--shadow-stamp);
}
.btn--trial:active { transform: translate(0, 0); box-shadow: none; }

.btn--solid { background: var(--ink); color: var(--ink-invert); border-color: var(--ink); }
.btn--solid:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-stamp-accent); }
.btn--solid:active { transform: translate(0, 0); box-shadow: none; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--ink-invert); }

.btn--ghost-invert { background: transparent; color: var(--ink-invert); border-color: var(--ink-invert); }
.btn--ghost-invert:hover { background: var(--ink-invert); color: var(--ink); }

.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ---------------------------------------------------------------------
   9. Hero (design-system 6.4)
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--bg-dark);
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.42;
}
.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-10) var(--space-5);
  color: var(--ink-invert);
}
.hero__title {
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin: var(--space-4) 0 var(--space-5);
  color: var(--ink-invert);
}
.hero .lead { color: var(--ink-invert); max-width: 50ch; }
.hero .eyebrow { color: var(--accent); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

/* Interior page hero band (shorter, no full-bleed photo) */
.page-hero {
  background: var(--bg-dark);
  color: var(--ink-invert);
  padding: var(--space-9) 0;
  border-bottom: 3px solid var(--accent);
}
.page-hero .eyebrow { color: var(--accent); }
.page-hero h1 { color: var(--ink-invert); max-width: 24ch; }
.page-hero .lead { color: var(--muted-invert); }

/* Interior hero with a thin photo strip alongside */
.page-hero--photo {
  position: relative;
  overflow: hidden;
}
.page-hero--photo .page-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.30;
}
.page-hero--photo .container { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------
   10. Trust strip (design-system 6.10)
   --------------------------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.trust__item {
  padding: var(--space-6) var(--space-5);
  border-left: 1px solid var(--line);
  text-align: center;
}
.trust__item:first-child { border-left: 0; }
.trust__num {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-h2);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.trust__num .award { color: var(--award); }
.trust__label {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: var(--space-2);
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust__item:nth-child(odd) { border-left: 0; }
  .trust__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------------
   11. Grids
   --------------------------------------------------------------------- */
.grid-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}
.grid-instructors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); }
  .grid-2--text-right { grid-template-columns: 0.9fr 1.1fr; }
}

/* ---------------------------------------------------------------------
   12. Program / service cards (design-system 6.6)
   --------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform var(--motion-base) var(--ease),
              box-shadow var(--motion-base) var(--ease),
              border-color var(--motion-base) var(--ease);
}
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.card__age {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-overline);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.card__title { font-size: var(--fs-h3); margin: 0; }
.card__text { font-size: var(--fs-small); color: var(--muted); margin: 0; }
.card__link {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
}
.card__link::after { content: "\203A"; color: var(--accent); font-size: 1.2em; line-height: 1; }
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-stamp);
  border-color: var(--ink);
}
.card:focus-within { border-color: var(--accent); }

/* ---------------------------------------------------------------------
   13. Category cards (design-system 6.7)
   --------------------------------------------------------------------- */
.cat-card {
  position: relative;
  background: var(--ink);
  color: var(--ink-invert);
  text-decoration: none;
  padding: var(--space-6) var(--space-5);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  border: 2px solid var(--ink);
  transition: background var(--motion-base) var(--ease),
              transform var(--motion-fast) var(--ease);
}
.cat-card__age {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-h2);
  line-height: 0.9;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cat-card__label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cat-card:hover { background: var(--surface-dark); transform: translate(-2px, -2px); }
.cat-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   14. Instructor card (design-system 6.8)
   --------------------------------------------------------------------- */
.instructor {
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform var(--motion-base) var(--ease),
              box-shadow var(--motion-base) var(--ease),
              border-color var(--motion-base) var(--ease);
}
.instructor:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-stamp);
  border-color: var(--ink);
}
.instructor__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
}
.instructor__body { padding: var(--space-5); }
.instructor__name { font-size: var(--fs-h4); margin: 0; }
.instructor__rank {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-overline);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: var(--space-2) 0 var(--space-3);
}
.instructor__note { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------------
   15. Featured instructor wedge (Glen, dark block)
   --------------------------------------------------------------------- */
.wedge__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--line-invert);
}
.wedge .eyebrow { color: var(--accent); }
.creds {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.creds li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.creds li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 14px; height: 2px;
  background: var(--accent);
}
.section--dark .creds li { color: var(--ink-invert); }

/* ---------------------------------------------------------------------
   16. Testimonials + rating (design-system 6.9)
   --------------------------------------------------------------------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}
.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: var(--space-6);
  margin: 0;
}
.quote__text {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 var(--space-4);
}
.quote__by {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.quote__by::before { content: "\2013 "; color: var(--accent); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.rating__stars { color: var(--award); letter-spacing: 2px; font-size: 1.1rem; }
.rating__num {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h5);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.rating__src {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section--dark .rating__num { color: var(--ink-invert); }
.section--dark .rating__src { color: var(--muted-invert); }

/* ---------------------------------------------------------------------
   17. Classes page anchor nav + sections
   --------------------------------------------------------------------- */
.anchor-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.anchor-nav a:hover { border-bottom-color: var(--accent); }

.prog {
  scroll-margin-top: 140px;
}
.prog__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}
.prog__age {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-ink);
  background: var(--accent);
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}
.prog__subtitle {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-overline);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

/* Belt progression strip */
.belts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line);
}
.belt {
  flex: 1 1 90px;
  min-width: 80px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--canvas);
  text-align: center;
  padding: var(--space-3) var(--space-2);
}
.belt:last-child { border-right: 0; }
.belt--white  { background: #FBF8F1; color: #15130F; }
.belt--yellow { background: #E7C94B; color: #15130F; }
.belt--orange { background: #D2862F; color: #15130F; }
.belt--blue   { background: #2F5DA8; color: #F4F0E6; }
.belt--green  { background: #3C7A4B; color: #F4F0E6; }
.belt--brown  { background: #6B4226; color: #F4F0E6; }
.belt--black  { background: #15130F; color: #F4F0E6; }

/* ---------------------------------------------------------------------
   18. Timetable (design-system 6.11)
   --------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-5);
}
.tab {
  min-height: 48px;
  padding: 0 var(--space-6);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-right-width: 0;
  cursor: pointer;
}
.tab:last-child { border-right-width: 2px; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--ink-invert); }
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; position: relative; z-index: 1; }

.tt-panel[hidden] { display: none; }
.table-wrap { overflow-x: auto; }
.timetable {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.timetable caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h5);
  margin-bottom: var(--space-3);
  color: var(--ink);
}
.timetable th, .timetable td {
  border: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--fs-small);
  vertical-align: top;
}
.timetable thead th,
.timetable th[scope="col"] {
  background: var(--ink);
  color: var(--ink-invert);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--fw-bold);
}
.timetable th[scope="row"] {
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timetable td.is-now { border-left: 3px solid var(--accent); }
.timetable .tt-class { display: block; }
.timetable .tt-time { color: var(--muted); display: block; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   19. Steps list (trial: four steps)
   --------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: var(--space-6) var(--space-5);
}
.step__num {
  counter-increment: step;
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-h2);
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: var(--space-3);
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
.step p { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* Plain feature list with rank-tick bullets */
.ticked {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.ticked li {
  position: relative;
  padding-left: var(--space-6);
  line-height: 1.5;
}
.ticked li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 16px; height: 2px;
  background: var(--accent);
}

/* ---------------------------------------------------------------------
   20. Forms (design-system 6.12)
   --------------------------------------------------------------------- */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: var(--space-6);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 560px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.field--full { grid-column: 1 / -1; }
.field__label {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  color: var(--ink);
}
.field__req { color: var(--accent); font-weight: var(--fw-regular); }
.field__input, .field__textarea, .field__select {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  padding: var(--space-3) var(--space-4);
  min-height: 48px;
  width: 100%;
}
.field__textarea { min-height: 140px; resize: vertical; }
.field__input:focus-visible,
.field__textarea:focus-visible,
.field__select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--ink);
}
.field__input:invalid:not(:placeholder-shown) { border-color: var(--accent-strong); }

.fieldset {
  border: 0;
  margin: 0 0 var(--space-5);
  padding: 0;
}
.fieldset legend {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  color: var(--ink);
  padding: 0;
  margin-bottom: var(--space-3);
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}
.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  font-size: var(--fs-small);
}
.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.form__note { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--space-3); }

/* ---------------------------------------------------------------------
   21. Contact details panel
   --------------------------------------------------------------------- */
.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
.detail-list dt {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-overline);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.detail-list dd { margin: 0; font-size: var(--fs-body); }
.detail-list a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.18em; }
.detail-list a:hover { color: var(--accent); }

.map-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  display: block;
}

/* ---------------------------------------------------------------------
   22. Timeline (about)
   --------------------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line-strong);
}
.timeline li {
  position: relative;
  padding: 0 0 var(--space-6) var(--space-6);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 4px;
  width: 12px; height: 12px;
  background: var(--accent);
}
.timeline__year {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-h4);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: var(--space-1);
}
.timeline__year--now { color: var(--accent); }
.timeline p { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------------
   23. Student of the Month archive
   --------------------------------------------------------------------- */
.sotm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.sotm {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}
.sotm--year { border-top: 3px solid var(--award); }
.sotm__year {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-h3);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sotm__star { color: var(--award); display: block; margin-bottom: var(--space-2); }
.sotm__name { font-size: var(--fs-small); color: var(--muted); margin: var(--space-2) 0 0; }

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.recent {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: var(--space-4) var(--space-5);
}
.recent dt {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-overline);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.recent dd { margin: var(--space-1) 0 0; font-size: var(--fs-body); }

/* Disclosure / accordion (archive note) */
.disclosure {
  border: 1px solid var(--line);
  background: var(--surface);
}
.disclosure summary {
  list-style: none;
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h5);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: "+"; color: var(--accent); font-size: 1.4em; line-height: 1; }
.disclosure[open] summary::after { content: "\2013"; }
.disclosure summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.disclosure__body { padding: 0 var(--space-5) var(--space-5); }

/* ---------------------------------------------------------------------
   24. Media frames
   --------------------------------------------------------------------- */
.frame {
  border: 1px solid var(--line);
  display: block;
  width: 100%;
}
.frame--strong { border: 2px solid var(--ink); }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.media-grid img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

.feature-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Pricing block (birthdays) */
.price {
  background: var(--ink);
  color: var(--ink-invert);
  border: 2px solid var(--ink);
  padding: var(--space-7) var(--space-6);
  text-align: center;
}
.price__amount {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-display);
  color: var(--accent);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.price__unit { color: var(--muted-invert); font-size: var(--fs-small); margin-top: var(--space-3); }
.price h3 { color: var(--ink-invert); }

/* ---------------------------------------------------------------------
   25. CTA band (design-system 6.14)
   --------------------------------------------------------------------- */
.cta-band {
  background: var(--bg-dark);
  color: var(--ink-invert);
  text-align: center;
  padding: var(--space-10) var(--space-5);
}
.cta-band__inner { max-width: 720px; margin: 0 auto; }
.cta-band h2 { color: var(--ink-invert); font-size: var(--fs-h1); }
.cta-band p { color: var(--muted-invert); max-width: 52ch; margin: 0 auto var(--space-6); }
.cta-band .btn--trial { margin-bottom: var(--space-4); }
.cta-band__phone {
  display: inline-block;
  color: var(--ink-invert);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  min-height: 44px;
}
.cta-band__phone:hover { color: var(--accent); }

/* ---------------------------------------------------------------------
   26. Footer (design-system 6.13)
   --------------------------------------------------------------------- */
.footer {
  background: var(--bg-dark);
  color: var(--muted-invert);
  padding: var(--space-9) 0 var(--space-6);
}
.footer__grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-7);
}
.footer h2 {
  font-size: var(--fs-h6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-invert);
  border-bottom: 2px solid var(--accent);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  display: inline-block;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer address { font-style: normal; }
.footer a {
  color: var(--muted-invert);
  text-decoration: none;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
}
.footer a:hover { color: var(--ink-invert); }
.footer p { color: var(--muted-invert); }
.footer__social { display: flex; gap: var(--space-4); margin-top: var(--space-3); }
.footer__social a { min-height: 44px; }
.footer__bar {
  max-width: var(--container);
  margin: var(--space-7) auto 0;
  padding: var(--space-5) var(--space-5) 0;
  border-top: 1px solid var(--line-invert);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
}
.footer__bar p { margin: 0; }
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ---------------------------------------------------------------------
   27. Scroll reveal (IntersectionObserver, user-scroll triggered)
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-base) var(--ease),
              transform var(--motion-base) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------------
   28. Reduced motion (design-system 5.5)
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   29. Utility spacing
   --------------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0; }
.gap-row { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; }
.muted { color: var(--muted); }
.note {
  font-size: var(--fs-small);
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: var(--space-4);
}

/* ---------------------------------------------------------------------
   30. Print stylesheet (design-system 7)
   --------------------------------------------------------------------- */
@media print {
  .site-header, .nav__drawer, .cta-band, .hero__img, .page-hero--photo .page-hero__img,
  .anchor-nav, .footer__social, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .page-hero, .section--dark, .footer, .cta-band {
    background: #fff !important; color: #000 !important;
  }
  .hero :where(h1,h2,h3,p), .page-hero :where(h1,h2,h3,p),
  .section--dark :where(h1,h2,h3,p), .footer :where(h1,h2,h3,p,a) { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  .card, .instructor, .quote, .timetable th, .timetable td { border-color: #000 !important; }
}
