/* МаркетЛаб — design tokens */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Dark (default) */
  --bg: #0a0c10;
  --bg-1: #0f1217;
  --bg-2: #14181f;
  --bg-3: #1a1f28;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --fg: #f4f6f8;
  --fg-1: #c8ccd2;
  --fg-2: #8a9099;
  --fg-3: #555c66;

  --accent: #00e5ff;          /* cyan */
  --accent-2: #00b8d4;
  --accent-soft: rgba(0,229,255,0.12);
  --accent-glow: rgba(0,229,255,0.35);
  --warn: #ffb547;
  --good: #4ade80;

  --grid: 8px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.45);

  --max: 1240px;
  --pad: 32px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-1: #ffffff;
  --bg-2: #f0f2f5;
  --bg-3: #e7eaef;
  --line: rgba(10,12,16,0.08);
  --line-strong: rgba(10,12,16,0.14);
  --fg: #0a0c10;
  --fg-1: #2a2f37;
  --fg-2: #5a626d;
  --fg-3: #8a929d;
  --accent: #0066ff;
  --accent-2: #0050cc;
  --accent-soft: rgba(0,102,255,0.10);
  --accent-glow: rgba(0,102,255,0.25);
  --shadow-sm: 0 1px 2px rgba(10,12,16,0.06);
  --shadow-md: 0 8px 24px rgba(10,12,16,0.08);
  --shadow-lg: 0 24px 60px rgba(10,12,16,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  text-wrap: pretty;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

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

.mono { font-family: var(--font-mono); font-feature-settings: 'zero', 'ss02'; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
}
.h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
}
.h3 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0;
}
.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-1);
  max-width: 60ch;
}
.muted { color: var(--fg-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #001318;
  box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--line-strong);
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Card */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--line-strong); }

/* Section header */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
  max-width: 760px;
}

/* Section spacing */
section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* Hide tweaks-only in screenshot */
[data-tweaks-only] { display: none; }
[data-tweaks-active] [data-tweaks-only] { display: block; }

/* selection */
::selection { background: var(--accent); color: #001318; }

/* Scroll lock for nav offset */
:target { scroll-margin-top: 100px; }

/* utility */
.row { display: flex; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.between { justify-content: space-between; }
.center { align-items: center; }
.col { flex-direction: column; }
.grow { flex: 1 1 auto; }

@media (max-width: 720px) {
  :root { --pad: 20px; }
  .lead { font-size: 17px; }
}

/* Theme toggle (replaces dev Tweaks panel) */
.theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--fg-1);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* No-JS fallback: still show content */
.no-js .reveal { opacity: 1; transform: none; }

/* Restore standard HTML5 [hidden] semantics (overridden by explicit display:flex/grid on tabs/demos) */
[hidden] { display: none !important; }
