/*
 * Northline. Two materials: "windows" are transparent shots onto the fixed 3D
 * voyage; "paper" sections sit above it (z-index 2) and pause it.
 * Tokens and motion timing are mirrored in MOTION.md.
 */
:root {
  color-scheme: light;
  --paper: #efebe3;
  --paper-2: #e6e0d4;
  --ink: #0e1a26;
  --ink-2: #4c5866;
  --line: rgba(14, 26, 38, 0.14);
  --glass: rgba(239, 235, 227, 0.72);
  --glass-line: rgba(255, 255, 255, 0.6);
  --accent: #e8541e;
  --accent-ink: #fff;
  --route: #0e1a26;
  --font-display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --page: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --dur-hover: 240ms;
  --dur-reveal: 600ms;
  --stagger: 45ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --paper: #0a1017; --paper-2: #101923; --ink: #ebe7df; --ink-2: #9aa5b1; --line: rgba(255, 255, 255, 0.1); --glass: rgba(12, 20, 30, 0.66); --glass-line: rgba(255, 255, 255, 0.09); --route: #ebe7df; }
}
:root[data-theme="dark"] { color-scheme: dark; --paper: #0a1017; --paper-2: #101923; --ink: #ebe7df; --ink-2: #9aa5b1; --line: rgba(255, 255, 255, 0.1); --glass: rgba(12, 20, 30, 0.66); --glass-line: rgba(255, 255, 255, 0.09); --route: #ebe7df; }

/* Windows onto the scene keep light ink in both themes */
.window { --ink: #f4efe6; --ink-2: rgba(244, 239, 230, 0.8); --line: rgba(255, 255, 255, 0.16); --glass: rgba(8, 14, 22, 0.5); --glass-line: rgba(255, 255, 255, 0.12); color: var(--ink); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #0b1520; color: var(--ink); font: 400 1.0625rem/1.6 var(--font-display); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 300; letter-spacing: -0.04em; line-height: 0.98; text-wrap: balance; }
h1 { font-size: clamp(3rem, 1rem + 6.4vw, 7.4rem); }
h2 { font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.6rem); }
h1 em, h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: calc(var(--page) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font: 500 0.72rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; }
.skip:focus { top: 12px; }

/* Buttons */
.button { position: relative; display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 6px 0 1.4rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 1rem/1 var(--font-display); text-decoration: none; cursor: pointer; white-space: nowrap; }
.knob { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent); transition: transform var(--dur-hover) var(--ease-out); }
.button:hover .knob, .button:focus-visible .knob { transform: rotate(-45deg); }
.text-link { color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; flex: none; }
.dot.live { background: #5fe08a; opacity: 1; box-shadow: 0 0 0 3px rgba(95, 224, 138, 0.2); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: max(12px, env(safe-area-inset-top)); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font: 600 1.15rem/1 var(--font-display); letter-spacing: -0.02em; }
.mark { width: 26px; height: 26px; }
.mark-n { fill: var(--accent); }
.mark-s { fill: currentColor; opacity: 0.85; }
.mark-h { stroke: currentColor; stroke-width: 1.5; opacity: 0.5; }
.nav-links { display: flex; gap: 4px; margin: 0 8px 0 0; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-size: 0.95rem; color: var(--ink-2); transition: color var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out); }
.nav-links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.theme-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle svg { width: 20px; height: 20px; }
.js .theme-toggle { display: grid; place-items: center; }
@media (max-width: 820px) { .nav-links { display: none; } .bar .button { padding-left: 1rem; min-height: 48px; } .bar .button .knob { width: 36px; height: 36px; } }

/* Stacking: windows are transparent over the fixed scene; paper covers it. */
.window, .paper { position: relative; }
.paper { z-index: 2; background: var(--paper); color: var(--ink); }
.wrap { position: relative; z-index: 1; }
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(4, 9, 16, 0.72) 0%, rgba(4, 9, 16, 0.42) 38%, rgba(4, 9, 16, 0) 66%), linear-gradient(0deg, rgba(4, 9, 16, 0.55) 0%, rgba(4, 9, 16, 0) 40%); }
.scene-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #0b1520; }
.scene-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity 1.2s ease; }
.has-scene .scene-layer canvas { opacity: 1; }
.scene-still, .scene-still svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.has-scene .scene-still { display: none; }

/* Window sections: full-height shots with the copy set like film titles */
.window { min-height: 100vh; min-height: 100svh; display: grid; align-content: end; padding-block: 140px clamp(48px, 8vh, 96px); }
.window-copy { display: grid; gap: 22px; justify-items: start; max-width: 40rem; }
.window .wrap { width: 100%; }

