/* Paradox Systems — public HUD design system.
   Ported from the internal "Paradox Command" cockpit HUD
   (sa/app/web/static/css/paradox-hud.css). Colors/shapes are the same
   literal tokens so the public site and the operator app read as one system. */

:root {
  --bg: #020204;
  --bg2: #05060a;
  --neon: #FC0A0A;
  --neon2: #ff1a2e;
  --neon3: #ff5561;
  --neon4: #ff8a96;
  --neon5: #ffb3bc;
  --text: #ffdfe2;
  --text-strong: #f2dde0;
  --muted: #a35660;
  --muted2: #8a4650;
  --muted3: #c06b73;
  --muted4: #7a3d44;
  --panel-bg: linear-gradient(160deg, rgba(255, 26, 46, .05), rgba(255, 255, 255, .01));
  --panel-border: rgba(255, 26, 46, .24);
  --input-bg: #0d0407;
  --input-border: rgba(255, 26, 46, .3);
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --good: #35d99a;
  --warn: #ffb04a;
  --bad: #ff1a2e;
  --info: #4d9dff;
  --purple: #c34bff;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--font-heading);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(90% 55% at 50% -8%, rgba(255, 26, 46, .10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
/* faint telemetry grid behind everything */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 26, 46, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 26, 46, .025) 1px, transparent 1px);
  background-size: 60px 60px;
}
a { color: var(--neon3); text-decoration: none; transition: color .15s; }
a:hover { color: var(--neon4); }
img { max-width: 100%; }
input, textarea, button, select { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted4); }
::selection { background: rgba(255, 26, 46, .4); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a0a12; border: 2px solid var(--bg); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes flick { 0%, 100% { opacity: .85; } 48% { opacity: 1; } 50% { opacity: .55; } 52% { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(2000%); } }

.chamf { clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.chamf-sm { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

/* ===== Layout helpers ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.reveal { opacity: 0; }
.reveal.v { animation: fadeUp .5s ease forwards; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--neon3); margin: 0 0 14px; display: inline-flex; align-items: center; gap: 9px; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--neon2); box-shadow: 0 0 8px var(--neon2); }
h1, h2, h3 { font-weight: 700; color: #fff; letter-spacing: -.01em; line-height: 1.1; }
.sh2 { font-size: clamp(28px, 4vw, 46px); margin: 0 0 18px; text-shadow: 0 0 24px rgba(255, 26, 46, .25); }
.sh2 .a { color: var(--neon2); }
.lead { font-size: clamp(15px, 1.5vw, 18px); color: var(--muted3); max-width: 680px; margin: 0 0 30px; }
.mono { font-family: var(--font-mono); }
.section { padding: 92px 0; position: relative; }
.section + .section { border-top: 1px solid rgba(255, 26, 46, .1); }

/* ===== Top nav (multi-page) ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: linear-gradient(90deg, rgba(255, 26, 46, .06), rgba(2, 2, 4, .85) 45%);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}
.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-brand img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 26, 46, .8)); }
.nav-brand b { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .04em; }
.nav-brand span { font-family: var(--font-mono); font-size: 8px; letter-spacing: .26em; color: var(--neon3); display: block; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted3); font-size: 13.5px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta { padding: 8px 16px; border: 1px solid rgba(255, 26, 46, .5); background: rgba(255, 26, 46, .1); color: var(--neon4) !important; box-shadow: 0 0 16px rgba(255, 26, 46, .2); }
.nav-cta:hover { background: rgba(255, 26, 46, .2); color: #fff !important; }
.nav-op { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--muted2); }
.nav-op::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.nav-toggle { display: none; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 12px 22px; border: 1px solid transparent; letter-spacing: .02em; text-decoration: none; }
.btn-primary { background: linear-gradient(90deg, var(--neon2), var(--neon3)); color: #fff; border-color: rgba(255, 26, 46, .6); box-shadow: 0 0 24px rgba(255, 26, 46, .35); }
.btn-primary:hover { filter: brightness(1.12); color: #fff; }
.btn-ghost { background: transparent; color: var(--neon5); border: 1px solid rgba(255, 26, 46, .4); }
.btn-ghost:hover { background: rgba(255, 26, 46, .1); color: #fff; }

/* ===== SPLASH / landed gate ===== */
.splash {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px;
  position: relative; overflow: hidden;
}
.splash-scan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .5; }
.splash-scan::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,26,46,.5), transparent); animation: scan 6s linear infinite; }
.splash-mark { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 0 34px rgba(255, 26, 46, .9)); animation: flick 5s infinite; }
.splash-title { font-size: clamp(38px, 8vw, 82px); font-weight: 700; margin: 26px 0 0; color: #fff; letter-spacing: .02em; text-shadow: 0 0 40px rgba(255, 26, 46, .5); }
.splash-title span { color: var(--neon2); }
.splash-sub { font-family: var(--font-mono); font-size: clamp(12px, 1.6vw, 15px); letter-spacing: .18em; color: var(--neon3); margin: 20px 0 0; max-width: 640px; text-transform: uppercase; line-height: 1.8; }
.splash-status { font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; color: var(--muted2); margin-top: 30px; display: inline-flex; align-items: center; gap: 9px; text-transform: uppercase; }
.splash-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); animation: pulse 1.8s infinite; }
.splash-enter { margin-top: 40px; font-family: var(--font-mono); letter-spacing: .3em; font-size: 15px; padding: 16px 54px; }
.splash-foot { position: absolute; bottom: 26px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--muted4); text-transform: uppercase; }

