/* ============================================
   politics.day — Pop-Art Biomechanics
   Circuit-to-Botanical Metamorphosis
   ============================================ */

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

:root {
    --midnight: #0a1628;
    --deep-navy: #0f1f3d;
    --navy: #1a2a4a;
    --blue-mid: #162744;
    --circuit-blue: #2a4a7f;
    --steel: #7a8fb5;
    --mint: #7bc4a5;
    --blush: #e8a0b5;
    --petal: #f5c6d0;
    --ice-blue: #c4d4f5;
    --white-ghost: rgba(245, 198, 208, 0.06);
}

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

body {
    background-color: var(--midnight);
    color: var(--steel);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Ben-Day Dot Overlay --- */
.ben-day-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: radial-gradient(circle, rgba(122, 143, 181, 0.07) 1px, transparent 1px);
    background-size: 18px 18px;
}

/* --- Blossom Canvas --- */
#blossom-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* --- Scroll Progress --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 100;
    background: rgba(10, 22, 40, 0.5);
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--circuit-blue), var(--mint), var(--blush));
    transition: width 0.1s linear;
}

/* --- Diagonal Sections --- */
.diagonal-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.section-hero {
    background: linear-gradient(170deg, var(--midnight) 0%, var(--deep-navy) 50%, var(--navy) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
}

.section-machine {
    background: linear-gradient(190deg, var(--deep-navy) 0%, var(--midnight) 60%, var(--navy) 100%);
    clip-path: polygon(0 0, 100% 7%, 100% 93%, 0 100%);
    margin-top: -7vh;
}

.section-fracture {
    background: linear-gradient(170deg, var(--navy) 0%, var(--deep-navy) 50%, var(--midnight) 100%);
    clip-path: polygon(0 7%, 100% 0, 100% 100%, 0 93%);
    margin-top: -7vh;
}

.section-bloom {
    background: linear-gradient(190deg, var(--midnight) 0%, var(--deep-navy) 40%, var(--navy) 100%);
    clip-path: polygon(0 0, 100% 7%, 100% 93%, 0 100%);
    margin-top: -7vh;
}

.section-newday {
    background: linear-gradient(170deg, var(--deep-navy) 0%, var(--midnight) 100%);
    clip-path: polygon(0 7%, 100% 0, 100% 100%, 0 100%);
    margin-top: -7vh;
}

/* --- Circuit Layers --- */
.circuit-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

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

.circuit-trace {
    stroke: var(--circuit-blue);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-out;
}

.circuit-trace.animated {
    stroke-dashoffset: 0;
}

.trace-broken {
    stroke-dasharray: 12, 8;
    stroke-dashoffset: 0;
}

.solder-node {
    stroke: var(--circuit-blue);
    stroke-width: 1.5;
    fill: none;
}

.bloom-node {
    stroke: var(--blush);
    fill: rgba(232, 160, 181, 0.2);
}

/* --- Botanical SVG Elements --- */
.botanical-sprout {
    stroke: var(--mint);
    stroke-width: 1.2;
    fill: rgba(123, 196, 165, 0.15);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.section-visible .botanical-sprout {
    opacity: 1;
}

.petal {
    fill: var(--petal);
    opacity: 0.7;
}

.petal-center {
    fill: var(--blush);
    opacity: 0.9;
}

.petal-large {
    fill: var(--petal);
    opacity: 0.6;
}

.petal-center-large {
    fill: var(--blush);
    opacity: 0.85;
}

.blossom-cluster {
    opacity: 0;
    transform-origin: center;
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.section-visible .blossom-cluster {
    opacity: 1;
}

.blossom-float {
    animation: blossom-bob 4s ease-in-out infinite;
}

@keyframes blossom-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.vine-trace {
    stroke: var(--mint);
    stroke-width: 1.8;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-out;
}

.section-visible .vine-trace {
    stroke-dashoffset: 0;
}

.vine-glow {
    filter: drop-shadow(0 0 4px rgba(123, 196, 165, 0.3));
}

.leaf {
    fill: var(--mint);
    opacity: 0.5;
}

/* --- Section Content --- */
.section-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 4rem 2rem;
    text-align: center;
}

/* --- Typography --- */
.domain-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.05em;
    color: var(--petal);
    text-shadow: 0 0 40px rgba(245, 198, 208, 0.15), 0 0 80px var(--ice-blue);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.section-visible .domain-title {
    opacity: 1;
    transform: translateY(0);
}

.title-dot {
    color: var(--mint);
    font-size: 1.2em;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: var(--steel);
    margin-top: 1.5rem;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease 0.4s, transform 1.5s ease 0.4s;
}

.section-visible .hero-subtitle {
    opacity: 0.8;
    transform: translateY(0);
}

.section-heading {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4.5rem);
    color: var(--petal);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(245, 198, 208, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-visible .section-heading {
    opacity: 1;
    transform: translateY(0);
}

.section-body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--steel);
    line-height: 1.9;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease 0.3s, transform 1.2s ease 0.3s;
}

.section-visible .section-body {
    opacity: 0.85;
    transform: translateY(0);
}

/* --- Code/Metadata Annotations --- */
.section-heading::before {
    content: '// ';
    color: var(--circuit-blue);
    font-size: 0.6em;
    opacity: 0.6;
}

/* --- Closing Mark --- */
.closing-mark {
    margin-top: 3rem;
    opacity: 0;
    transition: opacity 2s ease 0.8s;
}

.section-visible .closing-mark {
    opacity: 0.6;
}

.mark-symbol {
    font-size: 2.5rem;
    color: var(--blush);
}

/* --- Section-specific tweaks --- */
.section-fracture .circuit-layer {
    opacity: 0.5;
}

.section-bloom .circuit-layer {
    opacity: 0.6;
}

.section-newday .circuit-layer {
    opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-content {
        padding: 3rem 1.5rem;
    }

    .diagonal-section {
        min-height: 80vh;
    }

    .section-hero {
        clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
    }

    .section-machine,
    .section-fracture,
    .section-bloom,
    .section-newday {
        clip-path: polygon(0 0, 100% 4%, 100% 96%, 0 100%);
        margin-top: -4vh;
    }
}

@media (max-width: 480px) {
    .section-content {
        padding: 2.5rem 1rem;
    }
}
