/* ================================================================
   LITTLE NUMBERS ACADEMY — MARKETING SITE
   An editorial / chapbook aesthetic. Times-style transitional serif
   for display, system sans for body, terracotta as the only accent.
   No purple gradients. No tech-bro vibes. Generous whitespace.
================================================================ */

/* ---------------------------------------------------------------
   1. Tokens
--------------------------------------------------------------- */
:root {
    /* Official brand palette — primary dark blue + secondary light blue / orange + tertiary symbol colours. */
    --ink: #013f90;             /* PRIMARY — dark blue (badge ring + wordmark) */
    --ink-deep: #00295e;        /* deeper for hover states / strong contrast */
    --ink-faded: #5e7aa6;       /* desaturated for secondary text */
    --ink-soft: #9fb1ce;        /* very faded for placeholders / quiet metadata */

    --azure: #0377cf;           /* SECONDARY — light blue (L letter, ÷ symbol, links / highlights) */

    --terracotta: #f87306;      /* SECONDARY — orange (N letter, italic em accents) */
    --terracotta-dark: #c75900;
    --terracotta-soft: rgba(248, 115, 6, 0.12);

    /* Tertiary — math operator colours (used in the badge + footer strips) */
    --op-green: #77ab23;
    --op-purple: #7e2993;
    --op-red: #e33731;
    --op-azure: #0377cf;

    --paper: #fdfaf3;           /* cream paper — kept warm so the bright accents land softly */
    --paper-dark: #f3eee2;
    --paper-deeper: #ebe4d2;

    --rule: #d8d2c0;
    --rule-soft: #e6e1d2;

    /* Type stacks — Nunito (rounded sans, friendly fit for the brand).
       Display = ExtraBold/Black + italic for the em accents.
       Body = Regular. */
    --font-display: "Nunito", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;

    /* Spacing rhythm */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4rem;
    --space-7: 6rem;
    --space-8: 8rem;

    --max: 1240px;
    --measure: 36rem;
    --radius: 0;          /* Editorial = sharp corners. */

    --transition-quick: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-slow: 480ms cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Height of the fixed site header — used to offset body padding-top + scroll-padding. */
    --header-h: 89px;
}

/* ---------------------------------------------------------------
   2. Reset (light)
--------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    overflow-x: clip;          /* prevent any descendant from causing horizontal scroll */
}

body {
    margin: 0;
    padding-top: var(--header-h);   /* compensate for the fixed header so first content isn't hidden */
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    /* Subtle paper grain — using the official orange + dark-blue tints. */
    background-image:
        radial-gradient(circle at 12% 8%, rgba(248, 115, 6, 0.04), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(1, 63, 144, 0.04), transparent 36%);
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-quick);
}
a:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 3px;
    border-radius: 2px;
}

button { font: inherit; color: inherit; }

::selection {
    background: var(--terracotta);
    color: var(--paper);
}

.skip-link {
    position: absolute; left: -9999px; top: 8px;
    background: var(--ink); color: var(--paper);
    padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------------------------------------------------------------
   3. Type — display + body
   Fraunces variable axes for editorial flourish.
--------------------------------------------------------------- */
.display,
.display-2,
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.018em;
    line-height: 1.05;
    margin: 0;
}
.display em,
.display-2 em,
h1 em, h2 em, h3 em {
    font-style: italic;
    font-weight: inherit;
    color: var(--terracotta);
}

.display {
    font-size: clamp(48px, 9vw, 116px);
    font-weight: 800;
    letter-spacing: -0.035em;
}
.display em { font-weight: 800; }
.display span {
    display: block;
}
.display-2 {
    font-size: clamp(34px, 5.4vw, 64px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.0;
}

h3 {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

/* Eyebrow — small caps marker */
.eyebrow {
    font-family: var(--font-body);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faded);
    font-weight: 600;
    margin: 0 0 var(--space-3);
}

/* Lead paragraph */
.lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.5;
    color: var(--ink);
    max-width: 30em;
    margin: 0 0 var(--space-4);
}
.lead em {
    font-style: italic;
    font-weight: 600;
    color: var(--terracotta);
}

