/* LES School: the exercise book of the LES logo.
   Paper ruled in pale logo blue, the logo blue and night bands, the logo's stripe grey, the amber of the
   school's classroom walls as a highlighter, the mint of its quiet room. Commissioner for display,
   Literata for text. One light theme; every colour is a custom property. */

@font-face {
    font-family: "Commissioner";
    src: url("/fonts/commissioner.woff2") format("woff2");
    font-weight: 500 900;
    font-display: swap;
}

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

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

:root {
    --paper: #fbf8f1;
    --sheet: #ffffff;
    --rule: #d6e1ec;
    --rule-strong: #b9cde0;
    --margin: #e2a24f;
    --blue: #2f5e86;
    --blue-lit: #3d7097;
    --ink: #17283a;
    --ink-soft: #46576a;
    --night: #10233a;
    --night-2: #17304d;
    --night-3: #22405f;
    --on-night: #f3f0e8;
    --on-night-soft: #c9d3de;
    --grey: #a9abae;
    --amber: #fecf76;
    --amber-lit: #ffe2a6;
    --amber-deep: #b86a1d;
    --mint: #d0e2d8;
    --mint-deep: #a7c3b6;
    --wood: #d9a25e;
    --wood-edge: #b27537;
    --chair: #1b1b1f;
    --focus: #b86a1d;
    --radius: 22px;
    --radius-sm: 12px;
    --display: "Commissioner", "Arial Narrow", Arial, sans-serif;
    --text: "Literata", Georgia, "Times New Roman", serif;
    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --line: 32px;
}

*,
*::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: clip;
}

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

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

a:hover {
    color: var(--night);
    text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
    font-family: var(--display);
    font-variation-settings: "FLAR" 70, "VOLM" 0;
    color: var(--night);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 6.6vw, 5.4rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 0.96;
}

h2 {
    font-size: clamp(1.9rem, 4.2vw, 3.2rem);
    font-weight: 850;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.015em;
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    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(--night);
    color: var(--on-night);
    border-radius: 10px;
    font-family: var(--display);
    font-weight: 700;
}

.skip:focus {
    top: 12px;
    color: var(--on-night);
}

/* ---- ruled paper: the exercise book ---- */

.ruled {
    --margin-x: calc(max(var(--gutter), (100% - var(--wrap)) / 2) - 14px);
    background-color: var(--paper);
    background-image:
        linear-gradient(to right, transparent var(--margin-x), color-mix(in srgb, var(--margin) 60%, transparent) var(--margin-x) calc(var(--margin-x) + 2px), transparent calc(var(--margin-x) + 2px)),
        repeating-linear-gradient(to bottom, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line));
}

/* the logo's own stripes, as a texture on night bands */
.striped {
    background-color: var(--night);
    background-image: repeating-linear-gradient(-62deg, transparent 0 22px, rgba(169, 171, 174, 0.07) 22px 30px);
}

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

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--rule);
}

.top-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px 24px;
    min-height: 72px;
}

.brand {
    display: block;
    line-height: 0;
    border-radius: 6px;
}

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

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 4px;
    font-family: var(--display);
    font-weight: 650;
    font-size: 0.98rem;
}

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

.nav a:hover {
    background: color-mix(in srgb, var(--amber) 45%, transparent);
    color: var(--night);
}

.nav a[aria-current="page"] {
    background: var(--night);
    color: var(--on-night);
}

.top-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--amber);
    color: var(--night);
    font-family: var(--display);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber-deep) 35%, transparent);
    transition: background 0.2s, transform 0.2s;
}

.call:hover {
    background: var(--amber-lit);
    color: var(--night);
    transform: translateY(-1px);
}

.lang {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.85rem;
}

.lang a,
.lang span {
    padding: 5px 9px;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.2;
}

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

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

.lang span {
    background: var(--blue);
    color: #fff;
}

.menu-button {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--night);
    border-radius: 999px;
    background: var(--sheet);
    color: var(--night);
    font: 700 0.95rem var(--display);
    cursor: pointer;
}

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

.menu-bars {
    position: relative;
}

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

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

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

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

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

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

