/* monopole.one - Design System */
/* Colors: Deep Monopole #0B0A12, Dark Matter #131220, Fog Lavender #C8C4D4, 
   Dim Amethyst #6D6A7A, Monopole Yellow #E8F54A, Field Magenta #E84A8A, 
   Spin Cyan #4AE8D4, Aura White #F0EDF8 */

:root {
    --bg-primary: #0B0A12;
    --bg-secondary: #131220;
    --text-primary: #C8C4D4;
    --text-secondary: #6D6A7A;
    --accent-yellow: #E8F54A;
    --accent-magenta: #E84A8A;
    --accent-cyan: #4AE8D4;
    --aura-white: #F0EDF8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Literata', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Field Lines SVG Background ===== */
#field-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#field-lines path {
    fill: none;
    stroke-linecap: round;
}

/* ===== Particles ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: flicker var(--flicker-duration, 3s) ease-in-out infinite alternate;
    animation-delay: var(--flicker-delay, 0s);
}

@keyframes flicker {
    0% { opacity: 0.15; }
    100% { opacity: 0.7; }
}

/* ===== Navigation ===== */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.2rem 2rem;
    background: linear-gradient(180deg, rgba(11,10,18,0.9) 0%, rgba(11,10,18,0) 100%);
}

.nav-line {
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 1px;
    background: var(--text-secondary);
    opacity: 0.2;
    transform: translateY(-50%);
}

.nav-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 1;
}

.nav-dot:hover {
    border-color: var(--accent-magenta);
    box-shadow: 0 0 12px rgba(232, 74, 138, 0.4);
}

.nav-dot.active {
    border-color: var(--accent-cyan);
    background: var(--accent-cyan);
    box-shadow: 0 0 16px rgba(74, 232, 212, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(74, 232, 212, 0.3); }
    50% { box-shadow: 0 0 20px rgba(74, 232, 212, 0.6); }
}

.nav-label {
    position: absolute;
    bottom: -1.8rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-dot:hover .nav-label,
.nav-dot.active .nav-label {
    opacity: 1;
}

/* ===== Main Content ===== */
#content {
    position: relative;
    z-index: 2;
}

/* ===== Zone: Singularity ===== */
.zone-singularity {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.singularity-content {
    text-align: center;
    padding: 2rem;
}

.domain-name {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
}

.tagline {
    font-family: 'Literata', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-primary);
    line-height: 1.6;
    max-width: 32rem;
    margin: 0 auto 3rem;
    opacity: 0.85;
}

.monopole-point {
    display: flex;
    justify-content: center;
}

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

.monopole-svg .core {
    fill: var(--accent-yellow);
    filter: url(#glow);
}

.monopole-svg .ring {
    animation: ripple 4s ease-out infinite;
}

.monopole-svg .ring-1 {
    stroke: var(--accent-yellow);
    animation-delay: 0s;
}

.monopole-svg .ring-2 {
    stroke: var(--accent-magenta);
    animation-delay: 1.33s;
}

.monopole-svg .ring-3 {
    stroke: var(--accent-cyan);
    animation-delay: 2.66s;
}

@keyframes ripple {
    0% {
        r: 4;
        opacity: 0.5;
    }
    100% {
        r: 80;
        opacity: 0;
    }
}

/* ===== Masonry Grid ===== */
.masonry-grid {
    display: grid;
    grid-template-columns: 28% 38% 28%;
    gap: 1.2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== Blocks ===== */
.block {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 2rem 1.8rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Column spanning */
.span-2 {
    grid-column: span 1;
    min-height: 280px;
}

.span-3 {
    grid-column: span 2;
    min-height: 240px;
}

/* Block Label */
.block-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1rem;
}

/* Block Title */
.block-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

/* Block Body */
.block-body {
    font-family: 'Literata', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

/* ===== Theory Blocks ===== */
.block-theory {
    background-image: repeating-linear-gradient(
        4deg,
        transparent,
        transparent 11px,
        rgba(200, 196, 212, 0.04) 11px,
        rgba(200, 196, 212, 0.04) 12px
    );
    background-color: var(--bg-secondary);
}

.block-theory .block-title {
    color: var(--accent-yellow);
}

.block-theory::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-yellow);
    opacity: 0.6;
}

/* ===== Experiment Blocks ===== */
.block-experiment {
    background-image: radial-gradient(
        circle,
        rgba(200, 196, 212, 0.06) 1px,
        transparent 1px
    );
    background-size: 12px 12px;
    background-color: var(--bg-secondary);
}

.block-experiment .block-title {
    color: var(--accent-magenta);
}

.block-experiment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-magenta);
    opacity: 0.6;
}

/* ===== Math Blocks ===== */
.block-math {
    background-color: var(--bg-secondary);
}

.block-math .block-title {
    color: var(--accent-cyan);
}

.block-math::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-cyan);
    opacity: 0.6;
}

/* ===== Speculation Blocks ===== */
.block-speculation {
    background-color: var(--bg-secondary);
    position: relative;
}

.block-speculation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(232, 245, 74, 0.04),
        rgba(232, 74, 138, 0.04),
        rgba(74, 232, 212, 0.04)
    );
    background-size: 200% 200%;
    animation: specGradient 20s ease infinite;
    pointer-events: none;
    border-radius: 6px;
}

@keyframes specGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.block-speculation .block-title {
    color: var(--accent-yellow);
}

.block-speculation:nth-child(2n) .block-title {
    color: var(--accent-magenta);
}

.block-speculation:nth-child(3n) .block-title {
    color: var(--accent-cyan);
}

.block-speculation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-yellow), var(--accent-magenta), var(--accent-cyan));
    opacity: 0.6;
    z-index: 1;
}

/* ===== Equation ===== */
.equation {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--aura-white);
    text-align: center;
    padding: 1.2rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(200, 196, 212, 0.1);
    border-bottom: 1px solid rgba(200, 196, 212, 0.1);
    letter-spacing: 0.04em;
}

/* ===== Detector Diagram ===== */
.detector-diagram {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.detector-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
}

/* ===== Final Statement ===== */
.final-statement {
    width: 100%;
    padding: 6rem 2rem;
    text-align: center;
}

.still-searching {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: cycleColors 12s ease-in-out infinite;
}

@keyframes cycleColors {
    0%, 100% { color: var(--accent-yellow); }
    33% { color: var(--accent-magenta); }
    66% { color: var(--accent-cyan); }
}

/* ===== Zone spacing ===== */
.zone {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.zone-singularity {
    padding-top: 0;
    padding-bottom: 0;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .masonry-grid {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .block {
        width: 85vw;
    }

    .block:nth-child(even) {
        width: 65vw;
        align-self: flex-end;
    }

    .span-2,
    .span-3 {
        grid-column: span 1;
        min-height: auto;
    }

    #nav-bar {
        gap: 1.2rem;
        padding: 0.8rem 1rem;
    }

    .nav-label {
        display: none;
    }

    .final-statement {
        padding: 4rem 1rem;
    }
}

@media (max-width: 480px) {
    .block,
    .block:nth-child(even) {
        width: 92vw;
    }
    
    .domain-name {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
