/* ============================================================
   NetRisk.io — base, layout, nav, buttons, shared components
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient field that sits behind everything */
.bg-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 18% -5%, rgba(224,145,46,.07), transparent 60%),
    radial-gradient(1100px 700px at 88% 8%, rgba(155,123,240,.06), transparent 60%),
    radial-gradient(900px 900px at 50% 120%, rgba(224,145,46,.05), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(150,170,205,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(150,170,205,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 80%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--verified); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--verified); opacity: .7;
}
.eyebrow.ai { color: var(--ai); } .eyebrow.ai::before { background: var(--ai); }
.eyebrow.amber { color: var(--missing); } .eyebrow.amber::before { background: var(--missing); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; color: var(--text); }
.h-display { font-family: var(--font-editorial); font-weight: 400; font-size: clamp(46px, 7.4vw, 98px); line-height: 1.02; letter-spacing: -0.015em; }
.h1 { font-family: var(--font-editorial); font-weight: 400; font-size: clamp(38px, 5.2vw, 68px); line-height: 1.06; letter-spacing: -0.01em; }
.h2 { font-family: var(--font-editorial); font-weight: 400; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -0.005em; }
.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); line-height: 1.55; max-width: 60ch; text-wrap: pretty; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--font-mono); }
.grad-text {
  font-style: italic;
  background: linear-gradient(96deg, var(--brand-bright) 0%, var(--brand) 70%, var(--brand-deep) 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-bottom: 0.04em;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { position: relative; padding-block: clamp(80px, 11vw, 150px); }
.section-head { max-width: 760px; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 18px; }
.center { text-align: center; margin-inline: auto; }
.center .lead { margin-inline: auto; }

.scene-index {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  letter-spacing: .1em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-pill);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease), border-color var(--dur-2);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #F2A948, #D9882A);
  color: #2A1605;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 8px 30px -8px var(--verified-40);
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 14px 44px -8px var(--verified-40); }
.btn-ghost {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(255,255,255,.06); transform: translateY(-2px); }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }

/* ---------- Chips / pills / states ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); color: var(--text-2);
  background: rgba(255,255,255,.02);
  letter-spacing: .02em; white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.verified { color: var(--evidence); border-color: var(--evidence-20); background: var(--evidence-12); }
.chip.observed { color: var(--observed); border-color: var(--observed-20); background: var(--observed-12); }
.chip.ai       { color: var(--ai); border-color: var(--ai-20); background: var(--ai-12); }
.chip.missing  { color: var(--missing); border-color: var(--missing-20); background: var(--missing-12); }
.chip.critical { color: var(--critical); border-color: var(--critical-20); background: var(--critical-12); }
.chip.healthy  { color: var(--healthy); border-color: var(--healthy-20); background: var(--healthy-12); }
.chip.neutral  { color: var(--text-2); }

/* ---------- Glass cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}
.card-pad { padding: 20px; }
.card-hl { border-color: var(--border-2); }

/* generic frosted panel for product UI */
.ui-panel {
  background:
    linear-gradient(180deg, rgba(20,28,46,.92), rgba(11,16,28,.95));
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.04);
}
.ui-titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.ui-dots { display: flex; gap: 6px; }
.ui-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); display: block; }
.ui-title { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .04em; }
.ui-title b { color: var(--text); font-weight: 600; }
.ui-spacer { flex: 1; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Section divider rule ---------- */
.hr-glow { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding-block: 64px 36px; background: linear-gradient(180deg, transparent, rgba(5,8,15,.6)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px 32px; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--text-2); font-size: 14px; transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer-brand .lead { font-size: 14px; margin-top: 14px; max-width: 34ch; }
.footer-note { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-note p { color: var(--text-3); font-size: 13px; max-width: 70ch; }
.footer-legal { color: var(--text-3); font-size: 13px; display: flex; gap: 18px; }

/* brand mark */
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: var(--text); }
.brand-mark { width: 28px; height: 28px; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background var(--dur-2), border-color var(--dur-2), backdrop-filter var(--dur-2);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 20, .72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav-links a {
  font-size: 13.5px; color: var(--text-2); padding: 8px 11px; border-radius: var(--r-sm);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-cta .link { font-size: 13.5px; color: var(--text-2); padding: 8px 6px; transition: color .2s; }
.nav-cta .link:hover { color: var(--text); }
.nav-burger { display: none; }

/* progress bar under nav */
.nav-progress { position: absolute; bottom: -1px; left: 0; height: 2px; width: 0%; background: linear-gradient(90deg, var(--verified), var(--ai)); box-shadow: 0 0 12px var(--verified-40); }

/* ---------- utility ---------- */
.stack { display: flex; flex-direction: column; }
.row { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; }
.wrap-flex { flex-wrap: wrap; }
.items-center { align-items: center; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; } .mt-7 { margin-top: 48px; }

/* ---------- Responsive base ---------- */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-cta .link { display: none; }
  .nav-burger { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
}
