/* Matevi Language Centre – logo ink on paper, with the level ladder.
   Palette from the logo: navy #042e6f, spiral pink #ee3897; the old site's sky blue #4476a2.
   Fonts: Zen Kaku Gothic Antique (display), Literata (text), both SIL OFL, cut to Latin and Cyrillic. */

@font-face {
    font-family: "Zen Kaku";
    src: url("/fonts/zen-kaku-gothic-antique-bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Zen Kaku";
    src: url("/fonts/zen-kaku-gothic-antique-medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Literata";
    src: url("/fonts/literata-var.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --paper: #fbfaf6;
    --sheet: #ffffff;
    --ink: #152248;
    --muted: #4a5675;
    --navy: #042e6f;
    --night: #03204f;
    --deep: #021437;
    --pink: #ee3897;
    --pink-text: #c4166e;
    --pink-light: #ff9fcd;
    --pink-wash: #fde8f2;
    --sky: #4476a2;
    --sky-wash: #e6eef6;
    --line: rgba(4, 46, 111, 0.16);
    --on-dark: #eef2fa;
    --on-dark-muted: #c3cde3;
    --radius: 18px;
    --display: "Zen Kaku", "Segoe UI", system-ui, sans-serif;
    --text: "Literata", Georgia, "Times New Roman", serif;
    --menu-fg: var(--navy);
    --menu-focus: var(--pink-text);
    --lb-bg: rgba(2, 20, 55, 0.96);
    --lb-accent: #ff9fcd;
    --lb-accent-soft: rgba(238, 56, 151, 0.35);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: var(--navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--pink-text);
}

:focus-visible {
    outline: 3px solid var(--pink-text);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--navy);
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.1rem, 1.4rem + 3.4vw, 4rem);
}

h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
}

.skip:focus {
    top: 12px;
    color: #fff;
}

/* ---- header ---- */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--line);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-height: 76px;
    padding-block: 8px;
}

.brand {
    order: 0;
    flex: none;
    display: block;
    margin-right: auto;
}

.brand img {
    height: 58px;
    width: auto;
}

.nav {
    order: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--display);
    font-weight: 500;
}

.nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover {
    background: var(--sky-wash);
    color: var(--navy);
}

.nav a[aria-current] {
    color: var(--navy);
    background: var(--pink-wash);
    box-shadow: inset 0 -2px 0 var(--pink);
}

.call {
    order: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.call:hover {
    background: var(--pink-text);
    color: #fff;
}

.lang {
    order: 3;
    display: flex;
    gap: 2px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.9rem;
}

.lang a,
.lang span {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    text-decoration: none;
}

.lang span {
    color: var(--muted);
    border: 1px solid var(--line);
}

.lang a {
    color: var(--navy);
}

.lang a:hover {
    background: var(--sky-wash);
}

.menu-toggle {
    order: 4;
}

/* ---- menu: /js/menu.js folds the navigation behind a button on a phone ---- */

.menu-toggle {
    display: none;
}

@media (max-width: 1020px) {
    .has-menu .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-height: 44px;
        padding: 0 14px;
        border: 2px solid currentColor;
        border-radius: 999px;
        background: var(--menu-bg, transparent);
        color: var(--menu-fg, inherit);
        font: inherit;
        font-family: var(--display);
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
    }

    .has-menu .menu-toggle:focus-visible {
        outline: 3px solid var(--menu-focus, currentColor);
        outline-offset: 3px;
    }

    .has-menu .menu-nav:not(.is-open) {
        display: none;
    }

    .nav {
        order: 5;
    }

    .has-menu .menu-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex-basis: 100%;
        width: 100%;
        margin-inline: 0;
        gap: 2px;
        padding-block: 6px 4px;
        background: var(--menu-panel, none);
    }

    .has-menu .menu-nav.is-open a {
        padding-block: 12px;
    }
}

