:root {
    --bg: #050f0a;
    --bg-2: #061209;
    --panel: rgba(5,15,10,.88);
    --panel-2: rgba(34,197,94,.04);
    --green: #22c55e;
    --green-2: #4ade80;
    --green-3: #86efac;
    --text: #f0fdf4;
    --muted: rgba(134,239,172,.62);
    --muted-2: rgba(134,239,172,.7);
    --border: rgba(34,197,94,.1);
    --border-strong: rgba(34,197,94,.28);
    --danger: #ef4444;
    --danger-soft: #fca5a5;
    --orange: #f97316;
    --orange-soft: #fdba74;
    --yellow: #fde047;
    --teal: #0d9488;
    --teal-soft: #5eead4;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-main: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); overflow-x: hidden; }
body {
    min-height: 100vh;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a1a0d; }
::-webkit-scrollbar-thumb { background: #1a3a20; border-radius: 2px; }

@keyframes pulse-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes float-up { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes glow-green { 0%,100% { box-shadow: 0 0 18px rgba(34,197,94,.35), 0 0 36px rgba(34,197,94,.12); } 50% { box-shadow: 0 0 32px rgba(34,197,94,.65), 0 0 64px rgba(34,197,94,.22); } }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.blink-dot { animation: blink 1.1s step-end infinite; }

#topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 52px;
    background: rgba(5,15,10,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(34,197,94,.08);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand span { font-size: 18px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.brand-icon { width: 28px; height: 28px; color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
    color: var(--muted-2);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--green-2); }
#main-content { min-height: calc(100vh - 60px); }
#app { min-height: calc(100vh - 60px); }
.loading-state { padding: 40px; color: var(--muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--green);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
    text-decoration: none;
}
.btn.glow, .nav-cta { animation: glow-green 3s ease-in-out infinite; }
.btn.ghost {
    background: transparent;
    color: var(--green-3);
    border: 1px solid rgba(34,197,94,.25);
    font-weight: 500;
}
button:disabled { opacity: .45; cursor: not-allowed; }

.announcement-strip { height: 34px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 500; color: var(--muted-2); letter-spacing: .04em; border-bottom: 1px solid var(--border); gap: 4px; }
.announcement-strip strong { color: var(--green-2); font-weight: 700; }
.landing-screen { position: relative; height: calc(100vh - 94px); min-height: 580px; overflow: hidden; }
.hero-canvas, .scan-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(110deg,rgba(5,15,10,.9) 0%,rgba(5,15,10,.55) 48%,rgba(5,15,10,.05) 100%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: 72px 52px; max-width: 760px; animation: float-up .8s ease-out both; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.28); border-radius: 100px; padding: 5px 15px; margin-bottom: 36px; }
.hero-badge span:last-child { font-size: 11.5px; font-weight: 600; color: var(--green-2); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: glow-green 2s ease-in-out infinite; }
.hero-copy h1 { font-size: clamp(48px,7vw,108px); font-weight: 700; line-height: .92; letter-spacing: -.04em; color: var(--text); margin-bottom: 6px; text-wrap: balance; }
.hero-copy h1.accent { color: var(--green); margin-bottom: 36px; }
.hero-copy p { font-size: 18px; line-height: 1.65; color: var(--green-3); max-width: 540px; margin-bottom: 48px; opacity: .88; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.hero-actions .btn { padding: 15px 36px; font-size: 16px; }
.hero-stats { position: absolute; bottom: 40px; right: 52px; z-index: 2; display: flex; flex-direction: column; gap: 10px; animation: float-up 1s ease-out .5s both; }
.stat-card { background: rgba(5,15,10,.88); border: 1px solid rgba(34,197,94,.3); border-radius: 10px; padding: 14px 20px; backdrop-filter: blur(12px); min-width: 162px; }
.stat-card span { display: block; font-size: 10px; color: var(--green-2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 5px; opacity: .7; }
.stat-card strong { display: block; font-size: 32px; font-weight: 700; color: var(--green-2); letter-spacing: -.04em; line-height: 1; }
.stat-card.danger { border-color: rgba(239,68,68,.35); }
.stat-card.danger span, .stat-card.danger strong { color: var(--danger-soft); }
.stat-card.teal { border-color: rgba(13,148,136,.3); }
.stat-card.teal span, .stat-card.teal strong { color: var(--teal-soft); }

.platform-section { padding: 96px 52px; max-width: 1200px; margin: 0 auto; }
.section-heading { text-align: center; margin-bottom: 60px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); margin-bottom: 14px; }
.eyebrow.danger { color: var(--danger-soft); }
.section-heading h2 { font-size: clamp(28px,4vw,52px); font-weight: 700; letter-spacing: -.03em; color: var(--text); text-wrap: balance; }

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 52px 24px; border-bottom: 1px solid rgba(34,197,94,.08); }
.header-title { font-size: clamp(28px,4vw,52px); font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.dashboard-actions { display: flex; align-items: center; gap: 12px; }
.pipeline-status { display: inline-flex; align-items: center; gap: 8px; color: var(--green-3); border: 1px solid rgba(34,197,94,.18); border-radius: 100px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.scan-screen { width: 100vw; height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.scan-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(34,197,94,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(34,197,94,.04) 1px,transparent 1px); background-size: 48px 48px; pointer-events: none; }
.scan-screen::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%,transparent 38%,rgba(5,15,10,.75) 100%); pointer-events: none; }
.back-link { position: absolute; top: 28px; left: 28px; z-index: 2; background: transparent; border: 1px solid rgba(34,197,94,.2); border-radius: 6px; padding: 7px 16px; color: rgba(134,239,172,.65); font-size: 13px; cursor: pointer; font-family: var(--font-main); font-weight: 500; }
.scan-card { text-align: center; max-width: 460px; padding: 32px; animation: float-up .6s ease-out both; position: relative; z-index: 2; }
.scan-mark { margin: 0 auto 34px; width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--green); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.28); }
.scan-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--text); margin-bottom: 12px; }
.scan-card p { font-size: 14px; line-height: 1.7; color: var(--muted); margin-bottom: 42px; }
.scan-orb { position: relative; z-index: 2; width: 122px; height: 122px; border-radius: 50%; background: linear-gradient(145deg,#166534,#22c55e); border: 2px solid rgba(74,222,128,.8); color: var(--bg); font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font-main); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; animation: glow-green 2.5s ease-in-out infinite; box-shadow: 0 0 40px rgba(34,197,94,.22); }

.scanning-screen { position: relative; height: calc(100vh - 60px); overflow: hidden; background: var(--bg); }
.scan-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(34,197,94,.08); z-index: 4; }
.scan-progress div { height: 3px; width: 0; background: linear-gradient(90deg,#22c55e,#4ade80); box-shadow: 0 0 8px rgba(34,197,94,.5); transition: width .5s ease; }
.scan-stage { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
.graph-panel { position: relative; min-height: 0; background-image: linear-gradient(rgba(34,197,94,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(34,197,94,.04) 1px,transparent 1px); background-size: 40px 40px; }
.agent-rail { position: absolute; top: 22px; padding: 5px 12px; border-radius: 100px; border: 1px solid rgba(34,197,94,.18); background: rgba(5,15,10,.82); }
.agent-rail.left { left: 24px; color: var(--danger-soft); }
.agent-rail.right { right: 24px; color: var(--green-2); }
.agent-rail span { font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.agent-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; vertical-align: middle; }
.agent-rail.left .agent-dot { background: var(--danger-soft); box-shadow: 0 0 4px rgba(239,68,68,.5); }
.agent-rail.right .agent-dot { background: var(--green-2); box-shadow: 0 0 4px rgba(74,222,128,.5); }
.terminal-panel { border-left: 1px solid rgba(34,197,94,.1); background: rgba(5,15,10,.94); display: flex; flex-direction: column; min-height: 0; }
.terminal-header { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid rgba(34,197,94,.1); }
.terminal-header span { width: 8px; height: 8px; border-radius: 50%; background: rgba(34,197,94,.25); }
.terminal-header strong { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--green-2); font-weight: 400; }
.terminal-log { flex: 1; overflow-y: auto; padding: 12px 0; min-height: 0; }
.log-line { padding: 4px 18px; animation: log-in .25s ease-out both; display: flex; align-items: baseline; gap: 10px; }
.log-line span { color: rgba(134,239,172,.35); font-size: 10px; font-family: var(--font-mono); min-width: 44px; }
.log-line code { color: var(--teal-soft); font-size: 11px; font-family: var(--font-mono); line-height: 1.55; word-break: break-word; }
.log-approval code { color: #fde68a; }
.log-error code { color: var(--danger-soft); }
.log-success code { color: var(--green-3); }

@media (max-width: 900px) {
    #topbar { padding: 0 20px; }
    .nav-links { display: none; }
    .hero-copy, .page-header, .platform-section { padding-left: 24px; padding-right: 24px; }
    .hero-stats { position: relative; right: auto; bottom: auto; padding: 0 24px 32px; }
    .scan-stage { grid-template-columns: 1fr; grid-template-rows: 1fr 280px; }
    .terminal-panel { border-left: none; border-top: 1px solid rgba(34,197,94,.1); }
}
