/* RiskKernel - marketing site
   Hand-built design system. No framework. Restraint over decoration. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}

:root {
  --bg:        #08090a;
  --bg-1:      #0c0e0f;
  --bg-2:      #111416;
  --bg-card:   #0e1112;
  --line:      #1b1f23;
  --line-2:    #272c31;
  --ink:       #e9ebed;
  --ink-dim:   #a1a7ad;
  --ink-faint: #6b7178;
  --accent:      #34d399;
  --accent-dim:  #29b487;
  --accent-soft: rgba(52, 211, 153, 0.10);
  --accent-line: rgba(52, 211, 153, 0.28);
  --danger:    #f0716f;
  --warn:      #f0b53f;

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

  --container: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* page-wide ambient texture: faint dot grid + a single hero glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.022) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}
body::after {
  content: "";
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 720px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(52,211,153,0.10), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
p { margin: 0; }

::selection { background: var(--accent-soft); color: #d8fff0; }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 72px 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 18px 0 16px;
}
.section-head p {
  font-size: 17px;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 540;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #04130d;
  font-weight: 580;
}
.btn-primary:hover { background: #3fe0a6; }
.btn-ghost {
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: #353b41; background: #15181b; }
.btn svg { width: 17px; height: 17px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 580; letter-spacing: -0.02em; font-size: 16px; }
.brand .mark { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--ink-dim); transition: color 0.15s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .btn { height: 38px; padding: 0 15px; font-size: 14px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding: 92px 0 84px; text-align: center; position: relative; }
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 30px;
}
.hero .pill b { color: var(--ink); font-weight: 560; }
.hero .pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 70px);
  letter-spacing: -0.04em;
  max-width: 16ch;
  margin: 0 auto 24px;
  background: linear-gradient(180deg, #ffffff 30%, #b9bfc4 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-dim);
  max-width: 60ch;
  margin: 0 auto 36px;
  line-height: 1.62;
}
.hero .cta-row { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.hero .micro {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: -0.01em;
}
.hero .micro code { color: var(--ink-dim); }

/* ---------- terminal card ---------- */
.terminal {
  margin: 60px auto 0;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0d1011, #0a0c0d);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 30px 80px -40px rgba(0,0,0,0.8);
  overflow: hidden;
  text-align: left;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #0b0e0f;
}
.terminal-bar .dots { display: flex; gap: 7px; }
.terminal-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2f34; display: block; }
.terminal-bar .title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: 6px;
}
.terminal-body {
  padding: 22px 22px 24px;
  font-family: var(--mono);
  font-size: 13.3px;
  line-height: 1.85;
  overflow-x: auto;
}
.terminal-body .c { color: var(--ink-faint); }            /* comment */
.terminal-body .p { color: var(--accent); }               /* prompt / env */
.terminal-body .k { color: var(--ink); }                  /* key text */
.terminal-body .ok { color: var(--accent); }
.terminal-body .bad { color: var(--danger); }
.terminal-body .res { color: var(--warn); }
.terminal-body .dim { color: var(--ink-dim); }
.terminal-body .line { white-space: pre; display: block; }
.terminal-body .gap { height: 12px; }

/* ---------- feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 26px 24px 28px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); background: #101314; }
.card .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card .ico svg { width: 19px; height: 19px; }
.card h3 { font-size: 16.5px; margin-bottom: 9px; letter-spacing: -0.02em; }
.card p { font-size: 14.3px; color: var(--ink-dim); line-height: 1.6; }
.card .tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
}

/* ---------- problem list ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.fail-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fail {
  display: flex;
  gap: 15px;
  padding: 18px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}
.fail:last-child { border-bottom: 0; }
.fail .x { color: var(--danger); font-family: var(--mono); font-weight: 600; flex: none; line-height: 1.7; }
.fail b { font-weight: 560; color: var(--ink); }
.fail span { color: var(--ink-dim); font-size: 14.3px; }

/* ---------- how it works ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.way { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg-card); }
.way .n { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-bottom: 14px; }
.way h3 { font-size: 16px; margin-bottom: 8px; }
.way p { font-size: 14px; color: var(--ink-dim); }
.way code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; }

.principle {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0d1011, #0a0c0d);
  padding: 40px;
  text-align: center;
}
.principle p { font-size: clamp(20px, 3vw, 27px); font-weight: 560; letter-spacing: -0.025em; color: var(--ink); }
.principle p .em { color: var(--accent); }
.principle .note { margin-top: 12px; font-size: 14.5px; color: var(--ink-faint); font-weight: 400; letter-spacing: -0.01em; }

/* ---------- open source ---------- */
.oss { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.oss h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 16px; }
.oss p { color: var(--ink-dim); font-size: 16px; margin-bottom: 18px; }
.oss .install {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0c0d;
  overflow: hidden;
}
.oss .install .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  font-family: var(--mono);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.oss .install .row:last-child { border-bottom: 0; }
.oss .install .row .cmd { color: var(--ink); }
.oss .install .row .cmd .pfx { color: var(--accent); }
.oss .install .row .lbl { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-row { display: flex; gap: 32px; margin: 24px 0 4px; flex-wrap: wrap; }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.stat .l { font-size: 13px; color: var(--ink-faint); }

/* ---------- waitlist ---------- */
.waitlist { text-align: center; }
.waitlist-card {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(52,211,153,0.08), transparent 55%),
    linear-gradient(180deg, #0d1011, #090b0c);
  padding: 52px 40px;
}
.waitlist-card h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 14px; }
.waitlist-card p { color: var(--ink-dim); font-size: 16px; max-width: 46ch; margin: 0 auto 28px; }
.wl-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.wl-form input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #0a0c0d;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.wl-form input::placeholder { color: var(--ink-faint); }
.wl-form input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.wl-form .btn { height: 46px; }
.wl-note { margin-top: 16px; font-size: 13px; color: var(--ink-faint); }
.wl-msg { margin-top: 18px; font-size: 14.5px; min-height: 22px; transition: opacity 0.2s var(--ease); }
.wl-msg.ok { color: var(--accent); }
.wl-msg.err { color: var(--danger); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 26px 24px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.contact-card .ico { color: var(--accent); margin-bottom: 16px; }
.contact-card .ico svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 16px; margin-bottom: 6px; }
.contact-card p { font-size: 14px; color: var(--ink-dim); margin-bottom: 12px; }
.contact-card a.link { font-size: 14px; color: var(--accent); font-family: var(--mono); }
.contact-card a.link:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer .brand { font-size: 16px; }
.footer .blurb { color: var(--ink-faint); font-size: 14px; max-width: 34ch; margin-top: 14px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); margin: 0 0 14px; font-weight: 500; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; transition: color 0.15s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); }
.footer-bottom p { font-size: 13px; color: var(--ink-faint); }
.footer-bottom a { color: var(--ink-dim); transition: color 0.15s var(--ease); }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom .badge { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- reveal animation (only hides when JS is active, so no-JS sees everything) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .grid, .ways, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .oss { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .nav-links { display: none; }
  .grid, .ways, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .wl-form { flex-direction: column; }
  .wl-form .btn { width: 100%; }
  .footer-top { flex-direction: column; gap: 28px; }
  .terminal-body { font-size: 12px; }
}
