/* ═══════════════════════════════════════════════════════════════════
   MetricsLens.AI — core design system
   Monochrome · data/technical · Space Grotesk + JetBrains Mono
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  /* Ink scale (near-black → faint) */
  --ink:      #0B0D10;
  --ink-1:    #16181d;   /* brand black from logo */
  --ink-2:    #3A4047;
  --muted:    #646A71;
  --faint:    #969BA1;
  --ghost:    #B9BDC2;

  /* Surfaces */
  --paper:    #FFFFFF;
  --paper-2:  #F7F8F9;
  --paper-3:  #FBFBFC;
  --paper-4:  #F1F2F4;

  /* Lines */
  --line:     #E4E6E9;
  --line-2:   #EDEEF1;
  --line-3:   #D6D9DD;

  /* Dark-section tokens */
  --d-bg:     #0B0D10;
  --d-bg-2:   #121519;
  --d-line:   rgba(255,255,255,.10);
  --d-line-2: rgba(255,255,255,.06);
  --d-text:   rgba(255,255,255,.62);
  --d-faint:  rgba(255,255,255,.40);

  /* Semantics (used sparingly, data only) */
  --pos:      #1C8C4E;
  --pos-bg:   #ECF7F0;
  --neg:      #B4453A;

  --radius:   12px;
  --radius-lg: 18px;
  --maxw:     1180px;

  --grid-dot: rgba(11,13,16,.05);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: #fff; }

/* ── Layout primitives ──────────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section--alt { background: var(--paper-2); }
.divider { height: 1px; background: var(--line); border: 0; }

/* Dark sections — "console" surface */
.section--dark {
  background: var(--d-bg);
  color: #fff;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 26px 26px;
}

/* ── Mono eyebrow / kicker ──────────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--ink); transform: rotate(45deg);
}
.kicker--light { color: var(--d-faint); }
.kicker--light::before { background: #fff; }
.kicker--center { justify-content: center; }

/* ── Headings ───────────────────────────────────────────────────── */
.h1 {
  font-size: clamp(40px, 6.2vw, 74px);
  font-weight: 600; letter-spacing: -.035em; line-height: 1.02;
}
.h2 {
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 600; letter-spacing: -.03em; line-height: 1.08;
}
.h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); font-weight: 400; }
.lede--light { color: var(--d-text); }
.mono-num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ── Section header block ───────────────────────────────────────── */
.s-head { max-width: 720px; }
.s-head--center { margin: 0 auto; text-align: center; }
.s-head .kicker { margin-bottom: 20px; }
.s-head .h2 { margin-bottom: 18px; }
.s-head .lede { max-width: 600px; }
.s-head--center .lede { margin-left: auto; margin-right: auto; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  letter-spacing: -.01em; line-height: 1;
  padding: 13px 20px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #23262c; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-3); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #ECEDEF; }
.btn--ondark { background: rgba(255,255,255,.08); color: #fff; border-color: var(--d-line); }
.btn--ondark:hover { background: rgba(255,255,255,.14); }
.btn--lg { padding: 16px 26px; font-size: 16px; border-radius: 12px; }
.btn--sm { padding: 9px 14px; font-size: 13px; border-radius: 9px; }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn--block { width: 100%; justify-content: center; }

/* Text link with mono arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line-3); padding-bottom: 2px;
  transition: border-color .15s ease;
}
.tlink:hover { border-color: var(--ink); }
.tlink .arr { transition: transform .15s ease; }
.tlink:hover .arr { transform: translateX(3px); }

/* Generic pill / tag */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted); background: var(--paper);
}
.tag--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag--pos { background: var(--pos-bg); color: var(--pos); border-color: transparent; }

/* Live status dot */
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); position: relative; }
.dot-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--pos); opacity: .5; animation: ring 2.4s ease-out infinite;
}
@keyframes ring { 0%{transform:scale(.6);opacity:.7} 100%{transform:scale(1.5);opacity:0} }

/* ════════════════════════════════════════════════════════════ NAV */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav--scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 70px; }
.nav-logo { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.nav-logo-img { height: 26px; width: auto; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 8px; transition: color .15s ease, background .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--paper-4); }
.nav-actions { display: flex; align-items: center; gap: 6px; flex: 1 1 0; justify-content: flex-end; }
.nav-signin { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 9px 14px; border-radius: 9px; }
.nav-signin:hover { background: var(--paper-4); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.nav-mobile { display: none; flex-direction: column; gap: 2px; padding: 8px 28px 20px; border-top: 1px solid var(--line); background: #fff; }
.nav-mobile a { padding: 12px 12px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-mobile a:hover { background: var(--paper-2); }
.nav-mobile .btn { margin-top: 8px; }
.nav-mobile.open { display: flex; }

/* ════════════════════════════════════════════════════════════ FOOTER */
.footer { background: var(--d-bg); color: #fff; padding: 80px 0 36px;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 26px 26px;
}
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--d-line); }
.footer-brand .nav-logo-img { height: 26px; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,.72); line-height: 1.65; margin-top: 20px; max-width: 240px; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: rgba(255,255,255,.55); }
.footer-col-title { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.85); padding: 6px 0; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,.55); }
.footer-bottom .mono { font-family: var(--mono); letter-spacing: .02em; }
.footer ::selection { background: #fff; color: var(--ink); }
.footer ::-moz-selection { background: #fff; color: var(--ink); }

/* ── Reveal-on-scroll utility ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .06s; }
.reveal[data-delay="2"] { transition-delay: .12s; }
.reveal[data-delay="3"] { transition-delay: .18s; }
.reveal[data-delay="4"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ════════════════════════════════════════════════════════ RESPONSIVE core */
@media (max-width: 920px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .section { padding: 72px 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
