/* continuum.quest - Cyberpunk Data-Viz Dashboard */
/* Palette: #050510, #0a0a20, #00d4ff, #a855f7, #1a1a3a, #e0e7ff, #6366f1, #f43f5e */

:root {
    --bg: #050510;
    --panel-bg: rgba(10, 10, 32, 0.8);
    --neon-blue: #00d4ff;
    --neon-purple: #a855f7;
    --grid: #1a1a3a;
    --text: #e0e7ff;
    --label: #6366f1;
    --alert: #f43f5e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ========================================
   HUD Progress Bar
   ======================================== */
.hud-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(26, 26, 58, 0.5);
    z-index: 200;
}

.hud-fill {
    height: 100%;
    width: 0;
    background: var(--neon-blue);
    box-shadow: 0 0 12px var(--neon-blue), 0 0 4px var(--neon-blue);
    transition: width 0.08s linear;
}

/* ========================================
   HUD Corner Elements
   ======================================== */
.hud-corner {
    position: fixed;
    z-index: 150;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hud-corner.active {
    opacity: 1;
}

.hud-top-left {
    top: 16px;
    left: 16px;
}

.hud-top-right {
    top: 16px;
    right: 16px;
    text-align: right;
}

.hud-bottom-left {
    bottom: 16px;
    left: 16px;
}

.hud-bottom-right {
    bottom: 16px;
    right: 16px;
}

.hud-label {
    display: block;
    font-size: 0.55rem;
    color: var(--label);
    letter-spacing: 0.15em;
    margin-bottom: 2px;
}

.hud-data {
    display: block;
    font-size: 0.7rem;
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* ========================================
   Radar Sweep
   ======================================== */
.radar-sweep {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transform: translate(-50%, -50%);
}

.radar-ring-2 {
    width: 20px;
    height: 20px;
}

.radar-arm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.6), transparent);
    transform-origin: 0 0;
    animation: radarSpin 4s linear infinite;
}

@keyframes radarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--neon-blue);
    box-shadow: 0 0 4px var(--neon-blue);
    animation: radarBlink 4s ease-in-out infinite;
}

.radar-dot:nth-child(4) { top: 20%; left: 60%; animation-delay: 0.5s; }
.radar-dot:nth-child(5) { top: 65%; left: 30%; animation-delay: 1.8s; }
.radar-dot:nth-child(6) { top: 40%; left: 75%; animation-delay: 3.1s; }

@keyframes radarBlink {
    0%, 80%, 100% { opacity: 0; }
    10%, 70% { opacity: 1; }
}

/* ========================================
   Particle Field
   ======================================== */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    8% { opacity: 0.8; }
    50% { opacity: 0.6; }
    92% { opacity: 0.8; }
    100% {
        transform: translateY(-110vh) translateX(40px);
        opacity: 0;
    }
}

/* ========================================
   Grid Floor
   ======================================== */
.grid-floor {
    position: fixed;
    bottom: -10%;
    left: -50%;
    width: 200%;
    height: 50vh;
    background:
        repeating-linear-gradient(90deg, var(--grid) 0px, transparent 1px, transparent 60px),
        repeating-linear-gradient(0deg, var(--grid) 0px, transparent 1px, transparent 60px);
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center bottom;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.grid-floor.active {
    opacity: 0.5;
}

/* ========================================
   Boot Overlay
   ======================================== */
.boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 300;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10% 15%;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.boot-overlay.hidden {
    opacity: 0;
}

.boot-overlay.removed {
    display: none;
}

.boot-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--neon-blue);
    opacity: 0;
    margin-bottom: 4px;
    text-shadow: 0 0 6px rgba(0, 212, 255, 0.3);
    animation: bootLineIn 0.15s ease forwards;
}

@keyframes bootLineIn {
    to { opacity: 0.9; }
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    position: relative;
}

.hero-scanline {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0;
    animation: scanlineIn 0.6s ease forwards 2.8s;
}

@keyframes scanlineIn {
    to { opacity: 0.6; }
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 8vw, 5rem);
    color: var(--neon-blue);
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.4), 0 0 80px rgba(0, 212, 255, 0.15);
    position: relative;
    display: inline-block;
}

.brand-char {
    display: inline-block;
    opacity: 0;
    animation: charIn 0.08s ease forwards;
    animation-delay: calc(1.2s + var(--i) * 0.07s);
}

@keyframes charIn {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

.cursor {
    display: inline-block;
    opacity: 0;
    animation: cursorAppear 0.1s ease forwards 2.5s, blink 1s step-end infinite 2.6s;
}

@keyframes cursorAppear {
    to { opacity: 1; }
}

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

.brand-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--label);
    letter-spacing: 0.25em;
    margin-top: 1.2rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 2.8s;
}

.hero-divider {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    margin: 1.5rem auto;
    opacity: 0;
    animation: dividerExpand 1s ease forwards 3.2s;
}

@keyframes dividerExpand {
    to {
        width: 200px;
        opacity: 0.4;
    }
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(224, 231, 255, 0.5);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 3.5s;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Sector Markers
   ======================================== */
.sector-marker {
    position: absolute;
    top: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
}

.sector-marker-left {
    left: 2rem;
}

.sector-marker-right {
    right: 2rem;
}

.marker-line {
    width: 40px;
    height: 1px;
    background: var(--label);
    opacity: 0.4;
}

.marker-line-alert {
    background: var(--alert);
}

.marker-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--label);
    letter-spacing: 0.15em;
    opacity: 0.6;
}