@media (max-width: 1139px) {
    .top-row {
        grid-template-columns: auto 1fr;
    }

    .menu-button:not([hidden]) {
        display: inline-flex;
    }

    .top-tools {
        justify-self: end;
    }

    .nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .js-menu .nav {
        display: none;
    }

    .js-menu .nav.open {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 6px;
        padding: 6px 0 16px;
    }

    .js-menu .nav.open a {
        padding: 12px 14px;
        background: var(--sheet);
        border: 1px solid var(--rule);
        border-radius: var(--radius-sm);
        font-size: 1.05rem;
    }

    .js-menu .nav.open a[aria-current="page"] {
        background: var(--night);
        border-color: var(--night);
    }
}

@media (max-width: 640px) {
    .top {
        position: static;
    }

    .top-row {
        min-height: 64px;
        gap: 10px;
        padding-top: 10px;
    }

    .brand img {
        height: 34px;
    }

    .top-tools {
        display: contents;
    }

    .lang {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .menu-button {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .js-menu .lang {
        margin-right: 98px;
    }

    .call {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        font-size: 1.1rem;
    }

    .nav {
        grid-row: 3;
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: var(--night);
    font: 800 1.05rem/1.2 var(--display);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--amber-deep) 55%, transparent);
}

.btn:hover {
    background: var(--amber-lit);
    color: var(--night);
    transform: translateY(-2px);
}

.btn-ink {
    background: var(--night);
    color: var(--on-night);
    box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--blue) 60%, transparent);
}

.btn-ink:hover {
    background: var(--night-3);
    color: #fff;
}

.btn-line {
    background: transparent;
    color: var(--night);
    box-shadow: inset 0 0 0 2px var(--night);
}

.btn-line:hover {
    background: var(--sheet);
    color: var(--night);
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-weight: 800;
    color: var(--blue);
    text-decoration: none;
}

.arrow-link::after {
    content: "→";
    transition: transform 0.2s;
}

.arrow-link:hover::after {
    transform: translateX(4px);
}

/* the highlighter: an amber stroke drawn behind words */
.hl {
    background-image: linear-gradient(100deg, transparent 0.2em, var(--amber) 0.25em, var(--amber) calc(100% - 0.2em), transparent);
    background-repeat: no-repeat;
    background-size: 100% 0.42em;
    background-position: 0 88%;
    padding-inline: 0.06em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

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

.eyebrow::before {
    content: "";
    width: 26px;
    height: 12px;
    background: repeating-linear-gradient(-62deg, var(--grey) 0 2px, transparent 2px 5px);
}

.lead {
    font-size: clamp(1.12rem, 1.6vw, 1.3rem);
    line-height: 1.6;
    color: var(--ink);
    max-width: 60ch;
}

/* ---- the home hero ---- */

.hero {
    position: relative;
    padding: clamp(36px, 6vw, 84px) 0 clamp(48px, 7vw, 96px);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
}

.hero h1 {
    margin-bottom: 0.35em;
}

.hero .lead {
    margin-bottom: 28px;
}

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

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

.hero-facts li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    font-family: var(--display);
    font-weight: 650;
    font-size: 0.92rem;
    color: var(--night);
}

.hero-art {
    position: relative;
    margin: 0;
}

.hero-art figcaption {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

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

.key::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background: var(--chair);
}

.key-teacher::before {
    background: var(--blue);
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-art {
        max-width: 440px;
        justify-self: center;
        width: 100%;
    }
}

/* ---- the table (signature) ---- */

.table-art {
    display: block;
    width: 100%;
    overflow: visible;
}

.table-art .tbl-edge {
    fill: var(--wood-edge);
}

.table-art .tbl-top {
    fill: var(--wood);
}

.table-art .tbl-grain {
    fill: none;
    stroke: color-mix(in srgb, var(--wood-edge) 40%, transparent);
    stroke-width: 1.5;
}

.table-art .chair {
    fill: var(--chair);
}

.table-art .back {
    fill: #2c2c33;
}

.table-art .chair-blue {
    fill: var(--blue);
}

.table-art .back-blue {
    fill: var(--night);
}

.table-art .paper {
    fill: #fff;
}

.table-art .lines {
    fill: none;
    stroke: var(--rule-strong);
    stroke-width: 2;
}

.table-art .margin {
    stroke: var(--margin);
    stroke-width: 2;
}

