/* sim-ai.net - Military-grade Simulation Operations Center */
/* Fonts: Josefin Sans (headlines), Exo 2 (body), Share Tech Mono (data) */

:root {
    --void-black: #080c14;
    --void-secondary: #0a1020;
    --slate-surface: #111827;
    --hud-cyan: #00ffc8;
    --aurora-green: #39ff85;
    --aurora-violet: #a855f7;
    --aurora-pink: #ff2d7b;
    --ghost-text: #64748b;
    --bright-text: #e2e8f0;
    --hud-accent: #00ffc8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--bright-text);
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === SCAN LINES === */
.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

.zone-04 .scan-lines-hidden {
    opacity: 0;
}

/* === HUD OVERLAY FRAME === */
.hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    animation: hud-fade-in 2s ease-out 0.5s forwards;
}

@keyframes hud-fade-in {
    to { opacity: 1; }
}

/* Corner Brackets */
.hud-corner {
    position: absolute;
    width: 60px;
    height: 60px;
}

.hud-corner-tl {
    top: 20px;
    left: 20px;
    border-top: 2px solid var(--hud-accent);
    border-left: 2px solid var(--hud-accent);
    opacity: 0.4;
    transition: border-color 1.2s ease, opacity 1.2s ease;
}

.hud-corner-tr {
    top: 20px;
    right: 20px;
    border-top: 2px solid var(--hud-accent);
    border-right: 2px solid var(--hud-accent);
    opacity: 0.4;
    transition: border-color 1.2s ease, opacity 1.2s ease;
}

.hud-corner-bl {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid var(--hud-accent);
    border-left: 2px solid var(--hud-accent);
    opacity: 0.4;
    transition: border-color 1.2s ease, opacity 1.2s ease;
}

.hud-corner-br {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid var(--hud-accent);
    border-right: 2px solid var(--hud-accent);
    opacity: 0.4;
    transition: border-color 1.2s ease, opacity 1.2s ease;
}

/* Crosshair Lines */
.hud-crosshair-h {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 1px dashed var(--hud-accent);
    opacity: 0.15;
    transition: opacity 1.2s ease, border-color 1.2s ease;
}

.hud-crosshair-v {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 0;
    border-left: 1px dashed var(--hud-accent);
    opacity: 0.15;
    transition: opacity 1.2s ease, border-color 1.2s ease;
}

/* HUD Readouts */
.hud-readout-bl {
    position: absolute;
    bottom: 30px;
    left: 90px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    color: var(--hud-accent);
    opacity: 0.7;
    transition: color 1.2s ease;
}

.hud-readout-tr {
    position: absolute;
    top: 30px;
    right: 90px;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    color: var(--hud-accent);
    opacity: 0.7;
    transition: color 1.2s ease;
}

/* === ZONES CONTAINER === */
.zones-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
    scroll-behavior: smooth;
}

/* === ZONE BASE === */
.zone {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.zone-01 { background: var(--void-black); }
.zone-02 { background: var(--void-secondary); }
.zone-03 { background: var(--void-black); }
.zone-04 { background: var(--void-black); }
.zone-05 { background: var(--void-black); }

/* Zone Grid */
.zone-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 3fr 1fr;
    height: 100%;
    padding: 40px 30px;
    position: relative;
    z-index: 2;
}

.zone-margin-left {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-left: 20px;
}

.zone-content {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.zone-margin-right {
    grid-column: 3;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding-right: 20px;
}

/* Zone Labels & Coords */
.zone-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    color: var(--hud-cyan);
    opacity: 0.6;
}

.zone-coord {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.6rem, 0.8vw, 0.75rem);
    letter-spacing: 0.12em;
    color: var(--ghost-text);
    opacity: 0.5;
}

.zone-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.6rem, 0.8vw, 0.75rem);
    letter-spacing: 0.12em;
    color: var(--aurora-green);
    opacity: 0.7;
    margin-top: 8px;
}

.zone-timestamp {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.6rem, 0.8vw, 0.75rem);
    letter-spacing: 0.12em;
    color: var(--ghost-text);
    opacity: 0.5;
}

