/* ================================================
   monopole.cloud — Styles
   Colors: #080812, #0f0f2e, #e8eaf6, #00f0ff, #ff2eaa, #7b2ff7, #f5c542
   Fonts: Playfair Display, Source Sans 3, IBM Plex Mono
   ================================================ */

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

:root {
    --void-black: #080812;
    --magnetic-indigo: #0f0f2e;
    --plasma-white: #e8eaf6;
    --monopole-cyan: #00f0ff;
    --aurora-magenta: #ff2eaa;
    --field-violet: #7b2ff7;
    --spark-gold: #f5c542;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--plasma-white);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---- HEADER ---- */
#site-header {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: var(--plasma-white);
    text-transform: uppercase;
}

.header-dot, .inline-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aurora-magenta);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255,46,170,0.6); transform: scale(1); }
    50% { box-shadow: 0 0 18px rgba(255,46,170,0.9); transform: scale(1.3); }
}

/* ---- SCROLL PROGRESS ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    right: 16px;
    width: 3px;
    height: 100vh;
    z-index: 999;
    background: rgba(232,234,246,0.06);
}

#scroll-progress-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--monopole-cyan), var(--field-violet), var(--aurora-magenta));
    box-shadow: 0 0 10px rgba(0,240,255,0.4);
    transition: height 0.1s linear;
}

/* ---- SVG FIELD LINES ---- */
#field-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

/* ---- DIAGONAL SECTIONS ---- */
.diagonal-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 120px 40px;
}

.diagonal-section::before {
    content: '';
    position: absolute;
    inset: -10% -5%;
    background: var(--section-bg);
    transform: skewY(var(--section-skew));
    z-index: -1;
}

.section-content {
    max-width: 720px;
    width: 100%;
    position: relative;
}

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

/* ---- TYPOGRAPHY ---- */
h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--plasma-white);
    margin-bottom: 0.3em;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--plasma-white);
    margin-bottom: 0.6em;
}

p {
    max-width: 38em;
    margin-bottom: 1.2em;
    color: rgba(232,234,246,0.85);
}

.mono-data {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    color: var(--monopole-cyan);
}

.section-number {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 1.5em;
    opacity: 0.6;
}

.field-equation {
    font-size: 1.8rem;
    text-align: center;
    margin: 1.5em 0;
    letter-spacing: 0.05em;
}

/* ---- AURORA BACKGROUNDS ---- */
.aurora-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 600px 200px at 30% 20%, rgba(0,240,255,0.08), transparent),
        radial-gradient(ellipse 400px 300px at 70% 60%, rgba(255,46,170,0.06), transparent),
        radial-gradient(ellipse 500px 250px at 50% 40%, rgba(123,47,247,0.07), transparent);
    background-size: 200% 200%;
    animation: aurora-drift 20s ease-in-out infinite;
}

.magenta-shift::after {
    background:
        radial-gradient(ellipse 600px 200px at 30% 20%, rgba(255,46,170,0.1), transparent),
        radial-gradient(ellipse 400px 300px at 70% 60%, rgba(123,47,247,0.09), transparent),
        radial-gradient(ellipse 500px 250px at 50% 40%, rgba(0,240,255,0.05), transparent);
    background-size: 200% 200%;
}

@keyframes aurora-drift {
    0% { background-position: 0% 0%, 100% 100%, 50% 50%; }
    50% { background-position: 30% 20%, 70% 30%, 20% 70%; }
    100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
}

/* ---- MONOPOLE GLYPH ---- */
#monopole-glyph {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 60px;
}

.glyph-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--monopole-cyan);
    box-shadow:
        0 0 30px rgba(0,240,255,0.5),
        0 0 60px rgba(0,240,255,0.2),
        inset 0 -2px 6px rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.2);
}

.glyph-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid var(--monopole-cyan);
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: ring-expand 3s ease-out infinite;
}

.ring-1 { width: 40px; height: 40px; animation-delay: 0s; }
.ring-2 { width: 40px; height: 40px; animation-delay: 1s; }
.ring-3 { width: 40px; height: 40px; animation-delay: 2s; }

@keyframes ring-expand {
    0% { width: 40px; height: 40px; opacity: 0.6; }
    100% { width: 160px; height: 160px; opacity: 0; }
}

/* ---- CONVERGENCE POINTS ---- */
.convergence-point .section-content {
    position: relative;
}

.convergence-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    pointer-events: none;
}

.conv-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid var(--monopole-cyan);
    opacity: 0;
}

.convergence-point.active .conv-ring {
    animation: conv-expand 1.5s ease-out forwards;
}
.convergence-point.active .conv-ring:nth-child(1) { animation-delay: 0s; }
.convergence-point.active .conv-ring:nth-child(2) { animation-delay: 0.15s; }
.convergence-point.active .conv-ring:nth-child(3) { animation-delay: 0.3s; }
.convergence-point.active .conv-ring:nth-child(4) { animation-delay: 0.45s; }
.convergence-point.active .conv-ring:nth-child(5) { animation-delay: 0.6s; }

@keyframes conv-expand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

.gold-rings .conv-ring {
    border-color: var(--spark-gold);
}

.convergence-point.active .glow-flash {
    box-shadow: 0 0 80px rgba(0,240,255,0.5);
}

.detection-counter {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    position: relative;
    z-index: 2;
}

.convergence-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    color: rgba(232,234,246,0.5);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5em;
}

/* ---- FINAL CONVERGENCE ---- */
.proof-title {
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--spark-gold);
    text-shadow: 0 0 60px rgba(245,197,66,0.4);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1s ease, transform 1s ease;
}

.final-convergence.active .proof-title {
    opacity: 1;
    transform: scale(1);
}

.final-domain {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: rgba(232,234,246,0.6);
    margin-top: 1em;
    opacity: 0;
    transition: opacity 1.5s ease 1.2s;
}

.final-convergence.active .final-domain {
    opacity: 1;
}

.inline-dot {
    width: 6px;
    height: 6px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ---- INFLATED 3D ELEMENTS ---- */
.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,240,255,0.08);
    border: 1px solid rgba(0,240,255,0.15);
    box-shadow:
        inset 0 -4px 12px rgba(0,0,0,0.4),
        0 0 30px rgba(0,240,255,0.1),
        0 8px 32px rgba(0,0,0,0.6),
        inset 0 2px 0 rgba(255,255,255,0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.section-number:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 -4px 12px rgba(0,0,0,0.4),
        0 0 30px rgba(0,240,255,0.5),
        0 8px 32px rgba(0,0,0,0.6),
        inset 0 2px 0 rgba(255,255,255,0.1);
}

.section-number:active {
    transform: scale(0.97);
}

/* ---- PARTICLE GLYPHS ---- */
.particle-glyph {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0;
    animation: particle-blink 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particle-blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.7; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .diagonal-section {
        padding: 80px 24px;
    }
    #site-header {
        top: 16px;
        left: 16px;
    }
    #monopole-glyph {
        width: 120px;
        height: 120px;
        margin-bottom: 40px;
    }
}
