/* ==========================================================================
   WayUp — Design D: the combination

   Assembled from what the client picked out of the first three:

     from A — the organic shapes: blob-masked photographs and the soft
              out-of-focus colour fields behind each hero
     from B — the progression chart, the team grid with its greyscale-to-colour
              hover, and the section markers and title treatment
     from C — "Where your child would begin" as ring-binder phase tabs, the
              questions-parents-ask block on the homepage, and testimonials
              as sticky notes

   Inter throughout, as in B. The organic masks from A are what stop the grid
   from feeling clinical; the numbered markers from B are what stop the
   organic shapes from feeling loose. They need each other.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    --teal: #008080;
    --teal-deep: #006262;
    --teal-mid: #1e9e9e;
    --teal-soft: #28a8a8;

    --ink: #1e212b;
    --ink-mid: #3c3f49;
    --ink-soft: #565963;

    --sun: #ffc800;
    --sun-deep: #e1aa00;
    --crust: #ff8427;
    --crust-deep: #e16609;
    --crust-text: #a8470a;

    --white: #ffffff;
    --tint: #eef4f3;
    --sand: #faf7f2;
    --rule: #e1e1e1;
    --rule-teal: #cfe2e0;

    /* Phase ramp: warm (most supported) to deep (most academic). */
    --c-comprehensia: #ff8427;
    --c-explora: #ffc800;
    --c-responsia: #28a8a8;
    --c-motivia: #008080;
    --c-futura: #006262;

    --wrap: 1200px;
    --gutter: 26px;

    --axis-from: 10;
    --axis-span: 10;

    --shadow-sm: 0 4px 16px rgba(30, 33, 43, 0.06);
    --shadow-md: 0 14px 34px rgba(30, 33, 43, 0.09);
    --shadow-lg: 0 26px 60px rgba(0, 128, 128, 0.16);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-mid);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* height:auto is essential: the production build gives every <img> width and
   height attributes (so the page doesn't jump while photos load), and without
   this the height attribute wins and photos render huge and stretched.
   Rules that need a fixed height (team, film, logo) set one explicitly. */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    margin: 0 0 0.5em;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.022em;
}

h1 {
    font-size: clamp(2.3rem, 5.6vw, 4.1rem);
    letter-spacing: -0.032em;
}

h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

h3 {
    font-size: 1.3rem;
    letter-spacing: -0.014em;
}

h4 {
    font-size: 1.02rem;
}

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--teal-deep);
}

strong {
    color: var(--ink);
    font-weight: 600;
}

.skip-link {
    position: absolute;
    left: -9999px;
    background: var(--ink);
    color: var(--white);
    padding: 12px 20px;
    z-index: 2000;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.wrap--narrow {
    max-width: 800px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    align-items: start;
}

.col-4 { grid-column-end: span 4; }
.col-5 { grid-column-end: span 5; }
.col-6 { grid-column-end: span 6; }
.col-7 { grid-column-end: span 7; }
.col-8 { grid-column-end: span 8; }
.col-12 { grid-column-end: span 12; }
.start-1 { grid-column-start: 1; }
.start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; }

.grid > *:first-child:not([class*="start-"]) {
    grid-column-start: 1;
}

/* Text beside an image. Rows pinned so DOM order cannot push one half onto a
   second line — grid's sparse cursor only moves forward. */
.two-up {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--gutter) * 1.6);
    align-items: center;
}

.two-up > .two-up__text { grid-row: 1; grid-column: 1 / span 6; }
.two-up > .two-up__media { grid-row: 1; grid-column: 8 / span 5; }
.two-up--flip > .two-up__text { grid-column: 7 / span 6; }
.two-up--flip > .two-up__media { grid-column: 1 / span 5; }

.band {
    position: relative;
    padding: 90px 0;
    border-top: 1px solid var(--rule);
}

.band--flush { border-top: 0; }

.band--tint {
    background: var(--tint);
    border-top-color: var(--rule-teal);
}

