/* Fastest Lap — landing page
 *
 * The palette and the materials are the app's own (Palette in
 * apple/Sources/App/FastestLapApp.swift). The page is the menus continued onto
 * the web: carbon panels on a lit-to-deep ground, one accent teal used with
 * discipline, and the broadcast timing colours where a number needs a state.
 * If a tone here disagrees with the app, the app is right.
 */

:root {
    /* Ground — lit at the top of a screen, falling away at its foot. */
    --ground: #131923;
    --ground-lit: #1a2330;
    --ground-deep: #0d1219;
    /* Panels sit a fixed step above the ground. That gap is the only reason a
       card reads as a card, so the two move together or not at all. */
    --panel: #212d3d;
    --panel-raised: #2a3644;
    --carbon: #0b0e12;

    --ink: #f2f5f9;
    --muted: #8b939f;
    --hairline: rgba(242, 245, 249, 0.09);
    --hairline-strong: rgba(242, 245, 249, 0.16);

    --teal: #0ed3c0;
    --teal-dim: rgba(14, 211, 192, 0.14);
    --green: #00d46b;
    --amber: #ffc72c;
    --danger: #f24540;

    --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --page: 1180px;
    --gutter: 24px;
    --radius: 16px;

    color-scheme: dark;
}

/* Two voices, both one family: compressed heavy caps for words, condensed for
   small tracked labels. Same split as Typeface.swift. */
.display {
    font-family: var(--display);
    font-variation-settings: "wdth" 74, "wght" 850;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    line-height: 0.92;
}

.label {
    font-family: var(--display);
    font-variation-settings: "wdth" 86, "wght" 620;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.6875rem;
    color: var(--muted);
}

/* Every number is monospaced with tabular figures: a running clock must not
   reflow as it counts, and a column of times aligns on the decimal. */
.num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@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(--ground);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    /* The width/height attributes are on every <img> so the box is reserved
       before the bytes arrive; without `height: auto` those same attributes
       hold the height fixed while max-width shrinks the width, and every
       screenshot renders stretched. */
    height: auto;
    display: block;
}

a {
    color: inherit;
}

::selection {
    background: var(--teal);
    color: var(--carbon);
}

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

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--teal);
    color: var(--carbon);
    padding: 10px 16px;
    font-weight: 700;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* ── Page ground ─────────────────────────────────────────────────────────── */

.app-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% -10%, var(--ground-lit) 0%, var(--ground) 45%, var(--ground-deep) 100%);
}

/* The twill the app's panels are cut from — a 45° weave at the threshold of
   visible. Flat-shaded, no gradients: the "light" is entirely contrast. */
.app-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg,
            rgba(242, 245, 249, 0.016) 0 2px,
            transparent 2px 5px);
}

/* One teal wash behind the hero, the way a lit pit lane throws colour up. */
.app-background::after {
    content: "";
    position: absolute;
    top: -14vh;
    left: 50%;
    width: min(1100px, 130vw);
    height: 620px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(14, 211, 192, 0.13), transparent 72%);
    filter: blur(12px);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */

.navigation {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    background: rgba(11, 14, 18, 0.72);
    border-bottom: 1px solid var(--hairline);
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    margin-right: auto;
}

.app-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
}

.brand-text {
    font-family: var(--display);
    font-variation-settings: "wdth" 78, "wght" 820;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 1.0625rem;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--teal);
    background: var(--teal-dim);
    color: var(--teal);
    font-family: var(--display);
    font-variation-settings: "wdth" 86, "wght" 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-cta:hover {
    background: var(--teal);
    color: var(--carbon);
}

@media (max-width: 560px) {
    .nav-cta {
        display: none;
    }
}

/* ── Language switcher ───────────────────────────────────────────────────── */

.language-switcher {
    position: relative;
}

.language-switcher-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: var(--panel);
    color: var(--muted);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.language-switcher-button:hover {
    border-color: var(--hairline-strong);
    color: var(--ink);
}

.language-switcher-button.loading {
    opacity: 0.6;
    cursor: progress;
}

.language-icon {
    width: 15px;
    height: 15px;
    flex: none;
}

