/* polytics.club — Neon-Lit Celestial Debate Hall */
/* Colors: #08080f, #0d0f1a, #141828, #e0e6f0, #b8c4d8, #8a94a8, #ff2d6a, #00e5ff, #7b2dff, #ffc42d, #2dff8a */
/* Fonts: Libre Baskerville, DM Sans */

:root {
    --void-black: #08080f;
    --deep-indigo: #0d0f1a;
    --obsidian-glass: #141828;
    --starlight: #e0e6f0;
    --pale-constellation: #b8c4d8;
    --nebula-gray: #8a94a8;
    --neon-magenta: #ff2d6a;
    --neon-cyan: #00e5ff;
    --electric-violet: #7b2dff;
    --plasma-gold: #ffc42d;
    --aurora-green: #2dff8a;
    --frost-edge: rgba(255, 255, 255, 0.1);
    --ease-gravitational: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--pale-constellation);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* Star Field */
#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--plasma-gold);
    transform: rotate(45deg);
    animation: twinkle var(--duration) ease-in-out var(--delay) infinite;
    opacity: 0.3;
}

.star.small {
    width: 2px;
    height: 2px;
}

.star.large {
    width: 6px;
    height: 6px;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Flow Zones */
.flow-zone {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   ZONE 1 — THE APERTURE
   ═══════════════════════════════════════════════ */

#zone-aperture {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--void-black) 0%, var(--deep-indigo) 100%);
}

.aperture-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hexagonal-sigil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: sigilFadeIn 2s var(--ease-gravitational) 0.5s forwards;
}

.sigil-hex {
    fill: none;
    stroke: var(--electric-violet);
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawPath 3s var(--ease-gravitational) 0.8s forwards;
    opacity: 0.3;
}

.sigil-line {
    stroke: var(--electric-violet);
    stroke-width: 0.5;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawPath 2.5s var(--ease-gravitational) 1.2s forwards;
    opacity: 0.2;
}

.sigil-center {
    fill: var(--plasma-gold);
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.sigil-star {
    fill: var(--plasma-gold);
    opacity: 0;
    animation: fadeIn 1.5s ease 2.2s forwards;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

@keyframes sigilFadeIn {
    to { opacity: 1; }
}

@keyframes fadeIn {
    to { opacity: 0.6; }
}

.central-star {
    width: 12px;
    height: 12px;
    background: var(--plasma-gold);
    transform: rotate(45deg);
    opacity: 0;
    animation: starExplode 1.5s var(--ease-gravitational) 0.8s forwards;
    position: absolute;
}

@keyframes starExplode {
    0% { opacity: 0; transform: rotate(45deg) scale(0); }
    50% { opacity: 1; transform: rotate(45deg) scale(3); }
    100% { opacity: 0; transform: rotate(45deg) scale(0); }
}

.aperture-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--neon-magenta) 0%, var(--electric-violet) 50%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.aperture-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: letterReveal 0.6s var(--ease-gravitational) forwards;
}

.aperture-title .letter:nth-child(1) { animation-delay: 1.0s; }
.aperture-title .letter:nth-child(2) { animation-delay: 1.1s; }
.aperture-title .letter:nth-child(3) { animation-delay: 1.2s; }
.aperture-title .letter:nth-child(4) { animation-delay: 1.3s; }
.aperture-title .letter:nth-child(5) { animation-delay: 1.4s; }
.aperture-title .letter:nth-child(6) { animation-delay: 1.5s; }
.aperture-title .letter:nth-child(7) { animation-delay: 1.6s; }
.aperture-title .letter:nth-child(8) { animation-delay: 1.7s; }

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aperture-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--nebula-gray);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 2s forwards;
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════
   ZONE 2 — THE CONSTELLATION CHAMBER
   ═══════════════════════════════════════════════ */

#zone-chamber {
    min-height: 150vh;
    padding: 10vh 5vw;
    position: relative;
    background: linear-gradient(180deg, var(--deep-indigo) 0%, var(--void-black) 50%, var(--deep-indigo) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6vh;
}

.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.const-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s var(--ease-gravitational);
}

.const-line.visible {
    stroke-dashoffset: 0;
}