.band--sand {
    background: var(--sand);
    border-top-color: #eee7db;
}

.band--ink {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.76);
    border-top: 0;
}

.band--ink h2,
.band--ink h3,
.band--ink strong { color: var(--white); }

/* Section marker — kept from B, which the client singled out. */
.marker {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 30px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.marker__num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    /* deep teal: plain teal is 4.3:1 on the tinted bands, under WCAG AA */
    color: var(--teal-deep);
}

.band--ink .marker { color: rgba(255, 255, 255, 0.6); }
.band--ink .marker__num { color: var(--sun); }

.lede {
    font-size: clamp(1.1rem, 1.75vw, 1.38rem);
    line-height: 1.45;
    color: var(--ink);
    letter-spacing: -0.012em;
}

.note-text {
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.prose p:last-child { margin-bottom: 0; }
.prose h3 { margin-top: 32px; }

/* --------------------------------------------------------------------------
   4. Masthead
   -------------------------------------------------------------------------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--rule);
}

/* backdrop-filter would make this a containing block and trap the fixed
   mobile panel inside the header, so it only applies above that breakpoint. */
@media (min-width: 1025px) {
    .masthead {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(14px);
    }
}

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
}

.masthead__logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 26px;
}

.nav-links > li {
    position: relative;
    display: flex;
    align-items: center;
}

/* A <button> does not inherit line-height; matching it keeps the dropdown
   toggle on the same line as the anchors. */
.nav-links a,
.nav-dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
    text-decoration: none;
    background: none;
    border: 0;
    margin: 0;
    padding: 5px 0 8px;
    cursor: pointer;
}

/* Absolutely positioned, or it becomes a flex item of the inline-flex link. */
.nav-links a::after,
.nav-dropdown-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--sun);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-links a:hover::after,
.nav-dropdown-toggle:hover::after,
.nav-links a[aria-current="page"]::after,
.nav-links li.is-current > .nav-dropdown-toggle::after {
    transform: scaleX(1);
}

.nav-dropdown-toggle .chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.25s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .chevron {
    transform: translateY(2px) rotate(225deg);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: -18px;
    min-width: 276px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 10px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nav-dropdown a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.nav-dropdown a::after { display: none; }

.nav-dropdown li:nth-child(1) a { border-left-color: var(--c-comprehensia); }
.nav-dropdown li:nth-child(2) a { border-left-color: var(--c-explora); }
.nav-dropdown li:nth-child(3) a { border-left-color: var(--c-responsia); }
.nav-dropdown li:nth-child(4) a { border-left-color: var(--c-motivia); }
.nav-dropdown li:nth-child(5) a { border-left-color: var(--c-futura); }

.nav-dropdown a:hover { background: var(--tint); }

.nav-dropdown .dropdown-note {
    font-size: 0.79rem;
    font-weight: 400;
    color: var(--ink-soft);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.btn-login {
    background: var(--teal);
    color: var(--white) !important;
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}

.btn-login::after { display: none; }
.btn-login:hover { background: var(--teal-deep); }

.lang-pill {
    color: var(--teal-deep);
    border: 2px solid var(--teal);
    padding: 4px 11px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
}

.lang-pill::after { display: none; }
.lang-pill:hover { background: var(--teal); color: var(--white); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
    z-index: 1100;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--teal);
    transition: transform 0.3s ease, top 0.3s ease, background 0.3s ease;
}

.hamburger { position: relative; }

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle.is-open .hamburger { background: transparent; }
.nav-toggle.is-open .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open .hamburger::after { top: 0; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero — soft colour fields from A
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding: 96px 0 76px;
    overflow: hidden;
}

.hero > .wrap {
    position: relative;
    z-index: 2;
}

.hero h1 {
    max-width: 20ch;
    text-wrap: balance;
    margin-bottom: 26px;
}

.hero .lede {
    max-width: 52ch;
}

.blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.22;
    background: var(--teal);
    pointer-events: none;
}