.marker-text-alert {
    color: var(--alert);
}

/* ========================================
   Sector Sections
   ======================================== */
.sector-section {
    position: relative;
    z-index: 5;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem;
}

.sector-section:nth-child(odd) {
    justify-content: flex-end;
    padding-right: 12%;
}

.sector-section:nth-child(even) {
    justify-content: flex-start;
    padding-left: 12%;
}

/* ========================================
   Data Panels
   ======================================== */
.data-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid;
    padding: 32px;
    max-width: 520px;
    position: relative;
    transition: box-shadow 0.4s ease;
}

.data-panel:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25), inset 0 0 15px rgba(0, 212, 255, 0.08);
}

.panel-blue {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.15), inset 0 0 10px rgba(0, 212, 255, 0.05);
}

.panel-purple {
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15), inset 0 0 10px rgba(168, 85, 247, 0.05);
}

.panel-purple:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.25), inset 0 0 15px rgba(168, 85, 247, 0.08);
}

.panel-alert {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.2), inset 0 0 10px rgba(244, 63, 94, 0.08);
}

.panel-alert:hover {
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.3), inset 0 0 20px rgba(244, 63, 94, 0.1);
}

/* Crosshair markers */
.crosshair {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(99, 102, 241, 0.35);
    line-height: 1;
}

.crosshair-alert {
    color: rgba(244, 63, 94, 0.4);
}

.tl { top: 5px; left: 7px; }
.tr { top: 5px; right: 7px; }
.bl { bottom: 5px; left: 7px; }
.br { bottom: 5px; right: 7px; }

.sector-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--label);
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.panel-alert .sector-label {
    color: var(--alert);
}

.panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.panel-text {
    font-size: 0.88rem;
    color: rgba(224, 231, 255, 0.65);
    line-height: 1.75;
    margin-bottom: 1.2rem;
}

/* Panel Stats */
.panel-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--label);
    letter-spacing: 0.1em;
    white-space: nowrap;
    min-width: 100px;
}

.stat-bar {
    flex: 1;
    height: 2px;
    background: rgba(26, 26, 58, 0.8);
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: 0;
    transition: width 1.5s ease;
}

.stat-fill-blue {
    background: var(--neon-blue);
    box-shadow: 0 0 6px var(--neon-blue);
}

.stat-fill-purple {
    background: var(--neon-purple);
    box-shadow: 0 0 6px var(--neon-purple);
}

.stat-fill-alert {
    background: var(--alert);
    box-shadow: 0 0 6px var(--alert);
}

.stat-fill-flicker {
    animation: statFlicker 2s ease-in-out infinite;
}

@keyframes statFlicker {
    0%, 100% { opacity: 1; }
    30% { opacity: 0.4; }
    60% { opacity: 0.9; }
    80% { opacity: 0.3; }
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text);
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* ========================================
   Deep Scan Zone
   ======================================== */
.deep-scan-zone {
    position: relative;
}

.deep-scan-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(244, 63, 94, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ========================================
   Horizon Section
   ======================================== */
.horizon-section {
    position: relative;
    z-index: 5;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
}

.horizon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.horizon-lines {
    display: flex;
    gap: 8px;
    align-items: center;
}

.h-line {
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0.3;
}

.h-line:nth-child(1) { width: 30px; }
.h-line:nth-child(2) { width: 60px; opacity: 0.5; }
.h-line:nth-child(3) { width: 30px; }

.horizon-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.readout-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--label);
    letter-spacing: 0.25em;
}

.readout-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 5vw, 3rem);
    color: var(--neon-blue);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.15);
    animation: horizonPulse 3s ease-in-out infinite;
}

@keyframes horizonPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.15); }
    50% { opacity: 0.65; text-shadow: 0 0 15px rgba(0, 212, 255, 0.2), 0 0 30px rgba(0, 212, 255, 0.08); }
}

.horizon-coords {
    display: flex;
    gap: 2.5rem;
}

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

.coord-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    color: var(--label);
    letter-spacing: 0.15em;
}

.coord-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--neon-blue);
    text-shadow: 0 0 6px rgba(0, 212, 255, 0.3);
}

/* ========================================
   Fade In Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.slide-right {
    transform: translateX(-30px) translateY(0);
}

.fade-in.slide-left {
    transform: translateX(30px) translateY(0);
}

.fade-in.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* Stat bar fill animation when visible */
.fade-in.visible .stat-fill {
    width: var(--target-width);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    position: relative;
    z-index: 5;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--label);
    letter-spacing: 0.2em;
    opacity: 0.4;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .sector-section:nth-child(odd),
    .sector-section:nth-child(even) {
        justify-content: center;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sector-marker {
        display: none;
    }

    .data-panel {
        max-width: 100%;
    }

    .hud-corner {
        display: none;
    }

    .grid-floor {
        height: 30vh;
        opacity: 0.3;
    }

    .horizon-coords {
        gap: 1.5rem;
    }

    .panel-stat {
        flex-wrap: wrap;
        gap: 6px;
    }

    .stat-label {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 2.2rem;
    }

    .sector-section {
        min-height: 70vh;
        padding: 4rem 1rem;
    }

    .data-panel {
        padding: 24px;
    }

    .grid-floor {
        display: none;
    }
}
