/* ============================================
   DRIFTOPS AI — DESIGN SYSTEM CSS
   ============================================ */

/* --- TOKENS --- */
:root {
  --bg-primary: #0B1120;
  --bg-surface: #131B2E;
  --bg-elevated: #1A2340;
  --bg-hover: #1E2A4A;

  --accent: #0FCEAE;
  --accent-dim: rgba(15, 206, 174, 0.15);
  --accent-glow: rgba(15, 206, 174, 0.3);
  --accent2: #F5A623;
  --accent2-dim: rgba(245, 166, 35, 0.15);

  --text: #E8ECF1;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inv: #0B1120;

  --border: rgba(100, 116, 139, 0.2);
  --border-accent: rgba(15, 206, 174, 0.3);

  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-hero: clamp(2.5rem, 5vw, 4.5rem);

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;

  --ease-fast: 150ms ease-out;
  --ease-base: 250ms ease-out;
  --ease-slow: 400ms ease-out;

  --max-w: 1200px;
  --nav-h: 72px;
}

[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-hover: #E2E8F0;
  --accent: #0BA88E;
  --accent-dim: rgba(11, 168, 142, 0.1);
  --accent-glow: rgba(11, 168, 142, 0.2);
  --accent2: #D4910A;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inv: #F8FAFC;
  --border: rgba(15, 23, 42, 0.1);
  --border-accent: rgba(11, 168, 142, 0.3);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-primary);
  transition: background var(--ease-base), color var(--ease-base);
}
a { color: var(--accent); text-decoration: none; transition: opacity var(--ease-fast); }
a:hover { opacity: 0.85; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- LAYOUT --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-9) 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }

/* --- TYPOGRAPHY --- */
.display { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.amber { color: var(--accent2); }
.muted { color: var(--text-muted); }

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.section-label::before { content: '>'; opacity: 0.6; }

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--sp-5);
  line-height: 1.2;
}

.page-hero {
  padding: var(--sp-10) 0 var(--sp-9);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: var(--sp-5);
}

.page-hero h1 .highlight { color: var(--accent); }

.page-hero .subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* --- NAV --- */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(12px);
  padding: 0 var(--sp-5);
  margin: 0 calc(-1 * var(--sp-5));
  width: calc(100% + var(--sp-5) * 2);
}

[data-theme="light"] .nav { background: rgba(248, 250, 252, 0.9); }

.nav-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-xl);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--ease-fast);
}

.nav-links a:hover { color: var(--accent); opacity: 1; }

.nav-cta {
  background: var(--accent) !important;
  color: var(--text-inv) !important;
  padding: var(--sp-2) var(--sp-4) !important;
  border-radius: var(--r-md) !important;
  font-weight: 600 !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: var(--sp-2);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inv);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px var(--accent-glow);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-4);
}
.btn-ghost:hover { border-color: var(--accent); opacity: 1; }

.btn-sm { font-size: var(--text-sm); padding: var(--sp-2) var(--sp-4); }

/* --- EYEBROW BADGE --- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--accent-dim);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  border: 1px solid var(--border-accent);
  margin-bottom: var(--sp-4);
}

/* --- STAT BAR --- */
.stats-bar {
  display: flex;
  gap: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-8);
}

.stat { display: flex; flex-direction: column; }

.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--sp-2);
}

/* --- CARDS --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  transition: all var(--ease-base);
}

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

/* --- PRICING CARDS --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  position: relative;
  transition: all var(--ease-base);
}

.pricing-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-dim);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--accent);
  color: var(--text-inv);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
}

.pricing-tier {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-3);
}

.pricing-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}

.pricing-amount {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.pricing-amount span { font-size: var(--text-sm); color: var(--text-muted); font-weight: 400; }

.pricing-features {
  margin: var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pricing-features li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.pricing-features li::before { content: '\2713'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* --- CASE STUDY CAROUSEL --- */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 0 28px;
  margin: 0 -28px;
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(50% - 12px);
  gap: var(--sp-5);
  transition: transform 0.5s ease-out;
}

.case-study {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--ease-base);
}

.case-study:hover { border-color: var(--border-accent); }

.case-study-header {
  background: var(--bg-elevated);
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.case-study-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2);
}

.case-study-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.3;
}

.case-study-body { padding: var(--sp-5); }
.case-study-body p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-4); }

.case-study-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.metric-value { font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 700; color: var(--accent); }
.metric-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease-fast);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.carousel-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-elevated);
}

.carousel-arrow:disabled { opacity: 0; pointer-events: none; }
.carousel-arrow--left { left: 4px; }
.carousel-arrow--right { right: 4px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
  padding: 0;
}

.carousel-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  width: 24px;
  border-radius: var(--r-full);
}

/* --- FORMS --- */
.form-group { margin-bottom: var(--sp-4); }

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--ease-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { min-height: 120px; resize: vertical; }

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) 0;
}

.faq-question {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}

.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--ease-fast);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--ease-base), padding var(--ease-base);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: var(--sp-4);
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.8;
}

/* --- FUNNEL / STEPS --- */
.funnel-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: none;
}

.funnel-step.active { display: block; }

.funnel-progress {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.funnel-progress-dot {
  height: 4px;
  flex: 1;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background var(--ease-fast);
}

.funnel-progress-dot.filled { background: var(--accent); }

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-7);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-lg);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.footer-brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

.footer-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-4);
}

.footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-links a { font-size: var(--text-sm); color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-surface);
    padding: var(--sp-5);
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
  .stats-bar { flex-direction: column; gap: var(--sp-4); }
  .pricing-grid { grid-template-columns: 1fr; }
  .carousel-track { grid-auto-columns: 100%; }
  .carousel-arrow--left { left: 8px; }
  .carousel-arrow--right { right: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
