:root {
    color-scheme: light dark;
    --page: #f4f7f6;
    --surface: #ffffff;
    --surface-soft: #eaf0ef;
    --surface-strong: #dce7e6;
    --ink: #10201f;
    --muted: #566c69;
    --faint: #79908d;
    --line: #c8d6d4;
    --line-strong: #9db4b1;
    --brand: #066b9d;
    --brand-bright: #008bc7;
    --brand-soft: #d9eff8;
    --teal: #0b756d;
    --signal: #3cb67f;
    --code: #0a1618;
    --code-ink: #e5f2f2;
    --shadow: 0 24px 70px rgba(18, 47, 51, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #081113;
        --surface: #0d191b;
        --surface-soft: #122124;
        --surface-strong: #192b2e;
        --ink: #eaf4f4;
        --muted: #a6b9b7;
        --faint: #738987;
        --line: #24383a;
        --line-strong: #3a5355;
        --brand: #78cef1;
        --brand-bright: #8cddff;
        --brand-soft: #102d39;
        --teal: #6dd0c4;
        --signal: #62d59a;
        --code: #050b0d;
        --code-ink: #e5f2f2;
        --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    background: var(--page);
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px),
        var(--page);
    background-size: 40px 40px;
    background-attachment: fixed;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: color-mix(in srgb, var(--page) 92%, transparent);
    content: "";
    pointer-events: none;
}

a {
    color: inherit;
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--surface);
    background: var(--ink);
    transform: translateY(-160%);
}

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

.site-header,
main,
footer {
    width: min(1440px, calc(100% - 64px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    border-bottom: 1px solid var(--line-strong);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 720;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.brand-crop {
    position: relative;
    display: block;
    width: 39px;
    height: 39px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--brand) 58%, var(--line));
    background: #777a7b;
}

.brand-crop img {
    position: absolute;
    top: -13px;
    left: -46px;
    width: 130px;
    max-width: none;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.6vw, 38px);
}

.site-header nav a {
    color: var(--muted);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.045em;
    text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
    color: var(--brand);
}

.site-header .nav-action {
    padding: 11px 14px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    background: var(--surface);
}

.site-header .nav-action:hover {
    color: var(--surface);
    border-color: var(--ink);
    background: var(--ink);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.75fr);
    align-items: center;
    gap: clamp(44px, 7vw, 110px);
    min-height: calc(100vh - 82px);
    padding: 72px 0 88px;
}

.kicker,
.section-number,
.node-type,
.proof-status,
.code-toolbar,
.code-result span,
.signal-strip,
.target-grid article > span {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    color: var(--brand);
}

.kicker span {
    width: 26px;
    height: 1px;
    background: var(--brand);
}

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

h1 {
    max-width: 810px;
    margin-bottom: 30px;
    font-size: clamp(54px, 6.2vw, 94px);
    font-weight: 610;
    line-height: 0.96;
    letter-spacing: -0.065em;
}

h1 em {
    color: var(--brand);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.hero-intro {
    max-width: 720px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.68;
}

.hero-actions,
.open-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-decoration: none;
}

.button.primary {
    color: #f6fbff;
    border-color: #066b9d;
    background: #066b9d;
}

.button.primary:hover,
.button.primary:focus-visible {
    border-color: #004f79;
    background: #004f79;
}

.button.secondary {
    background: var(--surface);
}

.button.secondary:hover,
.button.secondary:focus-visible {
    border-color: var(--brand);
    color: var(--brand);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin: 45px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.hero-facts li {
    display: grid;
    gap: 4px;
}

.hero-facts strong {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
}

.hero-facts span {
    color: var(--faint);
    font-size: 11px;
}

.hero-visual {
    position: relative;
}

.logo-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: #777a7b;
    box-shadow: var(--shadow);
}

.logo-stage::before,
.logo-stage::after {
    position: absolute;
    z-index: 1;
    width: 54px;
    height: 54px;
    border-color: rgba(255, 255, 255, 0.56);
    content: "";
    pointer-events: none;
}

.logo-stage::before {
    top: 16px;
    left: 16px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.logo-stage::after {
    right: 16px;
    bottom: 16px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.logo-stage img {
    width: 100%;
}

.live-note {
    position: absolute;
    right: -18px;
    bottom: -36px;
    left: 38px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 11px;
}

.live-note span:not(.pulse) {
    display: grid;
    gap: 2px;
    color: var(--muted);
}

.live-note strong {
    color: var(--ink);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.live-note a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--signal) 16%, transparent);
}