.table-art .book-cover {
    fill: var(--blue);
}

.table-art .pot {
    fill: #6fb7bd;
}

.table-art .pot-in {
    fill: #2a5c63;
}

.table-art .num circle {
    fill: var(--amber);
}

.table-art .num text {
    fill: var(--night);
    font: 900 20px var(--display);
    text-anchor: middle;
}

.table-art .slide,
.table-art .item,
.table-art .num,
.table-art .tbl {
    transform-box: fill-box;
    transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
    .hero .table-art .tbl {
        animation: table-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .hero .table-art .slide {
        animation: chair-in 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
    }

    .hero .seat-teacher .slide {
        animation-delay: 0.45s;
    }

    .hero .seat-right .slide {
        animation-delay: 0.75s;
    }

    .hero .seat-mid .slide {
        animation-delay: 0.95s;
    }

    .hero .seat-left .slide {
        animation-delay: 1.15s;
    }

    .hero .table-art .item {
        animation: fade-in 0.6s ease-out both;
        animation-delay: 1.45s;
    }

    .hero .table-art .item-book {
        animation-delay: 0.7s;
    }

    .hero .table-art .num {
        animation: pop-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
    }

    .hero .table-art .num-right {
        animation-delay: 1.05s;
    }

    .hero .table-art .num-mid {
        animation-delay: 1.25s;
    }

    .hero .table-art .num-left {
        animation-delay: 1.45s;
    }

    .hero .hl {
        animation: highlight 0.9s 0.5s cubic-bezier(0.6, 0, 0.3, 1) both;
    }

    .hero-copy > * {
        animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .hero-copy > :nth-child(2) {
        animation-delay: 0.08s;
    }

    .hero-copy > :nth-child(3) {
        animation-delay: 0.16s;
    }

    .hero-copy > :nth-child(4) {
        animation-delay: 0.24s;
    }

    .hero-copy > :nth-child(5) {
        animation-delay: 0.32s;
    }
}

@keyframes table-in {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-12deg);
    }
}

@keyframes chair-in {
    from {
        opacity: 0;
        transform: translateY(70px);
    }
}

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

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.2);
    }
}

@keyframes highlight {
    from {
        background-size: 0 0.42em;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

/* ---- sections ---- */

.band {
    padding: clamp(56px, 8vw, 112px) 0;
}

.band-tight {
    padding: clamp(40px, 6vw, 72px) 0;
}

.band-sheet {
    background: var(--sheet);
    border-block: 1px solid var(--rule);
}

.band-mint {
    background: var(--mint);
}

.band-night {
    color: var(--on-night);
}

.band-night h2,
.band-night h3 {
    color: #fff;
}

.band-night a:not(.btn) {
    color: var(--amber);
}

.band-night a:not(.btn):hover {
    color: #fff;
}

.band-night .eyebrow {
    color: var(--amber);
}

.band-night .lead,
.band-night p {
    color: var(--on-night-soft);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 16px 48px;
    align-items: end;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head h2 {
    margin: 0;
}

.section-head p {
    margin: 0;
}

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

/* ---- credentials strip ---- */

.creds {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
}

.creds-doc {
    margin: 0;
    width: 150px;
}

.creds-doc a {
    display: block;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.creds-doc a:hover {
    transform: rotate(0) scale(1.04);
}

.creds-doc figcaption {
    margin-top: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--on-night-soft);
}

.cred {
    padding-left: 20px;
    border-left: 2px solid var(--night-3);
}

.cred strong {
    display: block;
    font-family: var(--display);
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: #fff;
    margin-bottom: 8px;
}

.cred p {
    margin: 0;
    font-size: 0.98rem;
}

@media (max-width: 860px) {
    .creds {
        grid-template-columns: 1fr;
    }

    .creds-doc {
        width: 140px;
    }
}

/* ---- the programmes: a numbered trail ---- */

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

.trail::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 30px;
    height: 3px;
    background: repeating-linear-gradient(to right, var(--blue) 0 14px, transparent 14px 22px);
    opacity: 0.45;
}

.trail li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.trail .num-badge {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--night);
    color: var(--amber);
    font: 900 1.4rem var(--display);
    box-shadow: 0 0 0 8px var(--paper);
}

.trail .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 22px;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.trail .card:hover {
    transform: translateY(-4px);
    border-color: var(--rule-strong);
    box-shadow: 0 22px 40px -28px rgba(16, 35, 58, 0.55);
}

.trail .tag {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mint);
    font: 750 0.85rem var(--display);
    color: var(--night);
}