/* === TARGETING RETICLE === */
.targeting-reticle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--hud-cyan);
    opacity: 0.08;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.targeting-reticle::before,
.targeting-reticle::after {
    content: '';
    position: absolute;
    background: var(--hud-cyan);
}

.targeting-reticle::before {
    width: 1px;
    height: 20%;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 0 transparent, 0 calc(100% + 20%) 0 0 var(--hud-cyan);
}

.targeting-reticle::after {
    height: 1px;
    width: 20%;
    left: -10%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: calc(100% + 20%) 0 0 0 var(--hud-cyan);
}

.reticle-01 {
    width: 200px;
    height: 200px;
    animation: reticle-spin 60s linear infinite;
}

.reticle-02 {
    width: 300px;
    height: 300px;
    animation: reticle-spin 60s linear infinite;
}

.reticle-03 {
    width: 400px;
    height: 400px;
    animation: reticle-spin 60s linear infinite;
}

.reticle-04 {
    width: 600px;
    height: 600px;
    opacity: 0.12;
    animation: reticle-spin 30s linear infinite;
    border-color: var(--aurora-violet);
}

.reticle-04::before,
.reticle-04::after {
    background: var(--aurora-violet);
}

.reticle-04::before {
    box-shadow: 0 0 0 0 transparent, 0 calc(100% + 20%) 0 0 var(--aurora-violet);
}

.reticle-04::after {
    box-shadow: calc(100% + 20%) 0 0 0 var(--aurora-violet);
}

.reticle-05 {
    width: 80px;
    height: 80px;
    animation: reticle-spin 60s linear infinite;
    opacity: 0.05;
}

@keyframes reticle-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === ZONE 01: INIT === */
.typewriter-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--bright-text);
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid var(--hud-cyan);
    width: 0;
    animation: typewriter 2.5s steps(10, end) 2.5s forwards, blink-cursor 0.8s step-end infinite;
}

@keyframes typewriter {
    to { width: 100%; }
}

@keyframes blink-cursor {
    50% { border-color: transparent; }
}

.init-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    color: var(--ghost-text);
    opacity: 0;
    animation: fade-in-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) 5s forwards;
    margin-top: 20px;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* === ZONE 02: SCAN === */
.data-panel {
    border: 1px solid rgba(0, 255, 200, 0.3);
    padding: 24px 28px;
    margin-bottom: 16px;
    background: rgba(17, 24, 39, 0.5);
    width: 100%;
    max-width: 600px;
}

.data-panel h2 {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--hud-cyan);
    margin-bottom: 10px;
}

.data-panel p {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    color: var(--bright-text);
    line-height: 1.65;
    margin-bottom: 14px;
}

.line-chart {
    width: 100%;
    height: 40px;
    opacity: 0.8;
}

.chart-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease-out;
}

.visible .chart-line {
    stroke-dashoffset: 0;
}

/* === ZONE 03: PROC === */
.proc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 650px;
    margin-bottom: 30px;
}

.data-cell {
    border: 1px solid rgba(0, 255, 200, 0.2);
    padding: 20px;
    text-align: center;
    background: rgba(17, 24, 39, 0.4);
}

.cell-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.6rem, 0.8vw, 0.75rem);
    letter-spacing: 0.12em;
    color: var(--ghost-text);
    display: block;
    margin-bottom: 8px;
}

.cell-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    letter-spacing: 0.08em;
    color: var(--hud-cyan);
    display: block;
}

.constellation-03 {
    width: 100%;
    max-width: 500px;
    height: auto;
    opacity: 0.6;
}

/* === ZONE 04: FLUX === */
.flux-text {
    text-align: center;
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin-bottom: 40px;
}

.flux-text h2 {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--bright-text);
    margin-bottom: 24px;
}

.flux-text p {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    color: var(--bright-text);
    line-height: 1.9;
    opacity: 0.9;
}

.constellation-04 {
    width: 100%;
    max-width: 400px;
    height: auto;
    opacity: 0.8;
}

.organic-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 3s ease-out;
}

.visible .organic-path {
    stroke-dashoffset: 0;
}

