:root {
    --ink-950: #07080d;
    --ink-900: #0b0d14;
    --ink-850: #11141c;
    --ink-800: #1a1e28;
    --text: #eef0f5;
    --text-2: #a3a9b8;
    --text-3: #7a8296;
    --line: rgba(238, 240, 245, 0.09);
    --line-strong: rgba(238, 240, 245, 0.16);
    --accent: #d6a15f;
    --accent-ink: #1b140c;
    --font: "IBM Plex Sans", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --radius-control: 8px;
    --radius-panel: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ink-950);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
}

h1,
h2,
h3,
p,
figure,
ol {
    margin: 0;
}

ol {
    padding: 0;
    list-style: none;
}

code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--ink-850);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.86em;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ink-950);
    border-bottom: 1px solid var(--line);
}

.scroll-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(var(--scroll, 0));
    transform-origin: left;
    opacity: 0.85;
    pointer-events: none;
}

.nav-shell {
    max-width: 1200px;
    height: 64px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    position: relative;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 140ms var(--ease);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a[href^="#"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms var(--ease);
}

.nav-links a[href^="#"].is-active::after {
    transform: scaleX(1);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), transform 120ms var(--ease);
}

.button:active {
    transform: translateY(1px);
}

.button-primary {
    background: var(--text);
    color: var(--ink-950);
}

.button-primary:hover {
    background: #ffffff;
}

.button-secondary {
    background: var(--ink-850);
    border-color: var(--line);
    color: var(--text);
}

.button-secondary:hover {
    background: var(--ink-800);
    border-color: var(--line-strong);
}

.button-nav {
    min-height: 34px;
    padding: 0 16px;
    font-size: 13px;
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.button-nav:hover {
    background: var(--ink-850);
    border-color: var(--line-strong);
}

.nav-toggle {
    display: none;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    color: var(--text-2);
    font-size: 13px;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 680px;
    height: calc(100svh - 64px);
    max-height: 900px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 88px 32px 104px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 64px;
    align-items: center;
}

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

.hero-copy > .kicker,
.hero-copy > h1,
.hero-copy > .hero-lede,
.hero-copy > .hero-actions,
.hero-copy > .hero-meta {
    animation: hero-rise 700ms var(--ease) both;
}

.hero-copy > h1 {
    animation-delay: 60ms;
}

.hero-copy > .hero-lede {
    animation-delay: 120ms;
}

.hero-copy > .hero-actions {
    animation-delay: 180ms;
}

.hero-copy > .hero-meta {
    animation-delay: 240ms;
}

.kicker {
    margin-bottom: 16px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

h1 {
    max-width: 15ch;
    font-size: clamp(44px, 4.4vw, 64px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.hero-lede {
    max-width: 36rem;
    margin-top: 20px;
    color: var(--text-2);
    font-size: 18px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 20px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
}

.graph {
    justify-self: end;
    width: 100%;
    max-width: 620px;
    animation: graph-in 700ms var(--ease) 120ms both;
}

.graph-frame {
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--ink-900);
    overflow: hidden;
}

.graph-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.4;
}

.graph-bar-bottom {
    border-bottom: 0;
    border-top: 1px solid var(--line);
}

.graph-canvas {
    display: block;
    width: 100%;
    height: auto;
}

.node-body {
    fill: var(--ink-850);
    stroke: var(--line-strong);
    stroke-width: 1;
}

.node-body-accent {
    stroke: rgba(214, 161, 95, 0.55);
}

.node-title {
    fill: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
}

.node-sub,
.node-row {
    fill: var(--text-3);
    font-family: var(--mono);
    font-size: 10px;
}

.node-port {
    fill: var(--ink-900);
    stroke: var(--text-3);
    stroke-width: 1.2;
}

.node-port-accent {
    stroke: var(--accent);
}

.node-rule {
    stroke: var(--line);
    stroke-width: 1;
}

.node-meter {
    fill: var(--accent);
    opacity: 0.55;
}

.wire {
    fill: none;
    stroke: var(--text-3);
    stroke-width: 1.2;
    stroke-opacity: 0.65;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    animation: wire-in 800ms var(--ease) forwards;
}

.wire-a {
    stroke: var(--accent);
    stroke-opacity: 0.9;
    animation-delay: 520ms;
}

.graph-node {
    opacity: 0;
    transform: translateY(6px);
    animation: node-in 500ms var(--ease) forwards;
    animation-delay: calc(220ms + var(--i) * 90ms);
}

.section {
    padding: 96px 0;
    scroll-margin-top: 80px;
}

.features,
.workflow,
.screenshots,
.download {
    border-top: 1px solid var(--line);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}

.section-head .kicker {
    margin-bottom: 12px;
}

h2 {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.section-lede {
    max-width: 34rem;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 64px;
}

.feature-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.feature-row.is-featured {
    grid-column: 1 / -1;
    padding: 32px 0;
}

.feature-number,
.step-index {
    padding-top: 4px;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
}

.feature-row h3 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
}

.feature-row.is-featured h3 {
    font-size: 22px;
    letter-spacing: -0.01em;
}

.feature-row p {
    max-width: 68ch;
    margin-top: 8px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

.feature-row.is-featured p {
    max-width: 72ch;
    font-size: 15px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
}

.step {
    padding-top: 20px;
    border-top: 1px solid var(--line-strong);
}

.step-index {
    display: block;
    margin-bottom: 16px;
    color: var(--accent);
}

.step h3 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

.step p {
    max-width: 40ch;
    margin-top: 8px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

.shot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.shot {
    min-width: 0;
}

.shot:first-child {
    grid-column: 1 / -1;
}

.shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--ink-900);
}

.shot figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
}

.shot-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}

