/* === BASE RESET & GLOBALS === */
/* Palette ref: #e0e6f0 grain overlay color (used in JS canvas) */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    background: #0a0b14;
    color: #c8cedb;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === GRAIN CANVAS === */
#grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* === NAVIGATION DOTS === */
#zone-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-dot {
    width: 4px;
    height: 4px;
    background: rgba(0, 255, 157, 0.15);
    cursor: pointer;
    transition: all 0.1s steps(2);
}

.nav-dot.active {
    background: #00ff9d;
}

.nav-dot:hover {
    width: 8px;
    height: 8px;
}

/* === PIXEL INTERACTIVE === */
.pixel-interactive {
    transition: transform 0.15s steps(3);
    image-rendering: pixelated;
}

.pixel-interactive:hover {
    transform: scale(1.5);
}

/* === ZONES (SECTIONS) === */
.zone {
    min-height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

/* === ZONE 0: SIGNAL LOCK === */
#zone-0 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

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

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.pixel-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
}

.live-indicator {
    background: #ffaa00;
    animation: blink-live 1s steps(2) infinite;
}

.signal-indicator {
    background: #00ff9d;
    margin-left: 16px;
}

.report-indicator {
    background: #ff00aa;
}

.status-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.55rem, 1vw, 0.7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffaa00;
}

.signal-label {
    color: #00ff9d;
}

@keyframes blink-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#hero-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00ff9d;
    line-height: 1;
    margin: 0;
}

.title-char {
    display: inline-block;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s steps(4);
}

.title-char.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: #ff00aa;
    letter-spacing: 0.12em;
    margin-top: 8px;
}

.cursor {
    animation: cursor-blink 2s steps(2) infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#mountain-hero {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    z-index: 1;
}

/* === ZONE 1: TERRAIN SCAN === */
#zone-1 {
    display: flex;
    flex-direction: column;
}

.data-panel {
    flex: 1;
    min-height: 33.33vh;
    background: rgba(10, 11, 20, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
    transform: translateX(-100vw);
    transition: transform 0.6s steps(8);
}

.data-panel.panel-right {
    transform: translateX(100vw);
}

.data-panel.visible {
    transform: translateX(0);
}

.panel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.panel-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.55rem, 1vw, 0.7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ff00aa;
}

.panel-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    color: #00ff9d;
    letter-spacing: 0.05em;
}

.panel-unit {
    font-size: 0.4em;
    color: #6b7189;
    margin-left: 4px;
}

/* === PIXEL DIVIDERS === */
.pixel-divider {
    width: 100%;
    height: 60px;
    background: #00ff9d;
    opacity: 0.15;
}

.divider-1 {
    clip-path: polygon(0 100%, 15% 40%, 28% 70%, 45% 20%, 60% 55%, 75% 10%, 88% 60%, 100% 100%);
}

.divider-2 {
    clip-path: polygon(0 100%, 10% 55%, 22% 30%, 38% 65%, 50% 15%, 65% 50%, 78% 25%, 92% 70%, 100% 100%);
}

.divider-mini {
    height: 30px;
    opacity: 0.08;
    clip-path: polygon(0 100%, 20% 50%, 35% 75%, 50% 25%, 65% 60%, 80% 35%, 100% 100%);
    margin: 20px 0;
}

/* === ZONE 2: ALTITUDE REPORT === */
.zone-report {
    min-height: 150vh;
    padding: 80px 0;
}

.report-column {
    width: min(90vw, 800px);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.transmission-block {
    padding: 48px 0;
    border-top: 1px solid rgba(0, 255, 157, 0.3);
}

.grain-block {
    position: relative;
}

.grain-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(224, 230, 240, 0.015) 2px,
        rgba(224, 230, 240, 0.015) 4px
    );
    pointer-events: none;
}

.block-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.55rem, 1vw, 0.7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6b7189;
}

.block-headline {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00ff9d;
    margin-bottom: 20px;
    transform-origin: left center;
}

.block-body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.85;
    color: #c8cedb;
    letter-spacing: 0.02em;
}

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

/* === ZONE 3: SIGNAL DEGRADATION === */
#zone-3 {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060710;
}

.degradation-content {
    text-align: center;
    width: min(90vw, 700px);
}

.degrade-headline {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff00aa;
    margin-bottom: 24px;
}

.degrade-body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.85;
    color: #c8cedb;
    letter-spacing: 0.02em;
    margin-bottom: 40px;
}

.degrade-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.5rem, 0.8vw, 0.6rem);
    letter-spacing: 0.15em;
    color: #6b7189;
}

.stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #00b4ff;
    letter-spacing: 0.05em;
}

/* === ZONE 4: TRANSMISSION END === */
#zone-4 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060710;
}

.end-content {
    text-align: center;
    position: relative;
    width: 100%;
}

.end-transmission {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00ff9d;
    opacity: 0;
    transition: opacity 0.5s steps(6);
}

.end-transmission.visible {
    opacity: 1;
}

.end-timestamp {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.45rem, 0.8vw, 0.6rem);
    letter-spacing: 0.15em;
    color: #6b7189;
    margin-top: 24px;
}

#mountain-end {
    width: 60%;
    height: 80px;
    margin: 40px auto 0;
    display: block;
    opacity: 0.2;
}
