@charset "UTF-8";

/* ==========================================================================
   GUB_DRAGONS // COMPETITIVE INTELLIGENCE COMMAND CENTER
   STYLESHEET // VERSION 2.0.0
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
    /* Base Color Spectrum */
    --c-space-900: #020305;
    --c-space-800: #030509; /* Primary Background */
    --c-space-700: #05080e; /* Deep Panel */
    --c-space-600: #080d17; /* Surface */
    --c-space-500: #0c1424; /* Elevated Surface */
    
    /* Structural Accents */
    --c-accent-primary: #2878ff; /* Cobalt Blue */
    --c-accent-bright: #55a0ff;
    --c-accent-dim: rgba(40, 120, 255, 0.4);
    --c-accent-ghost: rgba(40, 120, 255, 0.1);
    --c-accent-glow: rgba(40, 120, 255, 0.15);

    /* Text & Readability */
    --t-main: #e2e8f0;
    --t-muted: #8292a6;
    --t-dim: #4a5b73;
    --t-ghost: #2d3748;

    /* Status & System Indicators */
    --s-nominal: #10b981; /* Green */
    --s-nominal-ghost: rgba(16, 185, 129, 0.15);
    --s-alert: #ef4444; /* Red */
    --s-alert-ghost: rgba(239, 68, 68, 0.15);
    --s-warn: #f59e0b; /* Amber */
    
    /* Structural Borders */
    --b-primary: rgba(40, 120, 255, 0.2);
    --b-strong: rgba(40, 120, 255, 0.5);
    --b-ghost: rgba(255, 255, 255, 0.05);
    --b-panel: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout & Scale */
    --layout-max: 1600px;
    --layout-pad: clamp(1rem, 4vw, 4rem);
    --hud-offset: clamp(10px, 2vw, 30px);
    
    /* Motion & Transitions */
    --trans-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --trans-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --trans-expo: 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--c-space-900);
}

body {
    background-color: var(--c-space-800);
    color: var(--t-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }
button { border: none; background: none; font: inherit; }
img { max-width: 100%; display: block; }

/* Selection */
::selection {
    background: var(--c-accent-dim);
    color: #fff;
    text-shadow: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: var(--c-space-900);
}
::-webkit-scrollbar-thumb {
    background: var(--b-strong);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--c-accent-primary);
}

/* ==========================================================================
   03. BACKGROUND SYSTEM & ATMOSPHERE
   ========================================================================== */
.background {
    position: fixed;
    inset: 0;
    z-index: -10;
    pointer-events: none;
    background-color: var(--c-space-800);
    overflow: hidden;
}

/* Core Grid */
.grid {
    position: absolute;
    inset: -50%;
    width: 200vw;
    height: 200vh;
    transform-origin: center center;
}

.grid-main {
    background-size: 120px 120px;
    background-image: 
        linear-gradient(to right, rgba(40, 120, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(40, 120, 255, 0.05) 1px, transparent 1px);
    animation: drift 120s linear infinite;
}

.grid-fine {
    background-size: 24px 24px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    animation: drift 180s linear infinite reverse;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-120px, -120px); }
}

/* Atmospheric Glows */
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    mix-blend-mode: screen;
    pointer-events: none;
}

.glow-main {
    top: -20vh;
    left: 10vw;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(40, 120, 255, 0.12) 0%, transparent 60%);
    animation: pulse-glow 8s ease-in-out infinite alternate;
}

.glow-red {
    bottom: -10vh;
    right: -10vw;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.05) 0%, transparent 60%);
}

@keyframes pulse-glow {
    0% { opacity: 0.8; transform: scale(0.95); }
    100% { opacity: 1.2; transform: scale(1.05); }
}

/* Optical Overlay Effects */
.scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.25) 50%,
        rgba(0,0,0,0.25)
    );
    background-size: 100% 4px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 2;
}

.noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: overlay;
}

