/* ============================================
   polytics.club — Grainy Duotone Split Chamber
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    background: #0A0A14;
}

/* ---- Grain Overlay ---- */
#grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    animation: grainShift 0.5s steps(3) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-2px, -1px); }
    66% { transform: translate(1px, 2px); }
    100% { transform: translate(0, 0); }
}

/* ---- Bubbles Containers ---- */
.bubbles-container {
    position: fixed;
    top: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

#bubbles-left {
    left: 0;
}

#bubbles-right {
    left: 50%;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: bubbleRise linear infinite;
}

.bubble-dark {
    background: rgba(80, 176, 160, 0.05);
    box-shadow: 0 0 6px rgba(80, 176, 160, 0.03);
}

.bubble-light {
    background: rgba(192, 112, 80, 0.05);
    box-shadow: 0 0 6px rgba(192, 112, 80, 0.03);
}

@keyframes bubbleRise {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(var(--drift, 20px));
        opacity: 0;
    }
}

/* ---- Floating Cross-Panel Elements ---- */
#floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.float-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    animation: floatDrift ease-in-out infinite;
}

.float-el-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: calc(50% - 60px);
    background: radial-gradient(circle, rgba(80, 176, 160, 0.15), transparent 70%);
    animation-duration: 12s;
}

.float-el-2 {
    width: 80px;
    height: 80px;
    top: 40%;
    left: calc(50% - 40px);
    background: radial-gradient(circle, rgba(192, 112, 80, 0.12), transparent 70%);
    animation-duration: 9s;
    animation-delay: -3s;
}

.float-el-3 {
    width: 50px;
    height: 50px;
    top: 65%;
    left: calc(50% - 25px);
    background: radial-gradient(circle, rgba(80, 176, 160, 0.1), transparent 70%);
    animation-duration: 15s;
    animation-delay: -6s;
}

.float-el-4 {
    width: 100px;
    height: 100px;
    top: 25%;
    left: calc(50% - 50px);
    background: radial-gradient(circle, rgba(128, 192, 176, 0.08), transparent 70%);
    animation-duration: 11s;
    animation-delay: -2s;
}

.float-el-5 {
    width: 65px;
    height: 65px;
    top: 80%;
    left: calc(50% - 32px);
    background: radial-gradient(circle, rgba(192, 112, 80, 0.1), transparent 70%);
    animation-duration: 14s;
    animation-delay: -8s;
}

@keyframes floatDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(40px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-30px, -40px) scale(0.95);
    }
    75% {
        transform: translate(20px, -10px) scale(1.02);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ---- Main Chamber ---- */
#chamber {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 3;
}

.panel {
    flex: 1;
    min-height: 100vh;
    position: relative;
}

#panel-left {
    background: #0A0A14;
}

#panel-right {
    background: #F0ECE8;
}

#divider {
    width: 2px;
    min-height: 100vh;
    background: #404048;
    position: relative;
    z-index: 4;
    flex-shrink: 0;
}

/* ---- Panel Content ---- */
.panel-content {
    padding: 8vh 6vw;
    position: relative;
}

/* ---- Hero Section ---- */
.hero-section {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 6vh;
}

.hero-title {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-title-left {
    color: #50B0A0;
}

.hero-title-right {
    color: #3A2828;
}

.hero-subtitle {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

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

#panel-left .hero-subtitle {
    color: #80C0B0;
}

#panel-right .hero-subtitle {
    color: #5A4040;
}

/* ---- Stats Section ---- */
.stats-section {
    display: flex;
    gap: 3vw;
    margin-bottom: 6vh;
    flex-wrap: wrap;
}

.stat-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stat-number {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

#panel-left .stat-number {
    color: #50B0A0;
}

#panel-right .stat-number {
    color: #C07050;
}

.stat-label {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

#panel-left .stat-label {
    color: #80C0B0;
}

#panel-right .stat-label {
    color: #5A4040;
}

/* ---- Content Sections ---- */
.content-section {
    margin-bottom: 6vh;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.section-heading {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
}

#panel-left .section-heading {
    color: #50B0A0;
}

#panel-left .section-heading::after {
    background: #50B0A0;
}

#panel-right .section-heading {
    color: #3A2828;
}

#panel-right .section-heading::after {
    background: #3A2828;
}

.section-text {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
}

#panel-left .section-text {
    color: #80C0B0;
}

#panel-right .section-text {
    color: #5A4040;
}

/* ---- Stats Lower ---- */
.stats-lower {
    padding-top: 2vh;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    #chamber {
        flex-direction: column;
    }

    .panel {
        min-height: auto;
    }

    #divider {
        width: 100%;
        height: 2px;
        min-height: 2px;
    }

    .panel-content {
        padding: 6vh 8vw;
    }

    .hero-section {
        min-height: 40vh;
    }

    .stats-section {
        gap: 6vw;
    }

    .float-element {
        display: none;
    }

    #bubbles-left,
    #bubbles-right {
        width: 100%;
        left: 0;
    }
}