.trail h3 {
    margin-bottom: 10px;
}

.trail p {
    flex: 1;
    font-size: 0.98rem;
    color: var(--ink-soft);
}

@media (max-width: 980px) {
    .trail {
        grid-template-columns: 1fr 1fr;
    }

    .trail::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .trail {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .trail li {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 14px;
    }

    .trail .num-badge {
        width: 52px;
        height: 52px;
        font-size: 1.15rem;
        margin: 0;
        box-shadow: none;
    }
}

/* ---- how we work: a bento grid ---- */

.bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, auto);
    gap: 16px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    border-radius: var(--radius);
    background: var(--sheet);
    border: 1px solid var(--rule);
    overflow: hidden;
}

.tile h3 {
    margin-bottom: 8px;
}

.tile p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.tile-big {
    grid-column: span 3;
    grid-row: span 2;
    background: var(--night);
    border-color: var(--night);
    color: var(--on-night);
}

.tile-big h3 {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.tile-big p {
    color: var(--on-night-soft);
    font-size: 1.05rem;
}

.tile-big .tile-figure {
    font: 900 clamp(7rem, 16vw, 12rem)/0.8 var(--display);
    letter-spacing: -0.06em;
    color: var(--amber);
    margin-bottom: auto;
    font-variation-settings: "FLAR" 100;
}

.tile-amber {
    grid-column: span 2;
    background: var(--amber);
    border-color: var(--amber);
}

.tile-amber p {
    color: var(--ink);
}

.tile-photo {
    grid-column: span 3;
    grid-row: span 2;
    padding: 0;
    border: 0;
    min-height: 300px;
}

.tile-photo a {
    position: absolute;
    inset: 0;
    display: block;
}

.tile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.tile-photo a:hover img {
    transform: scale(1.04);
}

.tile-mint {
    grid-column: span 2;
    background: var(--mint);
    border-color: var(--mint);
}

.tile-mint p {
    color: var(--ink);
}

.tile-plain {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .bento {
        grid-template-columns: 1fr 1fr;
    }

    .tile-big,
    .tile-photo {
        grid-column: 1 / -1;
    }

    .tile-amber {
        grid-column: 1 / -1;
    }

    .tile-big {
        grid-row: auto;
        min-height: 360px;
    }

    .tile-mint,
    .tile-plain {
        grid-column: span 1;
    }
}

@media (max-width: 560px) {
    .bento {
        grid-template-columns: 1fr;
    }

    .tile-mint,
    .tile-plain,
    .tile-amber {
        grid-column: 1 / -1;
    }
}

/* ---- prices: pick a group and the table changes ---- */

.pricing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
}

.plans {
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.plans legend {
    padding: 0;
    margin-bottom: 14px;
    font: 750 0.95rem var(--display);
    color: var(--ink-soft);
}

.plan {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    background: var(--sheet);
    border: 2px solid var(--rule);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.plan:hover {
    border-color: var(--rule-strong);
}

.plan input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--blue);
}

.plan-name {
    font: 750 1.1rem/1.25 var(--display);
    color: var(--night);
}

.plan-price {
    font: 900 clamp(1.4rem, 3vw, 1.9rem)/1 var(--display);
    color: var(--night);
    text-align: right;
    white-space: nowrap;
}

.plan-price small {
    display: block;
    margin-top: 4px;
    font: 600 0.85rem var(--text);
    color: var(--ink-soft);
}

.plan:has(input:checked) {
    border-color: var(--night);
    background: var(--amber-lit);
}