/* Vignette Mask */
.background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, var(--c-space-900) 120%);
    z-index: 4;
}

/* ==========================================================================
   04. HUD CORNERS & PERIMETER
   ========================================================================== */
.hud-corner {
    position: fixed;
    width: clamp(20px, 4vw, 40px);
    height: clamp(20px, 4vw, 40px);
    border-color: var(--c-accent-primary);
    border-style: solid;
    border-width: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.7;
    transition: var(--trans-base);
}

.hud-corner::after {
    content: '';
    position: absolute;
    background: var(--c-accent-primary);
}

.hud-tl { top: var(--hud-offset); left: var(--hud-offset); border-top-width: 2px; border-left-width: 2px; }
.hud-tr { top: var(--hud-offset); right: var(--hud-offset); border-top-width: 2px; border-right-width: 2px; }
.hud-bl { bottom: var(--hud-offset); left: var(--hud-offset); border-bottom-width: 2px; border-left-width: 2px; }
.hud-br { bottom: var(--hud-offset); right: var(--hud-offset); border-bottom-width: 2px; border-right-width: 2px; }

/* Micro-ticks on HUD */
.hud-tl::after { top: 0; left: 8px; width: 1px; height: 4px; }
.hud-tr::after { top: 0; right: 8px; width: 1px; height: 4px; }
.hud-bl::after { bottom: 0; left: 8px; width: 1px; height: 4px; }
.hud-br::after { bottom: 0; right: 8px; width: 1px; height: 4px; }

/* ==========================================================================
   05. PAGE SHELL
   ========================================================================== */
.page {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: var(--layout-pad);
    position: relative;
    z-index: 10;
    width: 100%;
    flex: 1;
}

.section {
    margin-top: clamp(6rem, 10vw, 10rem);
    position: relative;
}

/* ==========================================================================
   06. TOPBAR / COMMAND HEADER
   ========================================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 2rem);
    background: rgba(5, 8, 14, 0.7);
    border: 1px solid var(--b-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: clamp(3rem, 6vw, 5rem);
    position: sticky;
    top: var(--hud-offset);
    z-index: 90;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Decorative topbar brackets */
.topbar::before, .topbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    width: 10px;
    height: 1px;
    background: var(--c-accent-bright);
}
.topbar::before { left: -1px; }
.topbar::after { right: -1px; }

.brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
}

.brand-icon {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--c-space-900);
    background: var(--c-accent-primary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    position: relative;
    box-shadow: 0 0 15px var(--c-accent-glow);
}

.brand-icon::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    clip-path: inherit;
    pointer-events: none;
}

.brand-title {
    font-weight: 800;
    letter-spacing: 0.15em;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--c-accent-bright);
    letter-spacing: 0.15em;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.system-state {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--s-nominal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
    background: var(--s-nominal-ghost);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 2px;
}

.state-light {
    width: 6px;
    height: 6px;
    background-color: var(--s-nominal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--s-nominal);
    animation: blink 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

nav {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
}

nav a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--t-muted);
    transition: var(--trans-base);
    position: relative;
    padding: 0.5rem 0;
    text-transform: uppercase;
}

nav a:hover, nav a:focus-visible {
    color: var(--c-accent-bright);
    outline: none;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-accent-primary);
    transition: width var(--trans-base);
    box-shadow: 0 0 8px var(--c-accent-primary);
}

nav a:hover::after, nav a:focus-visible::after {
    width: 100%;
}

/* ==========================================================================
   07. HERO SECTION
   ========================================================================== */
.hero {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 420px);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
    min-height: 60vh;
    position: relative;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: relative;
    z-index: 2;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 0.15em;
}

.eyebrow span {
    width: 32px;
    height: 1px;
    background: var(--c-accent-primary);
}

.eyebrow b {
    color: var(--t-main);
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--b-panel);
}

.hero h1 {
    font-size: clamp(3.5rem, 6vw, 7rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--t-dim);
    display: inline-block;
    position: relative;
}

