/* ============================================================
   DEMOLAB — Design System
   Dark premium "lab" aesthetic · lime accent · modern grotesk
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* accent (overridable via tweak) */
  --accent: #34d399;
  --accent-rgb: 52, 211, 153;
  /* brand gradient (from logo): emerald → cyan → blue */
  --grad-brand: linear-gradient(105deg, #2bef8c 0%, #1fd3c6 46%, #3b9fe0 100%);

  /* DARK theme (default) */
  --bg: oklch(0.16 0.012 155);
  --bg-2: oklch(0.19 0.012 155);
  --surface: oklch(0.21 0.013 158);
  --surface-2: oklch(0.24 0.013 158);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: oklch(0.96 0.006 150);
  --text-dim: oklch(0.78 0.012 150);
  --muted: oklch(0.62 0.012 150);
  --net-muted: 170, 196, 178;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 80px);
}

[data-theme="light"] {
  --bg: oklch(0.985 0.004 150);
  --bg-2: oklch(0.965 0.005 150);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.975 0.005 150);
  --line: rgba(20, 30, 24, 0.10);
  --line-strong: rgba(20, 30, 24, 0.20);
  --text: oklch(0.24 0.014 155);
  --text-dim: oklch(0.42 0.014 155);
  --muted: oklch(0.55 0.012 150);
  --net-muted: 80, 110, 92;
  --shadow: 0 30px 70px -34px rgba(20, 40, 28, 0.28);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}
::selection { background: var(--accent); color: #0a0f0c; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Reusable ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }
.section { padding-block: clamp(72px, 11vh, 150px); position: relative; }
.section-head { max-width: 760px; }
.section-title { font-size: clamp(30px, 4.6vw, 56px); margin-top: 22px; text-wrap: balance; }
.section-lede { color: var(--text-dim); font-size: clamp(17px, 1.5vw, 20px); margin-top: 22px; max-width: 620px; }

/* divider */
.hr { height: 1px; background: var(--line); border: 0; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0a0f0c; }
.btn-primary:hover { box-shadow: 0 14px 40px -12px rgba(var(--accent-rgb), 0.5); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform 0.25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Optional blueprint grid ---------- */
body[data-grid="on"]::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
}
#app { position: relative; z-index: 1; }