.dropdown-icon {
    width: 13px;
    height: 13px;
    flex: none;
    transition: transform 0.18s ease;
}

.language-switcher-button[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--hairline-strong);
    background: var(--carbon);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
    display: none;
}

.language-dropdown.open {
    display: block;
}

.language-option {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.language-option:hover {
    background: var(--panel);
}

.language-option.active {
    color: var(--teal);
}

.language-native {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.8125rem;
}

/* RTL: the switcher and the page flip together. */
[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .nav-brand {
    margin-right: 0;
    margin-left: auto;
}

/* ── Section furniture ───────────────────────────────────────────────────── */

section {
    position: relative;
    padding: 92px 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 44px;
}

/* The teal rule above a heading — the app's own section marker. */
.rule {
    display: block;
    width: 62px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--teal), rgba(14, 211, 192, 0));
    margin-bottom: 18px;
}

h1,
h2,
h3 {
    margin: 0;
}

.section-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 74, "wght" 850;
    text-transform: uppercase;
    line-height: 0.94;
    letter-spacing: 0.004em;
    font-size: clamp(2rem, 5.2vw, 3.1rem);
}

.section-title em,
.price-title em,
.feature-title em,
.hero-title em {
    font-style: normal;
    color: var(--teal);
}

.section-sub {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.0625rem;
    max-width: 56ch;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero-section {
    padding: clamp(48px, 8vw, 88px) 0 76px;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.hero-eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(14, 211, 192, 0.16);
}

.hero-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 72, "wght" 880;
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: 0.002em;
    font-size: clamp(2.4rem, 6.2vw, 3.9rem);
    margin: 0;
}

.title-teal {
    color: var(--teal);
}

.hero-subtitle {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.125rem;
    max-width: 46ch;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--hairline);
}

.stat-item {
    flex: 1 1 108px;
}

.stat-value {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
}

.stat-label {
    font-family: var(--display);
    font-variation-settings: "wdth" 86, "wght" 620;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: 5px;
}

/* ── Phone panels ────────────────────────────────────────────────────────── */

/* A screenshot is 1320×2868 — the phone it was taken on. The frame is drawn
   rather than imaged: a rounded bezel and one hairline, nothing that pretends
   to be hardware. */