/* Glassmorphic Cards */
.podium-card {
    background: rgba(20, 24, 40, 0.6);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: clamp(2rem, 4vw, 3.5rem);
    max-width: 640px;
    width: 90%;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(123, 45, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 1s var(--ease-gravitational), transform 1s var(--ease-gravitational), box-shadow 0.4s ease;
}

.podium-card:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15), 0 8px 40px rgba(123, 45, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.podium-card.visible {
    opacity: 1;
}

.card-left {
    align-self: flex-start;
    transform: translateX(-80px) rotate(-1deg);
}

.card-left.visible {
    transform: translateX(0) rotate(-1deg);
}

.card-right {
    align-self: flex-end;
    transform: translateX(80px) rotate(1deg);
}

.card-right.visible {
    transform: translateX(0) rotate(1deg);
}

.card-bottom {
    align-self: center;
    transform: translateY(60px);
}

.card-bottom.visible {
    transform: translateY(0);
}

.card-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--starlight);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.card-body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    color: var(--pale-constellation);
    line-height: 1.72;
    max-width: 38em;
    margin-bottom: 1.5rem;
}

.pull-quote {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--starlight);
    border-left: 3px solid var(--neon-magenta);
    padding-left: 1.5rem;
    margin: 0;
    line-height: 1.6;
}

.satellite-card {
    background: rgba(20, 24, 40, 0.5);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.8) rotate(2deg);
    transition: opacity 0.8s var(--ease-gravitational), transform 0.8s var(--ease-gravitational);
}

.satellite-card.visible {
    opacity: 1;
    transform: scale(1) rotate(2deg);
}

.sat-statement {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    margin: 0;
}

.sat-1 { align-self: flex-end; margin-right: 10%; }
.sat-2 { align-self: flex-start; margin-left: 10%; }
.sat-3 { align-self: center; }

/* ═══════════════════════════════════════════════
   ZONE 3 — THE ORRERY
   ═══════════════════════════════════════════════ */

#zone-orrery {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--void-black);
}

.orbit-ring {
    position: absolute;
    width: 80vmin;
    height: 80vmin;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.orbit-circle {
    fill: none;
    stroke: rgba(123, 45, 255, 0.08);
    stroke-width: 1;
}

.orbit-inner {
    stroke: rgba(0, 229, 255, 0.06);
    stroke-dasharray: 8 8;
}

.orrery-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.orrery-glass-circle {
    width: clamp(180px, 28vmin, 280px);
    height: clamp(180px, 28vmin, 280px);
    border-radius: 50%;
    background: rgba(20, 24, 40, 0.6);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 40px rgba(123, 45, 255, 0.12);
}

.orrery-question {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.9rem, 1.8vmin, 1.3rem);
    color: var(--starlight);
    text-align: center;
    padding: 1.5rem;
    line-height: 1.5;
}

.spark-card {
    position: absolute;
    background: rgba(20, 24, 40, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    z-index: 3;
    opacity: 0;
    transition: opacity 1s var(--ease-gravitational);
}

.spark-card.visible {
    opacity: 1;
}

.spark-word {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(0.7rem, 1.2vmin, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.spark-1 .spark-word { color: var(--neon-magenta); }
.spark-2 .spark-word { color: var(--neon-cyan); }
.spark-3 .spark-word { color: var(--plasma-gold); }
.spark-4 .spark-word { color: var(--aurora-green); }
.spark-5 .spark-word { color: var(--electric-violet); }

/* Spark card positions along the orbit — will be updated by JS for rotation */
.spark-1 { top: 50%; left: 50%; }
.spark-2 { top: 50%; left: 50%; }
.spark-3 { top: 50%; left: 50%; }
.spark-4 { top: 50%; left: 50%; }
.spark-5 { top: 50%; left: 50%; }

/* ═══════════════════════════════════════════════
   ZONE 4 — THE SPECTRUM ARC
   ═══════════════════════════════════════════════ */

#zone-spectrum {
    min-height: 80vh;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 10vh 5vw;
    background: linear-gradient(180deg, var(--void-black) 0%, var(--deep-indigo) 50%, var(--void-black) 100%);
}

.spectrum-arc-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.spectrum-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    opacity: 0.6;
    transition: stroke-dashoffset 3s var(--ease-gravitational);
    animation: arcPulse 4s ease-in-out infinite;
}

.spectrum-path.visible {
    stroke-dashoffset: 0;
}

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

.spectrum-card {
    background: rgba(20, 24, 40, 0.6);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    width: clamp(200px, 28%, 320px);
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(123, 45, 255, 0.08);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.8s var(--ease-gravitational), transform 0.8s var(--ease-gravitational), box-shadow 0.4s ease;
}

.spectrum-card.visible {
    opacity: 1;
    transform: scale(1);
}

.spectrum-card:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15), 0 8px 40px rgba(123, 45, 255, 0.08);
}

