:root {
    --ink: #f7fbff;
    --muted: #b8c6d8;
    --cyan: #8be9ff;
    --amber: #ffd38a;
    --coral: #ff8f70;
    --green: #98ffc5;
    --panel: rgba(6, 11, 18, 0.54);
    --line: rgba(255, 255, 255, 0.16);
    --font-display: "Segoe UI Variable Display", "Segoe UI", "Aptos Display", sans-serif;
    --font-text: "Segoe UI Variable Text", "Segoe UI", "Aptos", sans-serif;
    --smoke-x: 50%;
    --smoke-y: 50%;
    --smoke-drift-x: 0px;
    --smoke-drift-y: 0px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: var(--font-text);
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.92)),
        radial-gradient(circle at 16% 18%, rgba(139, 233, 255, 0.16), transparent 34rem),
        radial-gradient(circle at 82% 66%, rgba(255, 143, 112, 0.11), transparent 30rem),
        #030508;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis: none;
    font-kerning: normal;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 76%, transparent);
}

body::after {
    position: fixed;
    inset: -18vmax;
    z-index: 0;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at var(--smoke-x) var(--smoke-y), rgba(139, 233, 255, 0.12), transparent 18rem),
        radial-gradient(circle at calc(var(--smoke-x) + 18%) calc(var(--smoke-y) - 12%), rgba(255, 211, 138, 0.08), transparent 24rem),
        radial-gradient(circle at calc(var(--smoke-x) - 22%) calc(var(--smoke-y) + 18%), rgba(152, 255, 197, 0.065), transparent 26rem),
        radial-gradient(ellipse at 50% 50%, rgba(90, 130, 170, 0.08), transparent 42rem);
    filter: blur(32px);
    mix-blend-mode: screen;
    opacity: 0.72;
    transform: translate3d(var(--smoke-drift-x), var(--smoke-drift-y), 0);
    transition: transform 520ms ease-out, opacity 260ms ease;
}

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    width: 100%;
    padding: 1.15rem clamp(1rem, 4vw, 4.5rem);
    background: linear-gradient(180deg, rgba(3, 5, 8, 0.78), rgba(3, 5, 8, 0));
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-decoration: none;
    text-shadow:
        0 0 1px rgba(247, 251, 255, 0.55),
        0 0 24px rgba(139, 233, 255, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: clamp(0.85rem, 2.8vw, 2.25rem);
    row-gap: 0.62rem;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: rgba(247, 251, 255, 0.76);
    font-size: 0.82rem;
    font-weight: 680;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 180ms ease, text-shadow 180ms ease;
    text-shadow: 0 0 1px rgba(247, 251, 255, 0.22);
}

.nav-links a::after {
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 100%;
    height: 1px;
    content: "";
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--cyan);
    text-shadow: 0 0 22px rgba(139, 233, 255, 0.55);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
}

.shape-progress {
    position: fixed;
    right: clamp(0.9rem, 2.8vw, 3rem);
    top: 50%;
    z-index: 4;
    display: grid;
    gap: 0.8rem;
    transform: translateY(-50%);
}

.shape-progress span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 8.2rem;
    color: rgba(247, 251, 255, 0.48);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 180ms ease, transform 180ms ease;
}

.shape-progress span::after {
    width: 0.54rem;
    height: 0.54rem;
    margin-left: 0.8rem;
    content: "";
    border: 1px solid currentColor;
    border-radius: 999px;
    box-shadow: 0 0 0 rgba(139, 233, 255, 0);
}

.shape-progress span.active {
    color: var(--cyan);
    transform: translateX(-0.35rem);
}

.shape-progress span.active::after {
    background: currentColor;
    box-shadow: 0 0 20px rgba(139, 233, 255, 0.75);
}

.content,
.site-footer {
    position: relative;
    z-index: 2;
}

.hero,
.stage-section {
    min-height: 100vh;
    padding: clamp(6rem, 10vw, 9rem) clamp(1.2rem, 7vw, 7rem);
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 58rem;
}

.eyebrow,
.stage-number {
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.title {
    font-family: var(--font-display);
    margin-top: 0.8rem;
    font-size: clamp(4.2rem, 13vw, 11.5rem);
    font-weight: 760;
    line-height: 0.82;
    text-shadow:
        0 0 1px rgba(247, 251, 255, 0.42),
        0 0 22px rgba(139, 233, 255, 0.18),
        0 14px 42px rgba(0, 0, 0, 0.66);
    -webkit-text-stroke: 0 transparent;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.subtitle {
    max-width: 42rem;
    margin-top: 1.7rem;
    color: var(--muted);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.55;
}

.stage-section {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 32rem) minmax(0, 1fr);
}

.stage-section--right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
}

.stage-section--right .stage-copy {
    grid-column: 2;
}

.stage-copy {
    max-width: 31rem;
    padding-left: 1.4rem;
    border-left: 1px solid rgba(139, 233, 255, 0.4);
}

.stage-copy h2 {
    font-family: var(--font-display);
    margin-top: 0.8rem;
    color: var(--ink);
    font-size: clamp(2.3rem, 5.4vw, 5.4rem);
    font-weight: 760;
    line-height: 0.96;
    text-shadow:
        0 0 1px rgba(247, 251, 255, 0.42),
        0 12px 34px rgba(0, 0, 0, 0.72);
    -webkit-text-stroke: 0 transparent;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.stage-copy p:not(.stage-number) {
    margin-top: 1.2rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    line-height: 1.75;
}

.site-footer {
    padding: 4rem 1.2rem 5rem;
    color: rgba(247, 251, 255, 0.56);
    text-align: center;
}

.site-footer a {
    color: var(--cyan);
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 0 18px rgba(139, 233, 255, 0.36);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--amber);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .site-header {
        padding-top: 0.9rem;
    }

    .site-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        row-gap: 0.62rem;
    }

    .nav-links a {
        font-size: 0.68rem;
    }

    .shape-progress {
        right: 0.7rem;
        gap: 0.55rem;
    }

    .shape-progress span {
        min-width: auto;
        width: 0.68rem;
        height: 0.68rem;
        color: rgba(247, 251, 255, 0.42);
        font-size: 0;
    }

    .shape-progress span::after {
        margin-left: 0;
    }

    .hero,
    .stage-section {
        min-height: 100vh;
        padding-right: 2.25rem;
    }

    .stage-section,
    .stage-section--right {
        grid-template-columns: 1fr;
    }

    .stage-section--right .stage-copy {
        grid-column: 1;
    }
}

@media (max-width: 520px) {
    .nav-links a {
        letter-spacing: 0.04em;
    }

    .title {
        font-size: clamp(3.8rem, 22vw, 6.4rem);
    }

    .subtitle {
        font-size: 1rem;
    }

}