/* Glitch/Technical shadow on hollow text */
.hero h1 span::before {
    content: '_DRAGONS';
    position: absolute;
    left: 2px;
    top: 2px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(40, 120, 255, 0.3);
    z-index: -1;
}

.hero-line {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--c-accent-primary);
    letter-spacing: 0.25em;
}

.hero-line i {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--c-accent-primary), transparent);
    opacity: 0.5;
}

.hero-line i:last-child {
    background: linear-gradient(270deg, var(--c-accent-primary), transparent);
}

.hero-copy p {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--t-muted);
    max-width: 540px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
}

.hud-button {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 1rem 2rem;
    border: 1px solid var(--c-accent-primary);
    background: rgba(40, 120, 255, 0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--trans-base);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    position: relative;
    overflow: hidden;
}

.hud-button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: transform 0.6s ease;
}

.hud-button b {
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--c-accent-bright);
    transition: transform var(--trans-base);
}

.hud-button:hover, .hud-button:focus-visible {
    background: var(--c-accent-primary);
    box-shadow: 0 0 20px var(--c-accent-glow);
    outline: none;
}

.hud-button:hover::before {
    transform: translateX(200%);
}

.hud-button:hover b {
    color: #fff;
    transform: translate(2px, -2px);
}

.hud-button.secondary {
    border-color: var(--b-panel);
    background: var(--c-space-600);
    color: var(--t-muted);
}

.hud-button.secondary b { color: var(--t-dim); }

.hud-button.secondary:hover, .hud-button.secondary:focus-visible {
    border-color: var(--t-muted);
    background: var(--c-space-500);
    color: var(--t-main);
}
.hud-button.secondary:hover b { color: var(--t-main); transform: rotate(90deg); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--b-primary);
    padding-top: 2rem;
    position: relative;
}

/* Telemetry markers on hero stats */
.hero-stats::before {
    content: '';
    position: absolute;
    top: -2px; left: 0;
    width: 20px; height: 3px;
    background: var(--c-accent-primary);
}

.hero-stats div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.hero-stats span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--t-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-stats strong {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--t-main);
}

.hero-stats .green, .green {
    color: var(--s-nominal);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   08. COMMAND NODE & RADAR
   ========================================================================== */
.command-node {
    background: rgba(8, 13, 23, 0.6);
    border: 1px solid var(--b-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Tech Corners */
.command-node::before, .command-node::after {
    content: '';
    position: absolute;
    width: 15px; height: 15px;
    border-color: var(--c-accent-primary);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
}
.command-node::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.command-node::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--b-primary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.node-header span { color: var(--t-muted); }
.node-header b { 
    color: var(--c-accent-bright);
    background: rgba(40,120,255,0.1);
    padding: 2px 6px;
    border-radius: 2px;
}

.node-body {
    padding: clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.02) 75%, transparent 75%, transparent);
    background-size: 4px 4px;
}

/* Radar System */
.radar {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid var(--b-strong);
    background: radial-gradient(circle, rgba(40, 120, 255, 0.08) 0%, rgba(0,0,0,0.8) 80%);
    box-shadow: inset 0 0 40px rgba(40, 120, 255, 0.1), 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.radar-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(40, 120, 255, 0.2);
    border-radius: 50%;
}

.radar-ring.r1 { width: 33%; height: 33%; }
.radar-ring.r2 { width: 66%; height: 66%; }
.radar-ring.r3 { width: 100%; height: 100%; border-style: solid; border-color: rgba(40, 120, 255, 0.4); }

.radar-cross {
    position: absolute;
    background: rgba(40, 120, 255, 0.2);
}

.radar-cross.horizontal { top: 50%; left: 0; width: 100%; height: 1px; }
.radar-cross.vertical { top: 0; left: 50%; width: 1px; height: 100%; }

/* Radar tick marks */
.radar::before, .radar::after {
    content: ''; position: absolute; background: var(--c-accent-primary);
}
.radar::before { top: 0; left: 50%; width: 2px; height: 8px; transform: translateX(-50%); }
.radar::after { top: 50%; right: 0; width: 8px; height: 2px; transform: translateY(-50%); }

.radar-sweep {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(40, 120, 255, 0.6) 100%);
    animation: radar-sweep 4s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes radar-sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.radar-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--s-nominal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--s-nominal), 0 0 20px var(--s-nominal);
    animation: radar-blip 4s infinite;
    opacity: 0;
}

