/* VIBE CHECK 9000 — the website. The game's own language: a split-flap departures board, letterboxed stills,
   paper type on night ink, and tungsten for the one thing to press. */

:root {
    --ink: #07060c;
    --ink-2: #121018;
    --paper: #efe3c4;
    --paper-dim: rgba(239, 227, 196, 0.68);
    --paper-faint: rgba(239, 227, 196, 0.14);
    --tungsten: #f2a541;
    --flap-top: #25242a;
    --flap-bottom: #1a191e;
    --gutter: clamp(18px, 6vw, 96px);
    --measure: 36rem;
    --display: "Big Shoulders Display", "Oswald", Impact, sans-serif;
    --text: "Big Shoulders Text", "Oswald", "Arial Narrow", sans-serif;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 1.125rem/1.6 var(--serif); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 900; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 0; padding: 10px 14px; background: var(--paper); color: var(--ink); font: 700 1rem var(--text); z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- split-flap tiles (built from text by site.js; plain text without it) ---------- */
.row { display: inline-flex; font-family: var(--display); font-weight: 900; line-height: 1; color: var(--paper); letter-spacing: 0; }
.row.amber, .row .amber { color: var(--tungsten); }
.flap {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 0.66em;
    height: 1.04em;
    margin-right: 0.055em;
    border-radius: 0.05em;
    background: linear-gradient(var(--flap-top) 0 49.3%, #050506 49.3% 50.7%, var(--flap-bottom) 50.7% 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.6), 0 0.05em 0.12em rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.flap::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: calc(50% - 0.035em);
    height: 0.07em;
    background: linear-gradient(90deg, #000 0 0.05em, transparent 0.05em calc(100% - 0.05em), #000 calc(100% - 0.05em));
    z-index: 2;
}
.flap b { font-weight: 900; transform: translateY(0.035em); text-shadow: 0 0.02em 0 rgba(0, 0, 0, 0.5); }
.flap.flip::after {
    content: "";
    position: absolute;
    inset: 0 0 50% 0;
    background: linear-gradient(#302f36, var(--flap-top));
    transform-origin: 50% 100%;
    animation: fold 90ms ease-in forwards;
    z-index: 1;
}
@keyframes fold { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.flap-gap { width: 0.24em; background: none; box-shadow: none; }
.flap-gap::before, .flap-colon::before { display: none; }
.flap-colon { width: 0.3em; background: none; box-shadow: none; }

/* ---------- hero: a letterboxed still with the board over it ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; grid-template-rows: auto 1fr auto; isolation: isolate; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: clamp(52px, 9vh, 88px);
    padding: 0 var(--gutter);
    background: var(--ink);
    font: 600 1rem/1 var(--text);
    letter-spacing: 0.03em;
}
.wordmark { text-decoration: none; font: 900 1.25rem/1 var(--display); letter-spacing: 0.02em; }
.topbar-links { display: flex; gap: clamp(14px, 3vw, 32px); }
.topbar-links a { color: var(--paper-dim); text-decoration: none; }
.topbar-links a:hover { color: var(--paper); }
.hero-still { position: absolute; inset: clamp(52px, 9vh, 88px) 0 clamp(52px, 9vh, 88px); margin: 0; z-index: -1; overflow: hidden; }
.hero-still img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-still::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 6, 12, 0.92) 0%, rgba(7, 6, 12, 0.72) 34%, rgba(7, 6, 12, 0.1) 70%),
        linear-gradient(0deg, rgba(7, 6, 12, 0.7) 0%, rgba(7, 6, 12, 0) 40%);
}
.hero-copy { align-self: center; padding: clamp(32px, 7vh, 72px) var(--gutter); max-width: 62rem; }
.board { display: grid; gap: 0.06em; font-size: clamp(2.3rem, 9.6vw, 9.5rem); margin-bottom: clamp(18px, 3vh, 28px); }
.lede { max-width: var(--measure); font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; color: var(--paper); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: clamp(22px, 4vh, 34px) 0 14px; }
.button {
    display: inline-block;
    padding: 18px 30px 16px;
    border: 2px solid var(--paper);
    border-radius: 3px;
    background: var(--paper);
    color: var(--ink);
    font: 800 1.35rem/1 var(--text);
    letter-spacing: 0.06em;
    text-decoration: none;
    box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px rgba(239, 227, 196, 0.35);
}
.button:hover { background: var(--tungsten); border-color: var(--tungsten); }
.quiet { font: 600 1.15rem/1 var(--text); color: var(--paper-dim); text-underline-offset: 5px; }
.quiet:hover { color: var(--paper); }
.small { color: var(--paper-dim); font: 500 1rem/1.4 var(--text); letter-spacing: 0.02em; }
.departure {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: clamp(52px, 9vh, 88px);
    padding: 0 var(--gutter);
    background: var(--ink);
    font: 600 1.05rem/1 var(--text);
    color: var(--paper-dim);
}
.small-row { font-size: 2rem; }

/* ---------- sections ---------- */
main > section { padding: clamp(64px, 11vh, 120px) var(--gutter); }
h2 { font: 900 clamp(2.4rem, 5vw, 4rem)/1 var(--display); letter-spacing: 0.01em; margin-bottom: 18px; }
.intro { max-width: var(--measure); color: var(--paper-dim); margin-bottom: clamp(32px, 6vh, 56px); text-wrap: pretty; }

/* The night as a departures board: time | stop | still. */
.stops { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--paper-faint); }
.stop {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 26rem);
    gap: 18px clamp(20px, 3vw, 40px);
    align-items: center;
    padding: clamp(20px, 3vh, 30px) 0;
    border-bottom: 1px solid var(--paper-faint);
}
.stop h3 { font: 900 clamp(1.7rem, 2.6vw, 2.3rem)/1.05 var(--display); margin-bottom: 8px; }
.stop-text p { max-width: 34rem; color: var(--paper-dim); }
.stop img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--ink-2); }

.city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.city-grid figure { margin: 0; }
.city-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--ink-2); margin-bottom: 14px; }
.city-grid figcaption { color: var(--paper-dim); font-size: 1.05rem; line-height: 1.5; max-width: 30rem; }
.city-grid strong { color: var(--paper); font-weight: 500; }

