:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-elev: #f6f6f8;
  --bg-card: #ffffff;
  --border: #e2e2e6;
  --border-strong: #c4c4c9;
  --text: #0a0a0a;
  --text-muted: #45454c;
  --text-subtle: #6a6a72;
  --accent: #0a0a0b;
  --accent-text: #ffffff;
  --accent-hover: #2a2a2d;
  --brand: #4338ca;
  --brand-soft: rgba(67, 56, 202, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d0d10;
  --bg-elev: #18181c;
  --bg-card: #1a1a1f;
  --border: #2a2a32;
  --border-strong: #3d3d47;
  --text: #f7f7f9;
  --text-muted: #cfcfd6;
  --text-subtle: #a4a4ad;
  --accent: #ffffff;
  --accent-text: #0a0a0b;
  --accent-hover: #e6e6e9;
  --brand: #a5b4fc;
  --brand-soft: rgba(165, 180, 252, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 17px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.011em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
}

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

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

/* === Theme toggle === */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  padding: 0;
}

.theme-toggle:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
  color: var(--text);
}

.theme-toggle svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-elev);
  border-color: var(--text);
}

:root[data-theme="dark"] .btn-secondary {
  background: var(--bg-elev);
}

:root[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-card);
}

.btn-lg {
  padding: 15px 26px;
  font-size: 1rem;
}

/* === Hero === */
.hero {
  position: relative;
  padding: 96px 0 64px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--brand-soft) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  background: var(--bg-elev);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

h1, h2, h3, h4 {
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* === Section === */
.section {
  padding: 96px 0;
}

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

.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 16px;
}

.section h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-head p {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* === Features Grid === */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* === How it works === */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 16px;
  font-feature-settings: 'tnum';
}

.step h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === Showcase / demo card === */
.showcase {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 8px;
  border: 1px solid var(--border);
  max-width: 920px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.showcase-inner {
  background: var(--bg-card);
  border-radius: calc(var(--radius-lg) - 8px);
  padding: 40px;
}

.transcript {
  display: grid;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.msg.right { flex-direction: row-reverse; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}

.msg.right .msg-avatar {
  background: var(--brand);
  color: #0a0a0b;
  border-color: var(--brand);
}

.msg-bubble {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 80%;
  color: var(--text);
}

.msg.right .msg-bubble {
  background: var(--brand);
  color: #0a0a0b;
  border-color: var(--brand);
  font-weight: 500;
}

:root:not([data-theme="dark"]) .msg.right .msg-bubble {
  color: #ffffff;
}
:root:not([data-theme="dark"]) .msg.right .msg-avatar {
  color: #ffffff;
}

/* === CTA Banner === */
.cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, var(--brand-soft) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner > * { position: relative; z-index: 1; }

.cta-banner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 12px;
}

.cta-banner p {
  color: var(--text-muted);
  font-size: 1.07rem;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* === Footer === */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 96px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-col a {
  font-size: 0.94rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* === Legal pages === */
.legal {
  padding: 64px 0 96px;
}

.legal-inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal h1 {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 600;
  margin-bottom: 12px;
}

.legal-meta {
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal p, .legal li {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal ul, .legal ol {
  margin: 8px 0 16px 24px;
}

.legal li { margin-bottom: 6px; }

.legal a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root[data-theme="dark"] .legal a {
  color: #c7d2fe;
}

.legal strong { color: var(--text); font-weight: 600; }

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Utilities === */
@media (max-width: 720px) {
  html { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .showcase-inner { padding: 24px; }
  .cta-banner { padding: 40px 24px; }
  .feature-card, .step { padding: 24px; }
  .hero-meta { gap: 12px; font-size: 0.85rem; }
}