/* Precision positioned dots */
.radar-dot.d1 { top: 25%; left: 65%; animation-delay: 0.8s; }
.radar-dot.d2 { top: 68%; left: 35%; animation-delay: 2.4s; }
.radar-dot.d3 { top: 42%; left: 20%; animation-delay: 3.3s; }

@keyframes radar-blip {
    0% { opacity: 0; transform: scale(0.5); }
    2% { opacity: 1; transform: scale(1.5); }
    15% { opacity: 0.6; transform: scale(1); }
    40% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 0; }
}

.radar-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--c-space-900);
    color: var(--c-accent-bright);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--c-accent-primary);
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    z-index: 5;
}

.node-readout {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border-top: 1px solid var(--b-primary);
    padding-top: 2rem;
    position: relative;
}

.node-readout::before {
    content: '';
    position: absolute;
    top: -2px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 3px;
    background: var(--c-accent-primary);
}

.node-readout div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.node-readout span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--t-dim);
    letter-spacing: 0.15em;
}

.node-readout b {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--t-main);
}

.node-footer {
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--b-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--t-muted);
    letter-spacing: 0.1em;
}

.signal-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 14px;
}

.signal-bars i {
    width: 4px;
    background: var(--c-accent-primary);
    animation: signal-bounce 1.5s ease-in-out infinite alternate;
}

.signal-bars i:nth-child(even) { animation-duration: 2s; background: var(--t-dim); }
.signal-bars i:nth-child(3n) { animation-duration: 1.2s; background: var(--c-accent-bright); }

@keyframes signal-bounce {
    0% { height: 20%; opacity: 0.4; }
    100% { height: 100%; opacity: 1; }
}

/* ==========================================================================
   09. METRICS STRIP
   ========================================================================== */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: -3rem; /* Overlap hero slightly */
    position: relative;
    z-index: 10;
}

.metric {
    background: var(--c-space-700);
    border: 1px solid var(--b-panel);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    transition: var(--trans-base);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.metric::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--c-accent-ghost);
    transition: var(--trans-base);
}

.metric:hover {
    border-color: var(--b-strong);
    background: var(--c-space-600);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 15px var(--c-accent-ghost);
}

.metric:hover::before {
    background: var(--c-accent-primary);
}

.metric-id {
    position: absolute;
    top: -5px;
    right: -10px;
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 800;
    color: rgba(255,255,255,0.02);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    transition: var(--trans-base);
}

.metric:hover .metric-id {
    color: rgba(40,120,255,0.05);
    transform: scale(1.05) translate(-5px, 5px);
}

.metric div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.metric small {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--t-muted);
    letter-spacing: 0.1em;
}

.metric strong {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--t-main);
    line-height: 1;
    font-family: var(--font-mono);
}

.metric em {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--c-accent-bright);
    font-style: normal;
    margin-top: auto;
    padding-top: 1.5rem;
    z-index: 2;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   10. SECTION HEADINGS
   ========================================================================== */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--b-panel);
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 60px; height: 2px;
    background: var(--c-accent-primary);
}

.section-heading div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-heading span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--c-accent-bright);
    letter-spacing: 0.2em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-heading span::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--c-accent-primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.section-heading h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-transform: uppercase;
}

.section-heading p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--t-dim);
    letter-spacing: 0.15em;
    text-align: right;
}

/* ==========================================================================
   11. OPERATOR ROSTER (PERSONNEL)
   ========================================================================== */
