/* Ametric marketing — shared styles
 * Brand-locked: slate neutrals + lime accent. Borders carry depth.
 */

:root {
  /* Neutrals — Tailwind slate */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Lime accent — locked */
  --lime-50:  #f7fee7;
  --lime-100: #ecfccb;
  --lime-500: #84cc16;
  --lime-600: #65a30d;  /* light-mode accent */
  --lime-700: #4d7c0f;  /* marketing CTAs */
  --lime-800: #3f6212;

  /* Semantics */
  --emerald-600: #059669;
  --amber-600:   #d97706;
  --red-600:     #dc2626;
  --sky-600:     #0284c7;

  /* Mapped tokens — light */
  --bg:           #fdfdfb;        /* warmer marketing bg */
  --surface:      var(--slate-50);
  --surface-2:    var(--slate-100);
  --border:       var(--slate-200);
  --border-strong: var(--slate-300);
  --text:         var(--slate-900);
  --text-2:       var(--slate-700);
  --muted:        var(--slate-500);
  --muted-2:      var(--slate-400);

  --accent:       var(--lime-600);
  --accent-cta:   var(--lime-700);   /* marketing-only CTA */
  --accent-soft:  var(--lime-50);
  --accent-ink:   var(--lime-800);

  --success: var(--emerald-600);
  --warning: var(--amber-600);
  --danger:  var(--red-600);
  --info:    var(--sky-600);

  /* Radii — capped */
  --r-btn:    4px;
  --r-card:   6px;
  --r-modal:  8px;
  --r-pill:   999px;

  /* Shadows — minimal. Borders carry depth. */
  --shadow-none: none;
  --shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.04);

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1200px;
  --container-narrow: 960px;
}

[data-theme="dark"] {
  --bg:           var(--slate-950);
  --surface:      var(--slate-900);
  --surface-2:    var(--slate-800);
  --border:       var(--slate-800);
  --border-strong: var(--slate-700);
  --text:         var(--slate-50);
  --text-2:       var(--slate-300);
  --muted:        var(--slate-400);
  --muted-2:      var(--slate-500);

  --accent:       var(--lime-500);
  --accent-cta:   var(--lime-500);
  --accent-soft:  rgba(132, 204, 22, 0.10);
  --accent-ink:   var(--lime-100);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--lime-100); color: var(--lime-800); }
[data-theme="dark"] ::selection { background: var(--lime-500); color: var(--slate-950); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Layout primitives */
.container       { max-width: var(--container);        margin: 0 auto; padding: 0 24px; }
.container-narrow{ max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* Typography */
.h-display {
  font-weight: 600;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
}
.h1 {
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text);
}
.h2 {
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--text);
}
.h3 {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  margin: 0;
}
.body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* Buttons — radius 4px, motion 160ms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-btn);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: var(--slate-700); }
[data-theme="dark"] .btn-primary { background: var(--slate-50); color: var(--slate-950); }
[data-theme="dark"] .btn-primary:hover { background: var(--slate-200); }

/* Marketing accent CTA — lime-700 */
.btn-accent {
  background: var(--accent-cta);
  color: white;
  font-weight: 500;
}
.btn-accent:hover { background: var(--lime-800); }
[data-theme="dark"] .btn-accent { background: var(--lime-500); color: var(--slate-950); }
[data-theme="dark"] .btn-accent:hover { background: var(--lime-600); color: var(--slate-950); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--slate-400); }

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); }

.btn-lg { height: 44px; padding: 0 18px; font-size: 14px; }

/* Surfaces */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
[data-theme="dark"] .card { background: var(--surface); }

.surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Section spacing */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 120px 0; }
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 44px 0; }
  .section-lg { padding: 80px 0; }
}

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
}
[data-theme="dark"] .pill { background: var(--surface-2); }

.pill-accent {
  background: var(--accent-soft);
  color: var(--lime-800);
  border-color: var(--lime-100);
}
[data-theme="dark"] .pill-accent { color: var(--lime-100); border-color: rgba(132, 204, 22, 0.18); }

.pill-dot {
  width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; opacity: 0.8;
}

/* Live dot — kept subtle */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: var(--r-pill);
  background: var(--success);
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: var(--r-pill);
  background: var(--success);
  opacity: 0.18;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 0.18; }
  50%      { transform: scale(1.6); opacity: 0; }
}

.hr { height: 1px; background: var(--border); border: none; margin: 0; }

/* Subtle dot grid for hero — replaces the heavier line grid */
.dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--slate-200) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, black 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, black 35%, transparent 80%);
  pointer-events: none;
  opacity: 0.7;
}
[data-theme="dark"] .dot-bg {
  background-image: radial-gradient(circle at 1px 1px, var(--slate-800) 1px, transparent 0);
}

/* Utility flex */
.row { display: flex; align-items: center; }
.row-gap-2 { gap: 8px; }
.row-gap-3 { gap: 12px; }
.row-gap-4 { gap: 16px; }
.row-gap-6 { gap: 24px; }
.col { display: flex; flex-direction: column; }
.center { display: flex; align-items: center; justify-content: center; }

.tnum { font-variant-numeric: tabular-nums; }

/* Marketing — slightly longer than product 200ms cap */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 320ms ease-out backwards; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