.how { background: var(--ink-2); }
.how-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.keys { display: grid; gap: 14px; margin: 0; }
.keys > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; align-items: center; }
.keys dt { display: flex; gap: 6px; flex-wrap: wrap; }
.keys dd { margin: 0; color: var(--paper-dim); }
kbd {
    display: inline-grid;
    place-items: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.55rem;
    border-radius: 3px;
    background: linear-gradient(var(--flap-top) 0 50%, var(--flap-bottom) 50%);
    box-shadow: inset 0 -2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--paper);
    font: 700 1.05rem/1 var(--text);
}
.how-notes { display: grid; gap: 16px; max-width: var(--measure); color: var(--paper-dim); }

.releases { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.releases h3 { font: 900 1.8rem/1.05 var(--display); margin-bottom: 4px; }
.when { color: var(--tungsten); font: 600 1rem/1.4 var(--text); letter-spacing: 0.02em; margin-bottom: 10px; }
.releases li > p:last-child { color: var(--paper-dim); }
.more a { font: 600 1.1rem/1 var(--text); color: var(--paper-dim); text-underline-offset: 5px; }
.more a:hover { color: var(--paper); }

.last-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--paper-faint); }
.last-call p { font: 900 clamp(2.4rem, 6vw, 5rem)/1 var(--display); }

.footer { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; padding: 28px var(--gutter) 40px; color: var(--paper-dim); font: 500 1rem/1.4 var(--text); border-top: 1px solid var(--paper-faint); }
.build { color: rgba(239, 227, 196, 0.4); }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
    .stop { grid-template-columns: 6.5rem minmax(0, 1fr); }
    .stop img { grid-column: 1 / -1; }
    .city-grid, .releases { grid-template-columns: 1fr; }
    .how-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .topbar-links a:not(:last-child) { display: none; }
    .hero-still::after { background: linear-gradient(0deg, rgba(7, 6, 12, 0.95) 0%, rgba(7, 6, 12, 0.55) 60%, rgba(7, 6, 12, 0.3) 100%); }
    .stop { grid-template-columns: 1fr; }
    .small-row { font-size: 1.6rem; }
    .keys > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .flap.flip::after { animation: none; } }