.operator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.operator-card {
    background: var(--c-space-700);
    border: 1px solid var(--b-panel);
    padding: 1.75rem;
    position: relative;
    transition: var(--trans-base);
    display: flex;
    flex-direction: column;
}

/* Top left decorative bracket */
.operator-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 20px; height: 20px;
    border-top: 2px solid var(--member, var(--c-accent-primary));
    border-left: 2px solid var(--member, var(--c-accent-primary));
    transition: var(--trans-base);
}

/* Member Signal Line at bottom */
.operator-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--member, var(--c-accent-primary));
    opacity: 0.4;
    transition: var(--trans-base);
}

.operator-card:hover {
    transform: translateY(-6px);
    border-color: var(--b-strong);
    background: var(--c-space-600);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 20px rgba(40, 120, 255, 0.05);
}

.operator-card:hover::before { width: 30px; height: 30px; }
.operator-card:hover::after { opacity: 1; box-shadow: 0 -2px 10px var(--member, var(--c-accent-primary)); }

.operator-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.operator-id { 
    color: var(--t-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border: 1px solid var(--b-panel);
}

.operator-role { 
    color: var(--member, var(--c-accent-bright)); 
    font-weight: 600; 
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.operator-role::before {
    content: '';
    width: 6px; height: 6px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
}

.operator-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.operator-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.operator-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px dashed var(--b-panel);
    flex-grow: 1;
}

.rating-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    padding-left: 0.75rem;
}

.rating-box::before {
    content: '';
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 2px;
    background: var(--b-strong);
}

.rating-box small, .rating-box span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--t-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rating-box strong {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--t-main);
}

.operator-platforms {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 2px;
}

.operator-platforms div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.operator-platforms span { color: var(--t-dim); }
.operator-platforms b { color: var(--t-main); font-weight: 500; }

/* ==========================================================================
   12. TELEMETRY PANELS (CHARTS)
   ========================================================================== */
.telemetry-panel {
    background: var(--c-space-700);
    border: 1px solid var(--b-panel);
    margin-bottom: 4rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.telemetry-panel:last-child {
    margin-bottom: 0;
}

.telemetry-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--c-accent-primary), transparent);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--b-panel);
    background: rgba(0,0,0,0.3);
}

.platform-title {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.platform-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid var(--b-panel);
    background: rgba(255,255,255,0.02);
    position: relative;
}

/* specific platform styling */
.platform-icon.cf { color: #ef4444; border-color: rgba(239,68,68,0.3); }
.platform-icon.cc { color: #d97706; border-color: rgba(217,119,6,0.3); }

.platform-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid inherit;
    opacity: 0.2;
}

.platform-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #fff;
    text-transform: uppercase;
}

.platform-title span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    letter-spacing: 0.15em;
    display: block;
    margin-top: 0.2rem;
}

.panel-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--s-nominal);
    background: var(--s-nominal-ghost);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.panel-status i {
    width: 6px;
    height: 6px;
    background: var(--s-nominal);
    border-radius: 50%;
    animation: blink 2s infinite;
}

.chart-info {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--b-panel);
    background: rgba(0,0,0,0.5);
}

.chart-info div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-info span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--t-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chart-info b {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-muted);
    font-weight: 500;
}

/* CHART CONTAINER - CRITICAL SIZING */
.chart-box {
    position: relative;
    width: 100%;
    height: clamp(300px, 50vh, 500px); /* Stable height targeting */
    padding: 1.5rem 2rem;
    background: var(--c-space-800);
}

/* Chart Canvas enforcement */
.chart-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-legend {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--b-panel);
    background: rgba(0,0,0,0.3);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* ==========================================================================
   13. LIVE SNAPSHOT
   ========================================================================== */
.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.snapshot-card {
    background: var(--c-space-700);
    border: 1px solid var(--b-panel);
    padding: 1.5rem;
    position: relative;
    transition: var(--trans-fast);
}