.plan:has(input:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.h-md {
    font-size: clamp(1.5rem, 2.6vw, 2.05rem);
}

.band-gap {
    margin-top: 1.6em;
}

.price-notes {
    margin: 0;
    padding-left: 1.1em;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.price-notes li {
    margin-bottom: 6px;
}

.pricing .table-art .slide,
.pricing .table-art .item,
.pricing .table-art .num {
    transition: opacity 0.4s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pricing:has(input[value="2"]:checked) .seat-mid .slide,
.pricing:has(input[value="1"]:checked) :is(.seat-left .slide, .seat-right .slide) {
    opacity: 0;
    transform: translateY(60px);
}

/* the seat numbers count three seats: they go when there are fewer */
.pricing:has(input[value="2"]:checked) :is(.sheet-mid, .num),
.pricing:has(input[value="1"]:checked) :is(.sheet-left, .sheet-right, .num) {
    opacity: 0;
    transform: scale(0.6);
}

.pricing-art {
    margin: 0;
}

.pricing-art figcaption {
    margin-top: 8px;
    text-align: center;
    font: 700 0.95rem var(--display);
    color: var(--ink-soft);
}

@media (max-width: 860px) {
    .pricing {
        grid-template-columns: 1fr;
    }

    .pricing-art {
        max-width: 280px;
        justify-self: center;
        width: 100%;
        order: -1;
    }
}

/* ---- the school in figures ---- */

.figures {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 clamp(28px, 4vw, 48px);
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--night);
}

.figures li {
    padding: 22px 18px 6px 0;
    border-right: 1px solid var(--rule-strong);
    margin-right: 18px;
}

.figures li:last-child {
    border-right: 0;
}

.figures strong {
    display: block;
    font: 900 clamp(2.6rem, 6vw, 4.6rem)/0.9 var(--display);
    letter-spacing: -0.05em;
    color: var(--blue);
    font-variation-settings: "FLAR" 100;
}

.figures span {
    display: block;
    margin-top: 10px;
    font: 700 1rem/1.3 var(--display);
    color: var(--night);
}

@media (max-width: 860px) {
    .figures {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .figures li {
        border-right: 0;
        border-bottom: 1px solid var(--rule-strong);
        padding-bottom: 18px;
    }

    .figures li:first-child {
        grid-column: 1 / -1;
    }
}

.figures-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.figures-3 strong {
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
}

@media (max-width: 860px) {
    .figures-3 {
        grid-template-columns: 1fr;
    }

    .figures-3 li:first-child {
        grid-column: auto;
    }
}

/* ---- a sideways strip of photos ---- */

.strip {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 4px var(--gutter) 18px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--blue) transparent;
}

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

.strip a {
    display: block;
    line-height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.strip img {
    height: clamp(220px, 34vw, 340px);
    width: auto;
    transition: transform 0.5s;
}

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

/* ---- steps: how to start ---- */

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

.steps li {
    counter-increment: s;
    position: relative;
    padding: 76px 24px 24px;
    background: var(--night-2);
    border-radius: var(--radius);
    border: 1px solid var(--night-3);
}

.steps li::before {
    content: counter(s, decimal-leading-zero);
    position: absolute;
    top: 18px;
    left: 24px;
    font: 900 2.6rem/1 var(--display);
    color: var(--amber);
    letter-spacing: -0.04em;
}

.steps h3 {
    color: #fff;
}

.steps p {
    margin: 0;
    font-size: 0.98rem;
}

@media (max-width: 820px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

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

.callband {
    background: var(--amber);
    padding: clamp(44px, 6vw, 80px) 0;
    background-image: repeating-linear-gradient(-62deg, transparent 0 26px, rgba(184, 106, 29, 0.09) 26px 34px);
}

.callband-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px 48px;
    align-items: center;
}

.callband h2 {
    margin-bottom: 0.3em;
}

.callband p {
    margin: 0;
    color: var(--ink);
}

.big-phone {
    display: inline-block;
    font: 900 clamp(2.2rem, 6vw, 3.8rem)/1 var(--display);
    letter-spacing: -0.03em;
    color: var(--night);
    text-decoration: none;
    font-variation-settings: "FLAR" 100;
    white-space: nowrap;
}

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

.callband-phones p {
    margin: 0 0 10px;
}

.callband-phones .small-phone {
    font: 800 1.3rem var(--display);
    color: var(--night);
}

@media (max-width: 820px) {
    .callband-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- inner pages ---- */

.page-hero {
    padding: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 64px);
    border-bottom: 1px solid var(--rule);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 56px;
    align-items: end;
}

.page-hero .label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--sheet);
    border: 2px solid var(--night);
    font: 800 0.95rem var(--display);
    color: var(--night);
    transform: rotate(-1.5deg);
}

.page-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.page-hero .lead {
    margin: 0;
}

.page-hero-figure {
    font: 900 clamp(5rem, 13vw, 10rem)/0.8 var(--display);
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 2px var(--blue);
    font-variation-settings: "FLAR" 100;
    white-space: nowrap;
    user-select: none;
}

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

    .page-hero-figure {
        display: none;
    }
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
}