@media (max-width: 420px) {
    .has-menu .menu-toggle {
        justify-content: center;
        width: 44px;
        padding: 0;
    }

    .menu-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu-bars {
    position: relative;
}

.menu-bars::before,
.menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-bars::before {
    top: -6px;
}

.menu-bars::after {
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-bars {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1020px) {
    .brand img {
        height: 50px;
    }
}

@media (max-width: 560px) {
    .top-row {
        gap: 8px;
        min-height: 64px;
    }

    .brand img {
        height: 42px;
    }

    .call {
        padding: 0 12px;
        font-size: 0.9rem;
        gap: 6px;
    }

    .lang span {
        display: none;
    }

    .lang a,
    .lang span {
        min-width: 36px;
    }
}

@media (max-width: 400px) {
    .top-row {
        gap: 6px;
    }

    .brand img {
        height: 38px;
    }

    .call svg {
        display: none;
    }

    .call {
        padding: 0 10px;
        font-size: 0.86rem;
    }
}

/* ---- buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--pink-text);
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    background: var(--navy);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border-color: currentColor;
    color: var(--on-dark);
}

.btn-ghost:hover {
    background: var(--on-dark);
    color: var(--night);
}

.btn-line {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}

.btn-line:hover {
    background: var(--navy);
    color: #fff;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

/* ---- the logo's grid: thin crossing rules under headings ---- */

.ruled {
    position: relative;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.ruled::before,
.ruled::after {
    content: "";
    position: absolute;
    background: currentColor;
    opacity: 0.55;
}

.ruled::before {
    left: -10px;
    bottom: 4px;
    width: min(340px, 90%);
    height: 1.5px;
    transform: rotate(-1.6deg);
    transform-origin: left;
}

.ruled::after {
    left: 34px;
    bottom: -10px;
    width: 1.5px;
    height: 34px;
    transform: rotate(4deg);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink-text);
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: currentColor;
}

/* ---- home hero with the level ladder ---- */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 88% 110%, rgba(238, 56, 151, 0.28), transparent 60%),
        radial-gradient(700px 480px at -10% -20%, rgba(68, 118, 162, 0.55), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--night) 55%, var(--deep));
    color: var(--on-dark);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.hero::before {
    left: -5%;
    right: -5%;
    top: 74%;
    height: 1px;
    transform: rotate(-2.2deg);
}

.hero::after {
    top: -5%;
    bottom: -5%;
    left: 54%;
    width: 1px;
    transform: rotate(3deg);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding-block: clamp(48px, 8vw, 104px);
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 1.3rem + 4vw, 4.4rem);
    letter-spacing: -0.025em;
}

.hero h1 em {
    font-style: normal;
    color: var(--pink-light);
}

.hero .eyebrow {
    color: var(--pink-light);
}

.hero .lead {
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
    color: var(--on-dark-muted);
    max-width: 36em;
}

.hero .lead strong {
    color: #fff;
    font-weight: 600;
}

.ladder-box {
    margin: 0;
}

.ladder {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
}

.ladder li {
    --i: 0;
    margin-left: calc(var(--i) * 10.5%);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 10px 16px;
    border-radius: 12px 12px 12px 4px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(1, 10, 30, 0.25);
    animation: step-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.15s + var(--i) * 0.14s);
}

.ladder li:nth-child(2) { --i: 1; }
.ladder li:nth-child(3) { --i: 2; }
.ladder li:nth-child(4) { --i: 3; }
.ladder li:nth-child(5) { --i: 4; }

.ladder .lvl {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--navy);
    min-width: 2.2ch;
}

.ladder .note {
    font-size: 0.92rem;
    line-height: 1.35;
    color: var(--muted);
}

.ladder .note b {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink);
    font-size: 1rem;
}

.ladder li.top {
    background: var(--pink-text);
    color: #fff;
}

.ladder li.top .lvl,
.ladder li.top .note,
.ladder li.top .note b {
    color: #fff;
}