.snapshot-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--member, var(--c-accent-primary));
}

.snapshot-card:hover {
    background: var(--c-space-600);
    border-color: var(--b-strong);
}

.snapshot-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-family: var(--font-mono);
}

.snapshot-top span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
}

/* active dot mapped to member color */
.snapshot-top i {
    width: 6px; height: 6px;
    background: var(--member, var(--c-accent-primary));
    border-radius: 50%;
    box-shadow: 0 0 8px var(--member, transparent);
}

.snapshot-values {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.snapshot-values div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.snapshot-values div:last-child { border-bottom: none; }
.snapshot-values small { color: var(--t-dim); }
.snapshot-values strong { color: var(--t-main); font-weight: 500; }

/* ==========================================================================
   14. COMPETITIVE ARCHIVE (ACHIEVEMENTS)
   ========================================================================== */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 2rem;
}

.achievement-card {
    display: flex;
    background: var(--c-space-700);
    border: 1px solid var(--b-panel);
    position: relative;
    transition: var(--trans-base);
    overflow: hidden;
}

.achievement-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 1px solid transparent;
    transition: var(--trans-base);
    pointer-events: none;
    z-index: 10;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.achievement-card:hover::before { border-color: var(--b-strong); }

.achievement-media {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--b-panel);
    position: relative;
    background: #000;
    overflow: hidden;
}

.achievement-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity var(--trans-slow), transform var(--trans-expo), filter var(--trans-slow);
    filter: grayscale(80%) contrast(1.2) sepia(20%) hue-rotate(180deg);
}

/* Overlay scanlines on image */
.achievement-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
    z-index: 1;
}

.achievement-card:hover .achievement-media img {
    opacity: 1;
    transform: scale(1.08);
    filter: grayscale(0%) contrast(1) sepia(0%);
}

/* REQUIRED FIX: IMAGE FALLBACK SYSTEM */
.image-fallback {
    position: absolute;
    inset: 0;
    display: none; /* MUST BE HIDDEN BY DEFAULT */
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.02) 10px,
        rgba(255,255,255,0.02) 20px
    );
    z-index: 2;
}

/* ONLY display fallback when container has error state */
.achievement-media.image-missing .image-fallback {
    display: flex;
}

.achievement-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.achievement-index {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--c-accent-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
}

.achievement-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.achievement-place {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--s-warning, #f59e0b); /* Assuming gold/amber for placement */
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.achievement-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-muted);
    margin-bottom: 1.5rem;
}

.achievement-team {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--t-main);
    margin-bottom: 0.25rem;
    margin-top: auto;
}

.achievement-members {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    line-height: 1.5;
}

/* ==========================================================================
   15. MISSION / DIRECTIVE
   ========================================================================== */
.mission {
    margin-top: clamp(6rem, 12vw, 10rem);
    padding: clamp(4rem, 8vw, 6rem) 0;
    border-top: 1px solid var(--b-panel);
    border-bottom: 1px solid var(--b-panel);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    background: linear-gradient(90deg, rgba(40,120,255,0.03) 0%, transparent 100%);
}

.mission span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--c-accent-primary);
    letter-spacing: 0.25em;
    display: block;
    margin-bottom: 1.5rem;
}

.mission h2 {
    font-size: clamp(3rem, 5vw, 5.5rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.mission h2 b {
    color: transparent;
    -webkit-text-stroke: 1px var(--t-main);
    font-weight: 800;
}

.mission-right {
    position: relative;
    padding-left: clamp(2rem, 4vw, 3rem);
}

.mission-line {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--c-accent-primary), transparent);
}

.mission-right p {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    color: var(--t-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 500px;
}

.coordinates {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--t-dim);
    letter-spacing: 0.1em;
}

.coordinates span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coordinates span::before {
    content: '';
    width: 4px; height: 4px;
    background: var(--c-accent-bright);
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--t-dim);
    letter-spacing: 0.15em;
    border-top: 1px dashed var(--b-panel);
    text-transform: uppercase;
}