.phone {
    position: relative;
    border-radius: 30px;
    padding: 6px;
    background: linear-gradient(160deg, #39485a, #171f2a 42%, #0d1219);
    box-shadow:
        0 34px 70px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(242, 245, 249, 0.07);
}

.phone img {
    display: block;
    width: 100%;
    border-radius: 25px;
    background: var(--carbon);
}

.hero-phones {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    min-height: clamp(400px, 58vw, 620px);
}

.hero-phones .phone {
    position: absolute;
    width: clamp(168px, 23vw, 244px);
    transition: transform 0.5s cubic-bezier(0.22, 0.85, 0.3, 1);
}

.hero-phones .phone-back-l {
    transform: translate(-62%, -4%) rotate(-10deg) scale(0.86);
    filter: saturate(0.85) brightness(0.78);
    z-index: 1;
}

.hero-phones .phone-back-r {
    transform: translate(62%, -1%) rotate(10deg) scale(0.86);
    filter: saturate(0.85) brightness(0.78);
    z-index: 1;
}

.hero-phones .phone-front {
    z-index: 2;
    transform: translateY(3%);
}

.hero-phones:hover .phone-back-l {
    transform: translate(-68%, -7%) rotate(-12deg) scale(0.88);
}

.hero-phones:hover .phone-back-r {
    transform: translate(68%, -4%) rotate(12deg) scale(0.88);
}

@media (max-width: 900px) {

    .hero-phones .phone-back-l,
    .hero-phones .phone-back-r {
        display: none;
    }

    .hero-phones {
        min-height: 0;
    }

    .hero-phones .phone {
        position: relative;
        width: min(260px, 68vw);
        transform: none;
    }
}

/* ── Sign-up form ────────────────────────────────────────────────────────── */

.signup {
    margin-top: 30px;
    max-width: 470px;
}

.signup-row {
    display: flex;
    gap: 9px;
    padding: 7px;
    border-radius: 14px;
    border: 1px solid var(--hairline-strong);
    background: rgba(11, 14, 18, 0.66);
    transition: border-color 0.18s ease;
}

.signup-row:focus-within {
    border-color: var(--teal);
}

.signup input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 13px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.signup input::placeholder {
    color: var(--muted);
}

.signup input:focus {
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--teal);
    color: var(--carbon);
    font-family: var(--display);
    font-variation-settings: "wdth" 84, "wght" 780;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.btn:hover {
    filter: brightness(1.1);
}

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

.btn[disabled] {
    opacity: 0.55;
    cursor: progress;
}

.btn svg {
    width: 15px;
    height: 15px;
}

.signup-note {
    margin: 11px 2px 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Feedback uses the timing colours: green for a session best, amber for down on
   the reference. A form result reads the same way. */
.signup-status {
    margin: 11px 2px 0;
    font-size: 0.875rem;
    min-height: 1.2em;
}

.signup-status[data-state="ok"] {
    color: var(--green);
}

.signup-status[data-state="error"] {
    color: var(--amber);
}

/* ── Circuit ticker ──────────────────────────────────────────────────────── */

.ticker {
    padding: 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    background: rgba(11, 14, 18, 0.4);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 64s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-run {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 15px 15px;
    white-space: nowrap;
}

.ticker-item {
    font-family: var(--display);
    font-variation-settings: "wdth" 80, "wght" 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8125rem;
    color: var(--muted);
}

.ticker-item .flag {
    margin-right: 7px;
}

.ticker-sep {
    color: var(--teal);
    opacity: 0.55;
}

@keyframes ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ── Feature rows ────────────────────────────────────────────────────────── */

.feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(30px, 6vw, 78px);
    align-items: center;
    padding: clamp(40px, 6vw, 62px) 0;
}

.feature-row+.feature-row {
    border-top: 1px solid var(--hairline);
}

.feature-row.reverse .feature-media {
    order: -1;
}

.feature-media {
    display: flex;
    justify-content: center;
}

.feature-media .phone {
    width: min(290px, 74vw);
}

.feature-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 74, "wght" 850;
    text-transform: uppercase;
    line-height: 0.95;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 14px 0 0;
}

.feature-description {
    margin: 16px 0 0;
    color: var(--muted);
    max-width: 46ch;
}

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

    .feature-row.reverse .feature-media {
        order: 0;
    }
}

/* ── Circuits ────────────────────────────────────────────────────────────── */

.circuits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 12px;
}

.circuit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 13px 14px 15px;
    border-radius: 13px;
    border: 1px solid var(--hairline);
    background:
        repeating-linear-gradient(45deg, rgba(242, 245, 249, 0.014) 0 2px, transparent 2px 5px),
        var(--panel);
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.circuit-card:hover {
    border-color: rgba(14, 211, 192, 0.45);
    transform: translateY(-2px);
}

.circuit-figure {
    display: block;
    width: 100%;
    height: 96px;
    margin-bottom: 12px;
}

.circuit-figure path {
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: 0.82;
}

.circuit-card:hover .circuit-figure path {
    opacity: 1;
}

.circuit-name {
    font-family: var(--display);
    font-variation-settings: "wdth" 78, "wght" 780;
    text-transform: uppercase;
    line-height: 1.05;
    font-size: 0.875rem;
}

.circuit-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.75rem;
    color: var(--muted);
}

.circuit-meta .flag {
    font-size: 0.9375rem;
    line-height: 1;
}

.chip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(242, 245, 249, 0.08);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.6875rem;
}

.chip.free {
    background: var(--teal-dim);
    color: var(--teal);
    font-family: var(--display);
    font-variation-settings: "wdth" 86, "wght" 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chip.wet {
    background: rgba(92, 152, 255, 0.16);
    color: #5c98ff;
    font-family: var(--display);
    font-variation-settings: "wdth" 86, "wght" 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.circuits-note {
    margin: 22px 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}

/* ── Loop cards ──────────────────────────────────────────────────────────── */

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

.loop-card {
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--hairline);
    background:
        repeating-linear-gradient(45deg, rgba(242, 245, 249, 0.014) 0 2px, transparent 2px 5px),
        var(--panel);
}

.loop-step {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    color: var(--teal);
    letter-spacing: 0.1em;
}

.loop-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 78, "wght" 800;
    text-transform: uppercase;
    font-size: 1.25rem;
    margin: 10px 0 0;
}