/* === ZONE 05: TERM === */
.zone-05-content {
    gap: 30px;
}

.terminal-cursor {
    width: 12px;
    height: 24px;
    background: var(--hud-cyan);
    animation: cursor-blink 1.2s step-end infinite;
}

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

.term-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.12em;
    color: var(--ghost-text);
}

.constellation-05 {
    width: 60px;
    height: 60px;
}

.node.luminous {
    fill: var(--hud-cyan);
    animation: luminous-pulse 2s ease-in-out infinite;
}

@keyframes luminous-pulse {
    0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 4px var(--hud-cyan)); }
    50% { opacity: 1; filter: drop-shadow(0 0 12px var(--hud-cyan)); }
}

/* === AURORA BACKGROUNDS === */
.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.aurora-subtle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(57, 255, 133, 0.03) 20%,
        rgba(168, 85, 247, 0.02) 40%,
        transparent 60%,
        rgba(0, 255, 200, 0.03) 80%,
        transparent 100%
    );
    background-size: 300% 100%;
}

.aurora-medium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(57, 255, 133, 0.06) 15%,
        rgba(168, 85, 247, 0.05) 35%,
        rgba(0, 255, 200, 0.04) 55%,
        rgba(255, 45, 123, 0.03) 75%,
        transparent 100%
    );
    background-size: 300% 100%;
    animation: aurora-shift 12s ease-in-out infinite alternate;
}

.aurora-intense::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(57, 255, 133, 0.25) 10%,
        rgba(168, 85, 247, 0.35) 30%,
        rgba(255, 45, 123, 0.2) 50%,
        rgba(0, 255, 200, 0.3) 70%,
        rgba(168, 85, 247, 0.25) 85%,
        transparent 100%
    );
    background-size: 300% 100%;
    animation: aurora-shift 12s ease-in-out infinite alternate;
}

.aurora-intense::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(168, 85, 247, 0.15) 20%,
        rgba(57, 255, 133, 0.2) 50%,
        rgba(255, 45, 123, 0.15) 80%,
        transparent 100%
    );
    background-size: 400% 100%;
    animation: aurora-shift 8s ease-in-out infinite alternate-reverse;
    filter: blur(40px);
}

@keyframes aurora-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* === SVG CONSTELLATIONS === */
.constellation {
    opacity: 0.6;
}

.constellation .node {
    fill: var(--hud-cyan);
    opacity: 0.8;
}

.constellation .conn {
    stroke: var(--hud-cyan);
    stroke-width: 1;
    opacity: 0.2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease-out;
}

.visible .constellation .conn {
    stroke-dashoffset: 0;
}

.constellation .node.pulse {
    animation: node-pulse 2s ease-in-out infinite;
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* === FADE REVEAL === */
.fade-reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* === HUD COLOR STATES === */
.hud-frame.zone-flux .hud-corner,
.hud-frame.zone-flux .hud-crosshair-h,
.hud-frame.zone-flux .hud-crosshair-v {
    border-color: var(--aurora-violet);
}

.hud-frame.zone-flux .hud-readout-bl,
.hud-frame.zone-flux .hud-readout-tr {
    color: var(--aurora-violet);
}

.hud-frame.zone-scan .hud-crosshair-h,
.hud-frame.zone-scan .hud-crosshair-v {
    opacity: 0.25;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .zone-grid {
        grid-template-columns: 40px 1fr 40px;
        padding: 30px 10px;
    }

    .zone-margin-left,
    .zone-margin-right {
        padding: 0 5px;
    }

    .zone-label,
    .zone-coord,
    .zone-status,
    .zone-timestamp {
        font-size: 0.55rem;
    }

    .proc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hud-corner {
        width: 30px;
        height: 30px;
    }

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

    .hud-readout-bl { left: 50px; bottom: 20px; }
    .hud-readout-tr { right: 50px; top: 20px; }

    .data-panel {
        padding: 16px;
    }

    .reticle-04 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .zone-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .zone-margin-left,
    .zone-margin-right {
        display: none;
    }

    .zone-content {
        grid-column: 1;
        grid-row: 1;
        padding: 20px;
    }

    .proc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}