/* caedvx.com/hyperion, on ODIVM Graphite. Ice blue is reserved for data. */

:root {
    --bg: #000000;
    --text: #f2f2f0;
    --text-dim: rgba(242, 242, 240, 0.62);
    --text-faint: rgba(242, 242, 240, 0.52);
    --line: rgba(255, 255, 255, 0.14);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --ice: #9fdbf5;
    --ice-deep: #296bb3;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --gutter: clamp(16px, 5vw, 56px);
    --edge: max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter)));

    --font-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
    --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    color-scheme: dark;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
sub, sup { line-height: 0; }
code, .num { font-family: var(--font-mono); font-size: 0.9em; }
code { color: var(--text); }

:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; border-radius: 4px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
    position: absolute; left: var(--gutter); top: -100px; z-index: 30;
    padding: 0.5rem 0.9rem; border-radius: 8px; background: var(--text); color: #000;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.wrap {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Top bar */

.bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) var(--edge) 0.9rem;
    font-size: 0.85rem;
    background: linear-gradient(#000 0%, rgba(0, 0, 0, 0.72) 70%, rgba(0, 0, 0, 0));
}
.bar a { text-decoration: none; color: var(--text-dim); transition: color 0.2s var(--ease); }
.bar a:hover { color: var(--text); }
.bar-home { color: var(--text) !important; font-weight: 500; }
.bar-links { display: flex; gap: clamp(0.8rem, 2vw, 1.6rem); }

@media (max-width: 720px) {
    .bar-links { display: none; }
}

/* Hero */

.hero {
    position: relative;
    height: 100svh;
    min-height: 560px;
    max-height: 1100px;
    overflow: hidden;
    background: #000 url('media/hero-still.webp') center / cover no-repeat;
}
.hero > canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s var(--ease); }
.hero.is-live > canvas { opacity: 1; }
.hero.no-fade > canvas { transition: none; }
.hero .hero-glow { filter: blur(10px); mix-blend-mode: screen; }
.hero.is-live .hero-glow { opacity: 0.55; }

.hero-veil {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.82) 28%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0) 78%),
        linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 22%);
}

.hero-live {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 4.2rem);
    left: var(--edge);
    display: flex; align-items: center; gap: 0.55rem;
    font: 500 0.72rem var(--font-mono);
    color: var(--text-faint);
}
.hero-live::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ice); box-shadow: 0 0 10px var(--ice);
}

.hero-text {
    position: absolute;
    left: var(--edge);
    bottom: clamp(5rem, 14vh, 9rem);
    max-width: min(34rem, calc(100% - 2 * var(--gutter)));
}
.hero-kicker { color: var(--text-dim); font-size: 0.95rem; }
.hero h1 {
    margin: 0.6rem 0 1.1rem;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.92;
}
.hero-pitch { color: var(--text-dim); font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; max-width: 32rem; }

.hero-hud {
    position: absolute;
    right: var(--edge);
    bottom: 1.5rem;
    display: flex; align-items: flex-end; gap: 1.4rem;
    font: 0.7rem var(--font-mono);
    color: var(--text-faint);
}
.hero:not(.is-live) .hero-hud,
.hero:not(.is-live) .hero-live { visibility: hidden; }

.hero-toggle {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 3.75rem);
    right: var(--edge);
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-dim);
    font: 500 0.75rem var(--font-body);
    cursor: pointer;
}
.hero-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

.decisions .planned {
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
    border: 1px solid rgba(159, 219, 245, 0.4);
    border-radius: 999px;
    font: 500 0.7rem var(--font-mono);
    color: var(--ice);
    vertical-align: 0.15em;
    white-space: nowrap;
}
.hero-colourbar { display: grid; gap: 0.3rem; width: 7.5rem; }
.hero-colourbar i { display: block; height: 6px; border-radius: 2px; }
.hero-colourbar > span { display: flex; justify-content: space-between; }
.hero-spark { width: 9rem; height: 2.8rem; }
.hero-readout { text-align: right; line-height: 1.75; min-width: 7rem; }
.hero-readout b { color: var(--text-dim); font-weight: 500; }

@media (max-width: 720px) {
    .hero-hud { left: var(--edge); right: auto; bottom: 1rem; gap: 1rem; }
    .hero-colourbar, .hero-spark { display: none; }
    .hero-readout { text-align: left; }
    .hero-text { bottom: 5.5rem; }
    .hero-veil {
        background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.35) 100%);
    }
}

.hero-caption {
    margin-top: 1.4rem;
    color: var(--text-faint);
    font-size: 0.9rem;
    max-width: 1180px;
}
.hero-caption { padding-inline: var(--gutter); }

html.still .hero-veil,
html.still .hero-text,
html.still .hero-hud,
html.still .hero-live,
html.still .hero-axes,
html.still .bar,
html.still .hero-caption { display: none; }
html.still body { overflow: hidden; }

/* Sections */

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section + .section { border-top: 1px solid var(--line); }

.split {
    display: grid;
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}
.split > h2 {
    position: sticky;
    top: 5rem;
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    letter-spacing: -0.01em;
}
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split > h2 { position: static; }
}

