/* ==========================================================================
   AdOrbit — design tokens + shared foundation
   Mood: air-traffic-control radar screen — dark instrument panel,
   one sharp signal-green sweep, precise and alive.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* --- surfaces --- */
  --bg:        oklch(0.09  0     0);
  --surface:   oklch(0.15  0.006 113);
  --surface-2: oklch(0.205 0.008 113);
  --line:      oklch(0.27  0.010 113);
  --line-soft: oklch(0.20  0.008 113);

  /* --- text --- */
  --ink:   oklch(0.96 0.004 113);
  --muted: oklch(0.64 0.014 113);
  --faint: oklch(0.46 0.012 113);

  /* --- brand --- */
  --primary:      oklch(0.797 0.166 113.1);
  --primary-ink:  oklch(0.14  0.02  113);
  --primary-dim:  oklch(0.797 0.166 113.1 / 0.14);
  --primary-line: oklch(0.797 0.166 113.1 / 0.4);

  --accent:      oklch(0.68 0.15 220);
  --accent-ink:  oklch(0.99 0    0);
  --accent-dim:  oklch(0.68 0.15 220 / 0.14);

  /* --- status --- */
  --danger:     oklch(0.65 0.19 25);
  --danger-dim: oklch(0.65 0.19 25 / 0.14);
  --warning:     oklch(0.78 0.15 70);
  --warning-dim: oklch(0.78 0.15 70 / 0.14);
  --success:     oklch(0.72 0.17 145);
  --success-dim: oklch(0.72 0.17 145 / 0.14);

  /* --- type --- */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- z-scale --- */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

::selection { background: var(--primary); color: var(--primary-ink); }

/* --- typography --- */
h1, h2, h3, h4 { margin: 0; font-weight: 560; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 68ch; }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }

.h1 { font-size: clamp(2.5rem, 3.2vw + 1.5rem, 4.75rem); line-height: 1.03; }
.h2 { font-size: clamp(1.9rem, 1.6vw + 1.3rem, 2.75rem); line-height: 1.08; }
.h3 { font-size: clamp(1.25rem, 0.6vw + 1.05rem, 1.5rem); line-height: 1.2; }
.eyebrow-label { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--primary); }
.lede { font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem); color: var(--muted); line-height: 1.55; }

/* --- layout primitives --- */
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }
.stack { display: flex; flex-direction: column; }
.cluster { display: flex; align-items: center; flex-wrap: wrap; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding-inline: 20px; border-radius: var(--radius-sm);
  font-size: 0.9375rem; font-weight: 560; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 180ms var(--ease-out-expo), background-color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: oklch(0.85 0.166 113.1); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); background: var(--surface); }
.btn-sm { height: 36px; padding-inline: 14px; font-size: 0.875rem; border-radius: 7px; }

/* --- status pill --- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding-inline: 10px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 560; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pill-success { background: var(--success-dim); color: var(--success); }
.pill-success::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-dim); }
.pill-warning { background: var(--warning-dim); color: var(--warning); }
.pill-warning::before { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-dim); }
.pill-danger { background: var(--danger-dim); color: var(--danger); }
.pill-danger::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-dim); }
.pill-neutral { background: var(--surface-2); color: var(--muted); }
.pill-neutral::before { background: var(--faint); }

/* --- platform badge --- */
.platform {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding-inline: 12px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 0.875rem; color: var(--ink);
}
.platform .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.platform.yandex .dot { background: oklch(0.65 0.19 25); }
.platform.google .dot { background: oklch(0.75 0.16 90); }
.platform.meta .dot { background: var(--accent); }

/* --- motion --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal-in 700ms var(--ease-out-expo) both; }
  .reveal-delay-1 { animation-delay: 90ms; }
  .reveal-delay-2 { animation-delay: 180ms; }
  .reveal-delay-3 { animation-delay: 270ms; }
  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .sweep { animation: sweep-spin 8s linear infinite; transform-origin: center; }
  @keyframes sweep-spin { to { transform: rotate(360deg); } }
  .pulse-ring { animation: pulse-out 2.6s var(--ease-out-expo) infinite; }
  @keyframes pulse-out {
    0% { opacity: 0.55; transform: scale(0.85); }
    100% { opacity: 0; transform: scale(1.35); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .sweep { animation: none; }
  .pulse-ring { display: none; }
}

/* --- focus --- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 720px) {
  .h1 { letter-spacing: -0.02em; }
}
