/* political.wiki - Styles
   Nocturnal observatory of political systems
   Dark-mode with pastel bioluminescence, diagonal strata layout */

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d0b1a;
    --bg-secondary: #1a1235;
    --bg-tertiary: #16181f;
    --bg-deepest: #0a0818;
    --text-primary: #d4d2e0;
    --accent-lavender: #b8c0ff;
    --accent-pink: #ffc8dd;
    --accent-mint: #caffbf;
    --accent-violet: #bdb2ff;
    --accent-peach: #ffd6a5;
    --aurora-blue: #a0c4ff;
    --aurora-cyan: #9bf6ff;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.78;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== PARTICLE FIELD ========== */
#particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
    transition: none;
    will-change: transform;
}

.particle:nth-child(1) { background: var(--accent-lavender); width: 5px; height: 5px; }
.particle:nth-child(2) { background: var(--accent-pink); width: 4px; height: 4px; }
.particle:nth-child(3) { background: var(--accent-mint); width: 6px; height: 6px; }
.particle:nth-child(4) { background: var(--accent-violet); width: 5px; height: 5px; }
.particle:nth-child(5) { background: var(--accent-peach); width: 4px; height: 4px; }
.particle:nth-child(6) { background: var(--aurora-blue); width: 5px; height: 5px; }
.particle:nth-child(7) { background: var(--aurora-cyan); width: 6px; height: 6px; }
.particle:nth-child(8) { background: var(--accent-lavender); width: 4px; height: 4px; }
.particle:nth-child(9) { background: var(--accent-pink); width: 5px; height: 5px; }
.particle:nth-child(10) { background: var(--accent-violet); width: 3px; height: 3px; }
.particle:nth-child(11) { background: var(--accent-mint); width: 4px; height: 4px; }
.particle:nth-child(12) { background: var(--aurora-cyan); width: 5px; height: 5px; }

/* ========== VERTICAL NAV STRIP ========== */
#nav-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 32px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 50;
    background: rgba(13, 11, 26, 0.6);
    backdrop-filter: blur(4px);
}

.nav-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.62rem, 0.9vw, 0.78rem);
    color: var(--text-primary);
    opacity: 0.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.6s ease, color 0.6s ease;
    white-space: nowrap;
}

.nav-label.active {
    color: var(--accent-lavender);
    opacity: 1;
}

.nav-label:hover {
    opacity: 0.7;
}

/* ========== AURORA CONTAINER ========== */
#aurora-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 60%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

#aurora-svg {
    width: 100%;
    height: 100%;
}

.aurora-band-1 {
    animation: auroraFloat1 45s ease-in-out infinite;
}
.aurora-band-2 {
    animation: auroraFloat2 38s ease-in-out infinite;
}
.aurora-band-3 {
    animation: auroraFloat3 52s ease-in-out infinite;
}
.aurora-band-4 {
    animation: auroraFloat4 60s ease-in-out infinite;
}
.aurora-band-5 {
    animation: auroraFloat5 35s ease-in-out infinite;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translateY(0px); }
    25% { transform: translateY(-30px); }
    50% { transform: translateY(15px); }
    75% { transform: translateY(-20px); }
}

@keyframes auroraFloat2 {
    0%, 100% { transform: translateY(0px); }
    30% { transform: translateY(25px); }
    60% { transform: translateY(-35px); }
    80% { transform: translateY(10px); }
}

@keyframes auroraFloat3 {
    0%, 100% { transform: translateY(0px); }
    20% { transform: translateY(-20px); }
    50% { transform: translateY(30px); }
    70% { transform: translateY(-15px); }
}

@keyframes auroraFloat4 {
    0%, 100% { transform: translateY(0px); }
    35% { transform: translateY(20px); }
    65% { transform: translateY(-25px); }
}

@keyframes auroraFloat5 {
    0%, 100% { transform: translateY(0px); }
    40% { transform: translateY(-18px); }
    70% { transform: translateY(22px); }
}

/* ========== STRATA SECTIONS ========== */
.stratum {
    position: relative;
    z-index: 5;
}