/* Hero */
.hero { min-height: 100vh; min-height: 100svh; }
.hero .wrap { display: grid; gap: 26px; }
.hero h1 { max-width: 11ch; }
.hero-foot { display: grid; gap: 24px; justify-items: start; max-width: 36rem; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; background: rgba(6, 11, 18, 0.62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 239, 230, 0.7); }
.tag b { font-weight: 500; color: #f4efe6; }
@media (min-width: 1100px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .hero .eyebrow, .hero h1, .hero-foot { grid-column: 1; }
  .tags { grid-column: 2; grid-row: 3; flex-direction: column; align-items: flex-end; }
}

/* Headline rises word by word on load (under a second) */
.rise .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.rise .w > span { display: inline-block; animation: rise var(--dur-reveal) var(--ease-out) both; }
.rise .w:nth-child(2) > span { animation-delay: calc(var(--stagger) * 1); }
.rise .w:nth-child(3) > span { animation-delay: calc(var(--stagger) * 2); }
.rise .w:nth-child(4) > span { animation-delay: calc(var(--stagger) * 3); }
.rise .w:nth-child(5) > span { animation-delay: calc(var(--stagger) * 4); }
.rise .w:nth-child(6) > span { animation-delay: calc(var(--stagger) * 5); }
.rise .w:nth-child(7) > span { animation-delay: calc(var(--stagger) * 6); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

/* Readouts and glass */
.readouts { display: grid; grid-template-columns: repeat(3, auto); gap: 1px; margin: 8px 0 0; padding: 0; list-style: none; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.readouts li { display: grid; gap: 8px; padding: 14px 18px; background: rgba(6, 11, 18, 0.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.readouts span, .readouts .note { font: 500 0.68rem/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 239, 230, 0.6); }
.readouts b { display: inline-flex; align-items: center; gap: 8px; font: 500 1.05rem/1 var(--font-mono); color: #f4efe6; white-space: nowrap; }
.readouts .note { grid-column: 1 / -1; padding: 8px 18px; }
@media (max-width: 640px) { .readouts { grid-template-columns: 1fr; } }

.air-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 8px 0 0; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, 0.12); width: 100%; }
.air-options > div { display: grid; align-content: start; gap: 6px; padding: 18px; background: rgba(6, 11, 18, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.air-options dt { font: 500 0.72rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244, 239, 230, 0.66); }
.air-options dd { margin: 0; font: 300 1.9rem/1 var(--font-display); letter-spacing: -0.03em; }
.air-options p { font-size: 0.92rem; line-height: 1.45; color: rgba(244, 239, 230, 0.74); }
@media (max-width: 640px) { .air-options { grid-template-columns: 1fr; } }

/* Night statement */
.night { align-content: center; }
.night .scrim { background: radial-gradient(ellipse 70% 60% at 40% 50%, rgba(3, 6, 12, 0.6), rgba(3, 6, 12, 0.15)); }
.night .wrap { display: grid; gap: 28px; }
.statement { max-width: 20em; font: 300 clamp(1.9rem, 1rem + 3.1vw, 3.9rem)/1.12 var(--font-display); letter-spacing: -0.03em; }
.js .statement .word { color: rgba(244, 239, 230, 0.3); transition: color 0.3s ease; }
.js .statement .word.on { color: #f4efe6; }

/* Paper sections */
.section { padding-block: clamp(96px, 12vw, 168px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.split-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: end; gap: clamp(24px, 5vw, 80px); }
.split-head > div { display: grid; gap: 18px; }
@media (max-width: 860px) { .split-head { grid-template-columns: 1fr; } }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.services li { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.services li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.services .n { font: 500 0.72rem/1 var(--font-mono); color: var(--accent); }
.services h3 { font-size: 1.6rem; font-weight: 400; letter-spacing: -0.025em; }
.services p { color: var(--ink-2); font-size: 0.98rem; }
.services .kind { justify-self: start; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr 1fr; }
  .services li:nth-child(n) { padding-left: 0; border-left: 0; }
  .services li:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } .services li:nth-child(2n) { padding-left: 0; border-left: 0; } }

/* The chart: the lane ruled on a plotting sheet */
.chart { margin: 0 0 clamp(40px, 6vw, 72px); padding: clamp(14px, 2vw, 24px); border-radius: 22px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.grat path { fill: none; stroke: var(--line); stroke-width: 1; }
.grat-labels text, .ports text { font: 500 13px var(--font-mono); letter-spacing: 0.06em; fill: var(--ink-2); }
.ports text { font-size: 15px; fill: var(--ink); }
.ports circle { fill: var(--paper-2); stroke: var(--route); stroke-width: 2.5; }
.ports .air-dot { stroke: var(--accent); }
.ports .air-label { fill: var(--accent); }
.route { fill: none; stroke: var(--route); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.air { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 0.006 0.008; stroke-linecap: round; }
.js .chart .route { stroke-dashoffset: calc(1 - min(1, max(0, (var(--p, 1) - 0.12) * 2.4))); }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; font: 500 0.72rem/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.chart figcaption span { display: inline-flex; align-items: center; gap: 10px; }
.key { display: inline-block; width: 26px; height: 0; border-top: 3px solid var(--route); }
.key-air { border-top: 2px dotted var(--accent); }

.table-wrap { overflow-x: auto; }
.lanes { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 620px; }
.lanes caption { text-align: left; padding-bottom: 14px; }
.lanes th { text-align: left; padding: 0 16px 12px 0; font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.lanes td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.lanes td:nth-child(n + 3) { font: 400 0.9rem/1.3 var(--font-mono); color: var(--ink-2); }
.lanes tr:hover td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.lanes .air-row td:nth-child(3) { color: var(--accent); }

/* Giant numbers on hairlines */
.numbers { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.numbers > div { display: grid; gap: 14px; padding: clamp(28px, 4vw, 52px) clamp(0px, 3vw, 40px) clamp(28px, 4vw, 52px) 0; border-bottom: 1px solid var(--line); }
.numbers > div:nth-child(2n) { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.numbers dt { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.numbers .big { font: 200 clamp(5rem, 2rem + 8vw, 10rem)/0.85 var(--font-display); letter-spacing: -0.06em; }
.numbers .unit { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.6rem, 1rem + 1.6vw, 2.6rem); color: var(--accent); }
.numbers dd { margin: 0; max-width: 26em; color: var(--ink-2); }
@media (max-width: 640px) { .numbers { grid-template-columns: 1fr; } .numbers > div:nth-child(2n) { padding-left: 0; border-left: 0; } }

/* Arrival and the quote form */
.arrive .scrim { background: linear-gradient(90deg, rgba(4, 9, 16, 0.7), rgba(4, 9, 16, 0.25) 55%, rgba(4, 9, 16, 0.45)), linear-gradient(0deg, rgba(4, 9, 16, 0.5), transparent 45%); }
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: clamp(32px, 6vw, 96px); align-items: end; }
@media (max-width: 960px) { .quote-grid { grid-template-columns: 1fr; } }
.quote { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 22px; border-radius: 24px; background: rgba(8, 14, 22, 0.62); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 80px rgba(0, 0, 0, 0.35); }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field:nth-child(n + 3) { grid-column: 1 / -1; }
.field label, .field legend { font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244, 239, 230, 0.66); padding: 0; margin-bottom: 4px; }
.field select, .field input[type="email"] { width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); color: #f4efe6; font: 400 1rem var(--font-display); }
.field select option { color: #0e1a26; }
.field input::placeholder { color: rgba(244, 239, 230, 0.4); }
.modes { display: flex; flex-wrap: wrap; gap: 6px; }
.modes legend { width: 100%; }
.modes label { flex: 1; margin: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.modes input { position: absolute; opacity: 0; pointer-events: none; }
.modes span { display: grid; place-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); font: 500 0.92rem var(--font-display); color: rgba(244, 239, 230, 0.8); transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out); }
.modes input:checked + span { background: #f4efe6; color: #0e1a26; }
.modes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.quote .button { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; margin-top: 4px; }

/* Footer */
.site-footer { overflow: hidden; padding-block: clamp(56px, 8vw, 96px) 28px; border-top: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-cols > div { display: grid; gap: 10px; align-content: start; }
.footer-cols p:not(.eyebrow) { color: var(--ink-2); }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-mark { margin: clamp(40px, 6vw, 80px) 0 12px; text-align: center; font: 200 clamp(4.5rem, 0.5rem + 18vw, 19rem)/0.8 var(--font-display); letter-spacing: -0.07em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 22%, transparent); user-select: none; }
.fine { font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* Voyage rail: where the ship is, for the section in view */
.voyage { position: fixed; right: clamp(14px, 2vw, 28px); top: 50%; z-index: 40; display: none; transform: translateY(-50%); pointer-events: none; }
.js .voyage { display: grid; justify-items: end; gap: 18px; }
.voyage-rail { position: relative; display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.voyage-rail::before { content: ""; position: absolute; right: 4px; top: 4px; bottom: 4px; width: 1px; background: rgba(160, 170, 180, 0.45); }
.voyage-rail li { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #0b1520; box-shadow: inset 0 0 0 1.5px rgba(200, 205, 210, 0.75); transition: transform var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out); }
.voyage-rail li.done { background: rgba(200, 205, 210, 0.75); }
.voyage-rail li.on { background: var(--accent); box-shadow: 0 0 0 4px rgba(232, 84, 30, 0.22); transform: scale(1.2); }
.voyage-read { display: grid; justify-items: end; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(6, 11, 18, 0.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); font: 500 0.64rem/1.25 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 239, 230, 0.66); text-align: right; max-width: 15rem; }
.voyage-read b { font-weight: 500; color: #f4efe6; }
@media (max-width: 1099px) { .js .voyage { display: none; } }
@media (min-width: 1100px) { .window .wrap, .paper > .wrap { padding-right: calc(var(--gutter) + 120px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .chart .route { stroke-dashoffset: 0; }
}