@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
    }
}

.prose {
    max-width: 68ch;
}

.prose h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-top: 1.4em;
}

.prose h2:first-child,
.prose .eyebrow + h2 {
    margin-top: 0;
}

.prose h3 {
    margin-top: 1.5em;
}

.prose ul,
.prose ol {
    padding-left: 1.2em;
    margin: 0 0 1.2em;
}

.prose li {
    margin-bottom: 0.4em;
}

.prose li::marker {
    color: var(--blue);
}

.aside-stack {
    display: grid;
    gap: 16px;
}

@media (min-width: 901px) {
    .aside-stack {
        position: sticky;
        top: 104px;
    }
}

.note-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--sheet);
    border: 1px solid var(--rule);
}

.note-card h2,
.note-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.note-card p:last-child,
.note-card ul:last-child {
    margin-bottom: 0;
}

.note-card ul {
    padding-left: 1.1em;
}

.note-card-amber {
    background: var(--amber);
    border-color: var(--amber);
}

.note-card-night {
    background: var(--night);
    border-color: var(--night);
    color: var(--on-night-soft);
}

.note-card-night h2,
.note-card-night h3 {
    color: #fff;
}

.note-card-night a:not(.btn) {
    color: var(--amber);
}

.note-card-mint {
    background: var(--mint);
    border-color: var(--mint);
}

.callout {
    margin: 1.6em 0;
    padding: 18px 22px;
    border-left: 6px solid var(--amber-deep);
    background: var(--amber-lit);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

.pull {
    margin: 0 0 1.4em;
    font: italic 500 clamp(1.25rem, 2.2vw, 1.55rem)/1.45 var(--text);
    color: var(--night);
}

/* a lesson, as a numbered list with large numbers */
.lesson {
    display: grid;
    gap: 12px;
    margin: 0 0 1.4em;
    padding: 0;
    list-style: none;
    counter-reset: l;
}

.lesson li {
    counter-increment: l;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
}

.lesson li::before {
    content: counter(l);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--mint);
    font: 900 1.2rem var(--display);
    color: var(--night);
}

.lesson strong {
    display: block;
    font-family: var(--display);
    font-weight: 800;
    color: var(--night);
}

/* SAT format: a table that stays readable on a phone */
.facts-table {
    width: 100%;
    margin: 0 0 1.4em;
    border-collapse: collapse;
    font-size: 0.98rem;
}

.facts-table th,
.facts-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule-strong);
}

.facts-table thead th {
    font-family: var(--display);
    font-weight: 800;
    color: #fff;
    background: var(--night);
}

.facts-table tbody th {
    font-family: var(--display);
    font-weight: 750;
    color: var(--night);
    width: 42%;
}

@media (max-width: 520px) {
    .facts-table thead {
        display: none;
    }

    .facts-table tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--rule-strong);
    }

    .facts-table th,
    .facts-table td {
        display: block;
        width: auto;
        padding: 2px 0;
        border: 0;
    }
}

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

.chips li {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--night);
    color: var(--on-night);
    font: 750 0.95rem var(--display);
}

.divider {
    height: 14px;
    margin: 2.4em 0;
    border: 0;
    background: repeating-linear-gradient(-62deg, var(--grey) 0 2px, transparent 2px 7px);
    opacity: 0.6;
}

/* ---- documents ---- */

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

.doc {
    margin: 0;
    padding: 14px;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.doc a {
    display: block;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rule);
}

.doc img {
    width: 100%;
    transition: transform 0.4s;
}

.doc a:hover img {
    transform: scale(1.03);
}

.doc figcaption {
    padding: 14px 4px 2px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.doc figcaption strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--display);
    font-weight: 800;
    color: var(--night);
}

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