/* Stratum 0: Observatory Hero */
.stratum-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(26, 18, 53, 0.3) 100%);
    padding-left: 8vw;
    padding-right: 4vw;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    color: var(--accent-lavender);
    letter-spacing: 0.02em;
    text-transform: lowercase;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--text-primary);
    opacity: 0.6;
    max-width: 540px;
    letter-spacing: 0.03em;
}

/* ========== FAULT LINES ========== */
.fault-line {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 8px;
    background: linear-gradient(90deg, var(--accent-lavender), var(--accent-pink));
    z-index: 15;
    opacity: 0.6;
}

.fault-line-0 {
    transform: rotate(-4deg);
    transform-origin: left center;
}

.fault-line-1 {
    transform: rotate(3deg);
    transform-origin: right center;
}

.fault-line-2 {
    transform: rotate(-6deg);
    transform-origin: left center;
}

.fault-line-3 {
    height: 12px;
    background: linear-gradient(90deg, var(--accent-peach), var(--accent-pink));
    transform: rotate(-2deg);
    transform-origin: center center;
    animation: faultPulse 8s ease-in-out infinite;
}

@keyframes faultPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ========== STRATUM CLIPS (Diagonal sections) ========== */
.stratum-foundations {
    background: var(--bg-secondary);
    clip-path: polygon(0 4%, 100% 0%, 100% 97%, 0 100%);
    padding: 10vh 0 12vh 0;
    margin-top: -4vh;
}

.stratum-systems {
    background: var(--bg-primary);
    clip-path: polygon(0 0%, 100% 3%, 100% 100%, 0 96%);
    padding: 10vh 0 12vh 0;
    margin-top: -5vh;
}

.stratum-tensions {
    background: var(--bg-tertiary);
    clip-path: polygon(0 5%, 100% 0%, 100% 95%, 0 100%);
    padding: 10vh 0 12vh 0;
    margin-top: -5vh;
}

.stratum-deep {
    background: linear-gradient(180deg, var(--bg-deepest) 0%, #060510 100%);
    clip-path: polygon(0 2%, 100% 0%, 100% 100%, 0 100%);
    padding: 10vh 0 16vh 0;
    margin-top: -4vh;
}

/* ========== STRATUM INNER LAYOUT ========== */
.stratum-inner {
    position: relative;
    max-width: 1200px;
    padding-left: 8vw;
    padding-right: 4vw;
}

.stratum-content-wrapper {
    max-width: 880px;
}

/* ========== TYPOGRAPHY ========== */
.stratum-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    color: var(--accent-lavender);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    line-height: 1.15;
}

.stratum-title-deep {
    opacity: 0.7;
}

.body-column p {
    margin-bottom: 1.6rem;
    max-width: 720px;
}

.key-term {
    background: linear-gradient(transparent 60%, rgba(184, 192, 255, 0.2) 60%);
    padding: 0 2px;
}

.key-term-warm {
    background: linear-gradient(transparent 60%, rgba(255, 214, 165, 0.2) 60%);
}

/* ========== PULL QUOTES ========== */
.pull-quote {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-style: italic;
    color: var(--accent-violet);
    line-height: 1.45;
    margin: 3rem 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--accent-violet);
    max-width: 680px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.pull-quote.visible {
    opacity: 1;
    transform: translateX(0);
}

.pull-quote-warm {
    color: var(--accent-peach);
    border-left-color: var(--accent-peach);
}

.quote-cite {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.72rem, 1.2vw, 0.88rem);
    font-style: normal;
    color: var(--accent-mint);
    margin-top: 1rem;
    opacity: 0.7;
}

/* ========== GLYPHS ========== */
.glyph {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    animation: glyphRotate 120s linear infinite;
}

.glyph svg {
    width: 100%;
    height: 100%;
}

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

.glyph-ballot {
    animation-duration: 100s;
    animation-direction: reverse;
}

.glyph-tension {
    animation-duration: 90s;
}

