/* ATC Kaos site. Airfield-signage palette, bold ink outlines to match the game's cel style. */
:root {
    --ink: #0b0b10;
    --night: #0b1630;
    --night-2: #13224a;
    --taxi: #ffd100;
    --runway: #e0262f;
    --paper: #fff7e0;
    --radar: #3cff7a;
    --sky: #4fb7ff;
    --orville: #29e3ff;
    --muted: #a9b3cc;
    --sign-font: "Arial Black", "Arial Bold", "Helvetica Neue", Arial, sans-serif;
    --body-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
    --ink-w: 4px;
    --shadow: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--night);
    color: var(--paper);
    font-family: var(--body-font);
    font-size: 17px;
    line-height: 1.55;
}

a { color: var(--taxi); }
a:hover { color: #fff; }
kbd {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 4px;
    box-shadow: 2px 2px 0 var(--ink);
    padding: 0 .35em;
    white-space: nowrap;
}
code { font-family: var(--mono); }

.site { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: var(--ink);
    border-bottom: var(--ink-w) solid var(--taxi);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--taxi); }
.brand-mark {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    background: var(--taxi); color: var(--ink);
    border: 3px solid var(--paper);
    font-size: 22px;
    transform: rotate(-12deg);
}
.brand-text { font-family: var(--sign-font); font-size: 22px; letter-spacing: 2px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
    font-family: var(--sign-font);
    font-size: 14px;
    text-decoration: none;
    color: var(--paper);
    padding: 6px 12px;
    border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--taxi); color: var(--taxi); }
