/*
 * Burnin marketing and legal site.
 *
 * One stylesheet for every page, in both languages. The colour and radius
 * tokens below are the site's own values, kept as CSS custom properties so
 * both themes and every page share one definition. If a real Burnin app
 * design-token spec is introduced later, this file is the place to point at
 * it.
 *
 * Two names are the site's own and are marked where they appear. There is no
 * app-side "sunken section" role behind this, and no hairline token from
 * anywhere else: both exist only for this site's long scrolling pages and its
 * wide tables.
 *
 * Themeing: :root holds the light palette, [data-theme="dark"] overrides it.
 * The attribute is written before first paint by the inline script in each
 * page's head, so there is no flash of the wrong theme.
 */

/* ---------------------------------------------------------------- tokens */

:root {
    color-scheme: light;

    /* Four accent tones reused across the site: aspect-ratio cards, the export
       comparison bars, and callout accents. Light variants. */
    --lts-1: #2fbf6b;
    --lts-2: #d9a521;
    --lts-3: #de7a24;
    --lts-4: #d23a2f;

    /* Primary accent, and the ink colour that sits on top of it. `--accent-line`
       is the same accent, used for the two places it is drawn as a line under
       text rather than as a fill. This is the app icon's own orange
       (Burnin/Assets.xcassets/AppIcon.appiconset/Burnin.png), not an invented
       site colour. */
    --accent: #ff8a1f;
    --accent-ink: #ffffff;
    --accent-line: #ff8a1f;
    --track: #8b3d5c;

    /* canvas, surface, and a step between them that is the site's own. */
    --bg: #f6f5f2;
    --bg-elevated: #ffffff;
    --bg-sunken: #efede7;
    /* hairline, and a stronger version of it that is the site's own. */
    --surface-line: rgba(0, 0, 0, 0.10);
    --surface-line-strong: rgba(0, 0, 0, 0.18);

    /* textPrimary, textSecondary, textTertiary. */
    --ink: #111214;
    --ink-soft: #5e6167;
    --ink-muted: #7c7f86;

    /* Depth is carried by hairlines and space, not by shadow. The two that
       remain are for things that genuinely float: the header's dropdown and
       the language pill's selected half. */
    --shadow-sm: 0 1px 2px rgba(15, 21, 18, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 21, 18, 0.07);

    /* radius.field, radius.control, radius.card. */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --measure: 68ch;
    --page: 1060px;
    --gutter: 24px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    color-scheme: dark;

    /* Dark variants of the same four tones, lightened rather than darkened, so
       none of them go dim and unreadable against a near-black background. */
    --lts-1: #3ad07a;
    --lts-2: #f5c63a;
    --lts-3: #f7913c;
    --lts-4: #f05a4e;

    /* Text on the accent stays white in both appearances, so --accent-ink does
       not flip here. The accent itself is the same app-icon orange as light
       mode; it already reads clearly against a near-black background, so
       `--accent-line` does not need lightening the way the old blue did. */
    --accent: #ff8a1f;
    --accent-line: #ff8a1f;
    --track: #ba6e8c;

    /* canvas, then the site's own step, then surfaceElevated: a card on this
       page is as often over a sunken band as over the canvas, so the lighter
       sheet colour is the one that stays a card in both. */
    --bg: #0b0c0e;
    --bg-elevated: #1c1f24;
    --bg-sunken: #121419;
    --surface-line: rgba(255, 255, 255, 0.12);
    --surface-line-strong: rgba(255, 255, 255, 0.24);

    --ink: #ffffff;
    --ink-soft: rgba(255, 255, 255, 0.72);
    --ink-muted: rgba(255, 255, 255, 0.55);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* ---------------------------------------------------------------- reset */

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

/* The `.button` rule below sets its own `display`, which an author stylesheet
   always wins against the UA default for `[hidden]` even at equal specificity.
   Without this, a `hidden` App Store button would sit in the layout instead of
   disappearing, since `.button { display: inline-flex }` would win. */
[hidden] {
    display: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--ink);
    text-underline-offset: 3px;
    text-decoration-color: var(--surface-line-strong);
}

a:hover {
    text-decoration-color: currentColor;
}

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

h1,
h2,
h3,
h4 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    font-weight: 600;
}

/* Headings break where the sentence wants to break rather than where the box
   ends. Ignored by browsers that do not know it, which costs nothing. */
