/* ============================================================
   economic.day — Abyssal Data Observatory
   ============================================================ */

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

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

body {
    background: #0A1628;
    color: #C8D6E5;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.65;
    font-feature-settings: 'onum' 1, 'liga' 1;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, .viz-title, .zone-indicator, .scroll-text, .footer-text {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
}

.data-label, .annotation-text, .zone-indicator, .footer-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-variant-numeric: tabular-nums;
}

em {
    font-style: italic;
    color: #6BCDDB;
}

/* --- Depth Gauge --- */
.depth-gauge {
    position: fixed;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 100;
    pointer-events: none;
}

.depth-gauge-line {
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(107, 205, 219, 0.3);
}

.depth-gauge-dot {
    position: absolute;
    left: 4px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6BCDDB;
    box-shadow: 0 0 12px rgba(107, 205, 219, 0.6), 0 0 24px rgba(107, 205, 219, 0.2);
    transition: top 0.1s linear;
}

.depth-gauge-tick {
    position: absolute;
    left: 2px;
    width: 16px;
    height: 2px;
    background: rgba(107, 205, 219, 0.4);
}

/* --- Zone 1: Surface / Hero --- */
.zone-1 {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A1628;
    overflow: hidden;
}

.hero-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.contour-svg {
    position: absolute;
    width: 60vmin;
    height: 60vmin;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.contour-line {
    fill: none;
    stroke: #6BCDDB;
    stroke-width: 1;
    opacity: 0.4;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.contour-svg.active .contour-line {
    animation: drawContour 2.5s ease-out forwards;
}

.contour-svg.active .contour-2 { animation-delay: 0.15s; }
.contour-svg.active .contour-3 { animation-delay: 0.3s; }
.contour-svg.active .contour-4 { animation-delay: 0.45s; }
.contour-svg.active .contour-5 { animation-delay: 0.6s; }
.contour-svg.active .contour-6 { animation-delay: 0.75s; }
.contour-svg.active .contour-7 { animation-delay: 0.9s; }
.contour-svg.active .contour-8 { animation-delay: 1.05s; }
.contour-svg.active .contour-9 { animation-delay: 1.2s; }

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

@keyframes breatheContour {
    0%, 100% { stroke-width: 1; opacity: 0.35; }
    50% { stroke-width: 1.8; opacity: 0.55; }
}

.contour-svg.breathing .contour-line {
    stroke-dashoffset: 0;
    animation: breatheContour 30s ease-in-out infinite;
}
.contour-svg.breathing .contour-2 { animation-delay: 1s; }
.contour-svg.breathing .contour-3 { animation-delay: 2s; }
.contour-svg.breathing .contour-4 { animation-delay: 3s; }
.contour-svg.breathing .contour-5 { animation-delay: 4s; }
.contour-svg.breathing .contour-6 { animation-delay: 5s; }
.contour-svg.breathing .contour-7 { animation-delay: 6s; }
.contour-svg.breathing .contour-8 { animation-delay: 7s; }
.contour-svg.breathing .contour-9 { animation-delay: 8s; }

.hero-point {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
}

.bioluminescent-point {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6BCDDB;
    box-shadow: 0 0 12px rgba(107, 205, 219, 0.4), 0 0 24px rgba(107, 205, 219, 0.15);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 12px rgba(107, 205, 219, 0.4), 0 0 24px rgba(107, 205, 219, 0.15); }
    50% { opacity: 1; box-shadow: 0 0 18px rgba(107, 205, 219, 0.6), 0 0 36px rgba(107, 205, 219, 0.25); }
}

.site-title {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(32px, 6vw, 72px);
    font-weight: 700;
    color: #E8F1F8;
    white-space: nowrap;
    z-index: 2;
}

.title-char {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 120ms ease-out, filter 120ms ease-out;
}

.title-char.visible {
    opacity: 1;
    filter: blur(0);
}

.hero-subtitle {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(14px, 2vw, 20px);
    font-style: italic;
    color: #C8D6E5;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 500ms ease-out 0.3s, filter 500ms ease-out 0.3s;
    white-space: nowrap;
    z-index: 2;
}

.hero-subtitle.visible {
    opacity: 0.7;
    filter: blur(0);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 1s ease-out 3.5s;
    z-index: 2;
}

.scroll-indicator.visible {
    opacity: 0.5;
}

.scroll-text {
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6BCDDB;
}

.scroll-arrow {
    width: 12px;
    height: 12px;
    border-right: 1.5px solid #6BCDDB;
    border-bottom: 1.5px solid #6BCDDB;
    transform: rotate(45deg);
    animation: bobArrow 2s ease-in-out infinite;
}

@keyframes bobArrow {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(4px); }
}

/* --- Split Divider --- */
.split-divider {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 45%;
    width: 1px;
    background: #6BCDDB;
    z-index: 50;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 600ms ease-out;
    opacity: 0;
    pointer-events: none;
}