.section-lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.6;
    color: var(--ink-faded);
    max-width: 32em;
    margin: var(--space-3) 0 0;
}

/* ---------------------------------------------------------------
   4. Signature ornaments — double rules etc.
--------------------------------------------------------------- */
.rule-double {
    display: block;
    width: 80px;
    margin: var(--space-4) 0;
}
.rule-double span {
    display: block;
    background: var(--ink);
}
.rule-double span:first-child { height: 2px; }
.rule-double span:last-child { height: 1px; margin-top: 3px; opacity: 0.55; }

/* ---------------------------------------------------------------
   5. Buttons
--------------------------------------------------------------- */
.btn {
    --bg: var(--ink);
    --fg: var(--paper);
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 14px 26px 13px;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    transition: background var(--transition-quick), color var(--transition-quick), transform var(--transition-quick);
    line-height: 1;
    cursor: pointer;
    will-change: transform;
}
.btn:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn-large {
    padding: 18px 32px 17px;
    font-size: 14px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    padding: 11px 20px 10px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    transition: background var(--transition-quick), color var(--transition-quick);
    line-height: 1;
}
.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-link {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink);
    font-size: 18px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    transition: color var(--transition-quick), border-color var(--transition-quick);
    line-height: 1.2;
}
.btn-link:hover {
    color: var(--terracotta);
    border-color: var(--terracotta);
}

/* ---------------------------------------------------------------
   6. Header / Nav
--------------------------------------------------------------- */
.site-header {
    position: fixed;          /* anchored to viewport — survives body position:fixed scroll-lock */
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding: 18px 32px;
    background: rgba(253, 250, 243, 0.92);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--rule-soft);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    transition: transform var(--transition-quick);
}
.brand:hover { transform: translateY(-1px); }
.brand:hover .brand-wordmark em { color: var(--terracotta); }

/* The logo badge is now a transparent PNG, so no blend trick needed —
   it sits on the cream paper without the JPEG-white-background workaround. */
.brand-mark {
    display: block;
    height: 52px;
    width: 52px;
    object-fit: contain;
    transition: transform var(--transition-slow);
}
.brand:hover .brand-mark { transform: rotate(-4deg); }

.brand-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.25em;
    transition: color var(--transition-quick);
    text-transform: uppercase;
}
.brand-wordmark em {
    font-style: italic;
    color: var(--terracotta);
    font-weight: 700;
    transition: color var(--transition-quick);
}

.brand-large .brand-mark {
    height: 120px;
    width: 120px;
}

.primary-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.primary-nav a {
    position: relative;
    padding: 6px 0;
    color: var(--ink-faded);
}
.primary-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width var(--transition-quick);
}
.primary-nav a:hover {
    color: var(--ink);
}
.primary-nav a:hover::after { width: 100%; }

.header-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* Language bar — sits right under the navigation, full-width, centred. */
.lang-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

/* Language toggle — a proper editorial pill, sized to read at a glance */
.lang-toggle {
    display: inline-flex;
    align-items: stretch;
    border: 2px solid var(--ink);
    background: var(--paper);
    overflow: hidden;
    line-height: 1;
    box-shadow: 3px 3px 0 var(--rule);
}
.lang-btn {
    background: transparent;
    border: 0;
    padding: 14px 28px 13px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1;
    transition: background var(--transition-quick), color var(--transition-quick);
}
.lang-btn + .lang-btn { border-left: 2px solid var(--ink); }
.lang-btn:hover { background: var(--paper-dark); }
.lang-btn[aria-pressed="true"] {
    background: var(--terracotta);
    color: var(--paper);
}
.lang-btn[aria-pressed="true"]:hover {
    background: var(--terracotta-dark);
}
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--ink);
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--transition-quick), opacity var(--transition-quick);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Visibility is driven by the [hidden] attribute (toggled in JS).
   The menu floats as a fixed overlay below the sticky header so it stays in view
   regardless of scroll position. */