.blob--1 { width: 470px; height: 470px; top: -14%; right: -8%; }
.blob--2 { width: 300px; height: 300px; bottom: 2%; left: -6%; background: var(--teal-deep); }
.blob--3 { width: 260px; height: 260px; top: 22%; right: 28%; background: var(--sun); opacity: 0.16; }

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 36px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.hero__meta div { display: flex; gap: 8px; }

.hero__meta dt {
    font-weight: 600;
    color: var(--teal-deep);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    align-self: center;
}

.hero__meta dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: var(--white);
    padding: 15px 32px;
    border-radius: 50px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 128, 128, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 128, 128, 0.3);
}

.btn span { transition: transform 0.22s ease; }
.btn:hover span { transform: translateX(4px); }

.btn--ghost {
    background: none;
    color: var(--teal-deep);
    border: 2px solid var(--teal);
    box-shadow: none;
    padding: 13px 30px;
}

.btn--ghost:hover { background: var(--tint); box-shadow: none; }

.band--ink .btn {
    background: var(--sun);
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 34px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--teal-deep);
    text-decoration: none;
    border-bottom: 2px solid var(--sun);
    padding-bottom: 2px;
}

.link-arrow span { transition: transform 0.22s ease; }
.link-arrow:hover span { transform: translateX(4px); }

.link-inline {
    color: var(--teal-deep);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--rule-teal);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.link-inline:hover { text-decoration-color: var(--teal); }

/* --------------------------------------------------------------------------
   7. Organic photographs — from A
   -------------------------------------------------------------------------- */

.figure {
    margin: 0;
}

.figure img {
    width: 100%;
    border-radius: 40px;
    box-shadow: var(--shadow-md);
}

/* The blob masks that give the site its warmth. */
.figure--organic img {
    border-radius: 58% 42% 34% 66% / 56% 34% 66% 44%;
}

.figure--organic-alt img {
    border-radius: 34% 66% 66% 34% / 38% 34% 66% 62%;
}

.figure--tall img { aspect-ratio: 4 / 5; object-fit: cover; }
.figure--wide img { aspect-ratio: 16 / 8; object-fit: cover; }
.figure--square img { aspect-ratio: 1 / 1; object-fit: cover; }

/* Panoramic group shots keep their own proportions so nobody is cropped out. */
/* "auto <ratio>" keeps the photo's own proportions but reserves its height
   from width/height before it loads, so nothing jumps (CLS). */
.figure--natural img { aspect-ratio: auto 1600 / 559; height: auto; }

/* --------------------------------------------------------------------------
   7b. The film — click to play

   Until pressed this is an ordinary link carrying our own photograph, so no
   YouTube script, cookie or request happens on page view. v4.js swaps in a
   youtube-nocookie player on click.
   -------------------------------------------------------------------------- */

.film-row {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: calc(var(--gutter) * 2);
    align-items: center;
}

.film {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 32px;
    background: var(--ink);
    box-shadow: var(--shadow-lg);
}

.film img,
.film iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.film img {
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: saturate(0.9) brightness(0.86);
}

.film:hover img,
.film:focus-visible img {
    transform: scale(1.03);
    filter: saturate(1) brightness(0.8);
}

/* Play button in an organic shape, matching the photographs. */
.film__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92px;
    height: 92px;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 60% 40% 45% 55% / 55% 50% 50% 45%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.film__play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--teal);
}

.film:hover .film__play,
.film:focus-visible .film__play {
    transform: translate(-50%, -50%) scale(1.08);
}