.prose { max-width: 46rem; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.prose > p { color: var(--text-dim); }
.prose > p.plain { color: var(--text); font-size: 1.3rem; line-height: 1.5; max-width: 38rem; }
.prose em { font-style: normal; color: var(--text); }

/* Summary */

.lede {
    font-family: var(--font-body);
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    line-height: 1.45;
    letter-spacing: -0.01em;
    max-width: 52rem;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 3rem 0 0;
    max-width: 62rem;
}
.facts dt { font-weight: 600; margin-bottom: 0.4rem; }
.facts dd { margin: 0; color: var(--text-dim); }

.stats {
    list-style: none;
    padding: 0;
    margin: 3.5rem 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}
.stats li { padding: 1.4rem 1.2rem 0 0; }
.stats li + li { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 500; color: var(--ice); letter-spacing: -0.02em; }
.stats span { display: block; margin-top: 0.3rem; color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; }

@media (max-width: 860px) {
    .facts { grid-template-columns: 1fr; gap: 1.4rem; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
    .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 1.4rem; }
}

/* Equation */

.equation {
    margin-top: 0.5rem;
    padding: 1.4rem 1.6rem;
    border-left: 2px solid var(--ice-deep);
    background: var(--glass-bg);
    border-radius: 0 12px 12px 0;
    display: grid; gap: 0.5rem;
}
.equation .num { font-size: 1.25rem; color: var(--text); }
.equation small { color: var(--text-faint); font-size: 0.88rem; }

/* Diagrams and charts */

.diagram, .chart, .clip { margin: 1rem 0 0.5rem; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; padding-bottom: 6px; }
.diagram svg, .chart svg { display: block; width: 100%; min-width: 560px; height: auto; overflow: visible; }
figcaption { margin-top: 0.9rem; color: var(--text-faint); font-size: 0.88rem; max-width: 40rem; }

.diagram svg { color: rgba(242, 242, 240, 0.45); }
.diagram text { font-family: var(--font-mono); font-size: 14px; fill: var(--text); }
.diagram text.sub { font-size: 12px; fill: var(--text-faint); }
.diagram text.cost { font-size: 12.5px; fill: var(--ice); }
.diagram text.note { font-size: 11px; fill: var(--text-faint); }
.diagram .layer text { font-family: var(--font-body); font-size: 12px; fill: var(--text-faint); }
.diagram .box rect { fill: rgba(255, 255, 255, 0.03); stroke: var(--line); stroke-width: 1; }
.diagram .box.gpu rect { stroke: rgba(159, 219, 245, 0.55); fill: rgba(41, 107, 179, 0.1); }
.diagram .box.oracle rect { stroke-dasharray: 4 4; }
.diagram .wire path { fill: none; stroke: currentColor; stroke-width: 1.2; }
.diagram .wire path.test { stroke: var(--ice); stroke-dasharray: 3 3; }

.chart svg text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-faint); }
.chart .grid { stroke: rgba(255, 255, 255, 0.07); }
.chart .axis { stroke: var(--line); }
.chart .guide { stroke: rgba(242, 242, 240, 0.25); stroke-dasharray: 3 5; fill: none; }
.chart .gate { stroke: rgba(242, 242, 240, 0.35); stroke-dasharray: 6 4; }
.chart .s-a { stroke: var(--text-dim); fill: none; stroke-width: 1.6; }
.chart .s-b { stroke: var(--ice); fill: none; stroke-width: 2; }
.chart .d-a { fill: var(--text); }
.chart .d-b { fill: var(--ice); }
.chart .lbl-a { fill: var(--text); }
.chart .lbl-b { fill: var(--ice); }
.chart .floor { fill: rgba(41, 107, 179, 0.12); }

.clip video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05050d;
    border-radius: 14px;
    border: 1px solid var(--line);
    object-fit: cover;
}

/* Decisions */

.decisions { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; }
.decisions li {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: 2rem;
    row-gap: 0.35rem;
    padding: 1.6rem 0;
    border-top: 1px solid var(--line);
}
.decisions li:last-child { border-bottom: 1px solid var(--line); }
.decisions h3 { grid-row: span 2; font-family: var(--font-body); font-size: 1.08rem; font-weight: 600; line-height: 1.4; }
.decisions p { color: var(--text-dim); }
.decisions p b { color: var(--text-faint); font-weight: 500; }
@media (max-width: 640px) {
    .decisions li { grid-template-columns: 1fr; }
    .decisions h3 { grid-row: auto; margin-bottom: 0.2rem; }
}

/* Roadmap */

.stages { list-style: none; padding: 0; margin: 0.5rem 0 0; counter-reset: stage; }
.stages li {
    counter-increment: stage;
    position: relative;
    padding: 0 0 2.2rem 3.4rem;
}
.stages li::before {
    content: counter(stage);
    position: absolute; left: 0; top: 0;
    width: 2.1rem; height: 2.1rem;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    font: 500 0.85rem var(--font-mono);
    color: var(--text-faint);
    background: #000;
}
.stages li::after {
    content: '';
    position: absolute; left: calc(1.05rem - 0.5px); top: 2.1rem; bottom: 0;
    width: 1px; background: var(--line);
}
.stages li:last-child::after { display: none; }
.stages li.done::before { background: var(--ice); color: #000; border-color: var(--ice); }
.stages li.designed::before { border-color: var(--ice); color: var(--ice); }
.stages .state { font: 500 0.75rem var(--font-mono); color: var(--text-faint); }
.stages li.done .state, .stages li.designed .state { color: var(--ice); }
.stages h3 { font-size: 1.15rem; margin: 0.15rem 0 0.4rem; }
.stages p { color: var(--text-dim); }
.stages .checks { margin-top: 0.35rem; font-size: 0.88rem; color: var(--text-faint); }

/* Footer */

.foot {
    display: grid;
    gap: 1rem;
    padding-block: 4rem calc(env(safe-area-inset-bottom, 0px) + 3rem);
    border-top: 1px solid var(--line);
    color: var(--text-dim);
}
.foot .source {
    justify-self: start;
    padding: 0.85rem 1.3rem;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s var(--ease);
}
.foot .source:hover { background: var(--ice); }
.foot > a:last-child { color: var(--text-faint); text-decoration: none; }


@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
