/* ============================================================
   monopole.design — Pop-Art Particle Physics Magazine
   ============================================================ */

:root {
    --deep-bg: #1a1a2e;
    --chrome: #c8c8d0;
    --silver: #e8e8f0;
    --pop-magenta: #ff2d6b;
    --pop-cyan: #00e5ff;
    --pop-gold: #ffc107;
    --text-primary: #f5f5f7;
    --text-secondary: #6e7191;
    --spine-color: #c0c0c0;
    --pop-accent: #ff2d6b;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--deep-bg);
    color: var(--text-primary);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ---- Editorial Spine ---- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    background: var(--spine-color);
    z-index: 0;
    pointer-events: none;
}

/* ---- Spread Base ---- */
.spread {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: color 0.8s ease;
}

.spread__inner {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 3rem;
    position: relative;
    z-index: 2;
}

/* ---- Ben-Day Dot Overlay ---- */
.ben-day::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--pop-accent) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.12;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

/* ---- Chrome Dividers ---- */
.chrome-divider {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #e8e8f0 30%, #c8c8d0 50%, #e8e8f0 70%, transparent);
    z-index: 10;
    pointer-events: none;
}

.chrome-divider--1 { top: 100vh; }
.chrome-divider--2 { top: 200vh; }
.chrome-divider--3 { top: 300vh; }
.chrome-divider--4 { top: 400vh; }

/* ---- Clip Reveal Animation ---- */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.6s ease-out;
}

.clip-reveal.revealed {
    clip-path: inset(0 0 0 0);
}

/* ============================================================
   SPREAD 1: COVER
   ============================================================ */
.spread--cover {
    background: var(--deep-bg);
    color: var(--pop-magenta);
}

.spread__inner--cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
}

.cover-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pop-magenta);
    line-height: 1.1;
    margin-bottom: 2rem;
    width: 100%;
}

.cover-glyph {
    width: clamp(200px, 40vw, 400px);
    height: clamp(200px, 40vw, 400px);
    position: relative;
    margin: 2rem auto;
}

.monopole-glyph--cover {
    width: 100%;
    height: 100%;
    color: var(--pop-magenta);
}

.glyph-core {
    opacity: 0;
    transition: opacity 0.4s ease 3s;
}

.glyph-core.visible {
    opacity: 1;
}

.field-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 3s ease-out;
    opacity: 0.8;
}

.field-line.drawn {
    stroke-dashoffset: 0;
}

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

.field-line.pulsing {
    animation: fieldPulse 3s ease-in-out infinite;
}

.cover-subtitle {
    font-family: 'Righteous', cursive;
    font-size: clamp(1rem, 2vw, 1.6rem);
    letter-spacing: 0.05em;
    color: var(--chrome);
    margin-top: 2rem;
}

/* ============================================================
   SPREAD 2: DEFINITION
   ============================================================ */
.spread--definition {
    background: var(--deep-bg);
    color: var(--pop-cyan);
}

.spread__inner--definition {
    display: grid;
    grid-template-columns: 35fr 65fr;
    gap: 3rem;
    align-items: center;
    min-height: 100vh;
}

.definition-headline {
    font-family: 'Bungee', cursive;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pop-cyan);
    line-height: 1.2;
}

.feynman-diagram {
    width: 100%;
    max-width: 500px;
    color: var(--silver);
}

.feynman-fermion,
.feynman-photon,
.feynman-monopole {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.5s ease-out;
}

.feynman-fermion.drawn,
.feynman-photon.drawn,
.feynman-monopole.drawn {
    stroke-dashoffset: 0;
}

.feynman-vertex,
.feynman-arrow {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feynman-vertex.visible,
.feynman-arrow.visible {
    opacity: 1;
}

.diagram-caption {
    display: block;
    font-family: 'Space Mono', monospace;
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-top: 1rem;
    text-align: center;
}

/* ============================================================
   SPREAD 3: HISTORY
   ============================================================ */
.spread--history {
    background: var(--deep-bg);
    color: var(--pop-gold);
}

.spread__inner--history {
    max-width: 900px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem;
}

.history-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pop-gold);
    text-align: center;
    margin-bottom: 3rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-event--left .speech-bubble {
    margin-right: auto;
    margin-left: 0;
    max-width: 45%;
}

.timeline-event--right .speech-bubble {
    margin-left: auto;
    margin-right: 0;
    max-width: 45%;
}

