:root {
    --bg: #06131a;
    --bg-deep: #03090d;
    --panel: rgba(7, 22, 31, 0.72);
    --panel-strong: rgba(8, 26, 36, 0.9);
    --line: rgba(102, 227, 255, 0.18);
    --text: #eff7fb;
    --muted: #8ea8b3;
    --cyan: #62e7ff;
    --lime: #d4ff62;
    --orange: #ff8f42;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    --radius: 28px;
    --content: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(98, 231, 255, 0.16), transparent 32%),
        radial-gradient(circle at 85% 15%, rgba(255, 143, 66, 0.15), transparent 26%),
        linear-gradient(160deg, #06131a 0%, #091b24 45%, #03090d 100%);
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.depth-canvas,
.noise-layer,
.aurora,
.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.depth-canvas {
    z-index: -5;
}

.noise-layer {
    z-index: -4;
    opacity: 0.06;
    background-image:
        linear-gradient(transparent 0, rgba(255, 255, 255, 0.15) 50%, transparent 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.aurora {
    z-index: -3;
    filter: blur(55px);
    opacity: 0.38;
}

.aurora-a {
    background: radial-gradient(circle at 20% 20%, rgba(98, 231, 255, 0.26), transparent 40%);
    animation: driftA 18s ease-in-out infinite;
}

.aurora-b {
    background: radial-gradient(circle at 80% 30%, rgba(212, 255, 98, 0.18), transparent 38%);
    animation: driftB 24s ease-in-out infinite;
}

.spotlight {
    z-index: -2;
    background: radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 30%), rgba(98, 231, 255, 0.16), transparent 22%);
    transition: background-position 0.1s linear;
}

.site-header,
.hero-section,
.content-section,
.site-footer {
    width: min(calc(100% - 40px), var(--content));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    margin-top: 18px;
    background: rgba(6, 19, 26, 0.66);
    border: 1px solid rgba(98, 231, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--lime));
    box-shadow: 0 0 18px rgba(98, 231, 255, 0.9);
}

.site-nav {
    display: flex;
    gap: 24px;
    color: var(--muted);
}

.site-nav a {
    position: relative;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

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

.header-cta,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.header-cta {
    padding: 12px 18px;
    font-size: 0.92rem;
    background: linear-gradient(135deg, rgba(98, 231, 255, 0.18), rgba(212, 255, 98, 0.16));
    border-color: rgba(98, 231, 255, 0.22);
}

.header-cta:hover,
.btn:hover,
.signal-card:hover,
.feature-card:hover,
.lab-console:hover {
    transform: translateY(-3px);
}

.hero-section {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 72px 0 40px;
}

.hero-copy h1,
.section-heading h2,
.lab-copy h2,
.cta-shell h2,
.not-found-shell h1 {
    margin: 0;
    line-height: 0.95;
    font-size: clamp(3.4rem, 8vw, 7rem);
    letter-spacing: -0.05em;
}

.hero-copy h1 span,
.section-heading h2 span,
.not-found-shell h1 span {
    display: block;
    color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--lime), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--cyan);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-text,
