/* Open Traffic landing site. Loaded AFTER the tracker's globals.css (never edit that file);
   anything that needs to differ from it is overridden here with matching specificity. */

/* Self-hosted fonts (SIL OFL 1.1, see /assets/fonts/OFL-*.txt) */
@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
    font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 800; font-style: normal; font-display: swap;
}

/* Next.js normally injects these font variables; define them for the static pages. */
:root { --font-sans: "Space Grotesk"; --font-mono: "JetBrains Mono", ui-monospace, monospace; --todo: #ffc857; --focus: #ffd84d; }

html, body { height: auto; min-height: 100%; }
body { line-height: 1.5; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Keyboard focus: visible on every interactive element */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
a:hover { color: #7dd9f5; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--accent); color: #041219; padding: 8px 12px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Visible placeholders for data that hasn't been supplied yet */
.todo { display: inline-block; border: 1px dashed var(--todo); color: var(--todo); border-radius: 6px; padding: 1px 6px; font: 600 12px var(--font-mono); }

/* Top bar. The brand name is not a heading (one h1 per page), so the tracker's
   `.brand h1` styles are recreated here for `.brand .name`. */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 20px; gap: 16px; }
.brand .name { margin: 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 700; color: var(--text); text-decoration: none; }
.brand .name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; margin-right: 8px; vertical-align: middle; animation: pulse 2s infinite; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

/* Hero */
.hero { min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-block: 24px 64px; }
.eyebrow { font: 600 11px var(--font-mono); letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.hero h1 { margin: 14px 0 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; }
.hero h1 .air { color: var(--air); } .hero h1 .sea { color: var(--sea); }
.lede { color: var(--muted); font-size: 18px; max-width: 40ch; margin: 0 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn.primary { background: var(--accent); color: #041219; box-shadow: 0 8px 30px rgba(69,200,240,.25); }
.btn.primary:hover { color: #041219; transform: translateY(-1px); box-shadow: 0 10px 36px rgba(69,200,240,.4); }
.btn.primary span { transition: transform .15s ease; }
.btn.primary:hover span { transform: translateX(3px); }
.btn.secondary { color: var(--text); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.btn.secondary:hover { color: var(--text); background: rgba(255,255,255,.06); }
.btn:active { transform: translateY(1px); }
.note { font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* Hero mock-up of the tracker panel. `.panel` (globals.css) is absolutely positioned with a
   blur; reset both here. */
.mock { margin: 0; }
.mock .panel.preview { position: relative; inset: auto; padding: 16px; width: 100%; max-height: none; overflow: visible; backdrop-filter: none; background: #0d1219; }
.preview .brand .name { font-size: 19px; }
.preview .brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.preview .stats .num { font-size: 26px; color: var(--muted); }
.preview .sources { gap: 6px; }
.led.idle { background: #3a434e; }
.mock figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.03em; margin: 10px 0 12px; line-height: 1.1; }
section > .wrap > p.sub { color: var(--muted); max-width: 56ch; margin: 0 0 36px; font-size: 16px; }

.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #0d1219; }
.card h3 { margin: 12px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.card h3.flush { margin-top: 0; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .tag { display: inline-block; }
.tag.sea { color: var(--sea); border-color: var(--sea); }
.tag.acc { color: var(--accent); border-color: var(--accent); }
.tag.mil { color: #ff6b8a; border-color: #ff6b8a; }

/* Works today / planned: a plain two-column list instead of a card grid */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.split h3 { font: 600 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.feat { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feat li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.feat li .tag { justify-self: start; align-self: start; margin-top: 2px; }
.feat li p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.feat strong { font-weight: 600; }

.legendrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.legendrow .card .ramp { margin-top: 14px; }
.swatches.lg { margin-top: 14px; font-size: 13px; }
.swatches i.gnd { background: #7d8590; }
.swatches i.mil { background: #ff6b8a; }
.swatches i.emg { background: #ff3b3b; }
.swatches i.cargo { background: #5fd38d; } .swatches i.tanker { background: #ff7a59; }
.swatches i.passenger { background: #5aa9ff; } .swatches i.fishing { background: #ffc857; }
.swatches i.service { background: #3fe0d0; } .swatches i.pleasure { background: #d38cff; }
.swatches i.highspeed { background: #fff07a; } .swatches i.other { background: #9aa4b2; }

.srclist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.srclist .card { display: grid; grid-template-columns: 10px 1fr; gap: 4px 12px; align-items: start; }
.srclist .led { margin-top: 8px; }
.srclist h3 { margin: 0; }
.srclist p { grid-column: 2; }
.srclist .meta { grid-column: 2; font: 12px var(--font-mono); color: var(--muted); margin-top: 6px; }

.final { padding: 88px 0 72px; }
.final h2 { margin: 0 0 14px; max-width: 22ch; }
.final p { color: var(--muted); margin: 0 0 28px; }

/* Text pages: privacy, terms, accessibility, credits, 404 */
.doc { max-width: 720px; padding-top: 32px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 8px; }
.doc h2 { font-size: 21px; letter-spacing: -0.02em; margin: 36px 0 8px; }
.doc p, .doc li { color: #c9d2dc; font-size: 15.5px; }
.doc .updated { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc th, .doc td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 500; }
.doc .flag { color: var(--todo); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #4a5562; }

/* Footer with operator details */
footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px 40px; }
footer p { margin: 0 0 6px; }
footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: #b9c3cf; }

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 32px; }
    .split, .legendrow, .srclist, footer .wrap { grid-template-columns: 1fr; }
    .top nav a.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .brand .name::before { animation: none; }
    .btn, .btn.primary span { transition: none; }
    .btn.primary:hover, .btn.primary:hover span { transform: none; }
}

/* Hero screenshot of the live tracker */
.mock.shot a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.mock.shot a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mock.shot img { display: block; width: 100%; height: auto; }
