/* ============================================
   aiice.io - Glacial Observatory HUD
   Glassmorphism + HUD-overlay + Alpine Theme
   ============================================ */

/* --- CSS Variables (DESIGN.MD palette) --- */
:root {
    --obsidian-night: #0A0E1A;
    --glacier-slate: #151B2E;
    --alpine-frost: #1E2845;
    --neon-cyan: #00F0FF;
    --aurora-magenta: #FF2D7B;
    --summit-gold: #FFD166;
    --ice-white: #E8F0FF;
    --mist-gray: #8B9DC3;
    --altitude-green: #00FF88;
    --horizon-glow: #1A1028;
}

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

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

body {
    background: var(--obsidian-night);
    color: var(--ice-white);
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scanlines Overlay --- */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 240, 255, 0.02) 1px,
        rgba(0, 240, 255, 0.02) 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* --- Breath Fog Effect --- */
#breath-fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        rgba(232, 240, 255, 0.3) 0%,
        rgba(10, 14, 26, 0.9) 60%,
        rgba(10, 14, 26, 1) 100%
    );
    animation: breathClear 2.5s ease-out forwards;
}

@keyframes breathClear {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* --- Reticle Crosshair --- */
#reticle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 900;
    pointer-events: none;
    animation: reticlePulse 4s ease-in-out infinite;
}

.reticle-h,
.reticle-v {
    position: absolute;
    background: var(--neon-cyan);
}

.reticle-h {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    opacity: 0.3;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.reticle-v {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    opacity: 0.3;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.reticle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 50%;
}

@keyframes reticlePulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* --- Mountain Background --- */
#mountain-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

#sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        #0A0E1A 0%,
        #0e1225 40%,
        #151B2E 65%,
        #1A1028 100%
    );
    transition: background 1.2s ease;
}

#stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.6) 0%, transparent 100%);
    animation: twinkle var(--twinkle-duration, 3s) ease-in-out infinite;
    animation-delay: var(--twinkle-delay, 0s);
}

.star.bright {
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.9) 0%, rgba(0, 240, 255, 0.2) 50%, transparent 100%);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

#mountains {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    z-index: 2;
    animation: mountainDrift 60s ease-in-out infinite alternate;
}

@keyframes mountainDrift {
    0%   { transform: translateX(0px) translateY(0px); }
    25%  { transform: translateX(-10px) translateY(5px); }
    50%  { transform: translateX(-15px) translateY(-5px); }
    75%  { transform: translateX(-5px) translateY(8px); }
    100% { transform: translateX(-20px) translateY(0px); }
}

.mountain-layer {
    transition: opacity 1.5s ease;
}

.layer-5 { animation: layerDrift5 45s ease-in-out infinite alternate; }
.layer-4 { animation: layerDrift4 50s ease-in-out infinite alternate; }
.layer-3 { animation: layerDrift3 55s ease-in-out infinite alternate; }
.layer-2 { animation: layerDrift2 58s ease-in-out infinite alternate; }
.layer-1 { animation: layerDrift1 62s ease-in-out infinite alternate; }

@keyframes layerDrift5 {
    0% { transform: translateX(0); }
    100% { transform: translateX(15px); }
}
@keyframes layerDrift4 {
    0% { transform: translateX(0); }
    100% { transform: translateX(10px); }
}
@keyframes layerDrift3 {
    0% { transform: translateX(0); }
    100% { transform: translateX(6px); }
}
@keyframes layerDrift2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(3px); }
}
@keyframes layerDrift1 {
    0% { transform: translateX(0); }
    100% { transform: translateX(1px); }
}

#fog-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(10, 14, 26, 0.4) 60%,
        rgba(10, 14, 26, 0.7) 100%
    );
    z-index: 3;
    transition: opacity 1.5s ease;
}

/* --- Corner Anchors --- */
.corner-anchor {
    position: fixed;
    z-index: 800;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: hudFadeIn 1.5s ease-out 1s forwards;
}

@keyframes hudFadeIn {
    0%  { opacity: 0; }
    20% { opacity: 0.6; }
    30% { opacity: 0.1; }
    50% { opacity: 0.8; }
    60% { opacity: 0.2; }
    100% { opacity: 1; }
}

#corner-tl {
    top: 24px;
    left: 32px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.brand-mark {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow:
        0 0 6px rgba(0, 240, 255, 0.4),
        0 0 20px rgba(0, 240, 255, 0.1);
}

