:root {
    --warp-blue: #2156ff;
    --route-cyan: #20d9d2;
    --signal-yellow: #f6d53b;
    --midnight: #07101f;
    --deep-route: #0d2daa;
    --clear-white: #ffffff;
    --cold-paper: #f7f8fc;
    --slate-copy: #52647d;
    --clean-green: #59d18c;
    --attention-red: #ff5b69;
    --line-light: rgba(255, 255, 255, 0.24);
    --line-dark: rgba(7, 16, 31, 0.16);
    --font-display: "Barlow Condensed", Bahnschrift, "Arial Narrow", sans-serif;
    --font-body: Manrope, "Segoe UI Variable", "Noto Sans SC", sans-serif;
    --font-mono: "Cascadia Code", "JetBrains Mono", SFMono-Regular, Consolas, monospace;
    --radius-control: 10px;
    --radius-surface: 14px;
    --section-space: clamp(5.5rem, 12vw, 10.5rem);
    --page-gutter: clamp(1.25rem, 4vw, 4.5rem);
    --route-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --z-sticky: 20;
}

@supports (color: oklch(56% 0.25 260)) {
    :root {
        --warp-blue: oklch(56% 0.25 260);
        --route-cyan: oklch(81% 0.15 190);
        --signal-yellow: oklch(87% 0.17 95);
        --midnight: oklch(18% 0.03 255);
        --deep-route: oklch(37% 0.19 264);
        --cold-paper: oklch(98% 0.007 255);
        --slate-copy: oklch(49% 0.04 255);
        --clean-green: oklch(79% 0.14 150);
        --attention-red: oklch(70% 0.2 20);
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--cold-paper);
    color: var(--midnight);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body,
button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

code,
pre {
    font-family: var(--font-mono);
}

::selection {
    background: var(--signal-yellow);
    color: var(--midnight);
}

:focus-visible {
    outline: 3px solid var(--route-cyan);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: calc(var(--z-sticky) + 1);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-control);
    background: var(--signal-yellow);
    color: var(--midnight);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 180ms var(--route-ease);
}

.skip-link:focus {
    transform: translateY(0);
}

.page-shell {
    width: min(100% - (var(--page-gutter) * 2), 86rem);
    margin-inline: auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: var(--z-sticky);
    color: var(--clear-white);
    transition: background 180ms var(--route-ease), box-shadow 180ms var(--route-ease);
}

.site-header.is-scrolled {
    background: var(--midnight);
    box-shadow: 0 6px 8px rgba(7, 16, 31, 0.16);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - (var(--page-gutter) * 2), 86rem);
    min-height: 5rem;
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    width: 7.25rem;
    height: auto;
}

.nav-panel,
.nav-links,
.language-switch {
    display: flex;
    align-items: center;
}

.nav-panel {
    gap: clamp(1rem, 2.5vw, 2rem);
}

.nav-links {
    gap: clamp(1rem, 2.3vw, 1.75rem);
}

.nav-links a,
.nav-github,
.language-switch button {
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.nav-links a,
.nav-github {
    position: relative;
}

.nav-links a::after,
.nav-github::after {
    position: absolute;
    right: 0;
    bottom: -0.3rem;
    left: 0;
    height: 2px;
    background: var(--signal-yellow);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms var(--route-ease);
}

.nav-links a:hover::after,
.nav-github:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.language-switch {
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line-light);
    border-radius: 999px;
}

.language-switch button {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
}

.language-switch button[aria-pressed="true"] {
    background: var(--signal-yellow);
    color: var(--midnight);
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.7rem;
    border: 1px solid var(--line-light);
    border-radius: var(--radius-control);
    background: transparent;
    color: inherit;
}

.nav-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
}

.hero {
    position: relative;
    min-height: 100svh;
    padding: clamp(8.25rem, 15vh, 10rem) 0 clamp(8.5rem, 14vw, 11rem);
    overflow: hidden;
    background: var(--warp-blue);
    color: var(--clear-white);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5rem), 69% 100%, 0 calc(100% - 2rem));
}