.mobile-nav {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: var(--space-4) 32px var(--space-5);
    gap: var(--space-2);

    position: fixed;
    top: var(--header-h);                    /* sits flush below the fixed header on mobile */
    left: 0;
    right: 0;
    z-index: 45;                             /* below header (z:50) but above page content */
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));   /* dvh handles iOS Safari address-bar collapse */
    overflow-y: auto;
    box-shadow: 0 8px 16px -8px rgba(29, 53, 87, 0.15);
}
.mobile-nav[hidden] {
    display: none;
}
.mobile-nav a {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--ink);
    padding: 10px 0;
    border-bottom: 0.5px solid var(--rule);
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .mobile-cta {
    margin-top: var(--space-3);
    padding: 14px;
    text-align: center;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: none;
}

/* ---------------------------------------------------------------
   7. Sections layout
--------------------------------------------------------------- */
main { display: block; }

.section {
    padding: clamp(64px, 9vw, 128px) clamp(24px, 5vw, 64px);
    max-width: var(--max);
    margin: 0 auto;
    position: relative;
}

.section-alt {
    max-width: none;
    background: var(--paper-dark);
    padding-left: clamp(24px, 5vw, 64px);
    padding-right: clamp(24px, 5vw, 64px);
}
.section-alt > * {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

.section-head {
    max-width: 48rem;
    margin: 0 0 var(--space-6);
}
/* In full-bleed sections, the cards inside auto-centre to var(--max) — the section-head
   needs auto margins too so its left edge lines up with the cards beneath, not with the
   far-left padding edge of the full-bleed section. */
.section-alt .section-head { margin-left: auto; margin-right: auto; }
.section-head-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.section-head-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------
   8. Hero
--------------------------------------------------------------- */
.hero {
    position: relative;
    padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 64px) clamp(64px, 8vw, 128px);
    max-width: var(--max);
    margin: 0 auto;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 96px);
    align-items: end;
    padding-top: clamp(40px, 6vw, 96px);
}
.hero-text {
    grid-column: 1;
}
.hero-aside {
    grid-column: 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: 0;
}
.hero-figure {
    width: 100%;
    max-width: 360px;
    height: auto;
}
.hero-logo {
    aspect-ratio: 1;
    object-fit: contain;
}
.hero-note {
    font-family: var(--font-display);
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-faded);
    border-left: 1px solid var(--ink);
    padding-left: 14px;
    max-width: 240px;
    margin: 0;
    align-self: flex-end;
}
.hero-note em { color: var(--terracotta); font-style: italic; }

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

/* ---------------------------------------------------------------
   9. Manifesto band
--------------------------------------------------------------- */
.manifesto {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(64px, 7vw, 112px) clamp(24px, 5vw, 64px);
    text-align: center;
    position: relative;
}
.manifesto::before,
.manifesto::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 1px;
    background: rgba(253, 250, 243, 0.5);
}
.manifesto::before { top: 32px; }
.manifesto::after  { bottom: 32px; }
.manifesto p {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.2;
    margin: 0 auto;
    max-width: 22ch;
    letter-spacing: -0.025em;
}
.manifesto em {
    font-style: italic;
    color: var(--terracotta);
}
.manifesto .open-quote {
    display: block;
    font-family: var(--font-display);
    font-size: 0.6em;
    color: var(--terracotta);
    line-height: 0.4;
    margin-bottom: 0.2em;
    font-style: italic;
}

