/* ============================================================
   AutoAgent Works — Landing Page Styles
   Dark theme · Electric Blue accent · Space Grotesk + Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:          #0a0a0a;
  --surface-1:   #111111;
  --surface-2:   #161618;
  --surface-3:   #1a1a1e;
  --accent:      #2563EB;
  --accent-mid:  #3b82f6;
  --accent-light:#60a5fa;
  --accent-glow: rgba(37, 99, 235, 0.28);
  --accent-glow-strong: rgba(37, 99, 235, 0.5);
  --text-1:      #ffffff;
  --text-2:      #a1a1aa;
  --text-3:      #52525b;
  --border:      rgba(255,255,255,0.07);
  --border-accent: rgba(37,99,235,0.35);
  --radius:      12px;
  --radius-lg:   20px;
  --font-display:'Space Grotesk', sans-serif;
  --font-body:   'Inter', sans-serif;
  --nav-h:       72px;
  --section-pad: 120px;
}

html {
  scroll-behavior: auto; /* Lenis handles this */
}

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ── Utility ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  background: rgba(37,99,235,0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow-strong);
}

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

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text-1);
  transform: translateY(-2px);
}

/* ── Navigation ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon svg {
  width: 18px;
  height: 18px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn {
  padding: 10px 22px;
  font-size: 14px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.72) 100%
  );
  z-index: 1;
}

/* Subtle blue vignette bottom */
.hero-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 40px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 32px;
  opacity: 0;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 28px;
  overflow: hidden;
}

.hero-heading .word {
  display: inline-block;
  will-change: transform, opacity;
}

.hero-heading .accent-word {
  color: var(--accent-light);
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-2);
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 48px;
  opacity: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
}

.hero-actions .btn {
  padding: 16px 32px;
  font-size: 16px;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
}

/* ── Section Shared ───────────────────────────────────────── */
section {
  padding: var(--section-pad) 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-1);
  margin-bottom: 20px;
}

.section-body {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Problem Section ──────────────────────────────────────── */
.problem {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-header {
  text-align: center;
  margin-bottom: 72px;
}

.problem-header .section-body {
  margin: 0 auto;
}

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

.problem-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,0.6), transparent);
}

.problem-icon {
  width: 48px;
  height: 48px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #f87171;
}

.problem-icon svg {
  width: 24px;
  height: 24px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

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

/* ── Solution Section ─────────────────────────────────────── */
.solution {
  overflow: hidden;
}

.solution-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.solution-text {
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
}

.solution-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.solution-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.solution-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: rgba(37,99,235,0.12);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.solution-check svg {
  width: 12px;
  height: 12px;
  color: var(--accent-light);
}

.solution-item-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.solution-item-text span {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.solution-visual {
  position: relative;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
}

.solution-visual-inner {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.solution-visual-inner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.3s ease;
}

.flow-node.active {
  border-color: var(--border-accent);
  color: var(--text-1);
}

.flow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}

.flow-dot.blue { background: var(--accent); }
.flow-dot.green { background: #22c55e; }

.flow-arrow {
  display: flex;
  align-items: center;
  padding-left: 26px;
  color: var(--text-3);
  font-size: 18px;
}

.solution-metric {
  display: flex;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.metric-item {
  flex: 1;
  text-align: center;
}

.metric-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Features Section ─────────────────────────────────────── */
.features {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-header {
  text-align: center;
  margin-bottom: 72px;
}

.features-header .section-body {
  margin: 0 auto;
}

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

.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
  cursor: default;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(37,99,235,0.06), transparent 60%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px var(--border-accent), 0 0 40px var(--accent-glow);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(37,99,235,0.1);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-light);
  transition: background 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: rgba(37,99,235,0.18);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

/* ── Demo Section ─────────────────────────────────────────── */
.demo {
  background: var(--bg);
}

.demo-header {
  text-align: center;
  margin-bottom: 64px;
}

.demo-video-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 0 1px var(--border-accent), 0 40px 120px var(--accent-glow);
  will-change: transform, opacity;
  aspect-ratio: 16 / 9;
  background: var(--surface-1);
  max-width: 900px;
  margin: 0 auto;
}

.demo-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-video-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  box-shadow: inset 0 0 80px var(--accent-glow);
}

.demo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 72px;
}

.stat-item {
  text-align: center;
  will-change: transform, opacity;
}

.stat-number-wrap {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-suffix {
  color: var(--accent-light);
}

.stat-label {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 12px auto 0;
  opacity: 0.5;
}

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  will-change: transform, opacity;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-1);
  margin-bottom: 20px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.cta-heading em {
  font-style: normal;
  color: var(--accent-light);
}

.cta-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 44px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 44px;
}

.cta-actions .btn-primary {
  padding: 18px 40px;
  font-size: 17px;
}

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

.cta-note strong {
  color: var(--text-2);
  font-weight: 500;
}

/* Grid lines decoration */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 0%, transparent 80%);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.footer-links a {
  font-size: 14px;
  color: var(--text-3);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-2);
}

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

/* ── Loader ───────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}

.loader-bar-wrap {
  width: 200px;
  height: 2px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .solution-inner {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
  }

  .container {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta .btn-ghost {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin: 0 auto;
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .solution-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .demo-stats {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ── Stats Strip ──────────────────────────────────────────── */
.stats-strip {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}

.stats-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stats-strip-item {
  flex: 1;
  text-align: center;
  padding: 0 32px;
  border-right: 1px solid var(--border);
}

.stats-strip-item:last-child {
  border-right: none;
}

.stats-strip-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.stats-strip-number em {
  font-style: normal;
  color: var(--accent-light);
}

.stats-strip-label {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Solution Cards (2-card layout) ──────────────────────── */
.solution-card-heading {
  font-size: clamp(24px, 2.4vw, 36px);
  margin-bottom: 28px;
}

.solution-text-inner {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  flex: 1;
}

.solution-visual-inner {
  padding: 48px;
}

.solution-text-inner .solution-list,
.solution-visual-inner .solution-list {
  margin-top: 0;
  gap: 24px;
}

/* ── Animation helpers ────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

@media (max-width: 768px) {
  .stats-strip .container {
    flex-direction: column;
    gap: 0;
  }
  .stats-strip-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    width: 100%;
  }
  .stats-strip-item:last-child {
    border-bottom: none;
  }
}
