/* ============================================================
   monopole.tech - Hypermodernist Scientific Design
   Colors: #0a0e27, #e63946, #00d9ff, #f1faee, #a8dadc, #ffd60a
   Fonts: Space Grotesk, Inter, Courier Prime
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background-color: #0a0e27;
    color: #f1faee;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.005em;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    overflow-x: hidden;
    position: relative;
}

/* ============================================================
   Timeline Navigation (Left Margin)
   ============================================================ */

#timeline-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 100;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #a8dadc15, #a8dadc08, transparent);
    transform: translateX(-50%);
}

.timeline-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: calc(70vh / 6);
    text-decoration: none;
    z-index: 2;
}

.node-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a8dadc;
    opacity: 0.25;
    transition: opacity 0.4s ease, background-color 0.4s ease, transform 0.4s ease;
}

.timeline-node.active .node-dot {
    opacity: 1;
    background: #00d9ff;
    transform: scale(1.5);
    box-shadow: 0 0 12px #00d9ff40;
}

.node-label {
    position: absolute;
    left: 50px;
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a8dadc;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-node:hover .node-label {
    opacity: 0.6;
}

.timeline-node.active .node-label {
    opacity: 0.8;
    color: #00d9ff;
}

/* ============================================================
   Data Dust (Right Margin)
   ============================================================ */

#data-dust {
    position: fixed;
    right: 10px;
    top: 0;
    height: 100vh;
    width: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-end;
    z-index: 50;
    pointer-events: none;
    padding: 3rem 0;
}

.dust-coord {
    font-family: 'Courier Prime', monospace;
    font-size: 0.55rem;
    color: #ffd60a;
    opacity: 0.12;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
    white-space: nowrap;
}

/* ============================================================
   Parallax Layers
   ============================================================ */

.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

.field-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300vh;
}

.field-line {
    fill: none;
    stroke-linecap: round;
}

.fl-bg-1, .fl-bg-2, .fl-bg-3, .fl-bg-4, .fl-bg-5, .fl-bg-6, .fl-bg-7 {
    stroke: #e63946;
    stroke-width: 1;
    opacity: 0.1;
    transition: opacity 1.2s ease, stroke 2s ease;
}

.fl-mid-1, .fl-mid-2, .fl-mid-3, .fl-mid-4, .fl-mid-5 {
    stroke: #00d9ff;
    stroke-width: 2;
    opacity: 0.15;
    transition: opacity 1.2s ease, stroke 2s ease;
}

.particle-annotation {
    position: absolute;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #a8dadc;
    opacity: 0.15;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

/* ============================================================
   Content Layer
   ============================================================ */

#content-layer {
    position: relative;
    z-index: 10;
}

/* ============================================================
   Zones (Sections)
   ============================================================ */

.zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 8rem 6rem 90px;
}

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

.zone-inner {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

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

/* Zone Header */
.zone-header {
    margin-bottom: 3rem;
    position: relative;
}

.zone-number {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #ffd60a;
    opacity: 0.5;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.75rem;
}

.zone-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: #f1faee;
    line-height: 1.1;
    opacity: 0.98;
}

/* Zone Content */
.zone-content {
    position: relative;
}

.zone-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-block {
    margin-bottom: 2rem;
}

.text-block p {
    margin-bottom: 1.2rem;
    color: #f1faee;
    opacity: 0.85;
}

.text-block-narrow {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.code-inline {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85em;
    color: #00d9ff;
    background: #00d9ff08;
    padding: 0.15em 0.4em;
    border-left: 2px solid #00d9ff30;
}

/* Formula Block */
.formula-block {
    margin: 2.5rem 0;
    padding: 2rem;
    text-align: center;
    position: relative;
    border-top: 1px solid #e6394620;
    border-bottom: 1px solid #e6394620;
}

.formula {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: #e63946;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.75rem;
}

.formula-caption {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #a8dadc;
    opacity: 0.6;
    font-style: italic;
}

/* ============================================================
   Zone Dividers
   ============================================================ */

.zone-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
}

.divider-svg {
    width: 100%;
    height: 100%;
}

.divider-line {
    fill: none;
    stroke: #00d9ff;
    stroke-width: 2;
    opacity: 0.2;
}

.divider-line-2 {
    stroke: #e63946;
    opacity: 0.15;
}

/* ============================================================
   Hero (Zone Origin)
   ============================================================ */

#zone-origin {
    min-height: 100vh;
    text-align: center;
}

.monopole-glyph {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.glyph-svg {
    width: 140px;
    height: 140px;
}

.glyph-ring {
    fill: none;
    stroke-width: 1;
}

.glyph-ring-outer {
    stroke: #e63946;
    opacity: 0.3;
    stroke-dasharray: 8 4;
}

.glyph-ring-mid {
    stroke: #00d9ff;
    opacity: 0.25;
    stroke-dasharray: 4 8;
}

.glyph-ring-inner {
    stroke: #ffd60a;
    opacity: 0.4;
}

.glyph-core {
    fill: #e63946;
    opacity: 0.9;
}

.glyph-field {
    stroke: #a8dadc;
    stroke-width: 1;
    opacity: 0.2;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f1faee;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    color: #a8dadc;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-domain {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: #ffd60a;
    opacity: 0.4;
    text-transform: uppercase;
}

/* ============================================================
   Detection Grid (Zone 3)
   ============================================================ */

.detection-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.detection-event {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    gap: 1.5rem;
    align-items: start;
    padding: 1.5rem 0;
    border-bottom: 1px solid #a8dadc08;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.detection-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.event-year {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: #ffd60a;
    opacity: 0.7;
    padding-top: 0.2rem;
}

.event-detail h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
    color: #f1faee;
    margin-bottom: 0.5rem;
}