/* ==========================================================================
   17. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Very Large / Ultra-Wide (1600px+) */
@media (min-width: 1600px) {
    .page {
        border-left: 1px dashed var(--b-ghost);
        border-right: 1px dashed var(--b-ghost);
        background: linear-gradient(90deg, rgba(255,255,255,0.01) 0%, transparent 5%, transparent 95%, rgba(255,255,255,0.01) 100%);
    }
}

/* Tablet Landscape & Small Desktop (1024px - 1150px) */
@media (max-width: 1150px) {
    .hero { grid-template-columns: 1fr; gap: 4rem; }
    .command-node { max-width: 500px; margin: 0 auto; width: 100%; }
    .metrics { grid-template-columns: repeat(2, 1fr); margin-top: 4rem; }
    .operator-grid { grid-template-columns: repeat(2, 1fr); }
    .achievement-grid { grid-template-columns: 1fr; }
    .mission { grid-template-columns: 1fr; gap: 3rem; }
    .mission-right { padding-left: 2rem; }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) {
    nav { gap: 1.5rem; }
    .chart-box { height: 400px; }
    .chart-info { gap: 1.5rem; }
}

/* Large Mobile (640px - 767px) */
@media (max-width: 767px) {
    .topbar { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    nav { width: 100%; justify-content: space-between; overflow-x: auto; padding-bottom: 0.5rem; }
    nav::-webkit-scrollbar { height: 2px; }
    
    .hero h1 { font-size: 3rem; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    
    .radar { width: 220px; height: 220px; }
    
    .section-heading { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .section-heading p { text-align: left; }
    
    .operator-grid, .snapshot-grid { grid-template-columns: 1fr; }
    
    .achievement-card { flex-direction: column; }
    .achievement-media { width: 100%; height: 240px; border-right: none; border-bottom: 1px solid var(--b-panel); }
    
    .panel-head { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .chart-info { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .chart-box { height: 350px; padding: 1rem; }
    
    .coordinates { flex-direction: column; gap: 1rem; }
    footer { flex-direction: column; gap: 1.5rem; text-align: center; }
}

/* Standard Mobile (480px - 639px) */
@media (max-width: 639px) {
    .metrics { grid-template-columns: 1fr; }
    .metric-id { font-size: 5rem; }
    .command-node { border-radius: 0; border-left: none; border-right: none; }
}

/* Small Mobile (360px - 479px) */
@media (max-width: 479px) {
    .hero-actions { flex-direction: column; }
    .hud-button { justify-content: center; width: 100%; }
    .hero-stats { grid-template-columns: 1fr; gap: 1rem; }
    .node-readout { grid-template-columns: 1fr; text-align: center; }
    .node-readout::before { display: none; }
    .radar { width: 200px; height: 200px; }
    .chart-box { height: 300px; }
}

/* Ultra-Small Mobile (<=359px) */
@media (max-width: 359px) {
    .page { padding: 1rem; }
    .brand-title { font-size: 0.9rem; }
    .hero h1 { font-size: 2.2rem; }
    .operator-ratings { grid-template-columns: 1fr; }
    .radar { transform: scale(0.9); }
}

/* ==========================================================================
   18. ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

/* Focus outlines for accessibility */
*:focus-visible {
    outline: 2px dashed var(--c-accent-bright);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Explicitly kill infinite animations */
    .grid-main, .grid-fine, .glow-main, .state-light, 
    .radar-sweep, .radar-dot, .signal-bars i {
        animation: none !important;
    }
    
    /* Ensure elements stuck in an invisible animation state are visible */
    .radar-dot { opacity: 1 !important; }
    .state-light { opacity: 1 !important; }
    .signal-bars i { height: 100% !important; opacity: 1 !important; }
    
    /* Disable hover transforms that cause layout shift */
    .operator-card:hover, .metric:hover, .achievement-card:hover {
        transform: none !important;
    }
}