/* ---------------------------------------------------------------
   10. How it works — steps
--------------------------------------------------------------- */
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(32px, 4vw, 56px);
    counter-reset: step;
}
.step {
    position: relative;
    padding-top: var(--space-4);
    border-top: 1px solid var(--ink);
}
.step::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    width: 32px;
    height: 1px;
    background: var(--terracotta);
}
.step-num {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 800;
    font-size: 52px;
    color: var(--terracotta);
    line-height: 1;
    display: block;
    margin: 0 0 var(--space-2);
    letter-spacing: -0.02em;
}
.step h3 {
    margin: 0 0 var(--space-2);
}
.step p {
    color: var(--ink-faded);
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* ---------------------------------------------------------------
   11. Programmes / pricing
--------------------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(24px, 3vw, 40px);
    margin-bottom: var(--space-5);
}
.card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: clamp(28px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 0 var(--rule);
    transition: transform var(--transition-quick), box-shadow var(--transition-quick);
}
.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--rule);
}
.card-feature {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 var(--terracotta);
}
.card-feature:hover {
    box-shadow: 6px 6px 0 var(--terracotta);
}
.card-num {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 800;
    font-size: 28px;
    color: var(--terracotta);
    line-height: 1;
    margin: 0 0 var(--space-2);
    letter-spacing: -0.01em;
}
.card-feature .card-num { color: var(--terracotta); }
.card-flag {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--terracotta);
    color: var(--paper);
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 7px 14px 6px;
    margin: 0;
}
.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(26px, 2.8vw, 34px);
    line-height: 1.05;
    margin: 0 0 var(--space-2);
    letter-spacing: -0.025em;
}
.card-feature .card-title em { color: var(--terracotta); }
.card-tag {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-faded);
    margin: 0 0 var(--space-3);
}
.card-feature .card-tag { color: rgba(253, 250, 243, 0.7); }

.card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: var(--space-3) 0;
    margin: 0 0 var(--space-3);
    border-top: 0.5px solid currentColor;
    border-bottom: 0.5px solid currentColor;
    flex-wrap: wrap;
}
.price-prefix,
.price-suffix {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-faded);
}
.card-feature .price-prefix,
.card-feature .price-suffix { color: rgba(253, 250, 243, 0.7); }
.price-value {
    font-family: var(--font-display);
    font-size: clamp(36px, 3.5vw, 46px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.card-feature .price-value { color: var(--paper); }

.card-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
    flex: 1;
}
.card-bullets li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
}
.card-bullets li::before {
    content: "·";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--terracotta);
    font-size: 28px;
    line-height: 1;
}
.card-feature .btn-secondary {
    background: transparent;
    color: var(--paper);
    border-color: var(--paper);
}
.card-feature .btn-secondary:hover {
    background: var(--paper);
    color: var(--ink);
}

.programmes-note {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-faded);
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
}

/* ---------------------------------------------------------------
   Schedule — "office plan" cards, grouped into school-day and
   school-holiday blocks each with a small editorial subhead.
--------------------------------------------------------------- */
.sched-block + .sched-block { margin-top: var(--space-6); }
.sched-block-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(14px, 1.2vw, 16px);
    color: var(--ink);
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding-top: var(--space-3);
}
.sched-block-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 1.5px;
    background: var(--terracotta);
}
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(24px, 3vw, 40px);
    margin-bottom: var(--space-5);
}
.sched-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: clamp(28px, 3vw, 36px);
    box-shadow: 4px 4px 0 var(--rule);
    transition: transform var(--transition-quick), box-shadow var(--transition-quick);
}
.sched-language {
    position: absolute;
    top: 18px;
    right: 18px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-faded);
    background: var(--paper);
    border: 1px solid var(--ink-faded);
    padding: 4px 10px 3px;
    line-height: 1;
}
.sched-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--rule);
}
.sched-grade {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 14px;
}
.sched-grade em {
    font-style: italic;
    font-weight: 700;
    color: var(--terracotta);
}
.sched-days {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(20px, 2.2vw, 24px);
    line-height: 1.2;
    margin: 0 0 8px;
    letter-spacing: -0.015em;
}
.sched-times {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.05;
    color: var(--terracotta);
    margin: 0 0 var(--space-2);
    letter-spacing: -0.02em;
    font-feature-settings: "tnum";
}
.sched-note {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-faded);
    margin: 0;
    line-height: 1.45;
}
.schedule-foot {
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.55;
    color: var(--ink-faded);
    margin: 0 auto;
    max-width: 42rem;
}
.schedule-foot em {
    font-style: italic;
    color: var(--terracotta);
    font-weight: 400;
}

