/* ---------- Tokens ---------- */
:root {
  --bg: #0b0f14;
  --bg-alt: #0f141b;
  --surface: #121821;
  --surface-2: #171f2a;
  --border: #1f2a37;
  --border-strong: #2b3a4c;
  --text: #e6edf3;
  --text-muted: #8b98a8;
  --text-faint: #5d6b7c;

  --accent: #5eead4;        /* teal */
  --accent-strong: #2dd4bf;
  --accent-ink: #04201c;

  --ok: #4ade80;
  --info: #60a5fa;
  --warn: #fbbf24;
  --violet: #a78bfa;
  --pink: #f472b6;
  --error: #f87171;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1120px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ol, ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--text-faint); }

.btn--small { height: 36px; padding: 0 16px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }

.nav__inner { display: flex; align-items: center; gap: 32px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand__mark { width: 24px; height: 24px; color: var(--accent); }
.brand--muted { color: var(--text-muted); font-size: 15px; }
.brand--muted .brand__mark { width: 20px; height: 20px; color: var(--text-muted); }

.nav__links { display: flex; gap: 28px; margin-right: auto; font-size: 14px; color: var(--text-muted); }
.nav__links a { transition: color .15s ease; }
.nav__links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 112px; }

.hero__glow {
  position: absolute; inset: -20% -10% auto; height: 640px; pointer-events: none;
  background:
    radial-gradient(40% 50% at 70% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(35% 45% at 20% 10%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 70%);
}
.hero::after {
  /* faint grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
}

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; margin-bottom: 24px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 13px; color: var(--text-muted);
}

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }

.hero h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 650; letter-spacing: -0.035em; }

.lede { margin-top: 20px; max-width: 34rem; font-size: 18px; color: var(--text-muted); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Console ---------- */
.console {
  margin: 0;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .02) inset;
  font-family: var(--font-mono); font-size: 12.5px;
  overflow: hidden;
}

.console__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.console__title { margin-left: 10px; color: var(--text-faint); }

.console__feed { display: flex; flex-direction: column; min-height: 248px; padding: 10px 0; }

.console__feed li {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.console__feed li:last-child { border-bottom: 0; }
.console__feed li.is-new { animation: slide-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.msg { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag { color: var(--text-faint); }
.tag::before { content: "●"; margin-right: 6px; font-size: 9px; vertical-align: 1px; }
.tag--supply::before { color: var(--violet); }
.tag--vuln::before { color: var(--warn); }
.tag--server::before { color: var(--info); }
.tag--monitor::before { color: var(--accent); }
.tag--social::before { color: var(--pink); }
.tag--identity::before { color: var(--ok); }

.status {
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; white-space: nowrap;
  border: 1px solid currentColor;
}
.status--ok { color: var(--ok); }
.status--info { color: var(--info); }
.status--warn { color: var(--warn); }

.console__foot {
  padding: 8px 16px; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 11px; text-align: right;
}

/* ---------- Sections ---------- */
.section { padding: 104px 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 40rem; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.section__head p:not(.kicker) { margin-top: 16px; color: var(--text-muted); font-size: 17px; }

.kicker {
  margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Pillars (why now) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillars li {
  padding: 28px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface));
}
.pillars__label {
  display: block; margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.pillars h3 { font-size: 20px; margin-bottom: 10px; }
.pillars p { color: var(--text-muted); font-size: 15px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  padding: 28px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }

.card__icon {
  width: 40px; height: 40px; padding: 9px; margin-bottom: 20px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: none; }

.step { position: relative; padding-top: 28px; border-top: 1px solid var(--border-strong); }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 1px; background: var(--accent);
}
.step__num { display: block; margin-bottom: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ---------- Principles ---------- */
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.principles li { padding: 32px 28px; }
.principles li + li { border-left: 1px solid var(--border); }
.principles h3 { font-size: 16px; margin-bottom: 8px; }
.principles h3::before { content: "✓"; margin-right: 10px; color: var(--accent); }
.principles p { color: var(--text-muted); font-size: 15px; }

/* ---------- Data handling ---------- */
.data-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--border);
}
.data-list li { padding: 28px 24px; background: var(--bg-alt); }
.data-list h3 { font-size: 16px; margin-bottom: 8px; }
.data-list h3::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: 3px;
  border-radius: 50%; background: var(--accent);
}
.data-list p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  background: radial-gradient(50% 80% at 50% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.cta__inner { max-width: 640px; }
.cta h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.cta__inner > p { margin-top: 16px; color: var(--text-muted); font-size: 17px; }

.signup { display: flex; gap: 10px; max-width: 460px; margin: 36px auto 0; }
.signup input {
  flex: 1; min-width: 0; height: 44px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color .15s ease;
}
.signup input::placeholder { color: var(--text-faint); }
.signup input:focus { outline: none; border-color: var(--accent); }
.signup input[aria-invalid="true"] { border-color: var(--error); }
.signup .btn:disabled { opacity: .6; cursor: progress; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.signup__note { min-height: 24px; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.signup__note.is-error { color: var(--error); }
.signup__note.is-ok { color: var(--accent); }

.signup__privacy { max-width: 420px; margin: 4px auto 0; font-size: 13px; color: var(--text-faint); }

/* ---------- Thanks page ---------- */
.thanks { display: grid; place-items: center; min-height: 100vh; padding: 48px 0; text-align: center; }
.thanks__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 520px; }
.thanks h1 { margin-top: 16px; font-size: clamp(2rem, 4vw, 2.75rem); }
.thanks p { color: var(--text-muted); font-size: 17px; }
.thanks .btn { margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 14px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- App (login, setup, dashboard) ---------- */
.app-page { min-height: 100vh; }
.app-narrow { max-width: 520px; margin: 0 auto; padding: 64px 16px 80px; display: flex; flex-direction: column; gap: 28px; }
.app-narrow h1 { font-size: 30px; }
/* Vertical rhythm for anything rendered into a container (setup steps, dialogs, panels). */
.app-stack { display: flex; flex-direction: column; gap: 16px; }
.app-stack > .btn, .app-card > .btn { align-self: flex-start; }
.app-kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.app-kicker + h1 { margin-top: -8px; }
.app-steps { margin: 0; padding-left: 20px; list-style: decimal; color: var(--text-muted); }
.app-steps li + li { margin-top: 6px; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.app-link { padding: 0; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.app-link:hover { color: var(--text); }
.app-banner {
  padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--text); font-size: 14px;
}
.app-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 24px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.app-dialog::backdrop { background: rgb(0 0 0 / .6); }
.app-dialog h2 { font-size: 20px; }
.app-lede { color: var(--text-muted); }
.app-hint { color: var(--text-faint); font-size: 14px; }

.app-card {
  display: flex; flex-direction: column; gap: 12px; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.app-label { font-size: 14px; color: var(--text-muted); }
.app-input {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
.app-input:focus { outline: none; border-color: var(--accent); }
.app-mono { font-family: var(--font-mono); font-size: 14px; }
select.app-input { width: auto; }
.app-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Child only: inside a column .app-label the basis would set the input's height. */
.app-row > .app-input { flex: 1 1 160px; }
.app-row > .app-label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
.app-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.app-status { min-height: 20px; font-size: 14px; color: var(--text-muted); }
.app-status.is-ok { color: var(--accent); }
.app-status.is-error { color: var(--error); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.app-header { border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.app-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; max-width: var(--container); margin: 0 auto; padding: 12px 16px; }
.app-nav { display: flex; gap: 4px; margin-right: auto; }
.app-tab { padding: 6px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted); font: inherit; font-size: 14px; cursor: pointer; }
.app-tab:hover { color: var(--text); }
.app-tab[aria-current="true"] { background: var(--surface-2); color: var(--text); }
.app-who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.app-main { max-width: var(--container); margin: 0 auto; padding: 32px 16px 64px; }
.app-main--banner { padding-bottom: 0; }
.app-main section { display: flex; flex-direction: column; gap: 14px; }
.app-main h2 { font-size: 22px; }
.app-main h3 { font-size: 16px; margin-top: 12px; }

.app-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.app-table th { text-align: left; font-weight: 500; color: var(--text-faint); border-bottom: 1px solid var(--border-strong); }
.app-table th, .app-table td { padding: 8px 10px; vertical-align: top; }
.app-table td { border-bottom: 1px solid var(--border); }
.app-details { display: block; max-width: 360px; overflow-wrap: anywhere; color: var(--text-faint); font-size: 12px; }
.app-grow { flex: 1 1 auto; }
.app-textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.app-banner.app-stack { gap: 10px; }
.app-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.app-subnav .app-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.app-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.app-facts dt { color: var(--text-faint); }
.app-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .app-facts { grid-template-columns: 1fr; } .app-facts dd { margin-bottom: 6px; } }
.app-strong { color: var(--text); font-weight: 500; text-decoration: none; }
.app-strong:hover { text-decoration: underline; }
.app-wrap { overflow-wrap: anywhere; }
.app-input--small { height: 32px; font-size: 14px; }
/* Issues: a severity badge and a body that expands to the evidence. */
.app-issues { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.app-issue { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.app-issue.is-resolved, .app-issue.is-false_positive { opacity: .7; }
.app-issue__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.app-issue__title { color: var(--text); text-align: left; text-decoration: none; font-size: 15px; overflow-wrap: anywhere; }
.app-issue__title:hover { text-decoration: underline; }
.app-issue__details { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.app-issue__details p { margin: 0; }
.app-sev {
  flex: none; align-self: flex-start; min-width: 72px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border-strong); font-size: 12px; text-align: center; text-transform: uppercase; letter-spacing: .04em;
}
.app-sev.is-critical { color: var(--error); border-color: color-mix(in srgb, var(--error) 60%, transparent); }
.app-sev.is-high { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.app-sev.is-medium { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 50%, transparent); }
.app-sev.is-low, .app-sev.is-info { color: var(--text-muted); }
/* A shell command to copy. Long commands wrap rather than scroll; copying keeps them on one line. */
.app-command { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.app-pre {
  align-self: stretch; margin: 0; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.app-more summary { cursor: pointer; color: var(--text-muted); font-size: 14px; }
.app-more > * + * { margin-top: 10px; }
.app-group { border-bottom: 1px solid var(--border); padding: 10px 4px; }
.app-group > summary { cursor: pointer; }
.app-group > summary .app-hint { margin-left: 8px; }
.app-group[open] > summary { margin-bottom: 10px; }
.app-hint code { overflow-wrap: anywhere; font-size: 12px; }
@media (max-width: 640px) {
  .app-table { display: block; overflow-x: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0 80px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; }
  .data-list { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .principles { grid-template-columns: 1fr; }
  .principles li + li { border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .section { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }
  .grid { grid-template-columns: 1fr; }
  .data-list { grid-template-columns: 1fr; }
  .lede { font-size: 17px; }
  .console__feed li { grid-template-columns: 1fr auto; row-gap: 4px; }
  .console__feed .tag { grid-column: 1 / -1; }
  .signup { flex-direction: column; }
  .signup .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