.brand-sub {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: var(--mist-gray);
    letter-spacing: 0.04em;
    opacity: 0.6;
}

#corner-tr {
    top: 24px;
    right: 32px;
    text-align: right;
}

.status-indicator {
    color: var(--mist-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--altitude-green);
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 4px rgba(0, 255, 136, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(0, 255, 136, 0.7); }
}

#corner-bl {
    bottom: 24px;
    left: 32px;
}

.coord-readout {
    color: var(--mist-gray);
    opacity: 0.6;
}

.coord-readout::after {
    content: '_';
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

#corner-br {
    bottom: 24px;
    right: 32px;
}

.nav-cluster {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.nav-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 12px;
    border: 1px solid rgba(139, 157, 195, 0.4);
    border-radius: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 7px;
    letter-spacing: 0.04em;
    color: var(--mist-gray);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.nav-dot.active .nav-label {
    color: var(--neon-cyan);
    opacity: 1;
}

.nav-dot:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

.nav-dot:hover .nav-label {
    color: var(--neon-cyan);
    opacity: 0.8;
}

/* --- Telemetry Strips --- */
.telemetry-strip {
    position: fixed;
    left: 0;
    width: 100%;
    height: 24px;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--mist-gray);
    opacity: 0;
    z-index: 800;
    animation: hudFadeIn 1.5s ease-out 1.2s forwards;
}

#telemetry-top {
    top: 0;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.8) 0%, transparent 100%);
}

#telemetry-bottom {
    bottom: 0;
    background: linear-gradient(0deg, rgba(10, 14, 26, 0.8) 0%, transparent 100%);
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    opacity: 0.3;
    animation: tickerScroll 40s linear infinite;
    padding-top: 5px;
}

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

/* --- Scroll Snap Container --- */
#scroll-container {
    position: relative;
    z-index: 10;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* --- HUD Screens --- */
.hud-screen {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
}

.screen-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* --- HUD Panels (Glassmorphism) --- */
.hud-panel {
    position: relative;
    backdrop-filter: blur(20px) saturate(180%) brightness(110%);
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%);
    background: linear-gradient(
        135deg,
        rgba(30, 40, 69, 0.7) 0%,
        rgba(21, 27, 46, 0.5) 100%
    );
    border-top: 1px solid rgba(232, 240, 255, 0.08);
    border-left: 1px solid rgba(232, 240, 255, 0.08);
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    padding: 32px;
    opacity: 0;
    transform: scale(1.05);
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease;
    box-shadow:
        0 0 8px rgba(0, 240, 255, 0.15),
        0 0 24px rgba(0, 240, 255, 0.05);
}

/* Glass light reflection */
.hud-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 60%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: inherit;
}

.hud-panel.visible {
    opacity: 1;
    transform: scale(1);
    border-top: 1px solid rgba(0, 240, 255, 0.3);
    border-left: 1px solid rgba(0, 240, 255, 0.3);
}

/* --- Panel Brackets (targeting) --- */
.panel-brackets {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hud-panel.visible .panel-brackets {
    opacity: 1;
}

.bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease-out;
    transform: translate(0, 0);
}

.bracket.tl {
    top: 0;
    left: 0;
    border-top: 2px solid rgba(0, 240, 255, 0.4);
    border-left: 2px solid rgba(0, 240, 255, 0.4);
}

.bracket.tr {
    top: 0;
    right: 0;
    border-top: 2px solid rgba(0, 240, 255, 0.4);
    border-right: 2px solid rgba(0, 240, 255, 0.4);
}

.bracket.bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid rgba(0, 240, 255, 0.4);
    border-left: 2px solid rgba(0, 240, 255, 0.4);
}

.bracket.br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid rgba(0, 240, 255, 0.4);
    border-right: 2px solid rgba(0, 240, 255, 0.4);
}

.hud-panel:not(.visible) .bracket.tl { transform: translate(-4px, -4px); }
.hud-panel:not(.visible) .bracket.tr { transform: translate(4px, -4px); }
.hud-panel:not(.visible) .bracket.bl { transform: translate(-4px, 4px); }
.hud-panel:not(.visible) .bracket.br { transform: translate(4px, 4px); }