/* ---------------------------------------------------------------
   12. Why list
--------------------------------------------------------------- */
.why-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(36px, 4vw, 56px);
}
.why-list li {
    position: relative;
    padding-left: 0;
}
.why-mark {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--terracotta);
    line-height: 1;
    margin: 0 0 var(--space-3);
}
.why-list h3 {
    margin: 0 0 var(--space-2);
    font-size: clamp(20px, 2vw, 24px);
}
.why-list p {
    color: var(--ink-faded);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

/* ---------------------------------------------------------------
   13. About
--------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: clamp(40px, 5vw, 96px);
    align-items: start;
}
.about-portrait {
    margin: 0;
    position: relative;
}
@media (min-width: 901px) {
    /* Portrait stays beside the long bio as the reader scrolls. */
    .about-portrait {
        position: sticky;
        top: 96px;
        align-self: start;
    }
}
/* Real photograph framed in the same book-jacket style as the rest of the site:
   inner ink hairline, outer terracotta hairline, generous 14px paper border. */
.portrait-frame {
    position: relative;
    background: var(--paper);
    padding: 14px;
    border: 1px solid var(--ink);
    box-shadow: 6px 6px 0 var(--rule);
}
.portrait-frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 0.6px solid var(--terracotta);
    pointer-events: none;
}
.portrait-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 720 / 809;        /* matches the chantelle.jpg natural ratio */
    object-fit: cover;
    object-position: center 50%;
    /* Subtle desaturation to match the editorial palette without losing warmth. */
    filter: saturate(0.92) contrast(1.02);
}
.about-portrait figcaption {
    margin-top: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink-faded);
    font-size: 14px;
}
.about-portrait .eyebrow {
    margin: 0;
    font-style: normal;
}
.about-text p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.65;
    color: var(--ink);
    margin: 0 0 var(--space-3);
}
.about-text em { color: var(--terracotta); font-style: italic; font-weight: 600; }
.about-text .signature {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(18px, 1.8vw, 22px);
    color: var(--ink);
    margin-top: var(--space-4);
    margin-bottom: 4px;
}
.about-text .signature-role {
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faded);
    font-weight: 600;
    margin: 0;
}

/* Lede — italic intro line beneath the H2 in the About section */
.about-text .about-lede {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--ink-faded);
    margin: var(--space-2) 0 var(--space-3);
}

/* Editorial subheading inside the About body — section-of-section break */
.about-text .about-subhead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(20px, 1.8vw, 24px);
    color: var(--ink);
    margin: var(--space-5) 0 var(--space-3);
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    padding-top: var(--space-3);
    text-transform: uppercase;
    font-size: clamp(14px, 1.2vw, 16px);
    letter-spacing: 0.05em;
}
.about-text .about-subhead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 1.5px;
    background: var(--terracotta);
}

/* Credentials — small editorial chips beneath the About headline */
.credentials {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 6px;
}
.credentials li {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faded);
    font-weight: 600;
    padding: 7px 12px 6px;
    border: 1px solid currentColor;
    line-height: 1;
}

/* ---------------------------------------------------------------
   14. Voices / testimonials
--------------------------------------------------------------- */
.quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(32px, 4vw, 56px);
    align-items: start;
}
.quote {
    margin: 0;
    padding: var(--space-4) 0;
    border-top: 1px solid var(--ink);
    position: relative;
}
.quote::before {
    content: "“";
    position: absolute;
    top: -8px;
    left: 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 64px;
    line-height: 1;
    color: var(--terracotta);
    background: var(--paper);
    padding: 0 8px 0 0;
}
.quote p {
    font-family: var(--font-display);
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.45;
    color: var(--ink);
    margin: var(--space-3) 0 var(--space-3);
    padding-top: 12px;
    font-variation-settings: "opsz" 22, "SOFT" 70;
}
.quote figcaption {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faded);
    font-weight: 600;
}

