:root {
    --shade: 0.2;
    --bg: #0b0c10;
    --panel: rgba(20, 22, 28, 0.72);
    --ink: #ecebe6;
    --dim: #9a9c96;
    --line: #262a33;
    --accent: #e8582a;
    --wire: rgba(236, 235, 230, 0.14);
    --reach: 1.25rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}

body {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

header,
footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.4rem 0;
}

header {
    position: sticky;
    top: 1rem;
    z-index: 50;
    align-items: center;
    min-height: 4.5rem;
    margin-top: 1rem;
    padding: 1.1rem 1.75rem;
    border: 1px solid rgba(236, 235, 230, 0.16);
    border-radius: 18px;
    background: rgba(11, 12, 16, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(236, 235, 230, 0.06);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

header a {
    text-decoration: none;
}

header a:hover {
    color: var(--dim);
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg);
}

/* One knob for how dark the page sits: raise --shade to darken. */
.shade {
    position: absolute;
    inset: 0;
    background: var(--bg);
    opacity: var(--shade);
}

/* The grain overlays the glows, so it must sit in the same stacking context. */
.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='1.8' intercept='-0.4'/%3E%3CfeFuncG type='linear' slope='1.8' intercept='-0.4'/%3E%3CfeFuncB type='linear' slope='1.8' intercept='-0.4'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.drift {
    position: absolute;
    will-change: transform;
    animation: rest 52s ease-in-out infinite alternate;
}

.drift.violet {
    left: 25%;
    top: -25%;
    width: 90vw;
    height: 90vh;
}

.drift.azure {
    left: 30%;
    top: 20%;
    width: 85vw;
    height: 100vh;
    animation-duration: 67s;
    animation-delay: -20s;
}

.drift.aqua {
    left: -25%;
    top: 35%;
    width: 80vw;
    height: 80vh;
    animation-duration: 59s;
    animation-delay: -35s;
}

/* The blur spreads past the box; clipping it leaves a hard edge. */
.wash {
    display: block;
    overflow: visible;
    width: 100%;
    height: 100%;
    will-change: transform, opacity;
    transition: transform 9s cubic-bezier(0.45, 0, 0.2, 1), opacity 9s ease-in-out;
}

@keyframes rest {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(1.5%, -1%) rotate(1.2deg) scale(1.03); }
    66% { transform: translate(-1%, 1.2%) rotate(-0.8deg) scale(1.01); }
    100% { transform: translate(0.8%, 0.5%) rotate(0.6deg) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .drift {
        animation: none;
    }
}

.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0.9rem;
    text-decoration: none;
}

.wordmark .sc {
    font-size: 0.8rem;
}

.wordmark .wm {
    font-family: "Kode Mono", monospace;
    font-weight: 500;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

.sc {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

main {
    margin: 2rem 0 6rem;
}

.hero,
.feature {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.feature {
    grid-template-columns: minmax(16rem, 2fr) 3fr;
    align-items: stretch;
}

/* Lines only run past the outer edge of the grid, never into a box. */
main {
    position: relative;
}

main::before {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--reach)) 0;
    border-left: 1px solid var(--wire);
    border-right: 1px solid var(--wire);
    pointer-events: none;
}

.hero,
.feature {
    position: relative;
}

.hero::before,
.feature::before {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--reach));
    border-top: 1px solid var(--wire);
    pointer-events: none;
}

main::after {
    content: "";
    position: absolute;
    inset: auto calc(-1 * var(--reach)) 0;
    border-bottom: 1px solid var(--wire);
    pointer-events: none;
}

.cell {
    min-width: 0;
}

.cell + .cell {
    border-left: 1px solid var(--wire);
}

.headline {
    display: flex;
    align-items: center;
    padding: 5rem 2.5rem;
}

.mark {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.crow {
    width: 100%;
    max-width: 24rem;
    aspect-ratio: 1;
}

.crow canvas {
    display: block;
}

h1 {
    font-family: "Young Serif", serif;
    font-size: clamp(2.6rem, 7vw, 5.4rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.5rem;
}

.button {
    display: inline-block;
    font: 500 1rem "Hanken Grotesk", sans-serif;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.button:hover {
    border-color: var(--dim);
}

.button.primary {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}

.button.primary:hover {
    background: rgba(236, 235, 230, 0.1);
}

.feature-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 2.5rem;
}

.feature-text p {
    color: var(--dim);
    max-width: 26rem;
    margin-bottom: 1.8rem;
}

.feature-text p:has(+ p) {
    margin-bottom: 0.8rem;
}

.feature-text .lead {
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 500;
    max-width: 28rem;
}

.points {
    list-style: none;
    max-width: 28rem;
    margin: 0 0 1.4rem;
    padding: 0;
}

.points li {
    color: var(--dim);
    font-weight: 300;
    padding: 0.8rem 0;
    border-top: 1px solid var(--wire);
}

.points li:last-child {
    border-bottom: 1px solid var(--wire);
}

.feature-text .points-after {
    font-weight: 300;
}

.feature h2 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1;
    margin-bottom: 1rem;
}

.stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    text-decoration: none;
}