.ladder-cap {
    margin-top: 16px;
    font-size: 0.92rem;
    color: var(--on-dark-muted);
}

.ladder-cap strong {
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
}

@keyframes step-in {
    from {
        opacity: 0;
        transform: translateX(-28px);
        clip-path: inset(0 100% 0 0 round 12px);
    }
    to {
        opacity: 1;
        transform: none;
        clip-path: inset(0 0 0 0 round 12px);
    }
}

/* ---- inner page hero ---- */

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(700px 360px at 100% 120%, rgba(238, 56, 151, 0.22), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--night));
    color: var(--on-dark);
    padding-block: clamp(36px, 6vw, 76px);
}

.page-hero::after {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: 22px;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    transform: rotate(-1.4deg);
}

.page-hero h1 {
    color: #fff;
    max-width: 20ch;
}

.page-hero .lead {
    max-width: 40em;
    color: var(--on-dark-muted);
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.page-hero a {
    color: #fff;
}

.ph-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}

.ph-grid.solo {
    grid-template-columns: 1fr;
}

.ph-photo {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 6px solid #fff;
    box-shadow: 0 18px 40px rgba(1, 10, 30, 0.35);
    transform: rotate(1.2deg);
    background: #fff;
}

.ph-photo img {
    width: 100%;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--on-dark-muted);
}

.crumbs li + li::before {
    content: "/";
    margin-right: 6px;
    opacity: 0.7;
}

.crumbs a {
    color: #fff;
}

/* ---- bands ---- */

.band {
    padding-block: clamp(48px, 7vw, 96px);
}

.band-tight {
    padding-block: clamp(32px, 5vw, 64px);
}

.sheet {
    background: var(--sheet);
}

.wash {
    background: var(--sky-wash);
}

.dark {
    background: linear-gradient(165deg, var(--night), var(--deep));
    color: var(--on-dark);
}

.dark h2,
.dark h3 {
    color: #fff;
}

.dark a {
    color: #fff;
}

.dark p {
    color: var(--on-dark-muted);
}

.section-head {
    max-width: 46em;
    margin-bottom: 34px;
}

.section-head p {
    color: var(--muted);
    font-size: 1.08rem;
}

.dark .section-head p {
    color: var(--on-dark-muted);
}

.prose {
    max-width: 46em;
}

.prose h2 {
    margin-top: 1.4em;
}

.prose ul,
.marks {
    padding-left: 0;
    list-style: none;
    margin: 0 0 1.2em;
}

.prose ul li,
.marks li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 0.55em;
}

.prose ul li::before,
.marks li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.5em;
    width: 12px;
    height: 12px;
    border: 3px solid var(--pink);
    border-radius: 50%;
}

.prose strong {
    color: var(--navy);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

/* ---- "we work flexibly": a numbered trail ---- */

.trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    counter-reset: trail;
}

.trail li {
    counter-increment: trail;
    position: relative;
    padding: 26px 24px 24px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.trail li::before {
    content: counter(trail, decimal-leading-zero);
    display: block;
    margin-bottom: 10px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--pink-text);
}

.trail li p {
    margin: 0;
}

.trail a {
    font-weight: 600;
}

/* ---- course cards: a bento grid ---- */

.bento {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.bento li {
    display: flex;
}

.bento li:nth-child(1),
.bento li:nth-child(2) {
    grid-column: span 2;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(4, 46, 111, 0.14);
    border-color: var(--pink);
    color: var(--ink);
}

.card img {
    width: 100%;
    aspect-ratio: 610 / 220;
    object-fit: cover;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 20px 22px 22px;
}

.card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.97rem;
}

.card .go {
    margin-top: auto;
    padding-top: 8px;
    font-family: var(--display);
    font-weight: 700;
    color: var(--pink-text);
}

.card.navy {
    background: linear-gradient(150deg, var(--navy), var(--night));
    border-color: transparent;
}