.gallery {
    columns: 3 260px;
    column-gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery li {
    break-inside: avoid;
    margin-bottom: 14px;
}

.gallery a {
    display: block;
    line-height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gallery img {
    width: 100%;
    transition: transform 0.5s;
}

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

/* ---- prices page ---- */

.price-sheet {
    margin: 0 0 1.6em;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--night);
}

.price-sheet li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 24px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule-strong);
}

.price-sheet .what {
    font: 750 1.15rem/1.3 var(--display);
    color: var(--night);
}

.price-sheet .how-much {
    font: 900 clamp(1.4rem, 3vw, 2rem)/1 var(--display);
    color: var(--blue);
    white-space: nowrap;
    text-align: right;
}

.price-sheet .how-much small {
    font: 600 0.95rem var(--text);
    color: var(--ink-soft);
}

@media (max-width: 480px) {
    .price-sheet li {
        grid-template-columns: 1fr;
    }

    .price-sheet .how-much {
        text-align: left;
    }
}

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

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

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

.contact-list dt {
    font: 750 0.85rem var(--display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

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

.contact-list .phone-line {
    font: 900 clamp(1.6rem, 4vw, 2.2rem)/1.1 var(--display);
    letter-spacing: -0.02em;
}

.contact-list .phone-line a {
    color: var(--night);
    text-decoration: none;
}

.contact-list .phone-line a:hover {
    color: var(--blue);
}

/* contact form */

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

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font: 750 0.98rem var(--display);
    color: var(--night);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    background: var(--sheet);
    color: var(--ink);
    font: 1rem/1.5 var(--text);
}

.contact-form textarea {
    background-image: repeating-linear-gradient(to bottom, transparent 0 23px, var(--rule) 23px 24px);
    background-attachment: local;
    line-height: 24px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--blue);
    outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
    outline-offset: 0;
}

.contact-form ul {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    color: #9b2b1f;
    font-size: 0.95rem;
}

.contact-form .btn {
    justify-self: start;
}

.form-hint {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.contact-sent {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--mint);
    color: var(--night);
}

.contact-sent strong {
    display: block;
    font-family: var(--display);
}

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

.foot {
    color: var(--on-night-soft);
    padding-top: clamp(48px, 6vw, 80px);
    font-size: 0.98rem;
}

.foot a {
    color: var(--on-night);
}

.foot a:hover {
    color: var(--amber);
}

.foot h2 {
    margin-bottom: 14px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
}

.foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
}

.foot-logo {
    width: 170px;
    margin-bottom: 18px;
}

.foot-name {
    font-family: var(--display);
    font-weight: 750;
    color: var(--on-night);
    margin-bottom: 8px;
}

.foot address {
    font-style: normal;
}

.foot-note {
    display: block;
    margin: 6px 0 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.foot-phones span {
    display: inline-block;
    min-width: 5.5em;
    font-size: 0.88rem;
}

.foot-phone {
    font: 800 1.1rem var(--display);
    text-decoration: none;
}

.foot-cert {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0 0 16px;
}

.foot-cert a {
    display: block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
}

.foot-cert figcaption {
    font-size: 0.88rem;
    line-height: 1.45;
}

.foot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.foot-badges img {
    height: 52px;
    width: auto;
    padding: 6px 8px;
    background: #fff;
    border-radius: 8px;
}

.foot-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--night-3);
    font-family: var(--display);
    font-weight: 700;
}

.foot-nav a {
    text-decoration: none;
}

.foot-bottom {
    padding: 18px 0 28px;
    font-size: 0.9rem;
}

.foot-bottom p {
    margin: 0;
}

@media (max-width: 1000px) {
    .foot-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .foot-grid {
        grid-template-columns: 1fr;
    }
}

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

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px var(--gutter);
}

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

.not-found img {
    width: 200px;
    margin-bottom: 28px;
}

.not-found h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.not-found h2 {
    font-size: 1.6rem;
    margin-top: 1.6em;
}

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

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }

        .figures strong {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 90%;
        }
    }
}

@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;
    }
}

.lightbox {
    --lb-bg: rgba(10, 22, 37, 0.94);
    --lb-text: #f3f0e8;
    --lb-accent: #fecf76;
    --lb-accent-soft: rgba(254, 207, 118, 0.18);
}
