/* political.quest - Frutiger Aero Political Dive */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    --primary-blue: #3a9bd5;
    --primary-green: #56c596;
    --bg-light: #e8f4f8;
    --bg-dark: #0a1628;
    --text-dark: #1a2a4a;
    --text-light: #d4e8f0;
    --coral: #f0856e;
    --violet: #9b6eff;
    --mid-dark: #1a3a5c;
    --hero-top: #7ec8e3;
    --hero-bottom: #56c596;
    --green-light: #b8e6c8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* ============================================================
   Depth Indicator
   ============================================================ */
#depth-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#depth-track {
    width: 4px;
    height: 120px;
    background: rgba(58, 155, 213, 0.2);
    border-radius: 2px;
    position: relative;
}

#depth-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(58, 155, 213, 0.6), 0 0 24px rgba(58, 155, 213, 0.3);
    transition: top 0.3s ease-out;
}

/* ============================================================
   Ambient Bubbles
   ============================================================ */
#ambient-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ambient-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 70%);
    border: 1px solid rgba(58, 155, 213, 0.1);
    animation: floatUp var(--duration) linear infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity);
    }
    90% {
        opacity: var(--opacity);
    }
    100% {
        transform: translateY(-100px) translateX(var(--drift)) scale(var(--end-scale));
        opacity: 0;
    }
}

/* ============================================================
   Zone Base
   ============================================================ */
.zone {
    position: relative;
    overflow: hidden;
}

.zone-content {
    max-width: 880px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 5;
}

/* ============================================================
   Zone 1: The Surface (Hero)
   ============================================================ */
#zone-surface {
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--hero-top) 0%, #b8e6c8 60%, var(--hero-bottom) 100%);
    position: relative;
}

#caustics {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 2;
}

.caustic-line {
    fill: none;
    stroke: white;
    stroke-width: 3;
}

.c1 { animation: causticWave1 8s ease-in-out infinite; }
.c2 { animation: causticWave2 10s ease-in-out infinite; }
.c3 { animation: causticWave1 12s ease-in-out infinite reverse; }
.c4 { animation: causticWave2 9s ease-in-out infinite reverse; }

@keyframes causticWave1 {
    0%, 100% { d: path('M0,300 Q200,250 400,300 Q600,350 800,300'); }
    50% { d: path('M0,300 Q200,350 400,300 Q600,250 800,300'); }
}

@keyframes causticWave2 {
    0%, 100% { d: path('M0,200 Q200,280 400,200 Q600,120 800,200'); }
    50% { d: path('M0,200 Q200,120 400,200 Q600,280 800,200'); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

#hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(58, 155, 213, 0.4);
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}

#hero-tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.tagline-word {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeRevealWord 0.6s ease-out forwards;
}

.tagline-word:nth-child(1) { animation-delay: 0.8s; }
.tagline-word:nth-child(2) { animation-delay: 1.0s; }
.tagline-word:nth-child(3) { animation-delay: 1.2s; }
.tagline-word:nth-child(4) { animation-delay: 1.4s; }
.tagline-word:nth-child(5) { animation-delay: 1.6s; }
.tagline-word:nth-child(6) { animation-delay: 1.8s; }
.tagline-word:nth-child(7) { animation-delay: 2.0s; }

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

#scroll-chevron {
    position: absolute;
    bottom: 40px;
    z-index: 10;
    animation: pulseChevron 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes pulseChevron {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ============================================================
   Zone 2: Concept Pods
   ============================================================ */
#zone-concepts {
    background: var(--bg-light);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    color: var(--primary-blue);
    text-align: center;
    letter-spacing: 0.01em;
    margin-bottom: 3rem;
}

.concept-pods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.concept-pod {
    width: 260px;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(58, 155, 213, 0.2);
    box-shadow:
        -8px 8px 24px rgba(58, 155, 213, 0.08),
        8px 8px 24px rgba(86, 197, 150, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-pod:hover {
    transform: translateY(-4px);
    box-shadow:
        -12px 12px 32px rgba(58, 155, 213, 0.15),
        12px 12px 32px rgba(86, 197, 150, 0.15);
}

.pod-icon {
    margin-bottom: 1.5rem;
}

.concept-pod h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.concept-pod p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    opacity: 0.8;
}

/* ============================================================
   Zone 3: Interactive Reef
   ============================================================ */
#zone-reef {
    background: var(--bg-light);
    background-image: radial-gradient(ellipse at 50% 50%, rgba(58, 155, 213, 0.08), transparent 70%);
    min-height: 60vh;
    padding-bottom: 4rem;
}

#zone-reef .section-title {
    margin-bottom: 0.5rem;
}

.reef-subtitle {
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    opacity: 0.7;
    margin-bottom: 3rem;
    font-size: 1rem;
}

#reef-cluster {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    margin: 0 auto;
}

.reef-bubble {
    position: absolute;
    left: var(--bx);
    top: var(--by);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(58, 155, 213, 0.2));
    border: 2px solid rgba(58, 155, 213, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: bobbing 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    box-shadow: 0 4px 16px rgba(58, 155, 213, 0.15);
}