.speech-bubble {
    background: var(--text-primary);
    color: var(--deep-bg);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    position: relative;
    border: 2px solid var(--pop-gold);
    box-shadow: 4px 4px 0 var(--deep-bg);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--pop-gold);
}

.timeline-event--left .speech-bubble::after {
    right: 30%;
}

.timeline-event--right .speech-bubble::after {
    left: 30%;
}

.speech-date {
    font-family: 'Bungee', cursive;
    font-size: 2rem;
    color: var(--pop-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.speech-text {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.6;
    color: var(--deep-bg);
}

.timeline-connector {
    width: 100px;
    height: 60px;
    color: var(--pop-gold);
    margin: 0.5rem 0;
}

.timeline-connector path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease-out;
}

.timeline-connector path.drawn {
    stroke-dashoffset: 0;
}

/* ============================================================
   SPREAD 4: SPECULATION
   ============================================================ */
.spread--speculation {
    background: var(--deep-bg);
    color: var(--pop-magenta);
}

.spread__inner--speculation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 100vh;
}

.speculation-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pop-magenta);
    margin-bottom: 2rem;
}

.speculation-col--text p {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.drop-cap::first-letter {
    font-family: 'Bungee', cursive;
    font-size: 3.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.1em;
    color: var(--pop-magenta);
}

.pull-quote {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--pop-magenta);
    border-left: 4px solid var(--pop-magenta);
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    line-height: 1.4;
}

.pull-quote-attr {
    display: block;
    font-family: 'Space Mono', monospace;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    letter-spacing: 0.08em;
}

.detector-illustration {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    color: var(--silver);
}

.detector-ring {
    stroke-dasharray: 1100;
    stroke-dashoffset: 1100;
    transition: stroke-dashoffset 2s ease-out;
}

.detector-ring.drawn {
    stroke-dashoffset: 0;
}

.detector-seg {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.5s ease-out;
}

.detector-seg.drawn {
    stroke-dashoffset: 0;
}

.detector-track {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease-out;
}

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

.detector-event,
.detector-node {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detector-event.visible,
.detector-node.visible {
    opacity: 1;
}

/* ============================================================
   SPREAD 5: COLOPHON
   ============================================================ */
.spread--colophon {
    background: var(--deep-bg);
    color: var(--pop-cyan);
}

.spread__inner--colophon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.colophon-funnel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.funnel-line {
    font-family: 'Bungee', cursive;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pop-cyan);
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.funnel-line.visible {
    opacity: 1;
}

.funnel-line--1 { font-size: clamp(3rem, 8vw, 7.5rem); }
.funnel-line--2 { font-size: clamp(2.6rem, 7vw, 6.5rem); }
.funnel-line--3 { font-size: clamp(2.2rem, 6vw, 5.5rem); }
.funnel-line--4 { font-size: clamp(1.8rem, 5vw, 4.5rem); }
.funnel-line--5 { font-size: clamp(1.4rem, 4vw, 3.5rem); }
.funnel-line--6 { font-size: clamp(1rem, 3vw, 2.5rem); }
.funnel-line--7 { font-size: clamp(0.8rem, 2vw, 1.5rem); }
.funnel-line--8 { font-size: clamp(0.6rem, 1vw, 0.75rem); }

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

.pulsing-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pop-cyan);
    margin-top: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.colophon-caption {
    font-family: 'Space Mono', monospace;
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* ============================================================
   MARGIN DECORATIONS
   ============================================================ */
.margin-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.margin-deco {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.4;
    transition: transform 0.3s ease;
}

.deco-1 { top: 15vh; left: calc(50% - 60px); }
.deco-2 { top: 35vh; right: calc(50% - 80px); left: auto; width: 50px; height: 30px; }
.deco-3 { top: 55vh; left: calc(50% - 50px); width: 30px; height: 30px; }
.deco-4 { top: 70vh; right: calc(50% - 65px); left: auto; width: 35px; height: 35px; }
.deco-5 { top: 88vh; left: calc(50% - 55px); width: 45px; height: 45px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .spread__inner--definition {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .spread__inner--speculation {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline-event--left .speech-bubble,
    .timeline-event--right .speech-bubble {
        max-width: 85%;
        margin: 0 auto;
    }

    .spread__inner {
        padding: 3rem 1.5rem;
    }

    .cover-title {
        letter-spacing: 0.08em;
    }
}