/* ========== ANNOTATION PANELS ========== */
.annotation-panel {
    position: absolute;
    right: 4vw;
    top: 50%;
    transform: translateY(-50%) rotate(6deg);
    width: 260px;
    padding: 1.2rem 1rem;
    background: rgba(22, 24, 31, 0.85);
    border-left: 2px solid var(--accent-pink);
    box-shadow: 0 4px 24px rgba(184, 192, 255, 0.08);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.annotation-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.62rem, 1vw, 0.75rem);
    color: var(--accent-pink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.annotation-label-meta {
    color: var(--accent-mint);
}

.annotation-label-warm {
    color: var(--accent-peach);
}

.annotation-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.72rem, 1.2vw, 0.88rem);
    line-height: 1.65;
    color: var(--text-primary);
    opacity: 0.85;
}

.annotation-text strong {
    color: var(--accent-pink);
    font-weight: 400;
}

.annotation-meta {
    color: var(--accent-mint);
    opacity: 0.7;
}

.annotation-warm {
    border-left-color: var(--accent-peach);
}

.annotation-warm-text {
    color: var(--accent-peach);
    opacity: 0.75;
}

/* ========== DIAGONAL GRID OVERLAY ========== */
.diagonal-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        4deg,
        rgba(184, 192, 255, 0.04) 0px,
        rgba(184, 192, 255, 0.04) 1px,
        transparent 1px,
        transparent 40px
    );
    pointer-events: none;
    z-index: 2;
}

/* ========== DEEP RECORD SIGNATURE ========== */
.deep-signature {
    margin-top: 6rem;
    padding-top: 2rem;
}

.deep-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 1.2rem;
    color: var(--text-primary);
    opacity: 0.3;
    letter-spacing: 0.05em;
}

/* ========== DECORATIVE SVG ========== */
.decorative-svg {
    position: fixed;
    right: 4vw;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 400px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

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

/* ========== REVEAL ANIMATIONS ========== */
.reveal-element {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========== AURORA INTENSITY PER SECTION ========== */
body.section-stratum-2 #aurora-container { opacity: 0.85; }
body.section-stratum-3 #aurora-container { opacity: 0.6; }
body.section-stratum-4 #aurora-container { opacity: 1; }

/* ========== WARM PARTICLE MODE ========== */
body.warm-particles .particle:nth-child(1) { background: var(--accent-peach); }
body.warm-particles .particle:nth-child(3) { background: var(--accent-pink); }
body.warm-particles .particle:nth-child(6) { background: var(--accent-peach); }
body.warm-particles .particle:nth-child(7) { background: var(--accent-pink); }
body.warm-particles .particle:nth-child(11) { background: var(--accent-peach); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .annotation-panel {
        position: relative;
        right: auto;
        top: auto;
        transform: rotate(3deg);
        width: 100%;
        max-width: 400px;
        margin-top: 2rem;
        margin-left: 1rem;
    }

    .decorative-svg {
        display: none;
    }

    #aurora-container {
        width: 80%;
    }
}

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

    .stratum-hero {
        padding-left: 5vw;
    }

    .stratum-inner {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .stratum-foundations {
        clip-path: polygon(0 2%, 100% 0%, 100% 98.5%, 0 100%);
    }

    .stratum-systems {
        clip-path: polygon(0 0%, 100% 1.5%, 100% 100%, 0 98.5%);
    }

    .stratum-tensions {
        clip-path: polygon(0 2.5%, 100% 0%, 100% 97.5%, 0 100%);
    }

    .stratum-deep {
        clip-path: polygon(0 1%, 100% 0%, 100% 100%, 0 100%);
    }

    .fault-line-0 { transform: rotate(-2deg); }
    .fault-line-1 { transform: rotate(1.5deg); }
    .fault-line-2 { transform: rotate(-3deg); }
    .fault-line-3 { transform: rotate(-1deg); }

    .annotation-panel {
        transform: rotate(2deg);
    }

    .pull-quote {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
    }

    #aurora-container {
        width: 100%;
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .stratum-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .glyph {
        width: 48px;
        height: 48px;
    }
}
