:root {
    --bg-deep: #0a0806;
    --bg-panel: #141210;
    --gold: #cfaf73;
    --teal: #4eb9af;
    --parchment: #d4cfc6;
    --stone: #8a8578;
    --deep-teal: #1a3a38;
    --signal: #e8a832;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Status Bars */
.status-bar {
    position: fixed;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 8, 6, 0.9), transparent);
}

.status-bar--top {
    top: 0;
    border-bottom: 1px solid rgba(207, 175, 115, 0.15);
}

.status-bar--bottom {
    bottom: 0;
    top: auto;
    background: linear-gradient(to top, rgba(10, 8, 6, 0.9), transparent);
    border-top: 1px solid rgba(207, 175, 115, 0.15);
    padding: 0;
    overflow: hidden;
}

.status-bar__ticks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        to right,
        rgba(207, 175, 115, 0.15) 0px,
        rgba(207, 175, 115, 0.15) 1px,
        transparent 1px,
        transparent 40px
    );
    background-size: 40px 8px;
    background-repeat: repeat-x;
    background-position: 0 bottom;
}

.status-bar__label {
    color: var(--gold);
    opacity: 0.7;
    position: relative;
}

.status-bar__data {
    margin-left: auto;
    color: var(--teal);
    opacity: 0.7;
    position: relative;
}

/* Ticker */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    color: var(--teal);
    opacity: 0.7;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.06em;
}

.ticker span {
    padding: 0 8px;
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Crosshair */
.crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.crosshair.active {
    animation: crosshairFlash 600ms ease-out forwards;
}

@keyframes crosshairFlash {
    0% { opacity: 0; }
    30% { opacity: 0.4; }
    100% { opacity: 0; }
}

/* Tree Container */
.tree-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.tree-svg {
    width: 100%;
    height: 100%;
    will-change: transform;
}

.tree-leaves ellipse {
    animation: leafPulse var(--leaf-duration, 6s) ease-in-out infinite;
    animation-delay: var(--leaf-delay, 0s);
}

@keyframes leafPulse {
    0%, 100% { opacity: var(--base-opacity, 0.3); }
    50% { opacity: calc(var(--base-opacity, 0.3) + 0.15); }
}

/* Topo Overlay */
.topo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}

/* Stations */
.station {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    scroll-snap-align: start;
    padding: 80px 24px;
}

#station05 {
    background: linear-gradient(to bottom, transparent, #060504 60%);
}

/* Focus Panels */
.focus-panel {
    position: relative;
    max-width: 680px;
    width: 100%;
    padding: 3rem 3.5rem;
    background: var(--bg-panel);
    border: 1px solid rgba(207, 175, 115, 0.12);
    border-radius: 2px;
    box-shadow: inset 0 0 80px rgba(78, 185, 175, 0.04);
    opacity: 0;
    transform: translateY(12px);
    transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.focus-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.focus-panel--hero {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.focus-panel p {
    color: var(--parchment);
    opacity: 0.88;
    margin-top: 1em;
}

.focus-panel p:first-of-type {
    margin-top: 0;
}

.closing-message {
    color: var(--stone) !important;
    margin-top: 2em !important;
    font-style: italic;
}

/* Data Clusters */
.data-cluster {
    position: relative;
    padding: 1.5rem 2rem;
    background: var(--bg-panel);
    border: 1px solid rgba(207, 175, 115, 0.1);
    border-radius: 2px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.data-cluster.visible {
    opacity: 1;
    transform: translateY(0);
}

.data-cluster--top-left {
    position: absolute;
    top: 15%;
    left: 5%;
}

.data-cluster--bottom-right {
    position: absolute;
    bottom: 15%;
    right: 5%;
}

.data-cluster--left {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.data-cluster--left.visible {
    transform: translateY(-50%);
}

.data-cluster--right {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.data-cluster--right.visible {
    transform: translateY(-50%);
}

.data-label {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.data-value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.02em;
}

.data-unit {
    font-size: 0.6em;
    color: var(--stone);
    margin-left: 2px;
}

/* Sparklines */
.sparkline {
    display: block;
    width: 120px;
    height: 24px;
    margin-top: 0.75rem;
}

.sparkline polyline {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 800ms ease-out;
}

.sparkline--slow polyline {
    transition-duration: 1200ms;
}

.visible .sparkline polyline {
    stroke-dashoffset: 0;
}

/* Corner Brackets */
.corner-bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.corner-bracket svg path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    transition: stroke-dashoffset 400ms ease-out 100ms;
}

.visible .corner-bracket svg path {
    stroke-dashoffset: 0;
}

.corner-bracket--tl { top: -4px; left: -4px; }
.corner-bracket--tr { top: -4px; right: -4px; }
.corner-bracket--bl { bottom: -4px; left: -4px; }
.corner-bracket--br { bottom: -4px; right: -4px; }

/* Typography */
.site-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
}

.site-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--parchment);
    opacity: 0.88;
    margin-top: 1rem;
}

.station-header {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.signal-text {
    color: var(--signal);
}

/* Chevron */
.chevron-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: chevronPulse 2s ease-in-out infinite;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.7; transform: translateX(-50%) translateY(4px); }
}

/* Return Line */
.return-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: 0;
    background: var(--gold);
    transition: height 2s ease-out;
}

.return-line.active {
    height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .data-cluster--top-left,
    .data-cluster--bottom-right {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        margin: 1rem 0;
    }

    .data-cluster--left,
    .data-cluster--right {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        margin: 1rem 0;
    }

    .data-cluster--left.visible,
    .data-cluster--right.visible {
        transform: none;
    }

    .station {
        padding: 60px 16px;
        gap: 1.5rem;
    }

    .focus-panel {
        padding: 2rem 1.5rem;
    }
}