.card.navy h3 {
    color: #fff;
}

.card.navy p {
    color: var(--on-dark-muted);
}

.card.navy .go {
    color: var(--pink-light);
}

/* ---- figures band ---- */

.figures {
    background: var(--pink);
    color: var(--deep);
}

.figures h2 {
    color: var(--deep);
}

.figures .section-head p {
    color: var(--deep);
}

.fig-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 2px solid var(--deep);
}

.fig-row li {
    padding: 22px 22px 6px 0;
}

.fig-row li + li {
    padding-left: 22px;
    border-left: 2px solid var(--deep);
}

.fig {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(3rem, 2rem + 4vw, 5.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.fig small {
    font-size: 0.4em;
    letter-spacing: 0;
}

.fig-row p {
    margin: 10px 0 0;
    max-width: 22em;
}

.figures a {
    color: var(--deep);
    font-weight: 700;
}

.figures .btn {
    background: var(--deep);
    color: #fff;
}

.figures .btn:hover {
    background: #fff;
    color: var(--deep);
}

/* ---- photo strip ---- */

.strip {
    list-style: none;
    margin: 0;
    padding: 4px 16px 18px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(230px, 30vw, 360px);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.strip li {
    scroll-snap-align: start;
}

.strip a {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: var(--sheet);
}

.strip img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.strip a:hover img {
    transform: scale(1.04);
}

/* ---- testimonials ---- */

.quotes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.quotes figure {
    margin: 0;
    height: 100%;
    padding: 28px 26px 22px;
    background: var(--sheet);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.quotes blockquote {
    margin: 0 0 14px;
    font-size: 1.04rem;
}

.quotes blockquote::before {
    content: "“";
    display: block;
    height: 0.6em;
    font-family: var(--display);
    font-size: 3.4rem;
    line-height: 1;
    color: var(--pink);
}

.quotes figcaption {
    font-family: var(--display);
    font-weight: 700;
    color: var(--navy);
}

/* ---- partners ---- */

.partners {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.partners li {
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.partners h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.partners p {
    margin: 0;
    font-size: 0.97rem;
}

/* ---- call band ---- */

.call-band {
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(68, 118, 162, 0.5), transparent 60%),
        linear-gradient(160deg, var(--navy), var(--deep));
    color: var(--on-dark);
}

.call-band .wrap {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 28px;
    align-items: center;
}

.call-band h2 {
    color: #fff;
}

.call-band p {
    color: var(--on-dark-muted);
    margin: 0;
}

.big-phone {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem);
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.big-phone:hover {
    color: var(--pink-light);
}

.call-band .actions {
    margin-top: 12px;
}

/* ---- lists of other items ---- */

.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chips a {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--sheet);
    color: var(--navy);
    font-family: var(--display);
    font-weight: 500;
    text-decoration: none;
}

.chips a:hover {
    border-color: var(--pink);
    color: var(--pink-text);
}

.chips a[aria-current] {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

/* ---- people ---- */

.people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.people li {
    padding: 26px 24px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-top: 5px solid var(--pink);
}

.people h3 {
    margin-bottom: 4px;
}

.people .role {
    margin-bottom: 12px;
    font-family: var(--display);
    font-weight: 500;
    color: var(--pink-text);
}

.people ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.97rem;
}

.people ul li {
    padding: 0;
    margin-bottom: 6px;
    border: 0;
    background: none;
}

.mission {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.3;
    color: #fff;
}

.mission-by {
    margin-top: 14px;
    font-family: var(--display);
    color: var(--pink-light);
}

/* ---- gallery ---- */

.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.gallery a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: var(--sheet);
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery a:hover img {
    transform: scale(1.04);
}

/* ---- textbooks ---- */

.books {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.books li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-left: 5px solid var(--sky);
    border-radius: 10px;
}

.books b {
    font-family: var(--display);
    font-weight: 700;
    color: var(--navy);
}

.books span {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---- contact ---- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    align-items: start;
}

.panel {
    padding: clamp(22px, 3vw, 34px);
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.contact-list {
    margin: 0 0 18px;
}

.contact-list div {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.contact-list dt {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pink-text);
}

.contact-list dd {
    margin: 2px 0 0;
}

.phone-line a {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--navy);
    text-decoration: none;
}

.map-fig {
    margin: 18px 0 0;
}

.map-fig a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.map-fig figcaption,
.fig-cap {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--display);
    font-weight: 700;
    color: var(--navy);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid rgba(4, 46, 111, 0.3);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 3px solid var(--pink);
    outline-offset: 1px;
    border-color: var(--navy);
}

.contact-form ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #a3123f;
}

.form-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-sent {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--pink-wash);
    color: var(--ink);
}

.contact-sent strong {
    display: block;
    color: var(--navy);
}

/* ---- footer ---- */

.foot {
    background: #4476a2;
    background: linear-gradient(170deg, #3c6c97, #2c5684);
    color: #fff;
    padding-top: 56px;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1.2fr;
    gap: 30px;
}

.foot h2 {
    margin-bottom: 12px;
    font-size: 0.86rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
}

.foot p,
.foot address {
    font-style: normal;
    color: #fff;
    font-size: 0.97rem;
}

.foot a {
    color: #fff;
}

.foot a:hover {
    color: #ffe1ef;
}

.foot-note {
    width: 190px;
    margin: -10px 0 8px -10px;
}

.foot-phone {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
}

.fb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.foot-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
}

.foot-links li {
    margin-bottom: 6px;
}

.foot-bottom {
    margin-top: 36px;
    padding-block: 18px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.foot-bottom p {
    margin: 0;
    font-size: 0.88rem;
}

/* ---- 404 ---- */

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
    background: linear-gradient(170deg, #3c6c97, #2c5684);
    color: #fff;
    text-align: center;
}

.not-found > div {
    max-width: 560px;
}

.not-found img {
    margin: 0 auto 10px;
}

.not-found h1,
.not-found h2 {
    color: #fff;
}

.not-found a {
    color: #fff;
}

.not-found .btn {
    background: var(--deep);
}

.not-found [lang="en"] {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
}

/* ---- reveal on scroll ---- */

@supports (animation-timeline: view()) {
    .reveal {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 40%;
    }

    @keyframes rise {
        from {
            opacity: 0.2;
            transform: translateY(26px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ---- responsive ---- */

@media (max-width: 980px) {
    .hero-grid,
    .ph-grid,
    .split,
    .contact-grid,
    .call-band .wrap {
        grid-template-columns: 1fr;
    }

    .hero::after {
        left: 88%;
    }

    .trail,
    .people,
    .partners {
        grid-template-columns: 1fr 1fr;
    }

    .bento {
        grid-template-columns: 1fr 1fr;
    }

    .foot-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ph-photo {
        max-width: 560px;
    }
}

@media (max-width: 640px) {
    .trail li {
        padding: 18px 20px;
    }

    .trail li::before {
        font-size: 1.9rem;
        margin-bottom: 6px;
    }

    .trail,
    .people,
    .partners,
    .quotes,
    .bento,
    .foot-grid {
        grid-template-columns: 1fr;
    }

    .bento li:nth-child(1),
    .bento li:nth-child(2) {
        grid-column: auto;
    }

    .fig-row {
        grid-template-columns: 1fr;
    }

    .fig-row li + li {
        padding-left: 0;
        border-left: 0;
        border-top: 2px solid var(--deep);
    }

    .ladder li {
        margin-left: calc(var(--i) * 7%);
        padding: 9px 12px;
        gap: 10px;
    }

    .ladder .lvl {
        font-size: 1.4rem;
    }

    .ladder .note {
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* ---- lightbox: /js/lightbox.js opens a linked image enlarged over the page, in a <dialog> ----
   Paste this block into the site's css/site.css. The overlay is dark in every theme and brings its own
   colours and box sizing, so it does not depend on the rest of the stylesheet. To recolour it to the
   site, set these on .lightbox (or on :root): --lb-bg, --lb-text, --lb-accent (focus ring),
   --lb-accent-soft (hover). */

[data-lightbox] {
    cursor: zoom-in;
}

.lightbox,
.lightbox * {
    box-sizing: border-box;
}

html:has(.lightbox[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 68px 12px 14px;
    border: 0;
    background: var(--lb-bg, rgba(12, 14, 16, 0.95));
    color: var(--lb-text, #f2f2f2);
    color-scheme: dark;
    overscroll-behavior: contain;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
}

.lightbox::backdrop {
    background: none;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lightbox-stage img {
    display: block;
    max-width: none;
    border-radius: 4px;
    background: #fff;
}

.lightbox-caption {
    display: grid;
    place-items: center;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0 56px;
    color: var(--lb-text, #f2f2f2);
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: center;
}

.lightbox-button {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lightbox-button:hover {
    border-color: #ffffff;
    background-color: var(--lb-accent-soft, rgba(255, 255, 255, 0.16));
}

.lightbox-button:focus-visible {
    outline: 3px solid var(--lb-accent, #ffffff);
    outline-offset: 3px;
    border-radius: 50%;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lightbox-prev,
.lightbox-next {
    bottom: 14px;
}

.lightbox-prev {
    left: 12px;
    rotate: 180deg;
}

.lightbox-next {
    right: 12px;
}

@media (min-width: 760px) {
    .lightbox {
        padding: 24px 84px 18px;
    }

    .lightbox-caption {
        padding: 0;
    }

    .lightbox-prev,
    .lightbox-next {
        top: calc(50% - 22px);
        bottom: auto;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next,
    .lightbox-close {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.2s ease;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }
}

/* ---- additions ---- */

.h3 {
    font-size: 1.3rem;
}

.stack {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.needs li::before {
    content: none;
}

.need-lvl {
    display: inline-grid;
    place-items: center;
    min-width: 58px;
    height: 58px;
    margin-bottom: 14px;
    padding: 0 10px;
    border-radius: 14px 14px 14px 4px;
    background: var(--navy);
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.5rem;
}

.needs li:nth-child(2) .need-lvl {
    background: var(--pink-text);
}

.needs h2 {
    margin-bottom: 8px;
}

/* ---- home: promo tiles, course index, facebook row ---- */

.promo {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.promo-tile {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.promo-tile:hover {
    transform: translateX(4px);
    border-color: var(--pink);
    color: var(--ink);
}

.promo-tile img {
    width: 150px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.promo-tile span {
    font-size: 0.95rem;
    color: var(--muted);
}

.promo-tile b {
    display: block;
    margin-bottom: 2px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy);
}

.course-index {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    border-top: 1px solid var(--line);
}

.course-index a {
    display: grid;
    grid-template-columns: 3.2rem 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
}

.ci-n {
    color: var(--pink-text);
    font-size: 0.9em;
}

.ci-go {
    color: var(--pink-text);
    transition: transform 0.2s ease;
}

.course-index a:hover {
    color: var(--pink-text);
}

.course-index a:hover .ci-go {
    transform: translateX(6px);
}

.fb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 24px 26px;
    border-radius: var(--radius);
    background: var(--sheet);
    border: 1px solid var(--line);
}

.fb-row h3 {
    margin-bottom: 4px;
}

.fb-row p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 760px) {
    .course-index {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .promo-tile {
        grid-template-columns: 96px 1fr;
        gap: 12px;
    }

    .promo-tile img {
        width: 96px;
    }
}

.wrap.prose {
    max-width: none;
}

.wrap.prose > *:not(.trail) {
    max-width: 46em;
}

@media (min-width: 981px) {
    .bento li:nth-child(7),
    .bento li:nth-child(8) {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}
