@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=Work+Sans:wght@300;400;500&display=swap');

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

:root {
    --deep-void: #0A0A1A;
    --void: #050510;
    --spectral-white: #E8E0F0;
    --slate-blue: #7B68EE;
    --bioluminescent-teal: #00D4AA;
    --nebula-rose: #FF7EB3;
    --twilight-depth: #1A1A3A;
    --indigo-shadow: #4A3B8C;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(ellipse at center, var(--deep-void) 0%, var(--void) 100%);
    background-attachment: fixed;
    color: var(--spectral-white);
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.3vw, 1.05rem);
    line-height: 1.8;
    overflow-x: hidden;
    cursor: default;
}

/* ========================================
   CANVAS LAYERS
   ======================================== */

#particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#wireframe-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.connection-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.click-pulse-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

.click-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--slate-blue);
    opacity: 0;
    pointer-events: none;
    animation: clickPulse 600ms ease-out forwards;
}

@keyframes clickPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 0.3;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

/* ========================================
   NAVIGATION CONSTELLATION
   ======================================== */

.nav-constellation {
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    opacity: 0;
    animation: fadeInSlow 1.5s ease-out 2.5s forwards;
}

.nav-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(123, 104, 238, 0.1);
    z-index: -1;
}

.nav-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--slate-blue);
    border: none;
    cursor: pointer;
    opacity: 0.35;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    padding: 0;
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--slate-blue);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-dot:hover::after {
    opacity: 0.6;
}

.nav-dot:hover {
    opacity: 0.7;
    transform: scale(1.3);
}

.nav-dot.active {
    width: 8px;
    height: 8px;
    opacity: 1;
    box-shadow: 0 0 12px rgba(123, 104, 238, 0.5), 0 0 24px rgba(123, 104, 238, 0.2);
    animation: navPulse 2.5s ease-in-out infinite;
}

@keyframes navPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(123, 104, 238, 0.5), 0 0 24px rgba(123, 104, 238, 0.2); }
    50% { box-shadow: 0 0 18px rgba(123, 104, 238, 0.7), 0 0 36px rgba(123, 104, 238, 0.3); }
}

@keyframes fadeInSlow {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   MAIN CONTENT ZONES
   ======================================== */

.void-content {
    position: relative;
    z-index: 10;
}

.void-zone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

.void-zone + .void-zone {
    margin-top: 20vh;
}

.zone-inner {
    position: relative;
    max-width: 900px;
    width: 100%;
}

.zone-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.zone-canvas-large {
    width: 600px;
    height: 350px;
}

.void-zone.in-view .zone-canvas {
    opacity: 1;
}

/* ========================================
   AWAKENING (HERO) ZONE
   ======================================== */

.zone-awakening {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.awakening-inner {
    text-align: left;
    position: relative;
    z-index: 10;
    padding-left: 38.2%;
    padding-right: 10%;
}

.site-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5rem);
    letter-spacing: -0.03em;
    color: var(--spectral-white);
    line-height: 1.1;
}

.site-title .char {
    display: inline-block;
    opacity: 0;
    animation: charReveal 0.6s ease-out forwards;
    animation-delay: calc(0.8s + var(--delay) * 0.12s);
}

@keyframes charReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
        text-shadow: 0 0 0 rgba(123, 104, 238, 0);
    }
    60% {
        text-shadow: 0 0 60px rgba(123, 104, 238, 0.6);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 0 40px rgba(123, 104, 238, 0.15);
    }
}