h1,
h2,
h3 {
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem);
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.15rem);
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.12rem;
    letter-spacing: -0.015em;
}

p {
    margin: 0 0 1em;
}

ul,
ol {
    padding-inline-start: 1.25em;
}

li {
    margin-bottom: 0.4em;
}

code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--bg-sunken);
    border: 1px solid var(--surface-line);
    border-radius: 6px;
    padding: 0.1em 0.4em;
}

hr {
    border: 0;
    border-top: 1px solid var(--surface-line);
    margin: 48px 0;
}

/* ---------------------------------------------------------------- layout */

.wrap {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(64px, 9vw, 128px);
}

.section--tight {
    padding-block: clamp(48px, 6vw, 76px);
}

.section--sunken {
    background: var(--bg-sunken);
    border-block: 1px solid var(--surface-line);
}

.stack > * + * {
    margin-top: 16px;
}

.prose {
    max-width: var(--measure);
}

.prose h2 {
    margin-top: 2em;
    scroll-margin-top: 96px;
}

.prose h3 {
    margin-top: 1.8em;
    scroll-margin-top: 96px;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 18px;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 100;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--surface-line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 62px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-size: 1.06rem;
    text-decoration: none;
    margin-inline-end: auto;
}

/* The app icon itself, not a redrawing of it. Its own corner radius is baked
   into the file at the icon's proportions, so scaling it needs no override. */
.brand__mark {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 6.5px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.94rem;
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    background: var(--bg-sunken);
    color: var(--ink);
}

.site-nav a[aria-current="page"] {
    color: var(--ink);
    background: var(--bg-sunken);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    display: inline-flex;
    background: var(--bg-sunken);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-pill);
    padding: 2px;
}

.lang-switch a {
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-muted);
    text-decoration: none;
}

.lang-switch a[aria-current="true"] {
    background: var(--bg-elevated);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--surface-line);
    background: var(--bg-sunken);
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
}

.icon-button:hover {
    color: var(--ink);
    border-color: var(--surface-line-strong);
}

.icon-button svg {
    width: 17px;
    height: 17px;
}

[data-theme="dark"] .theme-toggle__sun,
.theme-toggle__moon {
    display: none;
}

[data-theme="dark"] .theme-toggle__moon {
    display: block;
}

.nav-toggle {
    display: none;
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-grid;
    }

    .site-nav {
        display: none;
        position: absolute;
        inset-inline: var(--gutter);
        top: calc(100% + 8px);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px;
        background: var(--bg-elevated);
        border: 1px solid var(--surface-line);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }

    .site-nav[data-open="true"] {
        display: flex;
    }

    .site-nav a {
        padding: 11px 14px;
    }
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease;
}

.button:active {
    transform: translateY(1px);
}

.button--primary {
    background: var(--ink);
    color: var(--bg);
}

.button--primary:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.button--ghost {
    background: transparent;
    border-color: var(--surface-line-strong);
    color: var(--ink);
}

.button--ghost:hover {
    background: var(--bg-sunken);
}

.button[aria-disabled="true"] {
    cursor: default;
    opacity: 0.72;
}

.button[aria-disabled="true"]:hover {
    background: var(--ink);
    color: var(--bg);
}

.button svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .button-row {
    justify-content: center;
}

/* ---------------------------------------------------------------- hero */

.hero {
    padding-block: clamp(48px, 9vw, 108px) clamp(32px, 5vw, 64px);
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 18px;
}

.hero p.lede {
    max-width: 56ch;
    margin-inline: auto;
    font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.24rem);
    color: var(--ink-soft);
}

.hero__note {
    margin-top: 18px;
    font-size: 0.86rem;
    color: var(--ink-muted);
}

.hero__art {
    margin-top: clamp(32px, 5vw, 56px);
}

/* ---------------------------------------------------------------- scale */

.scale {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 720px) {
    .scale {
        grid-template-columns: repeat(2, 1fr);
    }
}

.scale__item {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    padding: 20px;
}

.scale__swatch {
    height: 4px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
}