/* ---------------------------------------------------------------
   15. FAQ
--------------------------------------------------------------- */
.faq-list {
    max-width: 56rem;
    margin: 0 auto;
}
.faq-list details {
    border-top: 1px solid var(--rule);
    padding: var(--space-3) 0;
}
.faq-list details:last-child {
    border-bottom: 1px solid var(--rule);
}
.faq-list summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.35;
    color: var(--ink);
    padding: 6px 0;
    transition: color var(--transition-quick);
    letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: "＋";
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--terracotta);
    transition: transform var(--transition-quick);
    flex-shrink: 0;
    line-height: 1;
}
.faq-list details[open] summary { color: var(--terracotta); }
.faq-list details[open] summary::after {
    content: "—";
}
.faq-list details p {
    margin: var(--space-2) 0 0;
    color: var(--ink-faded);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    max-width: 50rem;
}

/* ---------------------------------------------------------------
   16. Contact / CTA card
--------------------------------------------------------------- */
.contact {
    padding-bottom: clamp(80px, 9vw, 144px);
}
.contact-card {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(40px, 5vw, 80px);
    max-width: var(--max);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.contact-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(253, 250, 243, 0.18);
    border-radius: 50%;
    transform: rotate(15deg);
}
.contact-card::after {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(200, 85, 61, 0.5);
    border-radius: 50%;
}
.contact-card .eyebrow { color: rgba(253, 250, 243, 0.7); }
.contact-card .display-2 { color: var(--paper); }
.contact-card .display-2 em { color: var(--terracotta); }

.contact-lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.55;
    color: rgba(253, 250, 243, 0.85);
    max-width: 28em;
    margin: var(--space-3) 0 var(--space-5);
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-3);
    margin: 0 0 var(--space-5);
}
.contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-3);
    border: 1px solid rgba(253, 250, 243, 0.18);
    background: rgba(253, 250, 243, 0.03);
    transition: background var(--transition-quick), border-color var(--transition-quick);
    color: var(--paper);
    min-width: 0;
}
.contact-row:hover {
    background: rgba(253, 250, 243, 0.07);
    border-color: var(--terracotta);
}
.contact-label {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(253, 250, 243, 0.6);
    font-weight: 600;
}
.contact-value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 15px;
    color: var(--paper);
    line-height: 1.4;
    overflow-wrap: anywhere;   /* lets long emails / urls wrap on @ or . */
}
.contact-card .btn {
    background: var(--terracotta);
    color: var(--paper);
    border-color: var(--terracotta);
}
.contact-card .btn:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

/* ---------------------------------------------------------------
   17. Footer (colophon)
--------------------------------------------------------------- */
.site-footer {
    padding: clamp(48px, 6vw, 96px) clamp(24px, 5vw, 64px) var(--space-5);
    border-top: 1px solid var(--rule);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: clamp(32px, 4vw, 64px);
    max-width: var(--max);
    margin: 0 auto var(--space-5);
}
.footer-brand .brand { display: inline-flex; }
.footer-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-faded);
    max-width: 22em;
    margin: var(--space-2) 0 0;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-col .eyebrow {
    margin: 0 0 var(--space-2);
}
.footer-col a {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--ink);
    padding: 2px 0;
    width: fit-content;
}
.footer-col a:hover { color: var(--terracotta); }

.footer-rule {
    max-width: var(--max);
    margin: 0 auto var(--space-3);
}
.footer-rule span { display: block; background: var(--ink); }
.footer-rule span:first-child { height: 1.5px; }
.footer-rule span:last-child { height: 0.5px; opacity: 0.5; margin-top: 3px; }

.footer-fine {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: 11px;
    color: var(--ink-faded);
}
.footer-fine p { margin: 0; }
.footer-set {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 12px;
}