.film__time {
    position: absolute;
    right: 18px;
    bottom: 16px;
    padding: 4px 11px;
    border-radius: 50px;
    background: rgba(30, 33, 43, 0.78);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.film.is-playing .film__play,
.film.is-playing .film__time { display: none; }

.film__note {
    margin: 14px 4px 0;
    font-size: 0.84rem;
    color: var(--ink-soft);
}

.figure figcaption {
    margin-top: 14px;
    font-size: 0.86rem;
    color: var(--ink-soft);
    text-align: center;
}

.image-trio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.image-trio img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.image-trio > *:nth-child(1) img { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
.image-trio > *:nth-child(2) img { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.image-trio > *:nth-child(3) img { border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%; }

/* Photo still to be taken. */
.todo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    aspect-ratio: 4 / 5;
    padding: 30px 24px;
    background: repeating-linear-gradient(135deg, var(--tint), var(--tint) 14px, #dfeeee 14px, #dfeeee 28px);
    border: 3px dashed var(--teal-soft);
    border-radius: 58% 42% 34% 66% / 56% 34% 66% 44%;
    color: var(--teal-deep);
}

.todo::before {
    content: "Photo to come";
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--crust);
    padding: 4px 12px;
    border-radius: 50px;
}

.todo span {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    max-width: 22ch;
}

.todo--wide { aspect-ratio: 16 / 8; }
.todo--square { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   8. The progression chart — from B
   -------------------------------------------------------------------------- */

.chart { margin: 0; }

.chart__key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    padding-bottom: 16px;
}

.chart__key span { display: inline-flex; align-items: center; gap: 8px; }

.chart__key i {
    width: 22px;
    height: 11px;
    display: block;
    border-radius: 6px;
    background: var(--ink-soft);
}

.chart__key i.is-soft { opacity: 0.28; }

.chart__grid {
    display: grid;
    grid-template-columns: minmax(104px, 156px) 1fr;
    gap: 0 20px;
}

.chart__axis {
    grid-column: 2;
    position: relative;
    height: 26px;
    border-bottom: 1px solid var(--rule);
}

.chart__tick {
    position: absolute;
    top: 0;
    left: calc((var(--at) - var(--axis-from)) / var(--axis-span) * 100%);
    transform: translateX(-50%);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.chart__tick::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 20px;
    width: 1px;
    height: 6px;
    background: var(--rule);
}

.chart__rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chart__row {
    display: grid;
    grid-template-columns: minmax(104px, 156px) 1fr;
    gap: 0 20px;
    align-items: center;
    border-bottom: 1px solid var(--rule);
    transition: opacity 0.25s ease;
}

.chart__row a {
    display: contents;
    text-decoration: none;
    color: inherit;
}

.chart__label {
    padding: 16px 0;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--ink);
}

.chart__range {
    display: block;
    font-size: 0.77rem;
    font-weight: 400;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

.chart__track {
    position: relative;
    height: 30px;
}

/* Rounded bar ends, so even the chart carries A's softness. */
.chart__bar,
.chart__soft {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: calc((var(--from) - var(--axis-from)) / var(--axis-span) * 100%);
    width: calc((var(--to) - var(--from)) / var(--axis-span) * 100%);
    background: var(--bar, var(--teal));
    border-radius: 50px;
    transform-origin: left center;
}

.chart__soft {
    left: calc((var(--soft-from) - var(--axis-from)) / var(--axis-span) * 100%);
    width: calc((var(--soft-to) - var(--soft-from)) / var(--axis-span) * 100%);
    opacity: 0.26;
}

/* Comprehensia is not an age stage — it runs throughout, by need. */
.chart__row--any .chart__track::before {
    content: "";
    position: absolute;
    inset: 3px 0;
    border: 2px dashed var(--c-comprehensia);
    border-radius: 50px;
    background: rgba(255, 132, 39, 0.08);
}

.chart__any-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-left: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--crust-text);
}

.chart__rows:hover .chart__row { opacity: 0.4; }
.chart__rows:hover .chart__row:hover,
.chart__rows .chart__row:focus-within { opacity: 1; }

.chart__foot {
    margin-top: 24px;
    max-width: 64ch;
}

/* --------------------------------------------------------------------------
   9. Phase tabs — from C
   -------------------------------------------------------------------------- */

.tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 -2px;
    padding: 0;
    list-style: none;
}

.tabs__tab {
    position: relative;
    top: 2px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--tint);
    border: 2px solid var(--rule-teal);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    padding: 12px 22px 13px;
    cursor: pointer;
    transition: background 0.2s ease, top 0.2s ease, border-color 0.2s ease;
}

.tabs__tab::before {
    content: "";
    display: block;
    height: 5px;
    margin: -4px -10px 8px;
    border-radius: 3px;
    background: var(--tab, var(--teal));
}

.tabs__tab:hover { top: 0; }

.tabs__tab[aria-selected="true"] {
    background: var(--white);
    border-color: var(--teal-soft);
    top: 0;
    padding-bottom: 15px;
}

.tabs__panel {
    background: var(--white);
    border: 2px solid var(--teal-soft);
    border-radius: 0 28px 28px 28px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.tabs__panel[hidden] { display: none; }

.tabs__panel-inner {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.tabs__age {
    display: inline-block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink);
    background: var(--tab, var(--teal));
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}

/* The teals need white text to stay legible. */
.tabs__panel[data-phase="motivia"] .tabs__age,
.tabs__panel[data-phase="futura"] .tabs__age {
    color: var(--white);
}

/* --------------------------------------------------------------------------
   10. Questions — from C
   -------------------------------------------------------------------------- */

.questions {
    display: grid;
    gap: 18px;
    max-width: 900px;
}

.question {
    background: var(--white);
    border: 1px solid var(--rule-teal);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.question[open] {
    border-color: var(--teal-soft);
    box-shadow: var(--shadow-md);
}

.question > summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 30px;
    cursor: pointer;
    list-style: none;
    font-size: clamp(1.05rem, 1.9vw, 1.3rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.014em;
}

.question > summary::-webkit-details-marker { display: none; }

.question > summary::after {
    content: "";
    flex: none;
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: 2px solid var(--teal);
    border-radius: 50%;
    background:
        linear-gradient(var(--teal), var(--teal)) center/12px 2px no-repeat,
        linear-gradient(var(--teal), var(--teal)) center/2px 12px no-repeat;
    transition: transform 0.25s ease, background 0.25s ease;
}

.question[open] > summary::after {
    background: linear-gradient(var(--teal), var(--teal)) center/12px 2px no-repeat;
    transform: rotate(180deg);
}

.question__mark {
    flex: none;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 60% 40% 45% 55% / 55% 50% 50% 45%;
    background: var(--tint);
    color: var(--crust-text);
    font-weight: 700;
    font-size: 1.05rem;
}

.question__body {
    padding: 0 30px 28px;
    margin-top: -4px;
}

.question__body p:last-child { margin-bottom: 0; }

.question__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: 600;
    color: var(--teal-deep);
    text-decoration: none;
    border-bottom: 2px solid var(--sun);
    padding-bottom: 2px;
}

.question__more span { transition: transform 0.2s ease; }
.question__more:hover span { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   11. Team — organic shape from A, greyscale hover from B
   -------------------------------------------------------------------------- */

.team {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 44px 30px;
}

.team figure {
    margin: 0;
    text-align: center;
}

.team__photo {
    width: 100%;
    max-width: 196px;
    margin: 0 auto 16px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--tint);
    border-radius: 60% 40% 32% 68% / 58% 32% 68% 42%;
    box-shadow: var(--shadow-sm);
}

.team figure:nth-child(even) .team__photo {
    border-radius: 38% 62% 62% 38% / 42% 40% 60% 58%;
}

.team__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 26%;
    filter: grayscale(1);
    transition: filter 0.45s ease, transform 0.45s ease;
}

.team figure:hover .team__photo img {
    filter: grayscale(0);
    transform: scale(1.04);
}

.team__initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: var(--white);
    font-size: 2.4rem;
    font-weight: 500;
}