.scale__level {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.scale__name {
    font-size: 1.14rem;
    font-weight: 640;
    margin: 2px 0 6px;
    letter-spacing: -0.02em;
}

.scale__desc {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin: 0;
}

.lts-1 .scale__swatch,
.swatch--1 {
    background: var(--lts-1);
}

.lts-2 .scale__swatch,
.swatch--2 {
    background: var(--lts-2);
}

.lts-3 .scale__swatch,
.swatch--3 {
    background: var(--lts-3);
}

.lts-4 .scale__swatch,
.swatch--4 {
    background: var(--lts-4);
}

/* ---------------------------------------------------------------- cards */

.section-head {
    max-width: 62ch;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head p {
    color: var(--ink-soft);
    margin-bottom: 0;
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-lg);
    padding: 26px;
}

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

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

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

/* A grid of plain text blocks separated by hairlines. Used where the boxes
   were only holding the words apart, which space and a rule do better. */
.plain-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    border-top: 1px solid var(--surface-line);
}

.plain-grid > article {
    padding: 28px 28px 28px 0;
    border-bottom: 1px solid var(--surface-line);
}

.plain-grid > article h3 {
    margin-bottom: 8px;
}

.plain-grid > article p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin-bottom: 0;
    max-width: 44ch;
}

/* ---------------------------------------------------------------- resolutions */

.resolutions {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resolution-card {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.resolution-card__name {
    font-weight: 640;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.resolution-card__sub {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-bottom: 16px;
}

.resolution-card__stats {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}

.stat__value {
    font-size: 1.3rem;
    font-weight: 640;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat__label {
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.bar {
    display: flex;
    height: 8px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: var(--bg-sunken);
}

.bar span {
    display: block;
    height: 100%;
}

.bar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.bar__legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-inline-end: 5px;
}

/* ---------------------------------------------------------------- tables */

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.92rem;
    min-width: 520px;
}

th,
td {
    text-align: start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-line);
    vertical-align: top;
}

thead th {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: var(--bg-sunken);
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------------------------------------------------------------- faq */

.faq {
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    overflow: hidden;
}

.faq details {
    border-bottom: 1px solid var(--surface-line);
}

.faq details:last-child {
    border-bottom: 0;
}

.faq summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    transition: background-color 0.16s ease;
}

.faq summary:hover {
    background: var(--bg-sunken);
}

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

/* A chevron drawn from two borders, so it can rotate rather than be swapped
   for a different character. Swapping glyphs is what made it look like a
   text field's spinner. */
.faq summary::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-right: 1.6px solid var(--ink-muted);
    border-bottom: 1.6px solid var(--ink-muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.faq details[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
    border-color: var(--accent);
}

.faq details > div {
    padding: 0 22px 20px;
    color: var(--ink-soft);
    max-width: var(--measure);
}

.faq details > div p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------- callout */

.callout {
    border: 1px solid var(--surface-line);
    border-inline-start: 3px solid var(--accent);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 24px 0;
}

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

.callout--warn {
    border-inline-start-color: var(--lts-4);
}

.callout--calm {
    border-inline-start-color: var(--lts-1);
}

.callout__title {
    font-weight: 640;
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------- misc */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg-sunken);
    border: 1px solid var(--surface-line);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lts-1);
    display: inline-block;
}

.meta {
    font-size: 0.86rem;
    color: var(--ink-muted);
}

.toc {
    background: var(--bg-sunken);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 44px;
}

.toc ol {
    margin: 0;
    columns: 2;
    column-gap: 36px;
    font-size: 0.93rem;
}

.toc li {
    margin-bottom: 6px;
    break-inside: avoid;
}

.toc li::marker {
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}

.toc a {
    color: var(--ink-soft);
    text-decoration: none;
}

.toc a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
}

@media (max-width: 620px) {
    .toc ol {
        columns: 1;
    }
}

.page-head {
    padding-block: clamp(44px, 6vw, 76px) clamp(20px, 3vw, 32px);
    border-bottom: 1px solid var(--surface-line);
}

.page-head p {
    color: var(--ink-soft);
    max-width: 58ch;
    margin-bottom: 0;
}

/* The address is the point of this block, so it is set like a destination
   rather than like a form field: a micro-label above, the address at reading
   size below, and an envelope drawn in the accent to the left of both. The
   glyph is a mask rather than an <img> so it takes the theme's accent colour
   and needs no markup of its own. */