/* ===== HERO ===== */
.hero { padding: 96px 0 72px; position: relative; }
.hero .badge { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--neon4); border: 1px solid rgba(255, 26, 46, .35); background: rgba(255, 26, 46, .07); padding: 7px 14px; margin-bottom: 26px; text-transform: uppercase; }
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neon2); box-shadow: 0 0 8px var(--neon2); animation: pulse 1.8s infinite; }
.hero h1 { font-size: clamp(36px, 6.5vw, 76px); margin: 0 0 24px; text-shadow: 0 0 40px rgba(255, 26, 46, .3); }
.hero h1 .r { color: var(--neon2); }
.hero h1 .dim { color: var(--muted2); }
.hero-sub { font-size: clamp(16px, 1.8vw, 20px); color: var(--muted3); max-width: 620px; margin: 0 0 34px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Ticker ===== */
.ticker { border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); background: rgba(255, 26, 46, .03); overflow: hidden; white-space: nowrap; padding: 14px 0; }
.ticker-track { display: inline-flex; gap: 0; animation: tick 40s linear infinite; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ti { font-family: var(--font-mono); font-size: 12px; color: var(--muted3); letter-spacing: .05em; padding: 0 30px; flex-shrink: 0; }
.ti b { color: var(--neon3); }

/* ===== Cards / panels ===== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.panel { padding: 26px; background: var(--panel-bg); border: 1px solid var(--panel-border); box-shadow: inset 0 0 30px rgba(255, 26, 46, .05); }

/* Department cards (Home hub) */
.dept-card { display: block; padding: 30px 26px; background: linear-gradient(160deg, rgba(255, 26, 46, .06), rgba(255, 255, 255, .01)); border: 1px solid var(--panel-border); text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.dept-card:hover { border-color: rgba(255, 26, 46, .6); box-shadow: 0 0 30px rgba(255, 26, 46, .18); transform: translateY(-3px); }
.dept-card .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--muted3); }
.dept-card h3 { font-size: 22px; margin: 12px 0 8px; color: #fff; }
.dept-card p { color: var(--muted3); font-size: 14px; margin: 0 0 14px; }
.dept-card .go { font-family: var(--font-mono); font-size: 12px; color: var(--neon3); letter-spacing: .08em; }
.dept-card .count { position: absolute; top: 22px; right: 22px; font-family: var(--font-mono); font-size: 11px; color: var(--muted2); border: 1px solid rgba(255,26,46,.25); padding: 2px 8px; }

/* ===== Product number badge (fallback mark when no logo file) ===== */
.pnum-badge {
  aspect-ratio: 1; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(60% 60% at 50% 40%, rgba(255,26,46,.12), transparent 70%), var(--input-bg);
  border: 1px solid rgba(255, 26, 46, .3);
  position: relative;
}
.pnum-badge::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(255, 26, 46, .18); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pnum-badge .lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: .24em; color: var(--muted3); text-transform: uppercase; }
.pnum-badge .n { font-family: var(--font-mono); font-weight: 600; font-size: clamp(26px, 4vw, 40px); color: var(--neon3); text-shadow: 0 0 20px rgba(255, 26, 46, .6); letter-spacing: .04em; }

