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

:root {
    --cyan: #00e5ff;
    --teal: #007c8a;
    --amber: #d4a847;
    --mist: #a8c8d4;
    --frost: #e0f0f5;
    --navy: #1b2838;
    --abyss: #0a0e14;
    --trench: #0d1b2a;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--abyss);
    color: var(--frost);
    font-family: 'Commissioner', sans-serif;
    overflow-x: hidden;
}

.zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--abyss) 0%, var(--trench) 50%, var(--abyss) 100%);
}

/* Depth Counter */
#depth-counter {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--cyan);
    opacity: 0.4;
    z-index: 100;
    letter-spacing: 0.05em;
}

/* Cursor Probe */
#cursor-probe {
    position: fixed;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    pointer-events: none;
    z-index: 1000;
    transition: transform 0.15s ease-out;
    opacity: 0;
}

/* Zone 1 */
#zone1 {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 12vw;
}

#domain-title {
    font-weight: 300;
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--frost);
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#domain-title.visible {
    opacity: 1;
}

#subtitle {
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--mist);
    margin-top: 1.5rem;
    letter-spacing: 0.02em;
}

#subtitle span {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#subtitle span.visible {
    opacity: 1;
}

#hero-thread-line {
    position: absolute;
    bottom: 25%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 20%, var(--cyan) 80%, transparent 100%);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
    animation: pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { opacity: 0.4; }
    to { opacity: 0.8; }
}

/* Zone 2 */
#zone2 {
    align-items: stretch;
}

.zone2-grid {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    width: 100%;
    max-width: 1200px;
    padding: 0 5vw;
    gap: 2rem;
    align-items: center;
    min-height: 100vh;
}

#vertical-label {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--cyan);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    opacity: 0.6;
}

#zone2-content p {
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.8;
    color: var(--mist);
    max-width: 650px;
}

#concurrency-svg {
    height: 300px;
}

#concurrency-svg svg {
    width: 100%;
    height: 100%;
}

.fork-line {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.5s ease;
}

.fork-line.animate {
    stroke-dashoffset: 0;
}

/* Zone 3 */
#zone3 {
    flex-direction: column;
}

#thread-array {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 70%;
    max-width: 800px;
}

.thread-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 20%, var(--cyan) 80%, transparent 100%);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
    width: 0%;
    transition: width 0.8s ease-out, filter 0.2s ease, transform 0.2s ease;
    will-change: transform, width;
}

.thread-bar.animate {
    /* width set by JS */
}

/* Zone 4 */
#zone4 {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 12vw;
}

#features-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    cursor: default;
}

.node-point {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cyan), transparent);
    box-shadow: 0 0 4px var(--cyan);
    animation: node-pulse 2s ease-in-out infinite alternate;
    flex-shrink: 0;
}

@keyframes node-pulse {
    from { box-shadow: 0 0 4px var(--cyan); }
    to { box-shadow: 0 0 16px var(--cyan); }
}

.feature-text {
    font-weight: 300;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--frost);
    transition: color 0.3s ease;
}

.feature-item:hover .feature-text {
    color: #ffffff;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    transition: transform 0.3s ease-out;
    pointer-events: none;
}

.feature-item:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.amber {
    color: var(--amber);
    font-style: normal;
}

#zone4-halo {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Zone 5 */
#zone5 {
    flex-direction: column;
    background: var(--abyss);
}

#zone5-content {
    text-align: center;
}

#zone5-domain {
    font-weight: 200;
    font-size: 1.2rem;
    color: var(--mist);
    letter-spacing: 0.04em;
}

#zone5-tagline {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--cyan);
    opacity: 0.6;
    margin-top: 1rem;
}

#zone5-halo {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
    animation: halo-breathe 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes halo-breathe {
    from { transform: scale(0.8); opacity: 0.5; }
    to { transform: scale(1.2); opacity: 1; }
}

/* Timing Grid Overlay */
.zone::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 99px, rgba(27, 40, 56, 0.5) 99px, rgba(27, 40, 56, 0.5) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(27, 40, 56, 0.5) 99px, rgba(27, 40, 56, 0.5) 100px);
    pointer-events: none;
    opacity: 0.3;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    #cursor-probe {
        display: none;
    }
    #domain-title {
        opacity: 1;
    }
    #subtitle span {
        opacity: 1;
    }
    .thread-bar {
        width: var(--target-width) !important;
    }
    .fork-line {
        stroke-dashoffset: 0;
    }
}