.contact-block {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 4px;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    padding: 20px 28px 20px 24px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.contact-block::before {
    content: "";
    grid-row: 1 / span 2;
    width: 26px;
    height: 26px;
    background: var(--accent);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="5" width="19" height="14" rx="3"/><path d="M3.5 7.5 12 13l8.5-5.5"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="5" width="19" height="14" rx="3"/><path d="M3.5 7.5 12 13l8.5-5.5"/></svg>') center / contain no-repeat;
}

.contact-block:hover {
    border-color: var(--surface-line-strong);
    transform: translateY(-1px);
}

.contact-block .meta {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-block a {
    font-size: 1.12rem;
    font-weight: 550;
    letter-spacing: -0.01em;
    text-decoration: none;
    /* An underline that is drawn rather than inherited: it starts under the
       first character and runs to the end on hover, the same left to right
       reading the rest of the page asks for. */
    background-image: linear-gradient(var(--accent-line), var(--accent-line));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1.5px;
    transition: background-size 0.28s ease;
    padding-bottom: 2px;
}

.contact-block:hover a,
.contact-block a:focus-visible {
    background-size: 100% 1.5px;
}

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

.site-footer {
    border-top: 1px solid var(--surface-line);
    background: var(--bg-sunken);
    padding-block: 48px 36px;
    margin-top: 24px;
}

.footer-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1.4fr repeat(3, 1fr);
}

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

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

.footer-grid h4 {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 12px;
    font-weight: 700;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid li {
    margin-bottom: 8px;
}

.footer-grid a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.94rem;
}

.footer-grid a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--surface-line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.footer-note {
    max-width: 34ch;
    font-size: 0.92rem;
    color: var(--ink-muted);
}

/* ------------------------------------------------------- motion

   Everything below is decoration and every piece of it is optional: the
   elements it animates are readable before it runs and readable if it never
   runs. It is all switched off under prefers-reduced-motion at the end.

   The one idea it keeps returning to is the caption timeline, because that is
   what the app draws: progress through the page is a line that fills, and the
   hero timeline draws itself the way captions appear as playback runs. */

/* How far through the page you are, left to right. Created by script, so a
   page with no JavaScript simply has no bar. */
.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 60;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--lts-1), var(--lts-2) 55%, var(--lts-3) 82%, var(--lts-4));
    pointer-events: none;
    will-change: transform;
}

/* The header keeps its hairline while the page is at the top and gains a
   little depth once content is passing underneath it. */
.site-header {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header[data-scrolled="true"] {
    border-bottom-color: transparent;
    box-shadow: var(--shadow-md);
}

/* Sections arrive rather than appear. Applied by script only to elements that
   start below the fold, so nothing on screen can be caught mid-fade. */
/* The transition sits on the revealed state, not on the hidden one. The class
   is added by script after the first paint, and a transition on `.reveal`
   would animate that too: the element would fade out over half a second and
   then fade back in. Hiding is instant, arriving is animated. */
.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* A comparison bar reads as a measurement being taken, filling from the start
   to the end. */
.reveal-bar {
    clip-path: inset(0 100% 0 0);
}

.reveal-bar.is-in {
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* The hero timeline fills in once, left to right: the five caption blocks and
   the speaker-change divider each appear in the order captions would
   actually play. */
.hero__art .timeline-draw > * {
    opacity: 0;
    transform: translateY(4px);
    animation: reveal-timeline 0.35s ease forwards;
}

.hero__art .timeline-draw > *:nth-child(1) {
    animation-delay: 0.15s;
}

.hero__art .timeline-draw > *:nth-child(2) {
    animation-delay: 0.5s;
}

.hero__art .timeline-draw > *:nth-child(3) {
    animation-delay: 0.8s;
}

.hero__art .timeline-draw > *:nth-child(4) {
    animation-delay: 1.05s;
}

.hero__art .timeline-draw > *:nth-child(5) {
    animation-delay: 1.35s;
}

.hero__art .timeline-draw > *:nth-child(6) {
    animation-delay: 1.6s;
}

@keyframes reveal-timeline {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* The card that names the drawn element waits for it to exist. */
.hero__art .timeline-label {
    opacity: 0;
    animation: fade-in 0.5s ease 2.2s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-bar {
        opacity: 1;
        transform: none;
        clip-path: none;
        transition: none;
    }

    .hero__art .timeline-draw > *,
    .hero__art .timeline-label {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .scroll-progress {
        display: none;
    }
}