.site-nav .nav-play { background: var(--taxi); color: var(--ink); border-color: var(--ink); }
.site-nav .nav-play:hover { background: #fff; color: var(--ink); }

/* Notice strip: the site's own ticker */
.notice-strip {
    overflow: hidden;
    background: #111;
    border-bottom: 3px solid var(--ink);
    color: var(--taxi);
    font-family: var(--mono);
    font-size: 14px;
    white-space: nowrap;
}
.notice-track {
    display: inline-flex;
    gap: 64px;
    padding: 6px 0;
    animation: ticker 98s linear infinite;
}
.notice-track span::before { content: "■ "; color: var(--runway); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.site-main { flex: 1; }

/* Hero: the live airport fills it (game/showcase.js); ORVILLE's installation disk lies in the bottom-left
   corner in the foreground (Home.razor, site/hero.js scales its 1000 × 820 stage by --k). */
@font-face { font-family: "KaosMarker"; src: url("../game/fonts/permanent-marker-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "KaosHand"; src: url("../game/fonts/caveat-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
.hero {
    position: relative;
    min-height: max(600px, calc(100svh - 104px));
    background: linear-gradient(#4fb7ff 0 38%, #7fd0ff 38% 62%, #b9e6ff 62% 100%);
    border-bottom: var(--ink-w) solid var(--ink);
    overflow: hidden;
    --marker: "KaosMarker", "Segoe Print", "Comic Sans MS", cursive;
    --hand: "KaosHand", "Segoe Print", "Comic Sans MS", cursive;
    --felt: #1c2850;
    --red-felt: #c62a22;
}
.hero-disk { position: absolute; left: 0; bottom: 0; z-index: 2; width: calc(1000px * var(--k, .72)); height: calc(820px * var(--k, .72)); }
.hd-stage { position: absolute; left: 0; bottom: 0; width: 1000px; height: 820px; transform: scale(var(--k, .72)); transform-origin: 0 100%; }
.floppy { position: absolute; }
.floppy-jacket { position: absolute; inset: 0; width: 100%; height: 100%; }
.hd-floppy { left: 30px; top: 140px; width: 760px; height: 760px; transform: rotate(-6deg); animation: hd-in 1s cubic-bezier(.2, .8, .2, 1) both; }
.hd-floppy .floppy-jacket { filter: drop-shadow(12px 20px 22px rgba(0, 0, 0, .6)); }
@keyframes hd-in { from { translate: -90px 160px; rotate: -8deg; opacity: 0; } 40% { opacity: 1; } }

/* The label: printed by the vendor (cyan band, small print), written on by Hank; peeling at top-left. */
.hd-label-wrap { position: absolute; left: 42px; top: 13px; width: 676px; height: 252px; transform: rotate(-.6deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.hd-residue { position: absolute; left: 0; top: 0; width: 66px; height: 66px; clip-path: polygon(0 0, 100% 0, 0 100%); background: rgba(225, 220, 200, .16); }
.hd-label {
    position: absolute; inset: 0; box-sizing: border-box; padding: 0 22px 0 18px; color: var(--felt);
    background-color: #f7f8f3;
    background-image:
        linear-gradient(var(--orville), var(--orville)),
        repeating-linear-gradient(135deg, var(--orville) 0 7px, transparent 7px 15px),
        linear-gradient(165deg, rgba(255, 255, 255, .6), rgba(0, 0, 0, .04));
    background-size: 100% 26px, 12px 100%, 100% 100%;
    background-position: 0 0, 100% 0, 0 0;
    background-repeat: no-repeat;
    clip-path: polygon(66px 0, 100% 0, 100% 100%, 0 100%, 0 66px);
}
.hd-peel-wrap { position: absolute; left: 0; top: 0; width: 66px; height: 66px; filter: drop-shadow(4px 5px 4px rgba(0, 0, 0, .32)); }
.hd-peel { width: 100%; height: 100%; clip-path: polygon(100% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom right, transparent 50%, #cfc9b6 50%, #ece8da 58%, #fffef8 80%, #e4dfcf 100%); }
.hd-band { height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 6px 0 58px; font: 900 11px var(--sign-font); letter-spacing: .18em; color: var(--ink); }
.hd-print { margin: 6px 0 0 50px; font: 600 11px/1.3 var(--body-font); letter-spacing: .06em; text-transform: uppercase; color: #3d4350; }
.hd-print b { font-family: var(--sign-font); letter-spacing: .04em; color: var(--ink); }
.hd-print .kicker { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.hd-title { margin: 6px 0 0; font: 400 68px/1 var(--marker); color: #141418; transform: rotate(-2deg); letter-spacing: 1px; }
.hd-tagline { margin: 2px 0 0 6px; font: 400 21px/1.2 var(--marker); color: var(--red-felt); transform: rotate(-1deg); }
.hd-actions { display: flex; align-items: center; gap: 30px; margin: 10px 0 0 4px; }
.hd-start, .hd-movie {
    all: unset; position: relative; display: inline-block; cursor: pointer;
    font: 400 21px/1 var(--marker); color: var(--felt); padding: 4px 8px 6px;
}
.hd-start {
    font-size: 26px; color: var(--red-felt); padding: 6px 16px 7px; transform: rotate(-2deg);
    border: 3px solid var(--red-felt); border-radius: 10px 16px 8px 14px / 14px 8px 16px 10px;
}
.hd-start:hover { color: var(--red-felt); background: rgba(255, 228, 0, .6); }
.hd-start:active { transform: rotate(-2deg) translate(1px, 2px); }
.hd-movie:hover::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--red-felt); opacity: .55; transform: rotate(-1deg); }
.hd-start:focus-visible, .hd-movie:focus-visible { outline: 2px dashed var(--red-felt); outline-offset: 4px; }
.hd-needs { position: absolute; left: 18px; right: 30px; bottom: 9px; margin: 0; font: 600 10px/1.3 var(--body-font); letter-spacing: .05em; text-transform: uppercase; color: #5b6170; }

/* The post-it, stuck on the jacket's right-hand side. */
.hd-postit {
    position: absolute; left: 555px; top: 296px; width: 425px; box-sizing: border-box; padding: 32px 30px 22px 35px;
    transform: rotate(5deg); color: #22308a; font: 600 27.5px/1.13 var(--hand);
    background: linear-gradient(#fdf07c, #fbe861 55%, #f4dc4c);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .15), 0 26px 22px -16px rgba(0, 0, 0, .55);
    animation: hd-in 1s .15s cubic-bezier(.2, .8, .2, 1) both;
}
.hd-postit::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 48px; background: linear-gradient(rgba(255, 255, 255, .22), transparent); }
.hd-postit p { position: relative; margin: 0 0 10px; }
.hd-postit p:last-child { margin-bottom: 0; }
.hd-postit strong { font-weight: 700; }
.hd-postit u { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Big sign-style heading (logbook reports). */
.title {
    margin: 8px 0 4px;
    font-family: var(--sign-font);
    font-size: clamp(52px, 9vw, 112px);
    line-height: .88;
    letter-spacing: 1px;
    color: var(--taxi);
    -webkit-text-stroke: 3px var(--ink);
    paint-order: stroke fill;
    text-shadow: 6px 6px 0 var(--ink);
}

.btn-start {
    display: inline-block;
    font-family: var(--sign-font);
    font-size: 26px;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--ink);
    background: var(--taxi);
    border: var(--ink-w) solid var(--ink);
    box-shadow: var(--shadow);
    padding: 14px 30px;
    transition: transform .08s, box-shadow .08s;
}
.btn-start:hover { color: var(--ink); background: #fff04d; transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn-start:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.btn-start.small { font-size: 18px; padding: 10px 20px; }

/* Home: the in-flight movie dialog (site/movie.js) */
.movie {
    width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    background: var(--ink); color: var(--paper);
    border: var(--ink-w) solid var(--taxi);
    box-shadow: 10px 10px 0 var(--ink);
    overflow: hidden;
}
.movie::backdrop { background: rgba(11, 22, 48, .86); }
.movie-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; }
.movie-head h2 { margin: 0; font-family: var(--sign-font); font-size: 18px; letter-spacing: 1px; text-transform: uppercase; color: var(--taxi); }
.movie-close {
    font-family: var(--sign-font); font-size: 16px; line-height: 1;
    color: var(--ink); background: var(--taxi);
    border: 3px solid var(--paper); padding: 6px 10px; cursor: pointer;
}
.movie-close:hover { background: #fff; }
.movie video { display: block; width: 100%; max-height: calc(100vh - 110px); aspect-ratio: 16 / 9; background: #000; }

/* Live airport: the real sim, filmed by tower cams (game/showcase.js). Falls back to the sky gradient. */
.hero-live { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.live-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.hero-live.ready .live-canvas { opacity: 1; }
.live-fade { position: absolute; inset: 0; z-index: 1; background: var(--ink); opacity: 0; pointer-events: none; }
.live-fade.cut { animation: cut .55s ease-out; }
@keyframes cut { from { opacity: 1; } to { opacity: 0; } }
.live-caption {
    position: absolute; right: 16px; bottom: 16px; z-index: 2;
    max-width: calc(100% - 32px);
    padding: 8px 12px;
    background: rgba(11, 11, 16, .82); border: 3px solid var(--ink);
    font-family: var(--mono); font-size: 13px; line-height: 1.45;
}
.live-caption[hidden] { display: none; }
.live-top { color: var(--paper); text-transform: uppercase; letter-spacing: .5px; }
.live-dot { color: #ff3b3b; font-weight: 700; margin-right: 6px; }
.live-dot::before { content: "● "; animation: blink 1.2s steps(1) infinite; }
.live-clock { color: var(--taxi); margin-left: 10px; }
.live-status { color: var(--orville); }

/* Acts */
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 40px 32px; }
.act {
    background: var(--paper); color: var(--ink);
    border: var(--ink-w) solid var(--ink); box-shadow: var(--shadow);
    padding: 20px 22px;
}
.act h2 { margin: 0 0 8px; font-family: var(--sign-font); font-size: 22px; line-height: 1.1; }
.act h2 span {
    display: inline-block; margin-right: 6px; padding: 2px 8px;
    font-size: 14px; vertical-align: middle; color: var(--paper); background: var(--ink);
}
.act1 { border-top: 14px solid var(--radar); }
.act2 { border-top: 14px solid var(--taxi); }
.act3 { border-top: 14px solid #c46bff; }
.act blockquote { margin: 12px 0 0; padding: 10px 12px; font-family: var(--mono); font-size: 14px; background: var(--ink); color: var(--orville); }

.pitch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0 32px 48px; }
.pitch-card { background: var(--night-2); border: var(--ink-w) solid var(--ink); box-shadow: var(--shadow); padding: 20px 24px; }
.pitch-card h2 { margin: 0 0 8px; font-family: var(--sign-font); color: var(--taxi); font-size: 22px; }
.pitch-card ul { padding-left: 20px; }
.pitch-card li { margin: 6px 0; }

/* Inner pages */
.page { max-width: 980px; margin: 0 auto; padding: 40px 24px 64px; }
.page.center { text-align: center; }
.page-title {
    margin: 0 0 8px;
    font-family: var(--sign-font);
    font-size: clamp(32px, 5vw, 52px);
    color: var(--taxi);
    -webkit-text-stroke: 2px var(--ink);
    paint-order: stroke fill;
    text-shadow: 4px 4px 0 var(--ink);
}
.page-lede { font-size: 19px; color: var(--muted); margin-top: 0; }
.big-code { font-family: var(--sign-font); font-size: 120px; line-height: 1; margin: 0; color: var(--runway); text-shadow: 6px 6px 0 var(--ink); }
.muted { color: var(--muted); }
.prose h2, .handbook h2 { font-family: var(--sign-font); color: var(--taxi); margin: 32px 0 8px; }
.handbook h3 { margin: 18px 0 6px; color: var(--paper); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.toc a {
    font-family: var(--sign-font); font-size: 13px; text-decoration: none;
    color: var(--ink); background: var(--taxi);
    border: 3px solid var(--ink); padding: 4px 10px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; background: var(--night-2); border: 3px solid var(--ink); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 2px solid #22305a; vertical-align: top; }
th { background: var(--ink); color: var(--taxi); font-family: var(--sign-font); font-size: 13px; letter-spacing: .5px; }
td code { color: var(--radar); }

.callout {
    background: var(--paper); color: var(--ink);
    border: var(--ink-w) solid var(--ink); box-shadow: var(--shadow);
    padding: 14px 18px; margin: 18px 0;
}
.light { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -2px; margin-right: 4px; }
.light.green { background: #3cff7a; }
.light.red { background: #ff3b3b; }
.light.white { background: #fff; }
.light.flash { animation: blink .6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* Logbook */
.logbook { display: grid; gap: 18px; }
.log-best {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.stat {
    background: var(--paper); color: var(--ink);
    border: var(--ink-w) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
    padding: 12px 14px;
}
.stat .k { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: #555; }
.stat .v { font-family: var(--sign-font); font-size: 28px; }
.report {
    background: var(--paper); color: var(--ink);
    border: var(--ink-w) solid var(--ink); box-shadow: var(--shadow);
    padding: 14px 18px;
}
.report header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.report .grade { font-family: var(--sign-font); font-size: 34px; color: var(--runway); }
.report .title { font-size: 18px; -webkit-text-stroke: 0; text-shadow: none; color: var(--ink); margin: 0; }
.report ul { font-family: var(--mono); font-size: 13px; padding-left: 18px; }
.btn-plain {
    font-family: var(--sign-font); font-size: 14px;
    background: transparent; color: var(--muted);
    border: 3px solid var(--muted); padding: 6px 14px; cursor: pointer;
}
.btn-plain:hover { color: var(--runway); border-color: var(--runway); }

.site-footer { padding: 18px 24px; background: var(--ink); color: var(--muted); font-size: 13px; border-top: var(--ink-w) solid var(--taxi); }
.site-footer p { margin: 0; }

@media (max-width: 860px) {
    .hero { min-height: 0; background: linear-gradient(160deg, #343c49, #20262f 55%, #171b22); }
    .hero-live { position: relative; inset: auto; height: max(240px, 58vw); border-bottom: var(--ink-w) solid var(--ink); }
    .hero-disk { position: relative; }
    .hero-disk.narrow { width: calc(800px * var(--k)); height: calc(1180px * var(--k)); margin: 0 auto; }
    .hero-disk.narrow .hd-stage { width: 800px; height: 1180px; }
    .hero-disk.narrow .hd-floppy { left: 20px; top: 34px; transform: rotate(-3deg); }
    .hero-disk.narrow .hd-postit { left: 90px; top: 720px; width: 620px; font-size: 31px; padding: 34px 34px 28px 38px; transform: rotate(2deg); }
    .live-caption { left: 8px; right: 8px; bottom: 8px; font-size: 11px; padding: 6px 8px; }
    .live-clock { display: none; }
    .acts, .pitch { grid-template-columns: minmax(0, 1fr); padding-left: 16px; padding-right: 16px; }
    .site-header { padding: 10px 16px; }
    .page { padding: 28px 16px 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .notice-track, .live-dot::before, .light.flash, .hd-floppy, .hd-postit { animation: none; }
}

/* Logbook: overtime line (WP001 stage 5) */
.report .ot-line { background: #ffe3e3; border-left: 6px solid var(--runway); padding: 4px 10px; }