.event-detail p {
    color: #f1faee;
    opacity: 0.7;
    font-size: 0.9rem;
    line-height: 1.6;
}

.event-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a8dadc;
    opacity: 0.5;
    text-align: right;
    padding-top: 0.3rem;
}

.event-status-anomalous {
    color: #e63946;
    opacity: 0.8;
}

.event-status-emergent {
    color: #00d9ff;
    opacity: 0.7;
}

/* ============================================================
   Implications (Zone 4)
   ============================================================ */

.implications-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.implication-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.implication-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.implication-symbol {
    font-size: 1.6rem;
    color: #e63946;
    opacity: 0.6;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    padding-top: 0.2rem;
}

.implication-text h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.025em;
    color: #f1faee;
    margin-bottom: 0.5rem;
}

.implication-text p {
    color: #f1faee;
    opacity: 0.75;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ============================================================
   Void (Zone 5 - Final)
   ============================================================ */

.zone-final {
    min-height: 100vh;
}

.void-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.void-glyph {
    margin-bottom: 3rem;
    animation: voidPulse 4s ease-in-out infinite;
}

.void-svg {
    width: 200px;
    height: 200px;
}

.void-core {
    animation: corePulse 2s ease-in-out infinite;
}

@keyframes voidPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes corePulse {
    0%, 100% { opacity: 0.6; r: 3; }
    50% { opacity: 1; r: 5; }
}

.void-quote {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #f1faee;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.5;
    border: none;
    margin-bottom: 1rem;
}

.void-cite {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: #a8dadc;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 3rem;
}

.void-domain {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: #e63946;
    opacity: 0.3;
    text-transform: uppercase;
}

/* ============================================================
   Field Visualization Canvas (Zone 2)
   ============================================================ */

#field-vis {
    margin-bottom: 2.5rem;
}

#field-canvas {
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    display: block;
}

/* ============================================================
   Geometric Micro-Elements
   ============================================================ */

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

.geo-hex {
    position: absolute;
    fill: none;
    stroke: #a8dadc;
    stroke-width: 0.5;
}

.geo-hex-1 {
    width: 80px;
    height: 80px;
    top: 8%;
    right: 12%;
    opacity: 0.04;
    transform: rotate(15deg);
}

.geo-hex-2 {
    width: 50px;
    height: 50px;
    bottom: 15%;
    left: 8%;
    opacity: 0.03;
    transform: rotate(-10deg);
}

.geo-hex-3 {
    width: 120px;
    height: 120px;
    top: 55%;
    right: 5%;
    opacity: 0.025;
    transform: rotate(30deg);
}

/* ============================================================
   Scroll-triggered animations
   ============================================================ */

.zone {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.zone.zone-visible {
    opacity: 1;
}

#zone-origin {
    opacity: 1;
}

/* Glyph rotation */
.glyph-ring-outer {
    animation: ringRotate 30s linear infinite;
    transform-origin: center;
}

.glyph-ring-mid {
    animation: ringRotate 20s linear infinite reverse;
    transform-origin: center;
}

.glyph-ring-inner {
    animation: ringRotate 10s linear infinite;
    transform-origin: center;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Field line color shift */
.field-shift-cyan .fl-bg-1,
.field-shift-cyan .fl-bg-2,
.field-shift-cyan .fl-bg-3,
.field-shift-cyan .fl-bg-4,
.field-shift-cyan .fl-bg-5,
.field-shift-cyan .fl-bg-6,
.field-shift-cyan .fl-bg-7 {
    stroke: #00d9ff;
    opacity: 0.15;
}

.field-shift-red .fl-mid-1,
.field-shift-red .fl-mid-2,
.field-shift-red .fl-mid-3,
.field-shift-red .fl-mid-4,
.field-shift-red .fl-mid-5 {
    stroke: #e63946;
    opacity: 0.2;
}

/* ============================================================
   Magnetic Hover States
   ============================================================ */

.detection-event:hover,
.implication-item:hover {
    cursor: default;
}

.detection-event:hover .event-year {
    color: #00d9ff;
    transition: color 0.3s ease;
}

.implication-item:hover .implication-symbol {
    transform: rotate(15deg) scale(1.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .zone {
        padding: 4rem 2rem 4rem 70px;
    }

    .detection-event {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .event-status {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 600px) {
    #timeline-nav {
        display: none;
    }

    #data-dust {
        display: none;
    }

    .zone {
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 4rem);
    }

    .detection-event {
        grid-template-columns: 1fr;
    }

    .event-year {
        font-size: 0.75rem;
    }
}