.team figcaption strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.team figcaption span {
    font-size: 0.86rem;
    color: var(--ink-soft);
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   12. Testimonials — sticky notes from C
   -------------------------------------------------------------------------- */

.notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    align-items: start;
}

.note {
    position: relative;
    margin: 0;
    padding: 30px 32px;
    border-radius: 28px 28px 28px 6px;
    background: #fff6d6;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.notes > .note:nth-child(4n + 1) { background: #fff6d6; }
.notes > .note:nth-child(4n + 2) { background: var(--tint); }
.notes > .note:nth-child(4n + 3) { background: #ffe9d6; }
.notes > .note:nth-child(4n + 4) { background: #f2f1e7; }

.note:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.note p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
}

.note p:last-of-type { margin-bottom: 18px; }

.note footer {
    font-size: 0.88rem;
    color: var(--ink-soft);
    font-weight: 500;
}

.note footer strong {
    color: var(--teal-deep);
    font-weight: 600;
}

/* Longer quotes get their own wider cell rather than a scrollbar. */
.note--long { grid-column: span 2; }

.notes--more {
    margin-top: 28px;
}

.more-voices > summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--teal-deep);
    padding: 12px 26px;
    border: 2px solid var(--teal);
    border-radius: 50px;
    transition: background 0.2s ease;
}

.more-voices > summary::-webkit-details-marker { display: none; }
.more-voices > summary:hover { background: var(--tint); }

.more-voices > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.25s ease;
}

.more-voices[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
}

.note--draft::before {
    content: "Placeholder text";
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--crust);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   13. Lists and asides
   -------------------------------------------------------------------------- */

.rule-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}

.rule-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border-bottom: 1px solid var(--rule);
    padding: 9px 0;
    font-size: 0.99rem;
}

.rule-list li span {
    flex: none;
    align-self: center;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--teal-deep);
    background: var(--tint);
    border: 1px solid var(--rule-teal);
    padding: 2px 8px;
    border-radius: 50px;
}

.rule-list--plain li { display: block; }

.callout {
    background: var(--tint);
    border-left: 5px solid var(--teal);
    border-radius: 0 20px 20px 0;
    padding: 22px 28px;
    margin: 26px 0;
}

.callout--warm {
    background: #fff6e0;
    border-left-color: var(--sun-deep);
}

.callout p:last-child { margin-bottom: 0; }

.fact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--gutter);
}

.fact-card {
    background: var(--white);
    border: 1px solid var(--rule-teal);
    border-radius: 26px;
    border-top: 5px solid var(--teal);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
}

.fact-cards > .fact-card:nth-child(2) { border-top-color: var(--sun); }
.fact-cards > .fact-card:nth-child(3) { border-top-color: var(--crust); }

.fact-card h4 { margin-bottom: 8px; color: var(--teal-deep); }
.fact-card p { margin: 0; font-size: 0.96rem; }

/* --------------------------------------------------------------------------
   14. Accreditation
   -------------------------------------------------------------------------- */

.accred {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--white);
    border: 1px solid var(--rule-teal);
    border-radius: 28px;
    padding: 26px 32px;
    box-shadow: var(--shadow-sm);
}

.accred__mark { flex: none; width: 150px; }
.accred__mark img { width: 100%; }

.accred__text strong { display: block; color: var(--ink); font-size: 1.02rem; }
.accred__text span { font-size: 0.93rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.colophon {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.72);
    padding: 76px 0 28px;
    /* The phase ramp, as a hairline across the top. */
    border-top: 4px solid transparent;
    border-image: linear-gradient(
        90deg,
        var(--c-comprehensia) 0 20%,
        var(--c-explora) 20% 40%,
        var(--c-responsia) 40% 60%,
        var(--c-motivia) 60% 80%,
        var(--c-futura) 80% 100%
    ) 1;
}

.colophon a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.colophon a:hover { color: var(--sun); text-decoration: underline; text-underline-offset: 3px; }

