/* Arrow Escape site, "Pegboard".
   Tokens from projects/arrow/DESIGN.md (Colour, Type, Shapes and depth):
   cream and warm by day, deep plum at night; raised faces sit on a solid
   *Edge band, never a blurred shadow. Fonts: Bricolage Grotesque (width 80,
   optical size 96, weight 800) for display, Figtree for text. */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/arrow/fonts/bricolage-grotesque-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Figtree";
    src: url("/arrow/fonts/figtree-var.woff2") format("woff2");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --bg: #FFF3DE;
    --ink: #2A1E14;
    --muted: #6E5B48;
    --surface: #FFFFFF;
    --surface-edge: #F0D6AE;
    --surface-muted: #FFF3DE;
    --primary: #D63A18;
    --on-primary: #FFFFFF;
    --primary-edge: #8A230C;
    --accent: #1F55E0;
    --sun: #FFB300;
    --on-sun: #2A1E14;
    --sun-edge: #B57A00;
    --progress: #0B7F61;
    --peg: #8B6B42;
    --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
    --text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1B1726;
        --ink: #FFF3E3;
        --muted: #BDB0CC;
        --surface: #2D2641;
        --surface-edge: #0E0B16;
        --surface-muted: #1F1A2E;
        --primary: #FF6E4D;
        --on-primary: #240A04;
        --primary-edge: #9A2E16;
        --accent: #8FB0FF;
        --sun: #FFC433;
        --on-sun: #2A1E14;
        --sun-edge: #8C6200;
        --progress: #2FD3A6;
        --peg: #9A8DB3;
    }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 600 1.0625rem/1.55 var(--text);
    overflow-wrap: anywhere;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }

a:focus-visible, .button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h3 { font-size: 1.4rem; line-height: 1.15; }

p, ul, ol { margin: 0 0 1em; }

.wrap { width: min(70rem, 100% - 2rem); margin-inline: auto; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    color: var(--ink);
    border-radius: 12px;
    z-index: 10;
}
.skip-link:focus { top: 1rem; }

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

/* Header */
.topbar { padding: 1rem 0; }
.topbar .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    color: var(--ink);
    text-decoration: none;
    font: 800 1.6rem/1 var(--display);
}
.brand img { border-radius: 12px; }
.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.85rem;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { background: var(--surface); box-shadow: 0 3px 0 var(--surface-edge); }

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.25rem; }
.breadcrumb a { color: var(--muted); }

/* Hero */
.hero { padding: 1.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 .hot { color: var(--primary); }
.sub { font-size: 1.2rem; max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.cta-note { color: var(--muted); margin: 0; }
.play-badge { display: inline-block; min-height: 48px; }
.hero-shot { justify-self: center; width: min(22rem, 100%); }

@media (min-width: 56rem) {
    .hero-grid { grid-template-columns: 1fr 22rem; }
}

/* Screens: framed store shots get a 1px pegEmpty border on the cream or plum ground */
.phone {
    border: 1px solid var(--peg);
    border-radius: 18px;
    background: var(--surface);
}

/* Sections and cards */
.section { padding: 2.5rem 0; }

.card {
    background: var(--surface);
    color: var(--ink);
    border-radius: 26px;
    box-shadow: 0 5px 0 var(--surface-edge);
    padding: 1.5rem;
}

.sun-card {
    background: var(--sun);
    color: var(--on-sun);
    border-radius: 26px;
    box-shadow: 0 5px 0 var(--sun-edge);
    padding: 1.5rem;
}
.sun-card a { color: var(--on-sun); }

.answer { font-size: 1.15rem; max-width: 46rem; }

.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) {
    .split { grid-template-columns: 1fr 18rem; }
    .split.flip { grid-template-columns: 18rem 1fr; }
    .split.flip > :first-child { order: 2; }
}
.split .shot { justify-self: center; width: min(18rem, 100%); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (min-width: 52rem) { .split.wide { grid-template-columns: 1fr 26rem; } }

figure { margin: 0; }

.ticks { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.ticks li { display: flex; gap: 0.6rem; align-items: flex-start; }
.ticks svg {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    margin-top: 0.1rem;
    stroke: var(--progress);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.twists { list-style: none; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .twists { grid-template-columns: 1fr 1fr; } }
.twists li { margin: 0; }
.twists .lvl {
    display: inline-block;
    padding: 0.1rem 0.7rem;
    border-radius: 999px;
    background: var(--sun);
    color: var(--on-sun);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.twists h3 { margin-top: 0.5rem; }
.twists p { margin: 0; }

.limits { padding-left: 1.25rem; }
.limits li { margin-bottom: 0.6rem; }

/* Gallery */
.gallery {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; }

/* Question links */
.qlinks { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.qlinks a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    color: var(--ink);
    border-radius: 20px;
    box-shadow: 0 5px 0 var(--surface-edge);
    font-weight: 800;
    text-decoration: none;
}
.qlinks a::after { content: "→"; margin-left: auto; padding-left: 1rem; color: var(--accent); }
.qlinks a:hover { text-decoration: underline; }

/* FAQ */
.faq-item { margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.prose .faq-item h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin-top: 0; }
.faq-item p:last-child { margin-bottom: 0; }

.page-head { padding: 1rem 0 0.5rem; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.5rem; scroll-margin-top: 1rem; }

/* Closing band */
.band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: 26px;
    box-shadow: 0 5px 0 var(--primary-edge);
    padding: 1.75rem;
}
.band h2 { margin: 0; color: var(--on-primary); }

/* Footer */
.footer { padding: 3rem 0 2rem; margin-top: 2rem; border-top: 5px solid var(--surface-edge); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; padding: 0; margin: 1rem 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.fine { color: var(--muted); font-size: 0.9rem; }
.fine p { margin: 0 0 0.4rem; }
.fine a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