.section-heading p,
.lab-copy p,
.cta-shell p,
.site-footer,
.not-found-shell p {
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.btn {
    padding: 15px 24px;
    font-weight: 700;
}

.btn-primary {
    color: #041117;
    background: linear-gradient(135deg, var(--cyan), var(--lime));
    box-shadow: 0 16px 40px rgba(98, 231, 255, 0.18);
}

.btn-secondary {
    border-color: rgba(98, 231, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.signal-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

.signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 34px;
}

.signal-card,
.feature-card,
.glass-panel,
.cta-shell,
.not-found-shell {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(98, 231, 255, 0.14);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.signal-card::before,
.feature-card::before,
.glass-panel::before,
.cta-shell::before,
.not-found-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(98, 231, 255, 0.14), transparent 38%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.signal-card:hover::before,
.feature-card:hover::before,
.glass-panel:hover::before,
.cta-shell:hover::before,
.not-found-shell:hover::before {
    opacity: 1;
}

.signal-card {
    padding: 22px;
}

.signal-index,
.feature-tag,
.panel-kicker,
.console-title,
.console-status {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signal-index {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--cyan);
}

.signal-card strong,
.feature-card h3 {
    display: block;
    margin-bottom: 10px;
    font-size: 1.08rem;
}

.signal-card p,
.feature-card p,
.lab-list,
.console-line span {
    color: var(--muted);
    line-height: 1.7;
}

.hero-scene {
    position: relative;
    min-height: 640px;
}

.scene-shell {
    position: relative;
    width: min(100%, 620px);
    height: 620px;
    margin: 0 auto;
    transform-style: preserve-3d;
    perspective: 1400px;
}

.orbit-ring,
.core-orb,
.floating-token {
    position: absolute;
    left: 50%;
    top: 50%;
}

.orbit-ring {
    border-radius: 50%;
    border: 1px solid rgba(98, 231, 255, 0.12);
    transform-style: preserve-3d;
}

.ring-outer {
    width: 470px;
    height: 470px;
    transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0deg);
    animation: orbitSpin 18s linear infinite;
}

.ring-mid {
    width: 370px;
    height: 370px;
    border-color: rgba(212, 255, 98, 0.16);
    transform: translate(-50%, -50%) rotateY(74deg) rotateZ(0deg);
    animation: orbitSpinReverse 14s linear infinite;
}

.core-orb {
    width: 240px;
    height: 240px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateZ(70px);
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 24%),
        conic-gradient(from 30deg, rgba(98, 231, 255, 0.7), rgba(212, 255, 98, 0.3), rgba(255, 143, 66, 0.7), rgba(98, 231, 255, 0.7));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 90px rgba(98, 231, 255, 0.2),
        inset 0 0 50px rgba(255, 255, 255, 0.08);
    animation: orbFloat 8s ease-in-out infinite;
}

.core-grid,
.core-pulse {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
}

.core-grid {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(rgba(3, 9, 13, 0.18), rgba(3, 9, 13, 0.18)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 20px),
        repeating-linear-gradient(rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 20px);
    transform: rotate(18deg);
}

.core-pulse {
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: pulse 2.4s ease-in-out infinite;
}

.core-label {
    position: relative;
    z-index: 1;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    color: #031218;
    font-weight: 700;
}

.glass-panel {
    padding: 22px;
    transform-style: preserve-3d;
}

.terminal-panel {
    width: 320px;
    top: 86px;
    left: 30px;
    transform: rotateX(16deg) rotateY(8deg) translateZ(95px);
}

.panel-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.panel-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.terminal-copy p,
.code-stack span {
    margin: 0 0 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.88rem;
    color: #dce8ee;
}

.terminal-copy strong,
.console-line strong {
    color: var(--lime);
}

.status-panel {
    width: 250px;
    right: 10px;
    top: 155px;
    left: auto;
    transform: rotateX(-12deg) rotateY(-18deg) translateZ(110px);
}

.metric-item + .metric-item,
.console-line + .console-line {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

.metric-item strong {
    font-size: 1rem;
}

.code-panel {
    width: 355px;
    left: 90px;
    bottom: 78px;
    transform: rotateX(8deg) rotateY(-14deg) translateZ(120px);
}

.code-stack span:last-child,
.terminal-copy p:last-child {
    margin-bottom: 0;
}

.floating-token {
    padding: 10px 14px;
    border-radius: 999px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
}

.token-a {
    transform: translate(-220px, -240px) rotate(-10deg);
    animation: tokenFloat 9s ease-in-out infinite;
}

.token-b {
    transform: translate(135px, -235px) rotate(12deg);
    animation: tokenFloat 11s ease-in-out infinite reverse;
}

.token-c {
    transform: translate(140px, 190px) rotate(-8deg);
    animation: tokenFloat 10s ease-in-out infinite;
}

.content-section {
    padding: 64px 0;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 28px;
}

.section-heading h2,
.lab-copy h2,
.cta-shell h2 {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 1;
}

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

.feature-card {
    padding: 28px;
}

.feature-tag {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 12px;
    color: var(--cyan);
    border-radius: 999px;
    background: rgba(98, 231, 255, 0.08);
}

.lab-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 24px;
    align-items: start;
}

.lab-list {
    padding-left: 20px;
}

.lab-list li + li {
    margin-top: 12px;
}

.lab-console {
    padding: 26px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.console-status {
    color: var(--lime);
}

.console-line {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cta-section {
    padding-bottom: 100px;
}

.cta-shell,
.not-found-shell {
    padding: 34px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 0 0 44px;
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--cyan);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.not-found-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 20px;
}

.not-found-shell {
    width: min(100%, 760px);
    text-align: center;
}

.not-found-shell .hero-actions {
    justify-content: center;
}

@keyframes driftA {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(40px, 20px, 0);
    }
}

@keyframes driftB {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(-55px, 45px, 0);
    }
}

@keyframes orbitSpin {
    from {
        transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg);
    }
}

@keyframes orbitSpinReverse {
    from {
        transform: translate(-50%, -50%) rotateY(74deg) rotateZ(360deg);
    }
    to {
        transform: translate(-50%, -50%) rotateY(74deg) rotateZ(0deg);
    }
}

@keyframes orbFloat {
    0%,
    100% {
        transform: translate(-50%, -50%) translateZ(70px) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateZ(100px) translateY(-12px);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.35;
    }
}

@keyframes tokenFloat {
    0%,
    100% {
        margin-top: 0;
    }
    50% {
        margin-top: -12px;
    }
}

@media (max-width: 1100px) {
    .site-header {
        border-radius: 28px;
    }

    .hero-section,
    .lab-layout {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding-top: 42px;
    }

    .hero-scene {
        order: -1;
        min-height: 560px;
    }

    .feature-grid,
    .signal-grid {
        grid-template-columns: 1fr;
    }

    .scene-shell {
        height: 560px;
    }

    .terminal-panel {
        top: 70px;
    }

    .status-panel {
        right: 14px;
        top: 120px;
    }

    .code-panel {
        left: 40px;
    }
}

@media (max-width: 760px) {
    .site-header,
    .site-footer {
        width: min(calc(100% - 24px), var(--content));
    }

    .site-header {
        position: relative;
        top: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .site-nav {
        justify-content: space-between;
        gap: 12px;
        font-size: 0.9rem;
    }

    .hero-copy h1,
    .not-found-shell h1 {
        font-size: clamp(2.6rem, 14vw, 4.3rem);
    }

    .hero-scene {
        min-height: 460px;
    }

    .scene-shell {
        height: 460px;
    }

    .ring-outer {
        width: 330px;
        height: 330px;
    }

    .ring-mid {
        width: 260px;
        height: 260px;
    }

    .core-orb {
        width: 170px;
        height: 170px;
    }

    .glass-panel {
        padding: 18px;
    }

    .terminal-panel,
    .status-panel,
    .code-panel {
        width: calc(100% - 26px);
        left: 13px;
        right: auto;
        transform: none;
    }

    .terminal-panel {
        top: 18px;
    }

    .status-panel {
        top: 170px;
    }

    .code-panel {
        bottom: 16px;
    }

    .floating-token {
        display: none;
    }

    .cta-shell,
    .feature-card,
    .signal-card,
    .not-found-shell {
        padding: 24px;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