.colophon__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 44px;
}

.colophon__h {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--teal-soft);
    margin-bottom: 16px;
}

.colophon__name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.colophon p { font-size: 0.94rem; line-height: 1.7; margin: 0 0 10px; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 10px; font-size: 0.94rem; }

.colophon__accred {
    display: flex;
    align-items: center;
    gap: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 56px;
    padding-top: 36px;
}

.colophon__accred .mark {
    flex: none;
    width: 150px;
    background: var(--white);
    padding: 14px 18px;
    border-radius: 12px;
    display: block;
}

.colophon__accred .mark img { width: 100%; display: block; }

.colophon__accred p {
    max-width: 56ch;
    font-size: 0.9rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.64);
}

.colophon__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 40px;
    padding-top: 24px;
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.55);
}

.colophon__legal p { margin: 0; }

.version-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
}

.version-switch .label {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.version-switch a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-decoration: none;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50px;
}

.version-switch a:hover { border-color: var(--sun); color: var(--white); text-decoration: none; }

.version-switch a[aria-current="true"] {
    background: var(--sun);
    border-color: var(--sun);
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   16. Motion — A's breathing shapes, B's growing bars
   -------------------------------------------------------------------------- */

@keyframes breathe-a {
    0%, 100% { border-radius: 60% 40% 32% 68% / 58% 32% 68% 42%; }
    34%      { border-radius: 54% 46% 40% 60% / 50% 40% 60% 50%; }
    67%      { border-radius: 46% 54% 56% 44% / 62% 48% 52% 38%; }
}

@keyframes breathe-b {
    0%, 100% { border-radius: 38% 62% 62% 38% / 42% 40% 60% 58%; }
    34%      { border-radius: 48% 52% 50% 50% / 54% 50% 50% 46%; }
    67%      { border-radius: 58% 42% 38% 62% / 44% 58% 42% 56%; }
}

@keyframes breathe-c {
    0%, 100% { border-radius: 58% 42% 34% 66% / 56% 34% 66% 44%; }
    50%      { border-radius: 46% 54% 52% 48% / 46% 52% 48% 54%; }
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(26px, -18px, 0) scale(1.06); }
}

@media (prefers-reduced-motion: no-preference) {
    .blob { animation: drift 26s ease-in-out infinite; }
    .blob--2 { animation-duration: 32s; animation-delay: -8s; }
    .blob--3 { animation-duration: 38s; animation-delay: -16s; }

    .team__photo { animation: breathe-a 24s ease-in-out infinite; }
    .team figure:nth-child(even) .team__photo { animation-name: breathe-b; animation-duration: 28s; }
    .team figure:nth-child(3n) .team__photo { animation-delay: -9s; }
    .team figure:nth-child(3n + 1) .team__photo { animation-delay: -17s; }

    .figure--organic img { animation: breathe-c 30s ease-in-out infinite; }
    .figure--organic-alt img { animation: breathe-b 34s ease-in-out infinite; animation-delay: -11s; }

    /* Chart bars grow along the axis they measure. */
    .chart__bar,
    .chart__soft {
        transform: scaleX(0);
        transition: transform 0.75s cubic-bezier(0.22, 0.75, 0.3, 1);
    }

    .chart.is-in .chart__bar,
    .chart.is-in .chart__soft { transform: scaleX(1); }

    .chart__row:nth-child(1) .chart__bar, .chart__row:nth-child(1) .chart__soft { transition-delay: 0.05s; }
    .chart__row:nth-child(2) .chart__bar, .chart__row:nth-child(2) .chart__soft { transition-delay: 0.13s; }
    .chart__row:nth-child(3) .chart__bar, .chart__row:nth-child(3) .chart__soft { transition-delay: 0.21s; }
    .chart__row:nth-child(4) .chart__bar, .chart__row:nth-child(4) .chart__soft { transition-delay: 0.29s; }
    .chart__row:nth-child(5) .chart__bar, .chart__row:nth-child(5) .chart__soft { transition-delay: 0.37s; }

    .chart__row--any .chart__track::before {
        clip-path: inset(0 100% 0 0 round 50px);
        transition: clip-path 0.8s cubic-bezier(0.22, 0.75, 0.3, 1) 0.45s;
    }

    .chart.is-in .chart__row--any .chart__track::before {
        clip-path: inset(0 0 0 0 round 50px);
    }

    .reveal {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.75, 0.3, 1);
    }

    .reveal.is-in { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .nav-toggle { display: block; }

    .nav-menu {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(380px, 86%);
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 106px var(--gutter) 32px;
        box-shadow: -12px 0 40px rgba(30, 33, 43, 0.14);
        transform: translateX(100%);
        visibility: hidden;
        overflow-y: auto;
        transition: transform 0.35s ease, visibility 0.35s;
    }

    .nav-menu.is-open { transform: none; visibility: visible; }

    .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-links > li { border-bottom: 1px solid var(--rule); }

    .nav-links > li > a,
    .nav-dropdown-toggle {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 15px 0;
        font-size: 1.04rem;
    }

    .nav-links a::after,
    .nav-dropdown-toggle::after { display: none; }

    .nav-links a[aria-current="page"],
    .nav-links li.is-current > .nav-dropdown-toggle { color: var(--teal); }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 0;
        box-shadow: none;
        background: var(--tint);
        border-radius: 16px;
        display: none;
        margin-bottom: 12px;
        padding: 6px;
    }

    .nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown { display: block; }
    .nav-actions { margin-top: 28px; }
}