/* Product card (department listing) */
.prod-card { display: block; text-decoration: none; color: inherit; background: var(--input-bg); border: 1px solid rgba(255, 26, 46, .22); transition: border-color .2s, box-shadow .2s, transform .2s; overflow: hidden; }
.prod-card:hover { border-color: rgba(255, 26, 46, .6); box-shadow: 0 0 26px rgba(255, 26, 46, .18); transform: translateY(-3px); }
.prod-logo { aspect-ratio: 1; width: 100%; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid rgba(255, 26, 46, .18); }
.prod-logo img { width: 100%; height: 100%; object-fit: contain; padding: 14%; }
.prod-body { padding: 16px 16px 18px; }
.prod-body .pnum { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--neon3); }
.prod-body h4 { font-size: 16px; margin: 6px 0 4px; color: var(--text-strong); font-weight: 600; }
.prod-body .tag { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted2); }

/* status pill */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--pc, var(--muted2)) 40%, transparent); color: var(--pc, var(--muted2)); background: color-mix(in srgb, var(--pc, var(--muted2)) 14%, transparent); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
[data-status="live"] { --pc: var(--good); }
[data-status="beta"] { --pc: var(--warn); }
[data-status="dev"] { --pc: var(--info); }
[data-status="internal"] { --pc: var(--purple); }
[data-status="restricted"] { --pc: var(--bad); }

/* ===== Product detail page ===== */
.prod-hero { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; padding-top: 20px; }
.prod-hero-logo { width: 100%; aspect-ratio: 1; background: #000; border: 1px solid rgba(255, 26, 46, .3); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 40px rgba(255, 26, 46, .08); overflow: hidden; }
.prod-hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.prod-hero h1 { font-size: clamp(30px, 4vw, 46px); margin: 14px 0 10px; }
.prod-hero .desig { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--neon3); }
.spec-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.spec { font-family: var(--font-mono); font-size: 11px; padding: 5px 11px; background: rgba(255, 26, 46, .08); border: 1px solid rgba(255, 26, 46, .28); color: var(--neon4); }

/* ===== Contact hook / inquiry ===== */
.hook { margin-top: 28px; padding: 30px; border: 1px solid rgba(255, 26, 46, .4); background: linear-gradient(160deg, rgba(255, 26, 46, .08), rgba(255,255,255,.01)); box-shadow: inset 0 0 40px rgba(255, 26, 46, .06); }
.hook h3 { font-size: 22px; margin: 0 0 8px; }
.hook p { color: var(--muted3); margin: 0 0 18px; font-size: 14.5px; }
.field { display: block; margin-bottom: 14px; }
.label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted3); margin-bottom: 7px; text-transform: uppercase; }
.input, .textarea, .select { width: 100%; padding: 12px 14px; background: var(--input-bg); border: 1px solid var(--input-border); color: #e4e4e8; font-size: 14px; outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--neon2); box-shadow: 0 0 16px rgba(255, 26, 46, .2); }
.textarea { resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted2); margin-top: 10px; line-height: 1.6; }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--panel-border); padding: 40px 0; margin-top: 40px; }
.foot-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { max-width: 340px; }
.foot-brand b { color: #fff; }
.foot-brand p { font-size: 12px; color: var(--muted2); margin: 10px 0 0; line-height: 1.7; }
.foot-cols { display: flex; gap: 50px; flex-wrap: wrap; }
.foot-col h5 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--muted3); text-transform: uppercase; margin: 0 0 12px; }
.foot-col a { display: block; color: var(--muted3); font-size: 13px; margin-bottom: 8px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .prod-hero { grid-template-columns: 1fr; }
  .prod-hero-logo { max-width: 240px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg2); border-bottom: 1px solid var(--panel-border); padding: 10px 28px 18px; }
  .nav-links.open a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: transparent; border: 1px solid rgba(255,26,46,.4); color: var(--neon4); padding: 7px 12px; cursor: pointer; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .foot-grid { flex-direction: column; }
}