.signal-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    color: var(--muted);
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.signal-strip p {
    margin: 0;
}

.signal-strip span {
    color: var(--brand);
    font-size: 6px;
}

.stack-section,
.proof-section,
.profiles-section,
.direction-section,
.open-section {
    padding: 126px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
    align-items: end;
    gap: 40px 80px;
    margin-bottom: 70px;
}

.section-number {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--brand);
}

.section-heading h2,
.direction-section h2,
.open-section h2 {
    margin: 0;
    font-size: clamp(38px, 4.2vw, 66px);
    font-weight: 590;
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.section-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.stack-map {
    padding: 36px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow);
}

.stack-node {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 74px 24px 28px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.stack-node.bytecode-node {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.node-index {
    position: absolute;
    top: 22px;
    right: 24px;
    color: var(--faint);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.node-type {
    margin-bottom: 8px;
    color: var(--brand);
}

.stack-node h3,
.target-grid h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.stack-node > p:not(.node-type),
.target-grid p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.stack-node code {
    position: absolute;
    right: 22px;
    bottom: 20px;
    color: var(--brand);
    font-size: 10px;
}

.connector {
    display: grid;
    place-items: center;
    height: 62px;
}

.connector::before {
    position: absolute;
    width: 1px;
    height: 62px;
    background: var(--line-strong);
    content: "";
}

.connector span {
    z-index: 1;
    padding: 5px 8px;
    color: var(--faint);
    background: var(--surface-soft);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.06em;
}

.branch-line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 940px;
    height: 64px;
    margin: 0 auto;
}

.branch-line::before {
    position: absolute;
    top: 31px;
    right: 16.66%;
    left: 16.66%;
    height: 1px;
    background: var(--line-strong);
    content: "";
}

.branch-line span {
    justify-self: center;
    width: 1px;
    height: 64px;
    background: var(--line-strong);
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.target-grid article {
    min-height: 172px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.target-grid article.target-live {
    border-color: var(--brand);
}

.target-grid article > span {
    color: var(--brand);
}

.target-grid h3 {
    margin-top: 22px;
}

.proof-section {
    border-top: 1px solid var(--line-strong);
}

.compact-heading {
    display: block;
}

.compact-heading .section-number {
    margin-bottom: 20px;
}

.compact-heading h2 {
    max-width: 900px;
}

.compact-heading > p:last-child {
    max-width: 720px;
    margin-top: 24px;
}

.proof-grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
    border: 1px solid var(--line-strong);
    background: var(--surface);
}

.code-proof {
    color: var(--code-ink);
    background: var(--code);
}

.code-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    color: #7f999a;
    border-bottom: 1px solid #23383a;
}

.code-proof pre {
    min-height: 392px;
    margin: 0;
    padding: 32px;
    overflow-x: auto;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
}

.syntax-keyword {
    color: #7bcff3;
}

.syntax-string {
    color: #96dcae;
}

.code-result {
    display: grid;
    gap: 7px;
    padding: 22px 30px;
    color: var(--code-ink);
    border-top: 1px solid #23383a;
    background: #0e2021;
}

.code-result span {
    color: #62d59a;
}

.code-result strong {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
}

.code-result small {
    color: #819696;
}

.proof-list {
    display: grid;
}

.proof-list article {
    padding: 34px 38px;
    border-bottom: 1px solid var(--line);
}

.proof-list article:last-child {
    border-bottom: 0;
}

.proof-status {
    color: var(--teal);
}

.proof-status.progress {
    color: var(--brand);
}

.proof-list h3 {
    margin: 12px 0 8px;
    font-size: 21px;
}

.proof-list p {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.proof-list a,
.text-link {
    color: var(--brand);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-decoration: none;
}

.profiles-section {
    border-top: 1px solid var(--line-strong);
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.profiles-grid article {
    min-height: 280px;
    padding: 34px;
    border-right: 1px solid var(--line-strong);
}

.profiles-grid article:last-child {
    border-right: 0;
}

.profile-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--brand);
    border: 1px solid var(--brand);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-style: italic;
}

.profiles-grid h3 {
    margin: 66px 0 12px;
    font-size: 24px;
}

.profiles-grid p {
    max-width: 340px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.direction-section {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(500px, 1.2fr);
    gap: 70px 120px;
    border-top: 1px solid var(--line-strong);
}

.direction-section .section-number {
    margin-bottom: 20px;
}

.direction-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.direction-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 18px;
    padding: 0 0 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.direction-list > li > span {
    color: var(--brand);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.direction-list strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.direction-list p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.direction-section .text-link {
    grid-column: 2;
    justify-self: start;
}

.open-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
    gap: 50px 90px;
    padding-right: clamp(30px, 7vw, 110px);
    padding-left: clamp(30px, 7vw, 110px);
    color: #edf7fa;
    background: #0b1b20;
}

.open-mark {
    align-self: start;
    color: #86d7f5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(150px, 19vw, 260px);
    font-style: italic;
    line-height: 0.78;
    opacity: 0.84;
}

.open-section .section-number {
    margin-bottom: 18px;
    color: #86d7f5;
}

.open-section p:not(.section-number) {
    max-width: 790px;
    margin: 28px 0 34px;
    color: #adc1c5;
    font-size: 16px;
    line-height: 1.72;
}

.open-section .button.secondary {
    color: #edf7fa;
    border-color: #50666a;
    background: transparent;
}

footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 50px;
    padding: 70px 0 36px;
    border-top: 1px solid var(--line-strong);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.footer-brand div {
    display: grid;
    gap: 3px;
}

.footer-brand small,
.footer-note {
    color: var(--faint);
    font-size: 11px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 60px;
}

.footer-links div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-links strong {
    margin-bottom: 5px;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-links a {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.footer-note {
    grid-column: 1 / -1;
    margin: 18px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

a:focus-visible {
    outline: 2px solid var(--brand-bright);
    outline-offset: 4px;
}

@media (max-width: 1080px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-copy {
        max-width: 860px;
    }

    .hero-visual {
        width: min(720px, 92%);
        margin: 0 auto;
    }

    .proof-grid,
    .direction-section {
        grid-template-columns: 1fr;
    }

    .direction-section .text-link {
        grid-column: 1;
    }
}

@media (max-width: 820px) {
    .site-header,
    main,
    footer {
        width: min(100% - 32px, 1440px);
    }

    .site-header nav a:not(.nav-action) {
        display: none;
    }

    .hero {
        padding: 54px 0 78px;
    }

    h1 {
        font-size: clamp(48px, 12vw, 74px);
    }

    .signal-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .signal-strip span {
        display: none;
    }

    .section-heading {
        grid-template-columns: 1fr;
    }

    .stack-map {
        padding: 18px;
    }

    .target-grid,
    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .branch-line {
        display: none;
    }

    .target-grid {
        gap: 12px;
        margin-top: 62px;
    }

    .target-grid article {
        min-height: auto;
    }

    .profiles-grid article {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
    }

    .profiles-grid article:last-child {
        border-bottom: 0;
    }

    .profiles-grid h3 {
        margin-top: 34px;
    }

    .open-section {
        grid-template-columns: 1fr;
    }

    .open-mark {
        font-size: 130px;
    }
}

@media (max-width: 560px) {
    .site-header {
        min-height: 70px;
    }

    .brand-name {
        display: none;
    }

    .site-header .nav-action {
        padding: 10px 11px;
        font-size: 9px;
    }

    .hero-actions,
    .open-links {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .hero-facts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .live-note {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        grid-template-columns: auto 1fr;
        margin-top: -1px;
    }

    .live-note a {
        grid-column: 2;
    }

    .stack-section,
    .proof-section,
    .profiles-section,
    .direction-section,
    .open-section {
        padding: 88px 0;
    }

    .open-section {
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 24px;
        padding-left: 24px;
    }

    .stack-node {
        padding: 22px;
    }

    .stack-node code,
    .node-index {
        display: none;
    }

    .code-proof pre {
        min-height: auto;
        padding: 22px;
        font-size: 11px;
    }

    .proof-list article {
        padding: 28px 24px;
    }

    footer {
        grid-template-columns: 1fr;
    }

    .footer-links {
        gap: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