@media (max-width: 900px) {
    .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column-end: span 12; }

    .start-1, .start-7, .start-8,
    .grid > *:first-child:not([class*="start-"]) { grid-column-start: auto; }

    .two-up > .two-up__text,
    .two-up > .two-up__media,
    .two-up--flip > .two-up__text,
    .two-up--flip > .two-up__media {
        grid-row: auto;
        grid-column: 1 / -1;
    }

    .tabs__panel-inner { grid-template-columns: 1fr; gap: 30px; }
    .film-row { grid-template-columns: 1fr; gap: 30px; }
    .colophon__grid { grid-template-columns: 1fr 1fr; }
    .band { padding: 66px 0; }
    .note--long { grid-column: span 1; }
}

@media (max-width: 640px) {
    :root { --gutter: 20px; }

    .hero { padding: 60px 0 48px; }

    .blob { opacity: 0.16; filter: blur(60px); }
    .blob--1 { width: 250px; height: 250px; }
    .blob--2, .blob--3 { width: 170px; height: 170px; }

    .chart__grid,
    .chart__row { grid-template-columns: 1fr; gap: 0; }
    .chart__axis { grid-column: 1; margin-bottom: 4px; }
    .chart__label { padding: 14px 0 6px; }
    .chart__range { display: inline; margin-left: 8px; }
    .chart__track { height: 22px; margin-bottom: 14px; }

    .team { grid-template-columns: 1fr 1fr; }
    .tabs__tab { font-size: 0.9rem; padding: 10px 15px 11px; }
    .tabs__panel { padding: 26px 22px; border-radius: 0 22px 22px 22px; }
    .question > summary { padding: 20px 22px; gap: 12px; }
    .question__body { padding: 0 22px 24px; }
    .note { padding: 24px 24px; }

    .colophon__grid { grid-template-columns: 1fr; gap: 32px; }
    .colophon__accred,
    .accred { flex-direction: column; align-items: flex-start; gap: 18px; }
}

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

    .reveal { opacity: 1; transform: none; }
    .chart__bar, .chart__soft { transform: scaleX(1); }
    .chart__row--any .chart__track::before { clip-path: none; }
}

@media print {
    .masthead,
    .nav-toggle,
    .blob,
    .version-switch { display: none !important; }

    .band--ink,
    .colophon { background: none; color: #000; }
}
