/* ═══════════════════════════════════════════════════════════════
   Distill Landing Page — Styles
   Design tokens from the app's design system
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --base: #0f1117;
  --surface-1: #161b27;
  --surface-2: #1c2333;
  --surface-3: #232b3e;
  --surface-4: #2a3347;

  /* Text */
  --text-1: #f0f4f8;
  --text-2: #8b9bb4;
  --text-3: #5c6b84;
  --text-4: #3d4d66;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-standard: rgba(255, 255, 255, 0.1);
  --border-emphasis: rgba(255, 255, 255, 0.18);

  /* Accent */
  --accent: #d4912a;
  --accent-hover: #e8a23a;
  --accent-muted: rgba(212, 145, 42, 0.12);
  --accent-bg: rgba(212, 145, 42, 0.15);
  --accent-strong: #f0b040;

  /* Semantic */
  --success: #2ea84a;
  --info: #4b8fe0;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --ease: 0.2s ease;
}

/* ── RESET ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--base);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
  text-decoration: none;
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 52px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
  height: 44px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--accent);
  color: var(--base);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 145, 42, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-emphasis);
  color: var(--text-2);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text-1);
}

.btn-arrow {
  transition: transform var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ── NAV ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.logo-icon {
  color: var(--accent);
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--ease);
}

.nav-links a:not(.btn):hover {
  color: var(--text-1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-2);
  border-radius: 1px;
  transition: all var(--ease);
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  padding: 160px 0 120px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(212, 145, 42, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-muted);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 32px;
  border: 1px solid rgba(212, 145, 42, 0.2);
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.text-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-3);
}

/* ── PROBLEM ────────────────────────────────────────────────── */
.problem {
  padding: 80px 0;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  padding: 32px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease);
}

.problem-card:hover {
  border-color: var(--border-standard);
}

.problem-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── WORKFLOW ───────────────────────────────────────────────── */
.workflow {
  padding: 120px 0;
}

.workflow-steps {
  max-width: 640px;
  margin: 0 auto;
}

.workflow-step {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease);
}

.workflow-step:hover {
  border-color: var(--accent-muted);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--base);
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
}

.step-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.step-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-features li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 20px;
  position: relative;
}

.step-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
}

/* Connector between steps */
.workflow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

.connector-line {
  width: 2px;
  height: 24px;
  background: var(--border-standard);
}

.connector-arrow {
  color: var(--text-3);
  font-size: 16px;
  line-height: 1;
}

/* ── FEATURES ───────────────────────────────────────────────── */
.features {
  padding: 120px 0;
  background: var(--surface-1);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--ease);
}

.feature-card:hover {
  border-color: var(--border-standard);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── STATS ──────────────────────────────────────────────────── */
.stats {
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-2);
}

/* ── PRICING ────────────────────────────────────────────────── */
.pricing {
  padding: 120px 0;
  background: var(--surface-1);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  padding: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
}

.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(212, 145, 42, 0.1);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--accent);
  color: var(--base);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.pricing-period {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 24px;
}

.pricing-features {
  margin-bottom: 24px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-2);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ── CTA ────────────────────────────────────────────────────── */
.cta {
  padding: 120px 0;
  text-align: center;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(212, 145, 42, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta p {
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  padding: 64px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 12px;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  padding: 4px 0;
  transition: color var(--ease);
}

.footer-col a:hover {
  color: var(--text-1);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-4);
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for grid items */
.problem-card.animate-in:nth-child(2),
.feature-card.animate-in:nth-child(2),
.stat.animate-in:nth-child(2),
.pricing-card.animate-in:nth-child(2) {
  transition-delay: 0.1s;
}

.problem-card.animate-in:nth-child(3),
.feature-card.animate-in:nth-child(3),
.stat.animate-in:nth-child(3),
.pricing-card.animate-in:nth-child(3) {
  transition-delay: 0.2s;
}

.feature-card.animate-in:nth-child(4) {
  transition-delay: 0.1s;
}
.feature-card.animate-in:nth-child(5) {
  transition-delay: 0.2s;
}
.feature-card.animate-in:nth-child(6) {
  transition-delay: 0.3s;
}

/* Nav scroll state */
.nav.scrolled {
  background: rgba(15, 17, 23, 0.95);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Mobile menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px;
    gap: 16px;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero-title {
    font-size: 36px;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .problem-grid,
  .features-grid,
  .stats-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .workflow-step {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-value {
    font-size: 36px;
  }

  .cta h2 {
    font-size: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 32px;
  }

  .pricing-card-featured {
    order: -1;
  }
}