.stage svg {
    width: min(100%, 44rem);
    height: auto;
    overflow: visible;
}

.stage .slab,
.stage .card {
    fill: #14161c;
    stroke: var(--ink);
    stroke-width: 1.2;
}

.stage .card {
    fill: #1b1d24;
}

.stage .edge {
    fill: var(--ink);
}

.stage .rule {
    stroke: var(--line);
    stroke-width: 1.2;
}

.stage .dot {
    fill: none;
    stroke: var(--dim);
    stroke-width: 1.2;
}

.stage .bar {
    fill: #3a3d48;
}

.stage .bar.strong {
    fill: var(--ink);
}

.defs {
    position: absolute;
    width: 0;
    height: 0;
}

.stage .bar.accent {
    fill: url(#chrome);
    animation: sheen 6s ease-in-out infinite;
}

.stage .field {
    fill: #111319;
    stroke: var(--line);
    stroke-width: 1.2;
}

.stage .type {
    fill: var(--dim);
    animation: type 8s steps(1) infinite;
}

.stage .caret {
    fill: var(--ink);
    animation: blink 1.1s steps(1) infinite;
}

.stage .grow {
    transform-box: fill-box;
    transform-origin: left center;
    animation: grow 8s ease-out infinite;
}

.stage .hl {
    fill: url(#chrome);
    opacity: 0.9;
    animation: walk 8s ease-in-out infinite, sheen 6s ease-in-out infinite;
}

.stage .wire {
    stroke: var(--dim);
    stroke-width: 1;
    stroke-dasharray: 3 5;
    animation: flow 1.6s linear infinite;
}

.stage .lift {
    animation: drift 6s ease-in-out infinite;
}

@keyframes type {
    0% { opacity: 0; }
    12% { opacity: 1; }
    92% { opacity: 0; }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes grow {
    0% { transform: scaleX(0); }
    15%, 90% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

@keyframes walk {
    0%, 20% { transform: translateY(0); }
    32%, 44% { transform: translateY(18px); }
    56%, 68% { transform: translateY(36px); }
    80%, 100% { transform: translateY(0); }
}

@keyframes drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes sheen {
    0%, 100% { filter: hue-rotate(-25deg); }
    50% { filter: hue-rotate(25deg); }
}

@keyframes flow {
    to { stroke-dashoffset: -16; }
}

.stage .slot {
    fill: none;
    stroke: var(--dim);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.stage .token {
    fill: none;
    stroke: url(#chrome);
    stroke-width: 1.8;
    animation: sheen 6s ease-in-out infinite;
}

.stage .move {
    animation: lanes 9s ease-in-out infinite;
}

.stage .recall {
    animation: recall 7s ease-in-out infinite;
}

.stage .bob {
    animation: drift 4s ease-in-out infinite;
}

.stage .edit {
    animation: settle 8s ease-in-out infinite;
}

.stage .old {
    animation: fade 8s steps(1) infinite;
}

.stage .new {
    fill: url(#chrome);
    transform-box: fill-box;
    transform-origin: left center;
    animation: rewrite 8s ease-out infinite, sheen 6s ease-in-out infinite;
}

@keyframes lanes {
    0%, 18% { transform: translateX(0); }
    32%, 50% { transform: translateX(140px); }
    64%, 86% { transform: translateX(280px); }
    100% { transform: translateX(0); }
}

@keyframes recall {
    0%, 15% { transform: translate(0, 0); }
    35%, 70% { transform: translate(96px, -56px); }
    90%, 100% { transform: translate(0, 0); }
}

@keyframes settle {
    0%, 60% { transform: translateY(0); }
    75%, 90% { transform: translateY(64px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fade {
    0% { opacity: 1; }
    25% { opacity: 0; }
}

@keyframes rewrite {
    0%, 25% { transform: scaleX(0); }
    45%, 100% { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .stage * {
        animation: none !important;
    }
}

h2 {
    font-family: "Young Serif", serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

@media (max-width: 640px) {
    :root {
        --reach: 0.75rem;
    }

    header {
        padding: 0.9rem 1.1rem;
    }

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

    .feature .cell + .cell {
        border-left: 0;
        border-top: 1px solid var(--wire);
    }

    .headline {
        padding: 2.5rem 0.5rem 2.5rem 1rem;
    }

    .headline h1 {
        font-size: 9vw;
    }

    .mark {
        padding: 0.75rem;
    }

    .feature-text {
        padding: 2.5rem 1.25rem;
    }
}
