/* ============================================================
   LEADWACHE AI — Design System
   ============================================================ */

@font-face { font-display: swap; }

:root {
  /* ---- Color tokens (oklch) ---- */
  --bg:            oklch(0.985 0.004 255);   /* warm near-white page */
  --bg-2:          oklch(0.965 0.006 255);   /* alt light section */
  --surface:       oklch(1 0 0);             /* white cards */
  --surface-2:     oklch(0.975 0.005 255);

  --ink:           oklch(0.22 0.025 264);    /* near-black headings */
  --ink-soft:      oklch(0.33 0.022 264);
  --muted:         oklch(0.52 0.018 264);    /* secondary text */
  --faint:         oklch(0.66 0.014 264);    /* tertiary */
  --line:          oklch(0.90 0.008 264);    /* hairline borders */
  --line-soft:     oklch(0.93 0.006 264);

  /* brand blue — derived from #075BFF, refined */
  --blue:          oklch(0.55 0.215 262);
  --blue-600:      oklch(0.50 0.218 262);
  --blue-700:      oklch(0.43 0.19 263);
  --blue-300:      oklch(0.74 0.13 261);
  --blue-100:      oklch(0.93 0.045 260);
  --blue-50:       oklch(0.968 0.022 260);
  --blue-ink:      oklch(0.40 0.16 263);     /* blue text on light */

  /* dark product sections */
  --night:         oklch(0.205 0.028 264);
  --night-2:       oklch(0.255 0.03 264);
  --night-card:    oklch(0.285 0.03 264);
  --night-line:    oklch(0.36 0.03 264);
  --night-ink:     oklch(0.97 0.01 264);
  --night-muted:   oklch(0.72 0.02 264);

  /* functional data colors (desaturated, harmonious) */
  --good:          oklch(0.70 0.135 158);
  --good-ink:      oklch(0.52 0.12 158);
  --warn:          oklch(0.78 0.13 78);
  --leak:          oklch(0.64 0.18 25);
  --leak-ink:      oklch(0.55 0.18 25);

  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     26px;
  --radius-pill:   999px;

  --shadow-sm:  0 1px 2px oklch(0.3 0.03 264 / 0.05), 0 2px 6px oklch(0.3 0.03 264 / 0.04);
  --shadow:     0 4px 14px oklch(0.3 0.03 264 / 0.06), 0 12px 34px oklch(0.3 0.03 264 / 0.07);
  --shadow-lg:  0 10px 30px oklch(0.3 0.03 264 / 0.10), 0 30px 70px oklch(0.3 0.03 264 / 0.12);
  --shadow-blue: 0 14px 40px oklch(0.55 0.215 262 / 0.28);

  --ff-display: "Schibsted Grotesk", "Manrope", system-ui, sans-serif;
  --ff-body:    "Manrope", system-ui, -apple-system, sans-serif;
  --ff-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 132px); position: relative; }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }
.section--dark { background: var(--night); color: var(--night-ink); }
.section--alt { background: var(--bg-2); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--night-ink); }

.stack { display: flex; flex-direction: column; }
.center { text-align: center; }
.maxw-head { max-width: 760px; }
.maxw-head.center { margin-inline: auto; }

/* ---------- Type scale ---------- */
.display {
  font-size: clamp(2.7rem, 6.1vw, 5.1rem);
  line-height: 0.99;
  letter-spacing: -0.032em;
}
.h2 { font-size: clamp(2rem, 4.1vw, 3.35rem); letter-spacing: -0.028em; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); letter-spacing: -0.02em; }
.h4 { font-size: 1.18rem; letter-spacing: -0.015em; }

.lead { font-size: clamp(1.12rem, 1.55vw, 1.32rem); color: var(--ink-soft); line-height: 1.5; font-weight: 450; }
.section--dark .lead { color: var(--night-muted); }
.muted { color: var(--muted); }
.section--dark .muted { color: var(--night-muted); }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.section--dark .eyebrow { color: var(--blue-300); }
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px oklch(0.55 0.215 262 / 0.16);
}
.section--dark .eyebrow::before { background: var(--blue-300); box-shadow: 0 0 0 4px oklch(0.74 0.13 261 / 0.18); }

.mono { font-family: var(--ff-mono); font-feature-settings: "tnum" 1; }
.mono-label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-body);
  font-weight: 650;
  font-size: 1.0rem;
  letter-spacing: -0.01em;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 48px oklch(0.55 0.215 262 / 0.38); background: var(--blue-600); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.section--dark .btn-ghost { color: var(--night-ink); border-color: var(--night-line); }
.section--dark .btn-ghost:hover { border-color: var(--night-ink); background: oklch(1 0 0 / 0.04); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 18px 32px; font-size: 1.08rem; }
.btn-block { width: 100%; }

.btn-arrow svg { transition: transform .25s; }
.btn:hover .btn-arrow svg { transform: translateX(4px); }

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 550;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.chip svg { width: 15px; height: 15px; color: var(--blue); }
.section--dark .chip { background: oklch(1 0 0 / 0.05); border-color: var(--night-line); color: var(--night-ink); }
.section--dark .chip svg { color: var(--blue-300); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .25s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-300); }
.section--dark .card { background: var(--night-card); border-color: var(--night-line); }

.icon-badge {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue);
  border: 1px solid var(--blue-100);
}
.icon-badge svg { width: 22px; height: 22px; }
.section--dark .icon-badge { background: oklch(0.55 0.215 262 / 0.18); border-color: oklch(0.55 0.215 262 / 0.35); color: var(--blue-300); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, box-shadow .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: oklch(0.985 0.004 255 / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { height: 72px; display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-link { font-size: 0.95rem; font-weight: 550; color: var(--ink-soft); transition: color .2s; position: relative; }
.nav-link:hover { color: var(--blue-ink); }
.nav-cta { margin-left: 4px; }
.nav-burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); align-items: center; justify-content: center; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo .ai { color: var(--blue); }
.section--dark .logo, .footer .logo { color: var(--night-ink); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto; }
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Misc helpers ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; }
.kicker-line { width: 40px; height: 2px; background: var(--blue); border-radius: 2px; }
.check { color: var(--good-ink); flex: none; }
.section--dark .check { color: var(--good); }

.glow-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; z-index: 0; }

/* re-mount fade for auto-advancing/keyed panels (independent of reveal system) */
.swap-in { animation: swapIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .swap-in { animation: none; } }
