/* Quantum Fox — Night theme. Colors from the Quantum Fox design system. */
:root {
  --bg: #121A23;
  --bg-sunken: #0D131A;
  --card: linear-gradient(180deg, #1C2834 0%, #141D27 45%, #10171F 100%);
  --line: #263443;
  --line-strong: #6B8094;
  --ink: #DBDDDC;
  --ink-2: #B0BEC5;
  --muted: #93A6B4;
  --title: #3AA2F0;
  --accent: #2CC6D1;
  --focus: #14EEF2;
  --quantum: #C77DFF;
  --quantum-soft: #261640;
  --ok: #4ADE80;
  --err: #FB7185;
  --cta: linear-gradient(90deg, #9A2EA3 0%, #7034B4 33%, #3F4DBA 66%, #1E64A6 100%);
  --hero-grad: linear-gradient(180deg, #3AA2F0 0%, #3AA2F0 35%, #6E73F0 62%, #9A62F0 82%, #D04BE6 100%);
  --ring: linear-gradient(90deg, #EF27F4 0%, #A52CFC 25%, #4E5CFF 50%, #1FC2E8 75%, #4A5B6C 100%);
  --font-display: 'Red Hat Display', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.section { padding-block: 96px; }
.band { background: var(--bg-sunken); border-block: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.intro { max-width: 640px; }

.eyebrow { font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent); }
.h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.07; font-weight: 600; letter-spacing: -.01em; background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--title); }
.h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 600; color: var(--title); }
.h3 { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--title); }
.lede { font-size: 19px; line-height: 30px; color: var(--ink-2); max-width: 560px; }
.body-2 { color: var(--ink-2); }
.ring-rule { width: 160px; height: 3px; border-radius: 2px; background: var(--ring); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 0; }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.12); }
.btn-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); font-weight: 500; }
.btn-outline:hover { color: var(--ink); border-color: var(--ink-2); background: rgba(255,255,255,.03); }
.btn-sm { min-height: 44px; padding: 0 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: 96px; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-art { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 420px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--ink-2); }
.icon { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.referral { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 8px; }
.referral p { flex: 999 1 420px; min-width: 0; color: var(--ink-2); }
.referral strong { color: var(--ink); font-weight: 600; }
.aegis-mark { width: auto; height: 24px; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.steps .num { font-family: var(--font-mono); font-size: 14px; line-height: 20px; color: var(--accent); }
.steps h3 { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--title); }
.steps p { color: var(--ink-2); }

.callout { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.callout-body { flex: 999 1 420px; min-width: 0; display: flex; gap: 20px; align-items: flex-start; }
.callout h2 { font-size: 26px; line-height: 32px; font-weight: 600; color: var(--title); }
.callout .icon { width: 40px; height: 40px; }

/* Platform */
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > :first-child { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > :last-child { flex: 1 1 380px; min-width: 0; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--quantum-soft); color: var(--quantum); font-size: 13px; line-height: 20px; font-weight: 600; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .icon { width: 22px; height: 22px; stroke: var(--quantum); margin-top: 2px; }
.features strong { font-weight: 600; display: block; }
.features span span { color: var(--muted); }

/* Forms */
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; max-width: 520px; padding-top: 4px; }
.inline-form input { flex: 1 1 240px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 14px; font-weight: 500; }
.field.full { grid-column: 1 / -1; }
input, select, textarea { min-height: 46px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--bg-sunken); color: var(--ink); font: inherit; width: 100%; }
textarea { padding: 12px 14px; resize: vertical; min-height: 140px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status { font-size: 15px; min-height: 24px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.contact-grid { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-grid > :first-child { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-grid > :last-child { flex: 999 1 480px; min-width: 0; }
.details { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.details a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.details a:hover { color: var(--focus); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-sunken); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 40px; }
.site-footer img { height: 36px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .legal { width: 100%; font-size: 13px; line-height: 20px; color: var(--muted); }

/* Long-form pages (privacy) */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 24px; line-height: 30px; font-weight: 600; color: var(--title); margin-top: 24px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Portal */
.portal-main { min-height: calc(100vh - 160px); }
.login-card { max-width: 440px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 40px 32px; display: flex; flex-direction: column; gap: 20px; }
.notice { padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); font-size: 15px; }
.notice.err { border-color: #7a3442; color: var(--err); background: rgba(251,113,133,.06); }
.notice.ok { border-color: #2d6b45; color: var(--ok); background: rgba(74,222,128,.06); }
.file-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(16,23,31,.6); }
.file-list li:first-child { border-top: 0; }
.file-name { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.file-name .icon { width: 20px; height: 20px; }
.file-meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.group-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); margin: 24px 0 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-sunken); color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; border-top: 0; }
.mono { font-family: var(--font-mono); font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row .field { flex: 1 1 200px; }
input[type=file] { padding: 10px; min-height: 46px; }
input[type=radio], input[type=checkbox] { width: auto; min-height: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 20px; }
.radio-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }

@media (max-width: 640px) {
  .site-header { position: static; }
  .brand img { height: 40px; }
  .section, .hero { padding-block: 64px; }
}