.split-divider.active {
    transform: scaleY(1);
    opacity: 0.4;
}

/* --- Split Screen Layout --- */
.split-screen {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.panel-left {
    width: 45%;
    background: linear-gradient(180deg, #0A1628 0%, #0D1F3C 50%, #061018 100%);
    position: relative;
    padding: 60px 30px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.panel-right {
    width: 55%;
    background: #E8F1F8;
    padding: 60px 80px 60px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Zone 3 panels - deeper colors */
.panel-left-deep {
    background: linear-gradient(180deg, #061018 0%, #050D15 50%, #030810 100%);
}

.panel-right-deep {
    background: #D1DDE8;
}

/* --- Data Visualizations --- */
.data-viz {
    position: relative;
    width: 100%;
    padding: 20px;
}

.viz-title {
    font-size: 13px;
    font-weight: 400;
    font-family: 'IBM Plex Mono', monospace;
    color: #6BCDDB;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.gdp-contour,
.trade-contour,
.labor-contour,
.debt-contour,
.market-spiral {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

.gdp-ring, .labor-ring, .debt-ring {
    fill: none;
    stroke: #6BCDDB;
    stroke-width: 1;
    opacity: 0.35;
    animation: breatheRing 30s ease-in-out infinite;
}

.gdp-ring-2, .labor-ring-2, .debt-ring-2 { animation-delay: 2s; }
.gdp-ring-3, .labor-ring-3, .debt-ring-3 { animation-delay: 4s; }
.gdp-ring-4, .labor-ring-4, .debt-ring-4 { animation-delay: 6s; }
.gdp-ring-5, .debt-ring-5 { animation-delay: 8s; }
.gdp-ring-6 { animation-delay: 10s; }
.gdp-ring-7 { animation-delay: 12s; }

@keyframes breatheRing {
    0%, 100% { stroke-width: 1; opacity: 0.3; }
    50% { stroke-width: 2; opacity: 0.55; }
}

.trade-path {
    fill: none;
    stroke: #6BCDDB;
    stroke-width: 1.5;
    opacity: 0.4;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}

.trade-path.drawn {
    animation: drawTrade 3s ease-out forwards;
}

.trade-path-2.drawn { animation-delay: 0.5s; }
.trade-path-3.drawn { animation-delay: 1s; }

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

.spiral-path {
    fill: none;
    stroke: #4ECDC4;
    stroke-width: 1.5;
    opacity: 0.5;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.spiral-path.drawn {
    animation: drawSpiral 4s ease-out forwards;
}

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

/* --- Data Points --- */
.data-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6BCDDB;
    box-shadow: 0 0 12px rgba(107, 205, 219, 0.4), 0 0 24px rgba(107, 205, 219, 0.15);
    cursor: pointer;
    animation: pulse 4s ease-in-out infinite;
    transform: translate(-50%, -50%);
    will-change: transform, opacity, filter;
}

.data-point-warn {
    background: #FF6B4A;
    box-shadow: 0 0 12px rgba(255, 107, 74, 0.4), 0 0 24px rgba(255, 107, 74, 0.15);
    animation: pulseWarn 4s ease-in-out infinite;
}

@keyframes pulseWarn {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 12px rgba(255, 107, 74, 0.4), 0 0 24px rgba(255, 107, 74, 0.15); }
    50% { opacity: 1; box-shadow: 0 0 18px rgba(255, 107, 74, 0.6), 0 0 36px rgba(255, 107, 74, 0.25); }
}

.data-point-growth {
    background: #4ECDC4;
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.4), 0 0 24px rgba(78, 205, 196, 0.15);
    animation: pulseGrowth 4s ease-in-out infinite;
}

@keyframes pulseGrowth {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 12px rgba(78, 205, 196, 0.4), 0 0 24px rgba(78, 205, 196, 0.15); }
    50% { opacity: 1; box-shadow: 0 0 18px rgba(78, 205, 196, 0.6), 0 0 36px rgba(78, 205, 196, 0.25); }
}

.data-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #6BCDDB;
    white-space: nowrap;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 300ms ease-out, filter 300ms ease-out;
    pointer-events: none;
}

.data-point:hover .data-label,
.data-point.active .data-label {
    opacity: 1;
    filter: blur(0);
}

.data-point:hover {
    box-shadow: 0 0 24px rgba(107, 205, 219, 0.6), 0 0 48px rgba(107, 205, 219, 0.3);
    transform: translate(-50%, -50%) scale(1.3);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.data-point-warn:hover {
    box-shadow: 0 0 24px rgba(255, 107, 74, 0.6), 0 0 48px rgba(255, 107, 74, 0.3);
}

.data-point-growth:hover {
    box-shadow: 0 0 24px rgba(78, 205, 196, 0.6), 0 0 48px rgba(78, 205, 196, 0.3);
}

/* --- Right Panel Content --- */
.zone-indicator {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #1B3A5C;
    margin-bottom: 24px;
}

.section-heading {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    color: #0A1628;
    margin-bottom: 24px;
    line-height: 1.2;
}

.body-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.65;
    color: #1B2838;
    margin-bottom: 20px;
    font-feature-settings: 'onum' 1, 'liga' 1;
}

.pull-quote {
    margin: 32px 0;
    padding: 24px 0 24px 24px;
    border-left: 2px solid #D4A574;
}

.pull-quote p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 22px;
    font-style: italic;
    line-height: 1.5;
    color: #1B3A5C;
    margin-bottom: 8px;
}

.pull-quote cite {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-style: normal;
    color: #D4A574;
}

.annotation {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    background: rgba(27, 58, 92, 0.06);
    border-radius: 4px;
}

.annotation-glyph {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.annotation-text {
    font-size: 13px;
    line-height: 1.5;
    color: #D4A574;
}

/* --- Wave Dividers --- */
.wave-divider {
    width: 100%;
    height: 40px;
    margin: 20px 0;
    overflow: visible;
}

.wave-path {
    fill: none;
    stroke: rgba(200, 214, 229, 0.2);
    stroke-width: 1;
    animation: waveShift 8s ease-in-out infinite alternate;
}

@keyframes waveShift {
    0% { d: path("M0,20 C166,5 333,35 500,20 C666,5 833,35 1000,20"); }
    100% { d: path("M0,20 C166,10 333,30 500,22 C666,10 833,30 1000,18"); }
}

.wave-divider-abyss .wave-path {
    stroke: rgba(107, 205, 219, 0.15);
}

/* --- Blur Reveal Animation --- */
.blur-reveal {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(12px);
    transition: opacity 500ms ease-out, filter 500ms ease-out, transform 500ms ease-out;
    will-change: transform, opacity, filter;
}

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

/* --- Zone 3-4 Transition: Deep right panel near abyss --- */
.panel-right-deep.deepening {
    background: #B8C8D8;
}

/* --- Zone 4: The Abyss --- */
.zone-4 {
    background: linear-gradient(180deg, #0A1628 0%, #061018 30%, #030810 100%);
    padding: 120px 0 80px;
}

.abyss-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 40px;
}

.zone-indicator-abyss {
    color: #6BCDDB;
    display: block;
    text-align: center;
    margin-bottom: 48px;
}

.abyss-section {
    margin-bottom: 48px;
}

.abyss-heading {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    color: #E8F1F8;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.2;
}

.abyss-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.65;
    color: #C8D6E5;
    margin-bottom: 20px;
    font-feature-settings: 'onum' 1, 'liga' 1;
}

.pull-quote-abyss {
    border-left-color: rgba(212, 165, 116, 0.6);
}

.pull-quote-abyss p {
    color: #C8D6E5;
}

.abyss-viz {
    margin: 48px 0;
    text-align: center;
}

.abyss-contour {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.abyss-wave {
    fill: none;
    stroke: #6BCDDB;
    stroke-width: 1;
}

.abyss-wave-1 {
    opacity: 0.3;
    animation: abyssWave1 12s ease-in-out infinite alternate;
}

.abyss-wave-2 {
    opacity: 0.2;
    animation: abyssWave2 10s ease-in-out infinite alternate;
}

.abyss-wave-3 {
    opacity: 0.1;
    animation: abyssWave3 8s ease-in-out infinite alternate;
}

@keyframes abyssWave1 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

@keyframes abyssWave2 {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

@keyframes abyssWave3 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-2px); }
}

/* --- Footer --- */
.abyss-footer {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer-point {
    width: 8px;
    height: 8px;
    margin: 0 auto 24px;
}

.footer-text {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 700;
    color: #E8F1F8;
    margin-bottom: 8px;
    opacity: 0.6;
}

.footer-sub {
    font-size: 12px;
    color: #6BCDDB;
    opacity: 0.4;
}

/* --- Responsive: Mobile < 768px --- */
@media (max-width: 767px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    .depth-gauge {
        display: none;
    }

    .split-divider {
        display: none;
    }

    .split-screen {
        flex-direction: column;
    }

    .panel-left {
        width: 100%;
        min-height: 30vh;
        padding: 40px 20px;
        gap: 40px;
    }

    .panel-right {
        width: 100%;
        padding: 40px 24px;
    }

    .panel-right-deep {
        background: #D1DDE8;
    }

    .site-title {
        bottom: 28%;
    }

    .hero-subtitle {
        bottom: 20%;
        white-space: normal;
        text-align: center;
        padding: 0 20px;
    }

    .section-heading {
        font-size: clamp(22px, 5vw, 32px);
    }

    .body-text, .abyss-text {
        font-size: 16px;
        line-height: 1.6;
    }

    .abyss-content {
        padding: 0 24px;
    }

    .pull-quote p {
        font-size: 18px;
    }
}