.site-tagline {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    letter-spacing: 0.3em;
    color: var(--bioluminescent-teal);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeUp 1.5s ease-out 2.2s forwards;
    text-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   CONTENT ZONE TEXT
   ======================================== */

.zone-text {
    position: relative;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.void-zone.in-view .zone-text {
    opacity: 1;
    transform: translateY(0);
}

.void-zone.past-view .zone-text {
    opacity: 0.5;
    transition: opacity 0.8s ease;
}

/* Asymmetric golden-spiral placement */

.zone-input-inner .zone-text {
    margin-left: 10%;
    max-width: 520px;
}

.zone-input-inner .zone-canvas {
    right: 8%;
    left: auto;
    transform: translate(0, -50%);
}

.zone-processing-inner .zone-text {
    margin-left: 38.2%;
    max-width: 480px;
}

.zone-processing-inner .zone-canvas {
    left: 5%;
    transform: translate(0, -50%);
}

.zone-pattern-inner .zone-text {
    margin-left: 15%;
    max-width: 500px;
}

.zone-pattern-inner .zone-canvas {
    right: 5%;
    left: auto;
    transform: translate(0, -50%);
}

.zone-output-inner .zone-text {
    margin-left: 38.2%;
    max-width: 480px;
}

.zone-output-inner .zone-canvas {
    left: 8%;
    transform: translate(0, -50%);
}

.zone-loop-inner .zone-text {
    margin-left: 20%;
    max-width: 500px;
}

.zone-loop-inner .zone-canvas {
    right: 10%;
    left: auto;
    transform: translate(0, -50%);
}

.zone-neural-inner {
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zone-neural-inner .zone-canvas-large {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 3rem;
}

.zone-text-neural {
    text-align: center;
    max-width: 600px;
}

.zone-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5rem);
    letter-spacing: -0.03em;
    color: var(--spectral-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(123, 104, 238, 0.15);
}

.zone-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.3vw, 1.05rem);
    line-height: 1.8;
    color: rgba(232, 224, 240, 0.65);
    max-width: 520px;
}

/* Glow intensification on hover */
.zone-title:hover {
    text-shadow: 0 0 50px rgba(123, 104, 238, 0.3), 0 0 100px rgba(123, 104, 238, 0.1);
    transition: text-shadow 0.3s ease;
}

.zone-body:hover {
    color: rgba(232, 224, 240, 0.8);
    transition: color 0.3s ease;
}

/* ========================================
   GLOW EFFECTS
   ======================================== */

.void-zone.in-view .zone-title {
    text-shadow: 0 0 40px rgba(123, 104, 238, 0.2), 0 0 80px rgba(123, 104, 238, 0.08);
    transition: text-shadow 0.4s ease;
}

.void-zone.past-view .zone-title {
    text-shadow: 0 0 20px rgba(123, 104, 238, 0.05);
}

/* ========================================
   END / FOOTER ZONE
   ======================================== */

.zone-end {
    min-height: 60vh;
}

.zone-end-inner {
    text-align: center;
}

.end-glow {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 2rem);
    letter-spacing: 0.08em;
    color: rgba(123, 104, 238, 0.3);
    text-shadow: 0 0 30px rgba(123, 104, 238, 0.15), 0 0 60px rgba(123, 104, 238, 0.05);
}

.end-tagline {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: rgba(0, 212, 170, 0.25);
    margin-top: 1rem;
    text-shadow: 0 0 15px rgba(0, 212, 170, 0.1);
}

/* ========================================
   CURSOR BRIGHTNESS AREA
   ======================================== */

.cursor-glow {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 104, 238, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 4;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .nav-constellation {
        left: 14px;
        gap: 20px;
    }

    .awakening-inner {
        padding-left: 8%;
        padding-right: 8%;
    }

    .zone-input-inner .zone-text,
    .zone-processing-inner .zone-text,
    .zone-pattern-inner .zone-text,
    .zone-output-inner .zone-text,
    .zone-loop-inner .zone-text {
        margin-left: 8%;
        margin-right: 8%;
    }

    .zone-canvas {
        display: none;
    }

    .zone-neural-inner .zone-canvas-large {
        width: 100%;
        height: 250px;
        display: block;
    }

    .void-zone + .void-zone {
        margin-top: 10vh;
    }
}
