@tailwind base;
@tailwind components;
@tailwind utilities;

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --bg: #FAFAFA;
  --bg-deep: #F4F4F5;
  --surface: #FFFFFF;
  --surface-2: #F8F8FA;
  --border: #E4E4E7;
  --border-dim: #F0F0F2;
  --text: #09090B;
  --muted: #3F3F46;
  --dimmer: #71717A;
  --indigo: #0F766E;
  --indigo-dim: rgba(15,118,110,0.08);
  --indigo-glow: rgba(15,118,110,0.10);
  --indigo-strong: rgba(15,118,110,0.20);
  --green: #16A34A;
  --green-dim: rgba(22,163,74,0.10);
  --red: #DC2626;
  --red-dim: rgba(220,38,38,0.10);
  --yellow: #CA8A04;
  --yellow-dim: rgba(202,138,4,0.10);
  --orange: #EA580C;
  --terminal-bg: #F8F8FA;
  --terminal-bar: #EFEFEF;
  --code-text: #0F766E;
}

.dark {
  --bg: #09090B;
  --bg-deep: #0A0A0E;
  --surface: #111113;
  --surface-2: #18181B;
  --border: #27272A;
  --border-dim: #1C1C1F;
  --text: #FAFAFA;
  --muted: #A1A1AA;
  --dimmer: #52525B;
  --indigo: #2DD4BF;
  --indigo-dim: rgba(45,212,191,0.10);
  --indigo-glow: rgba(45,212,191,0.18);
  --indigo-strong: rgba(45,212,191,0.25);
  --green: #22C55E;
  --green-dim: rgba(34,197,94,0.10);
  --red: #EF4444;
  --red-dim: rgba(239,68,68,0.10);
  --yellow: #EAB308;
  --yellow-dim: rgba(234,179,8,0.10);
  --orange: #F97316;
  --terminal-bg: #0A0A0E;
  --terminal-bar: #111113;
  --code-text: #5EEAD4;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-geist-sans), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Grid background ────────────────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(var(--border-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* ── Terminal ───────────────────────────────────────────────── */
.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.dark .terminal { box-shadow: 0 4px 48px rgba(0,0,0,0.5); }
.terminal-bar {
  background: var(--terminal-bar);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-line {
  opacity: 0;
  animation: revealLine 0.18s ease forwards;
}
@keyframes revealLine {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px var(--indigo-dim), 0 8px 40px var(--indigo-glow);
  transform: translateY(-2px);
}
.card-flat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ── Persona tabs ───────────────────────────────────────────── */
.persona-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  color: var(--muted);
  background: transparent;
  border: none;
  white-space: nowrap;
}
.persona-tab:hover { color: var(--text); background: var(--indigo-dim); }
.persona-tab.active { background: var(--indigo); color: #fff; }

/* ── Gradients ──────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-indigo {
  background: linear-gradient(135deg, #5EEAD4 0%, #2DD4BF 50%, #14B8A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-orange {
  background: linear-gradient(135deg, #F97316 0%, #EF4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll reveal ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* ── Hero entry animations ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.65s cubic-bezier(0.16,1,0.3,1) both;
  will-change: opacity, transform;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

/* ── Cursor blink ───────────────────────────────────────────── */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cursor { animation: blink 1s step-end infinite; will-change: opacity; }

/* ── Glow pulse (hero badge dot) ────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--indigo-strong); }
  50%       { box-shadow: 0 0 0 5px transparent; }
}
.pulse-dot { animation: pulse-dot 2s ease infinite; will-change: box-shadow; }

/* ── Shimmer (skeleton loader) ──────────────────────────────── */
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-dim) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 6px;
}

/* ── Feature alternating row images ────────────────────────── */
.feature-screenshot {
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.dark .feature-screenshot {
  box-shadow: 0 4px 40px rgba(0,0,0,0.4);
}

/* ── Inline code pill ───────────────────────────────────────── */
code.pill {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.8em;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--indigo-dim);
  color: var(--indigo);
}

/* ── Section label ──────────────────────────────────────────── */
.section-label {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--indigo);
}

/* ── Scrollbar (dark) ───────────────────────────────────────── */
.dark ::-webkit-scrollbar { width: 6px; height: 6px; }
.dark ::-webkit-scrollbar-track { background: var(--bg); }
.dark ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb:hover { background: var(--dimmer); }