/* --- Typography --- */
h1, h2, .hero-title, .summit-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-white);
    text-shadow:
        0 0 6px rgba(0, 240, 255, 0.4),
        0 0 20px rgba(0, 240, 255, 0.1);
}

h3, .panel-header {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-white);
    margin-bottom: 20px;
}

.panel-subheader {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    letter-spacing: 0.06em;
    color: var(--neon-cyan);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.panel-body {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ice-white);
    margin-bottom: 16px;
}

.panel-body:last-child,
.panel-body:last-of-type {
    margin-bottom: 0;
}

.mono-accent {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    opacity: 0.6;
    color: var(--mist-gray);
    margin-top: 12px;
}

/* --- Screen 1: Base Camp --- */
.screen-1-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.panel-hero {
    text-align: center;
    padding: 48px 64px;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 16px;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px rgba(0, 240, 255, 0.5),
        0 0 40px rgba(0, 240, 255, 0.15),
        0 0 80px rgba(0, 240, 255, 0.05);
}

.hero-divider {
    width: 48px;
    height: 1px;
    background: var(--neon-cyan);
    margin: 0 auto 20px;
    opacity: 0.4;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

.hero-tagline {
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mist-gray);
    max-width: 440px;
    margin: 0 auto 16px;
}

.hero-altitude {
    opacity: 0.4;
    font-size: 10px;
}

/* --- Screen 2: Approach --- */
.screen-2-content {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 16px;
    align-items: start;
    padding-top: 80px;
}

.panel-main {
    min-height: 300px;
}

.panel-side {
    min-height: 260px;
}

/* Metrics */
.metric-row {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.metric-row:last-child {
    margin-bottom: 0;
}

.metric-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--mist-gray);
    opacity: 0.7;
}

.metric-bar {
    height: 4px;
    background: rgba(232, 240, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    background: var(--neon-cyan);
    border-radius: 2px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
    position: relative;
}

.metric-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -1px;
    width: 2px;
    height: 6px;
    background: var(--neon-cyan);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease 1.5s;
}

.hud-panel.visible .metric-fill::after {
    opacity: 1;
}

.metric-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--neon-cyan);
    text-align: right;
}

/* --- Screen 3: Ascent --- */
.screen-3-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding-top: 60px;
}

.panel-narrow {
    max-width: 480px;
    width: 100%;
}

.panel-stagger-1 {
    align-self: flex-start;
    margin-left: 5%;
}

.panel-stagger-2 {
    align-self: center;
}

.panel-stagger-3 {
    align-self: flex-end;
    margin-right: 5%;
}

/* --- Screen 4: Summit --- */
.screen-4-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.panel-summit {
    max-width: 640px;
    width: 100%;
    text-align: center;
    padding: 56px 48px;
}

.summit-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 28px;
    color: var(--summit-gold);
    text-shadow:
        0 0 10px rgba(255, 209, 102, 0.4),
        0 0 30px rgba(255, 209, 102, 0.1);
}

.summit-body {
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: var(--ice-white);
    margin-bottom: 24px;
}

.summit-divider {
    width: 60px;
    height: 1px;
    background: var(--summit-gold);
    margin: 24px auto;
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.3);
}

.summit-caption {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    letter-spacing: 0.06em;
    color: var(--summit-gold);
    text-transform: uppercase;
    opacity: 0.8;
}

/* --- Screen 5: Descent / Contact --- */
.screen-descent .hud-panel {
    opacity: 0;
}

.screen-descent .hud-panel.visible {
    opacity: 0.6;
}

.screen-5-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.panel-contact {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 40px;
}

.contact-text {
    color: var(--mist-gray);
}