.reef-bubble:nth-child(odd) { animation-duration: 3.5s; }
.reef-bubble:nth-child(3n) { animation-duration: 4.5s; }

.reef-bubble span {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-blue);
    letter-spacing: 0.02em;
    user-select: none;
}

.reef-bubble:hover {
    transform: scale(1.15);
    border-color: var(--coral);
    box-shadow: 0 4px 24px rgba(240, 133, 110, 0.3);
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.reef-bubble:hover {
    animation-play-state: paused;
}

#reef-tooltip {
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    width: 300px;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(58, 155, 213, 0.2);
    box-shadow: 0 8px 32px rgba(58, 155, 213, 0.15);
    opacity: 1;
    transition: opacity 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

#reef-tooltip.hidden {
    opacity: 0;
}

#tooltip-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

#tooltip-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
    opacity: 0.85;
}

/* ============================================================
   Zone 4: Narrative Scroll (Deep Waters)
   ============================================================ */
#zone-narrative {
    background: linear-gradient(180deg, var(--mid-dark) 0%, var(--bg-dark) 100%);
    padding: 6rem 0;
}

#zone-narrative .zone-content {
    padding: 0 2rem;
}

.narrative-block {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.narrative-block:last-child {
    margin-bottom: 0;
}

.narrative-block.reverse {
    flex-direction: row-reverse;
}

.narrative-text {
    flex: 1;
}

.gradient-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.narrative-text p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.85;
}

/* Glitch Art */
.glitch-art {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    position: relative;
}

.glitch-base, .glitch-r, .glitch-g {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Circle shape */
.glitch-art[data-shape='circle'] .glitch-base,
.glitch-art[data-shape='circle'] .glitch-r,
.glitch-art[data-shape='circle'] .glitch-g {
    border-radius: 50%;
}

/* Hexagon shape */
.glitch-art[data-shape='hexagon'] .glitch-base,
.glitch-art[data-shape='hexagon'] .glitch-r,
.glitch-art[data-shape='hexagon'] .glitch-g {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Blob shape */
.glitch-art[data-shape='blob'] .glitch-base,
.glitch-art[data-shape='blob'] .glitch-r,
.glitch-art[data-shape='blob'] .glitch-g {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.glitch-base {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    opacity: 0.8;
}

.glitch-r {
    background: linear-gradient(135deg, var(--coral), var(--primary-blue));
    mix-blend-mode: screen;
    transform: translate(3px, -1px);
    opacity: 0.5;
}

.glitch-g {
    background: linear-gradient(135deg, var(--primary-green), var(--violet));
    mix-blend-mode: screen;
    transform: translate(-2px, 2px);
    opacity: 0.5;
}

.glitch-art.glitching .glitch-r {
    animation: glitchR 0.3s steps(3) 1;
}

.glitch-art.glitching .glitch-g {
    animation: glitchG 0.3s steps(3) 1;
}

@keyframes glitchR {
    0% { transform: translate(3px, -1px); opacity: 0.5; }
    33% { transform: translate(6px, -3px); opacity: 0.8; }
    66% { transform: translate(-2px, 2px); opacity: 0.3; }
    100% { transform: translate(3px, -1px); opacity: 0.5; }
}

@keyframes glitchG {
    0% { transform: translate(-2px, 2px); opacity: 0.5; }
    33% { transform: translate(-5px, 4px); opacity: 0.8; }
    66% { transform: translate(3px, -2px); opacity: 0.3; }
    100% { transform: translate(-2px, 2px); opacity: 0.5; }
}

/* Iridescent ring decoration */
.glitch-art::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(from 45deg, var(--primary-blue), var(--primary-green), var(--primary-blue)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Zone 5: The Abyss (Footer)
   ============================================================ */
#zone-abyss {
    background: var(--bg-dark);
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#bioluminescent-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bio-dot {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: var(--primary-blue);
    opacity: 0;
    animation: bioPulse var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes bioPulse {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.3; transform: translateY(-20px); }
}

.abyss-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.abyss-link {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-green);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.abyss-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.abyss-link:hover::after {
    width: 100%;
}

.abyss-closing {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    text-align: center;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   Fade Reveal Animation
   ============================================================ */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Floating Leaf SVGs
   ============================================================ */
.floating-leaf {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.12;
    animation: floatUp var(--duration) linear infinite;
    animation-delay: var(--delay);
    pointer-events: none;
}

.floating-leaf svg {
    fill: var(--primary-green);
    width: 100%;
    height: 100%;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .concept-pods {
        flex-direction: column;
        align-items: center;
    }

    .concept-pod {
        width: 100%;
        max-width: 320px;
    }

    .narrative-block,
    .narrative-block.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .glitch-art {
        width: 120px;
        height: 120px;
    }

    #reef-cluster {
        height: 500px;
    }

    .reef-bubble {
        width: 48px;
        height: 48px;
    }

    #depth-indicator {
        display: none;
    }

    #reef-tooltip {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .zone-content {
        padding: 3rem 1.25rem;
    }

    #hero-tagline {
        gap: 0.3em;
    }

    .abyss-nav {
        gap: 1.5rem;
    }
}
