:root {
    --bg: #080b16;
    --bg-alt: #0d1224;
    --surface: #111830;
    --surface-2: #141c38;
    --line: rgba(241, 243, 250, 0.09);
    --line-strong: rgba(241, 243, 250, 0.16);
    --text: #f1f3fa;
    --text-dim: #909ac2;
    --text-faint: #5c6489;
    --violet: #5b6ef5;
    --violet-dim: #3b4494;
    --magenta: #ff3d81;
    --cyan: #4ce0d2;
    --amber: #ffb347;
    --red: #ff4d5e;
    --green: #3dd68c;

    --font-display: 'Chakra Petch', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

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

    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
}

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-bg span {
    position: absolute;
    width: 46vw;
    height: 46vw;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    will-change: transform;
}

.aurora-bg span:nth-child(1) {
    background: var(--violet);
    top: -10%;
    left: -8%;
    animation: drift1 26s ease-in-out infinite;
}

.aurora-bg span:nth-child(2) {
    background: var(--magenta);
    top: 20%;
    right: -14%;
    animation: drift2 32s ease-in-out infinite;
}

.aurora-bg span:nth-child(3) {
    background: var(--cyan);
    bottom: -16%;
    left: 20%;
    animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(6vw, 8vh) scale(1.15);
    }
}

@keyframes drift2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-8vw, 6vh) scale(0.9);
    }
}

@keyframes drift3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5vw, -7vh) scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .aurora-bg span {
        animation: none !important;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--magenta);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
    animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

/* ---------- NAV ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(8, 11, 22, 0.72);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, background .3s ease;
}

header.scrolled {
    border-bottom-color: var(--line);
    background: rgba(8, 11, 22, 0.9);
}

nav.wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--magenta), var(--violet));
    box-shadow: 0 0 12px var(--magenta);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 14px;
    color: var(--text-dim);
}

.nav-links a {
    transition: color .2s ease;
    position: relative;
}

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

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.nav-links a:not(.btn):hover::after {
    transform: scaleX(1);
}

.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--magenta), var(--violet));
    border: none;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -8px rgba(255, 61, 129, 0.55);
}

.btn-outline {
    background: transparent;
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-2px);
}

.btn-ghost {
    border: none;
    background: var(--surface);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-2);
}

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

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: 190px 0 120px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.9;
}

.hero-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.025) 0px,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 3px
    );
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

.hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: 1;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.enter {
    opacity: 0;
    transform: translateY(22px);
    animation: enter-up .8s cubic-bezier(.16, .8, .3, 1) forwards;
}

.enter-1 {
    animation-delay: .05s;
}

.enter-2 {
    animation-delay: .2s;
}

.enter-3 {
    animation-delay: .38s;
}

.enter-4 {
    animation-delay: .54s;
}

.enter-5 {
    animation-delay: .7s;
}

@keyframes enter-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .enter {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.01;
    letter-spacing: -0.01em;
    margin: 22px 0 26px;
}

.hero h1 span {
    display: block;
    background: linear-gradient(100deg, var(--cyan), var(--violet) 45%, var(--magenta) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: sheen 6s linear infinite;
}

@keyframes sheen {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.hero p.lede {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 560px;
    margin-bottom: 38px;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.btn-lg {
    padding: 14px 26px;
    font-size: 15px;
    border-radius: 10px;
}

.hero-readout {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    max-width: 560px;
}

.hero-readout b {
    color: var(--cyan);
    font-weight: 500;
}

/* ---------- SECTION HEADS ---------- */
section {
    position: relative;
}

.section-pad {
    padding: 120px 0;
}

.section-head {
    max-width: 620px;
    margin-bottom: 64px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 40px);
    margin-top: 14px;
    letter-spacing: -0.01em;
}

.section-head p {
    color: var(--text-dim);
    margin-top: 14px;
    font-size: 16px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.16, .8, .3, 1), transform .7s cubic-bezier(.16, .8, .3, 1);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- PIPELINE ---------- */
.pipeline {
    background: var(--bg-alt);
}

.pipeline-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.pipe-step {
    background: var(--bg-alt);
    padding: 36px 28px;
    position: relative;
    transition: background .25s ease;
}

.pipe-step:hover {
    background: var(--surface);
}

.pipe-step .num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--magenta);
    letter-spacing: 0.1em;
}

.pipe-step h3 {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 14px 0 10px;
    letter-spacing: 0.02em;
}

.pipe-step p {
    font-size: 14px;
    color: var(--text-dim);
}

.pipe-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -13px;
    top: 36px;
    color: var(--text-faint);
    font-size: 14px;
    z-index: 2;
    background: var(--bg-alt);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
}

.pipeline-flow {
    position: absolute;
    top: 36px;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}

.pipeline-flow i {
    position: absolute;
    top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
    animation: flow-across 3.2s linear infinite;
}

.pipeline-flow i:nth-child(2) {
    animation-delay: 1.07s;
}

.pipeline-flow i:nth-child(3) {
    animation-delay: 2.13s;
}

@keyframes flow-across {
    0% {
        left: 2%;
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    94% {
        opacity: 1;
    }
    100% {
        left: 98%;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pipeline-flow {
        display: none;
    }
}

@media (max-width: 860px) {
    .pipeline-flow {
        display: none;
    }
}

@media (max-width: 860px) {
    .pipeline-grid {
        grid-template-columns:1fr;
    }

    .pipe-step:not(:last-child)::after {
        display: none;
    }
}

/* ---------- SIGNATURE NETWORK ---------- */
.network-section {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.network-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 36px;
}

.network-live {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.network-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: blink 1.8s ease-in-out infinite;
}

.network-stage {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: radial-gradient(circle at 50% 40%, rgba(91, 110, 245, 0.10), transparent 60%), var(--bg);
    overflow: hidden;
    height: 520px;
}

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

.network-legend {
    position: absolute;
    left: 20px;
    bottom: 18px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.network-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ---------- extra signature stages ---------- */
.stage-stack {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.terminal-log {
    position: absolute;
    top: 20px;
    right: 20px;
    width: min(340px, 44%);
    background: rgba(8, 11, 22, 0.75);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text-dim);
    backdrop-filter: blur(6px);
    max-height: 170px;
    overflow: hidden;
}

.terminal-log .line {
    opacity: 0;
    transform: translateY(4px);
    animation: log-in .4s ease forwards;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-log .line .tag {
    color: var(--cyan);
}

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

@media (max-width: 760px) {
    .terminal-log {
        position: static;
        width: 100%;
        margin-top: 16px;
        max-height: 150px;
    }
}

/* ---------- CTA / FOOTER ---------- */
.cta {
    padding: 130px 0 160px;
    text-align: center;
}

.cta h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(30px, 5vw, 52px);
    letter-spacing: -0.01em;
}

.cta p {
    color: var(--text-dim);
    margin: 18px auto 34px;
    max-width: 480px;
}

.cta-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.cta-form input {
    flex: 1;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 13px 16px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
}

.cta-form input::placeholder {
    color: var(--text-faint);
}

.cta-form input:focus {
    border-color: var(--cyan);
    outline: none;
}