.cta-link {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-decoration: none;
    padding: 12px 32px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    margin: 20px 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 240, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.cta-link:hover::before {
    left: 100%;
}

.cta-link:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 16px rgba(0, 240, 255, 0.3),
        0 0 40px rgba(0, 240, 255, 0.1);
    color: var(--ice-white);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.contact-coords {
    margin-top: 16px;
}

/* --- Neon Glow Intensified Hover --- */
.hud-panel:hover {
    box-shadow:
        0 0 16px rgba(0, 240, 255, 0.3),
        0 0 48px rgba(0, 240, 255, 0.1),
        0 0 8px rgba(255, 45, 123, 0.1);
}

/* --- Altitude-based background shifts --- */
body.altitude-0 #sky {
    background: linear-gradient(180deg, #0A0E1A 0%, #0e1225 40%, #151B2E 65%, #1A1028 100%);
}

body.altitude-1 #sky {
    background: linear-gradient(180deg, #0A0E1A 0%, #0d1122 35%, #141a2a 60%, #1A1028 100%);
}

body.altitude-2 #sky {
    background: linear-gradient(180deg, #080c17 0%, #0b0f1f 30%, #111728 55%, #181530 100%);
}

body.altitude-3 #sky {
    background: linear-gradient(180deg, #060a14 0%, #090d1a 25%, #0e1222 50%, #151028 100%);
}

body.altitude-3 .layer-1,
body.altitude-3 .layer-2 {
    opacity: 0.3;
}

body.altitude-3 #fog-layer {
    opacity: 0.8;
}

body.altitude-3 .star {
    opacity: 0.9;
}

body.altitude-4 #sky {
    background: linear-gradient(180deg, #050912 0%, #080c18 20%, #0c1020 45%, #121028 100%);
}

body.altitude-4 .layer-1,
body.altitude-4 .layer-2,
body.altitude-4 .layer-3 {
    opacity: 0.2;
}

body.altitude-4 #fog-layer {
    opacity: 0.9;
}

/* --- Panel Flicker Animation --- */
@keyframes panelFlicker {
    0%  { opacity: 0; }
    10% { opacity: 0.6; }
    20% { opacity: 0.1; }
    40% { opacity: 0.8; }
    50% { opacity: 0.2; }
    70% { opacity: 0.9; }
    100% { opacity: 1; }
}

.hud-panel.flickering {
    animation: panelFlicker 0.4s ease-out forwards;
}

/* --- Glow Pulse (neon breathing) --- */
@keyframes glowPulse {
    0%, 100% {
        box-shadow:
            0 0 8px rgba(0, 240, 255, 0.15),
            0 0 24px rgba(0, 240, 255, 0.05);
    }
    50% {
        box-shadow:
            0 0 12px rgba(0, 240, 255, 0.25),
            0 0 36px rgba(0, 240, 255, 0.08);
    }
}

.hud-panel.visible.breathing {
    animation: glowPulse var(--pulse-duration, 4s) ease-in-out infinite;
}

/* --- Typewriter cursor --- */
.typewrite-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--neon-cyan);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 1s step-end infinite;
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.4);
}

/* --- Summit Gold panel brackets --- */
.panel-summit .bracket.tl,
.panel-summit .bracket.tr,
.panel-summit .bracket.bl,
.panel-summit .bracket.br {
    border-color: rgba(255, 209, 102, 0.4);
}

.panel-summit.visible {
    border-top-color: rgba(255, 209, 102, 0.3);
    border-left-color: rgba(255, 209, 102, 0.3);
    box-shadow:
        0 0 8px rgba(255, 209, 102, 0.15),
        0 0 24px rgba(255, 209, 102, 0.05);
}

@keyframes glowPulseSummit {
    0%, 100% {
        box-shadow:
            0 0 8px rgba(255, 209, 102, 0.15),
            0 0 24px rgba(255, 209, 102, 0.05);
    }
    50% {
        box-shadow:
            0 0 14px rgba(255, 209, 102, 0.25),
            0 0 40px rgba(255, 209, 102, 0.08);
    }
}

.panel-summit.visible.breathing {
    animation: glowPulseSummit var(--pulse-duration, 4s) ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .screen-2-content {
        grid-template-columns: 1fr;
    }

    .hud-screen {
        padding: 24px 16px;
    }

    .panel-hero {
        padding: 32px 24px;
    }

    .panel-summit {
        padding: 36px 24px;
    }

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

    .corner-anchor {
        display: none;
    }

    .telemetry-strip {
        display: none;
    }

    .metric-row {
        grid-template-columns: 80px 1fr 50px;
        gap: 8px;
    }

    #reticle {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .summit-title {
        font-size: clamp(1.6rem, 5vw, 2.4rem);
    }
}

@media (max-width: 480px) {
    .hud-screen {
        padding: 16px 12px;
    }

    .hud-panel {
        padding: 20px 16px;
    }

    .panel-hero {
        padding: 24px 16px;
    }

    .hero-tagline {
        font-size: 13px;
    }

    .panel-body {
        font-size: 14px;
    }
}