.shot-meta {
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
    text-align: right;
}

.download-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 64px;
    align-items: end;
    padding-top: 32px;
    border-top: 1px solid var(--line-strong);
}

.download-copy h2 {
    margin-bottom: 12px;
}

.download-copy p {
    max-width: 48rem;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.download-meta {
    grid-column: 1 / -1;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 48px 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 48px;
    align-items: start;
}

.footer-brand p {
    max-width: 28rem;
    margin-top: 12px;
    color: var(--text-2);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

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

.footer-links a:hover {
    color: var(--text);
}

.footer-meta {
    grid-column: 1 / -1;
    max-width: 70ch;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.6;
}

.js .reveal.scrub {
    --reveal: 0;
    opacity: calc(0.15 + var(--reveal) * 0.85);
    transform: translate3d(0, calc((1 - var(--reveal)) * 24px), 0);
    transition: none;
    will-change: opacity, transform;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes graph-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes node-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wire-in {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 960px) {
    .hero {
        height: auto;
        min-height: 0;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding: 64px 32px 72px;
    }

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

    .graph {
        justify-self: stretch;
        max-width: 640px;
    }

    .section-head {
        display: block;
    }

    .section-lede {
        margin-top: 16px;
    }

    .feature-list,
    .step-grid,
    .shot-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-row.is-featured {
        grid-column: auto;
        padding: 24px 0;
    }

    .shot:first-child {
        grid-column: auto;
    }

    .download-panel {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 60px;
        padding: 0 20px;
    }

    .js .nav-toggle {
        display: inline-flex;
    }

    .nav-shell {
        flex-wrap: wrap;
        height: auto;
        min-height: 60px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px 20px;
        padding-top: 8px;
    }

    .js .nav-shell {
        height: 60px;
        min-height: 0;
        flex-wrap: nowrap;
        padding-top: 0;
        padding-bottom: 0;
    }

    .js .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: auto;
        gap: 4px;
        padding: 16px 20px 24px;
        background: var(--ink-950);
        border-bottom: 1px solid var(--line);
    }

    .js .nav-links.is-open {
        display: flex;
        animation: menu-in 180ms var(--ease);
    }

    .nav-links a {
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .nav-links .button-nav {
        margin-top: 8px;
        justify-content: center;
    }

    .hero-inner {
        padding: 48px 20px 56px;
    }

    h1 {
        font-size: 38px;
    }

    .hero-lede {
        font-size: 16px;
    }

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

    .graph-bar {
        font-size: 10px;
        padding: 8px 12px;
    }

    .section {
        padding: 64px 0;
    }

    .section-inner,
    .footer-inner {
        padding: 0 20px;
    }

    h2 {
        font-size: 28px;
    }

    .feature-row {
        grid-template-columns: 32px minmax(0, 1fr);
        column-gap: 12px;
    }

    .feature-row.is-featured h3 {
        font-size: 20px;
    }

    .download-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .shot figcaption {
        display: block;
    }

    .shot-meta {
        margin-top: 4px;
        text-align: left;
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

@keyframes menu-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy > *,
    .graph,
    .graph-node {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .wire {
        animation: none !important;
        stroke-dashoffset: 0;
    }
}