.hero-route-map {
    position: absolute;
    top: 4rem;
    right: -8rem;
    width: min(66vw, 58rem);
    opacity: 0.45;
}

.route-path {
    fill: none;
    stroke-width: 3;
}

.route-path-back {
    stroke: rgba(255, 255, 255, 0.32);
}

.route-path-main {
    stroke: var(--signal-yellow);
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.route-node {
    fill: var(--clear-white);
}

.route-node-destination {
    fill: var(--signal-yellow);
}

.js .route-path-main {
    animation: draw-route 1.4s 300ms var(--route-ease) both;
}

.hero-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.88fr);
    gap: clamp(3rem, 7vw, 7rem);
    align-items: center;
}

.hero-copy {
    max-width: 46rem;
}

.hero-kicker,
.section-signal,
.pain-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.hero-kicker {
    margin-bottom: 1.5rem;
    color: var(--clear-white);
}

.hero h1 {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.75rem;
    font-family: var(--font-display);
    font-size: clamp(4rem, 9.3vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 0.88;
}

.hero-title-signal {
    color: var(--signal-yellow);
}

.hero-lede {
    max-width: 43rem;
    margin-bottom: 2rem;
    color: var(--clear-white);
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 10rem;
    min-height: 3rem;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-control);
    font-weight: 750;
    text-decoration: none;
    transition: transform 180ms var(--route-ease), box-shadow 180ms var(--route-ease), background 180ms;
}

.button:hover {
    transform: translateY(-2px);
}

.button-signal {
    background: var(--signal-yellow);
    color: var(--midnight);
}

.button-signal:hover {
    box-shadow: 0 4px 8px rgba(7, 16, 31, 0.2);
}

.button-ghost-light {
    border: 1px solid rgba(255, 255, 255, 0.56);
    color: var(--clear-white);
}

.button-ghost-light:hover {
    background: var(--clear-white);
    color: var(--midnight);
}

.hero-facts {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    color: var(--clear-white);
    font-size: 0.9rem;
    list-style: none;
}

.hero-facts li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.fact-mark {
    width: 1.35rem;
    height: 3px;
    background: var(--route-cyan);
}

.hero-switchyard {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-surface);
    background: var(--midnight);
    box-shadow: 0 6px 8px rgba(7, 16, 31, 0.28);
    transform: rotate(1.25deg);
}

.switchyard-topbar,
.terminal-bar,
.video-frame-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.switchyard-topbar {
    padding: 0.9rem 1.1rem;
    background: var(--deep-route);
    color: rgba(255, 255, 255, 0.72);
}

.switchyard-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--route-cyan);
}

.switchyard-status > span:first-child {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--route-cyan);
}

.old-route,
.terminal-command,
.destination-board {
    margin-inline: clamp(1.1rem, 3vw, 2rem);
}

.old-route {
    display: grid;
    gap: 0.5rem;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: clamp(0.64rem, 1.25vw, 0.78rem);
    text-decoration: line-through;
}

.route-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin: 1.6rem 0;
    color: var(--signal-yellow);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.route-divider span {
    height: 2px;
    background: var(--signal-yellow);
}

.terminal-command {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: clamp(0.76rem, 1.6vw, 0.95rem);
}

.terminal-prompt {
    color: var(--route-cyan);
}

.terminal-command code {
    color: var(--signal-yellow);
    font-weight: 700;
}

.destination-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.destination-board > div {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.destination-board > div:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.destination-board > div:nth-child(even) {
    padding-left: 1rem;
}

.destination-board dt {
    color: rgba(255, 255, 255, 0.48);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.destination-board dd {
    margin: 0.25rem 0 0;
    color: var(--clear-white);
    font-family: var(--font-mono);
    font-weight: 700;
}

.destination-board .state-clean {
    color: var(--clean-green);
}