.loop-body {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

/* ── Gallery ─────────────────────────────────────────────────────────────── */

.gallery {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px var(--gutter) 26px;
    margin: 0 calc(var(--gutter) * -1);
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--panel-raised) transparent;
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-thumb {
    background: var(--panel-raised);
    border-radius: 4px;
}

.gallery .phone {
    flex: none;
    width: min(230px, 62vw);
    scroll-snap-align: center;
}

/* ── Price ───────────────────────────────────────────────────────────────── */

.price-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(26px, 5vw, 56px);
    align-items: center;
    padding: clamp(28px, 5vw, 48px);
    border-radius: 22px;
    border: 1px solid var(--hairline-strong);
    background:
        repeating-linear-gradient(45deg, rgba(242, 245, 249, 0.014) 0 2px, transparent 2px 5px),
        linear-gradient(150deg, var(--panel-raised), var(--carbon) 78%);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

.price-title {
    font-family: var(--display);
    font-variation-settings: "wdth" 72, "wght" 880;
    text-transform: uppercase;
    line-height: 0.92;
    font-size: clamp(2rem, 5vw, 3rem);
}

.price-sub {
    margin: 16px 0 0;
    color: var(--muted);
}

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

.price-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 0.9375rem;
}

.tick,
.cross {
    flex: none;
    width: 19px;
    height: 19px;
    margin-top: 2px;
}

.tick {
    color: var(--teal);
}

.cross {
    color: var(--muted);
}

@media (max-width: 800px) {
    .price-panel {
        grid-template-columns: 1fr;
    }
}

/* ── Closing CTA ─────────────────────────────────────────────────────────── */

.cta-section {
    text-align: center;
    padding-bottom: 104px;
}

.cta-section .signup {
    margin-left: auto;
    margin-right: auto;
}

.cta-section .section-head {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cta-section .rule {
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, rgba(14, 211, 192, 0), var(--teal), rgba(14, 211, 192, 0));
}

.cta-section .section-sub {
    margin-left: auto;
    margin-right: auto;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--hairline);
    background: rgba(11, 14, 18, 0.5);
    padding: 34px 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-right: auto;
}

.footer-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--hairline);
}

.footer-brand-text {
    font-family: var(--display);
    font-variation-settings: "wdth" 80, "wght" 780;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.9375rem;
}

.footer-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8125rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.support-button:hover {
    color: var(--ink);
    border-color: var(--hairline-strong);
}

.support-icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.footer-copyright {
    color: var(--muted);
    font-size: 0.8125rem;
    padding-left: 6px;
}

/* ── Legal pages ─────────────────────────────────────────────────────────── */

.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px var(--gutter) 96px;
}

.legal h1 {
    font-family: var(--display);
    font-variation-settings: "wdth" 74, "wght" 850;
    text-transform: uppercase;
    line-height: 0.95;
    font-size: clamp(2rem, 6vw, 3rem);
}

.legal h2 {
    font-family: var(--display);
    font-variation-settings: "wdth" 80, "wght" 780;
    text-transform: uppercase;
    font-size: 1.1875rem;
    margin: 42px 0 12px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
}

.legal p,
.legal li {
    color: #c3cad4;
}

.legal ul {
    padding-left: 20px;
    display: grid;
    gap: 9px;
}

.legal a {
    color: var(--teal);
}

.legal .updated {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 10px;
}

.legal .lede {
    font-size: 1.0625rem;
    color: var(--ink);
}

/* ── Reveal on scroll ────────────────────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    section {
        padding: 68px 0;
    }
}

@media (max-width: 520px) {
    /* Pin the three stats to one row. Left to flex-wrap they break 2 + 1 at
       the narrowest widths and the last one is stranded. */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .circuit-figure {
        height: 76px;
    }
}

/* ── Utilities ───────────────────────────────────────────────────────────── */

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