.spec-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--starlight);
    margin-bottom: 0.75rem;
    font-variant: small-caps;
}

.spec-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: var(--pale-constellation);
    line-height: 1.6;
}

.spec-1 .spec-title { color: var(--neon-magenta); }
.spec-2 .spec-title { color: #d44dff; }
.spec-3 .spec-title { color: var(--electric-violet); }
.spec-4 .spec-title { color: #4d8fff; }
.spec-5 .spec-title { color: var(--neon-cyan); }
.spec-6 .spec-title { color: var(--aurora-green); }

/* ═══════════════════════════════════════════════
   ZONE 5 — THE OBSERVATORY
   ═══════════════════════════════════════════════ */

#zone-observatory {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, var(--deep-indigo) 0%, var(--void-black) 100%);
}

.observatory-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.observatory-quote {
    border: none;
    margin: 0 0 3rem 0;
    padding: 0;
}

.observatory-quote p {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    color: var(--starlight);
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s var(--ease-gravitational), transform 1.5s var(--ease-gravitational);
}

.observatory-quote.visible p {
    opacity: 1;
    transform: translateY(0);
}

.echo-cards {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.echo-card {
    position: absolute;
    width: 120px;
    height: 80px;
    background: rgba(20, 24, 40, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.3);
    filter: blur(3px);
    transition: opacity 2s var(--ease-gravitational), transform 2s var(--ease-gravitational);
}

.echo-card.visible {
    opacity: 0.3;
}

.echo-1 { top: 10%; left: 15%; transform: scale(0.3) rotate(-5deg); }
.echo-2 { top: 20%; right: 10%; transform: scale(0.25) rotate(8deg); }
.echo-3 { bottom: 30%; left: 8%; transform: scale(0.35) rotate(-3deg); }
.echo-4 { bottom: 15%; right: 20%; transform: scale(0.28) rotate(6deg); }
.echo-5 { top: 40%; left: 5%; transform: scale(0.22) rotate(-8deg); }
.echo-6 { top: 15%; right: 25%; transform: scale(0.3) rotate(4deg); }

.observatory-sigil {
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 2s var(--ease-gravitational);
}

.observatory-sigil.visible {
    opacity: 0.5;
}

.obs-hex {
    fill: none;
    stroke: var(--electric-violet);
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 0;
    opacity: 0.3;
}

.obs-hex.unravel {
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 3s var(--ease-gravitational);
}

.obs-line {
    stroke: var(--electric-violet);
    stroke-width: 0.5;
    opacity: 0.2;
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
}

.obs-line.unravel {
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2.5s var(--ease-gravitational);
}

.obs-center {
    fill: var(--plasma-gold);
    opacity: 0.6;
}

.obs-star {
    fill: var(--plasma-gold);
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    #zone-chamber {
        padding: 8vh 4vw;
    }

    .podium-card {
        width: 95%;
        max-width: none;
    }

    .card-left, .card-right {
        align-self: center;
    }

    .card-left {
        transform: translateX(-40px) rotate(0deg);
    }

    .card-left.visible {
        transform: translateX(0) rotate(0deg);
    }

    .card-right {
        transform: translateX(40px) rotate(0deg);
    }

    .card-right.visible {
        transform: translateX(0) rotate(0deg);
    }

    .satellite-card {
        transform: scale(0.8) rotate(0deg);
    }

    .satellite-card.visible {
        transform: scale(1) rotate(0deg);
    }

    .sat-1, .sat-2, .sat-3 {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .spectrum-card {
        width: 90%;
        max-width: 400px;
    }

    #zone-spectrum {
        gap: 1.5rem;
        padding: 8vh 4vw;
    }

    .orbit-ring {
        width: 90vmin;
        height: 90vmin;
    }
}

@media (max-width: 480px) {
    .aperture-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .orrery-glass-circle {
        width: 160px;
        height: 160px;
    }
}