/* ---------------------------------------------------------------
   18. Scroll reveal (subtle) — only when JS is alive.
   no-js / failed-script users see everything immediately.
--------------------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------
   19. Responsive
--------------------------------------------------------------- */
@media (max-width: 1024px) {
    .site-header {
        grid-template-columns: auto 1fr auto;
    }
    .primary-nav {
        gap: var(--space-3);
        font-size: 11px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    :root { --header-h: 73px; }   /* 14 padding × 2 + 44 brand + 1 border */

    .site-header {
        padding: 14px 20px;
        grid-template-columns: auto 1fr;
        gap: var(--space-2);
    }
    .primary-nav { display: none; }
    .menu-toggle { display: flex; }
    .header-end { gap: 12px; }

    /* Logo carries the brand on its own at small widths — drop the wordmark to free space. */
    .brand-wordmark { display: none; }
    .brand-mark { height: 44px; width: 44px; }
    .brand:hover .brand-mark { transform: none; }   /* skip the rotate gimmick on touch */

    /* Scroll lock for the open mobile menu — pinned via JS-set top:-Npx to defeat iOS Safari quirks. */
    body.menu-open {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        overflow: hidden;
    }

    /* Hero — figure goes ABOVE the headline, smaller, centered. Marginalia gets its own line below.
       Top padding kept tight on mobile so the logo lands right under the language bar. */
    .hero { padding-top: 12px; }
    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 0;
        gap: var(--space-4);
    }
    /* CRITICAL: clear the desktop grid-column placements, otherwise the grid auto-creates an implicit
       second column to fit hero-aside (which still says grid-column: 2) and the layout silently stays 2-col. */
    .hero-text { grid-column: auto; }
    .hero-aside {
        grid-column: auto;
        order: -1;
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
        text-align: center;
    }
    .hero-figure {
        max-width: 180px;
        flex-shrink: 0;
    }
    .hero-note {
        align-self: center;
        max-width: 26ch;
        border-left: 0;
        border-top: 1px solid var(--ink);
        padding-left: 0;
        padding-top: 10px;
        text-align: center;
    }
    /* Headline lays out in TWO lines on mobile: "Maths, made" / "small." instead of three.
       Source HTML has three spans with no whitespace between them, so inline-block + a
       margin-left fakes the natural inter-word space. The third span goes to its own line. */
    .display { font-size: clamp(34px, 11vw, 56px); }
    .display span { display: inline-block; }
    .display span + span { margin-left: 0.25em; }
    .display span:last-child {
        display: block;
        margin-left: 0;
    }
    .display-2 { font-size: clamp(30px, 7.5vw, 46px); }

    /* Drop the editorial double-rule on mobile and pull the lead paragraph up close
       to the headline — desktop keeps the ornament and the breathing room. */
    .hero-text .rule-double { display: none; }
    .hero-text .lead { margin-top: var(--space-2); }

    /* Manifesto — softer floor for tall narrow viewports */
    .manifesto p { font-size: clamp(24px, 7vw, 40px); }

    .about-grid { grid-template-columns: 1fr; }
    .about-portrait { max-width: 320px; }

    /* Schedule — give grade label right-padding so it never collides with the language pill */
    .sched-grade { padding-right: 90px; }
    .sched-language { top: 14px; right: 14px; }

    /* Programmes — same trick for the "Most chosen" flag */
    .card-feature .card-num { padding-right: 90px; }

    /* Contact card — tighter internal padding on small screens */
    .contact-card { padding: clamp(28px, 6vw, 48px); }
    .contact-card::before,
    .contact-card::after { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: var(--space-4); }
    .footer-fine { flex-direction: column; }

    /* -----------------------------------------------------------------
       Mobile centring pass — heading blocks, cards, CTAs centred.
       Long body paragraphs (about bio, FAQ answers) stay left-aligned
       because centred prose is tiring to scan past 2-3 lines.
    ----------------------------------------------------------------- */

    /* Section heads */
    .section-head { text-align: center; margin-left: auto; margin-right: auto; }
    .section-head .section-lead { margin-left: auto; margin-right: auto; }

    /* Hero text */
    .hero-text { text-align: center; }
    .hero-text .rule-double { margin-left: auto; margin-right: auto; }
    .hero-text .lead { margin-left: auto; margin-right: auto; }   /* lead has its own max-width: 30em — needs auto margins to centre the block, not just the text inside it */
    .hero-cta { justify-content: center; }

    /* About — centre the heading-block elements; keep bio paragraphs left-aligned for readability */
    .about-portrait { margin-left: auto; margin-right: auto; }
    .about-text > .eyebrow,
    .about-text > .display-2,
    .about-text > .about-lede,
    .about-text > .about-subhead,
    .about-text > .signature,
    .about-text > .signature-role { text-align: center; }
    /* Re-centre the terracotta accent rule that sits above each subhead */
    .about-text > .about-subhead::before { left: 50%; transform: translateX(-50%); }
    /* Credentials chips centre as a wrapped row, not left-jammed */
    .credentials { justify-content: center; }

    /* Steps (how it works) */
    .step { text-align: center; }
    .step::before { left: 50%; transform: translateX(-50%); }

    /* Programme cards — bullets lose their · marker on mobile so the centred text reads cleanly */
    .card { text-align: center; align-items: center; }
    .card-bullets { width: 100%; }
    .card-bullets li { padding-left: 0; text-align: center; }
    .card-bullets li::before { display: none; }
    .card .btn-secondary { align-self: center; }
    .card-feature .card-num { padding-right: 0; }   /* override desktop reserve — the flag pill sits in its corner, the numeral centres safely */

    /* Schedule cards — promote the corner language pill to a centred top eyebrow so the rest can centre cleanly */
    .sched-card { text-align: center; }
    .sched-language {
        position: static;
        display: inline-block;
        margin: 0 auto var(--space-3);
    }
    .sched-grade { padding-right: 0; }   /* override the right-pad reserved for the absolute pill */
    /* School-day / school-holiday block titles centre with the cards, accent rule re-centres */
    .sched-block-title { text-align: center; }
    .sched-block-title::before { left: 50%; transform: translateX(-50%); }

    /* Why list */
    .why-list li { text-align: center; }

    /* Contact card */
    .contact-card { text-align: center; }
    .contact-row { align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    .section { padding: 56px 20px; }
    .section-alt { padding: 56px 20px; }
    .hero { padding-left: 20px; padding-right: 20px; }

    .btn { padding: 13px 20px; font-size: 12px; letter-spacing: 0.14em; }
    .hero-cta { gap: var(--space-3); flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
    .hero-cta .btn-link { text-align: center; align-self: center; }   /* keep underline width to text width */

    /* Marginalia is editorial flair — drop it on phones; the figure speaks for itself. */
    .hero-note { display: none; }
    .hero-figure { max-width: 160px; }

    .card { padding: 24px; }
    .card-flag { font-size: 8px; padding: 6px 10px; }

    .sched-card { padding: 24px; }

    /* Lang toggle gets a touch smaller, and the bar tightens its padding */
    .lang-bar { padding: 16px 16px; }
    .lang-btn { padding: 12px 20px 11px; font-size: 13px; letter-spacing: 0.18em; }
}

@media (max-width: 380px) {
    :root { --header-h: 69px; }   /* 12 padding × 2 + 44 brand + 1 border */

    /* Very narrow phones — tighten the last bit of margin */
    .section { padding: 48px 16px; }
    .section-alt { padding: 48px 16px; }
    .hero { padding-left: 16px; padding-right: 16px; }
    .site-header { padding: 12px 16px; }

    .display { font-size: clamp(30px, 9vw, 40px); }
    .display-2 { font-size: clamp(26px, 8vw, 38px); }

    .lead { font-size: 16px; }
    .section-lead { font-size: 14px; }

    .hero-figure { max-width: 140px; }

    /* Drop-shadow looks chunky at this size */
    .card, .sched-card { box-shadow: 3px 3px 0 var(--rule); }
    .card:hover, .sched-card:hover { box-shadow: 4px 4px 0 var(--rule); }
}
