/* monopole.cloud - Cloud chamber ethereal experience */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    color: #e0e8f0;
    background: #0a0e1a;
    overflow-x: hidden;
    line-height: 1.75;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    letter-spacing: 0.02em;
}

/* Fog layers */
.fog {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
}

.fog-1 {
    background: radial-gradient(ellipse at 30% 40%, rgba(26, 39, 68, 0.05) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(108, 91, 158, 0.03) 0%, transparent 50%);
    animation: fogDrift1 120s linear infinite;
}

.fog-2 {
    background: radial-gradient(ellipse at 60% 30%, rgba(26, 39, 68, 0.04) 0%, transparent 55%),
                radial-gradient(ellipse at 20% 70%, rgba(10, 14, 26, 0.05) 0%, transparent 60%);
    animation: fogDrift2 95s linear infinite;
}

.fog-3 {
    background: radial-gradient(ellipse at 50% 50%, rgba(108, 91, 158, 0.03) 0%, transparent 50%);
    animation: fogDrift3 150s linear infinite;
}

@keyframes fogDrift1 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(5%, -3%); }
    100% { transform: translate(0, 0); }
}

@keyframes fogDrift2 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-4%, 2%); }
    100% { transform: translate(0, 0); }
}

@keyframes fogDrift3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(3%, 4%); }
    100% { transform: translate(0, 0); }
}

/* Domain watermark */
.watermark {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15vw;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    transition: color 600ms ease;
    letter-spacing: 0.08em;
}

body:hover .watermark {
    color: rgba(255, 255, 255, 0.04);
}

/* Nav dots */
.nav-dots {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 50;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(200, 214, 229, 0.3);
    display: block;
    transition: background 300ms ease, transform 300ms ease;
}

.dot.active {
    background: #7eb8da;
    transform: scale(1.5);
}

.dot-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: rgba(200, 214, 229, 0.1);
    z-index: -1;
}

/* Particle tracks */
.tracks-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 500vh;
    pointer-events: none;
    z-index: 1;
}

.track {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 4s ease;
}

.track.drawn {
    stroke-dashoffset: 0;
}

.track-anomaly {
    animation: anomalyPulse 2s ease-in-out infinite;
}

@keyframes anomalyPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Detection flash */
.detection-flash {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 184, 218, 0.6) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: width 1.5s ease-out, height 1.5s ease-out, opacity 1.5s ease-out;
}

.detection-flash.fired {
    width: 80vw;
    height: 80vw;
    opacity: 1;
}

.detection-flash.fade {
    opacity: 0;
}

/* Zones */
.zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 80px 32px;
}

/* Zone 1: Origin */
.zone-origin {
    min-height: 100vh;
}

.typewriter-container {
    text-align: center;
}

.typewriter-container span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    color: #c8d6e5;
    opacity: 0.5;
    letter-spacing: 0.08em;
}

/* Zone 2: Detection */
.zone-detection {
    justify-content: flex-end;
    padding-right: 10vw;
}

/* Zone 3: Theory */
.zone-theory {
    flex-direction: column;
}

.split-panels {
    display: flex;
    gap: 32px;
    max-width: 900px;
    width: 100%;
}

.field-svg {
    display: block;
    margin-top: 16px;
}

/* Zone 4: Evidence */
.zone-evidence {
    flex-direction: column;
    gap: 32px;
}

/* Zone 5: Horizon */
.zone-horizon {
    min-height: 100vh;
    background: linear-gradient(to bottom, #0a0e1a, #050710);
}

.horizon-statement {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Frost panels */
.frost-panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(10, 14, 26, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 40px;
    max-width: 520px;
}

.frost-center {
    max-width: 600px;
}

.frost-left {
    flex: 1;
}

.frost-right {
    flex: 1;
}

/* Slide reveal */
.slide-reveal {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.frost-left.slide-reveal {
    transform: translateX(-40px);
}

.frost-center.slide-reveal {
    transform: translateY(30px);
}

.slide-reveal.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Zone typography */
.zone-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 16px;
}

.zone-body {
    color: rgba(200, 210, 230, 0.8);
    margin-bottom: 16px;
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(140, 180, 220, 0.6);
    display: block;
    margin-bottom: 12px;
}

/* Data readout */
.data-readout {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 14, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    max-width: 400px;
    max-height: 200px;
    overflow: hidden;
}

.readout-lines {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: rgba(140, 180, 220, 0.6);
    letter-spacing: 0.04em;
    line-height: 1.8;
}

.readout-line {
    display: block;
    animation: readoutFade 0.5s ease forwards;
    opacity: 0;
}

@keyframes readoutFade {
    to { opacity: 1; }
}

/* Warm blush accent */
.blush-accent {
    color: #d4a0a0;
}

/* Palette reference classes */
.chamber-fog { background: #1a2744; }
.theory-violet { color: #6c5b9e; }

/* Mobile */
@media (max-width: 768px) {
    .split-panels {
        flex-direction: column;
    }

    .frost-panel {
        max-width: 90vw;
        padding: 24px;
    }

    .zone-detection {
        justify-content: center;
        padding-right: 32px;
    }

    .nav-dots {
        display: none;
    }

    .watermark {
        display: none;
    }
}
