:root {
  --bg: #08090c;
  --bg-soft: #0e1015;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ebf1;
  --muted: #9aa3b2;
  --brand: #6d5cff;
  --brand-2: #16d6c3;
  --grad: linear-gradient(100deg, #8a7dff 0%, #16d6c3 100%);
  --radius: 16px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
strong { color: var(--text); }

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  z-index: -2;
}
.bg-glow {
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, rgba(109, 92, 255, 0.22), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 9, 12, 0.92);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo,
.logo-small {
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  color: #b9b2ff;
}
.logo { font-size: 20px; }
.logo-small { font-size: 18px; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo,
  .logo-small {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: inline-flex; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--grad);
  color: #0a0b0f;
  box-shadow: 0 12px 30px -10px rgba(109, 92, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(109, 92, 255, 0.75); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* Hero */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  position: relative;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.pill span { color: var(--brand-2); }
.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -1px;
  max-width: 900px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 26px 0 36px;
  color: var(--muted);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats {
  display: flex;
  gap: 46px;
  margin-top: 60px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat { text-align: center; }
.stat-num {
  font-family: "Syncopate", sans-serif;
  font-size: 34px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-suffix {
  font-family: "Syncopate", sans-serif;
  font-size: 34px;
  color: var(--text);
  margin-left: -4px;
}
.stat-label { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }

.scroll-hint {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--brand-2);
  animation: scroll 1.6s infinite;
}
@keyframes scroll {
  0% { opacity: 0; transform: translateY(-4px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* Section */
.section { padding: 90px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block;
  color: var(--brand-2);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.section-sub { color: var(--muted); font-size: 17px; margin-top: 18px; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 0%), rgba(109, 92, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(109, 92, 255, 0.4); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-feature {
  background: linear-gradient(180deg, rgba(109, 92, 255, 0.12), transparent);
  border-color: rgba(109, 92, 255, 0.35);
}
.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand-2);
  margin-bottom: 22px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 21px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; }
.card-list { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.card-list li {
  color: var(--muted);
  font-size: 14px;
  padding-left: 22px;
  position: relative;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--grad);
}

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.timeline { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.tl-item { display: flex; gap: 18px; }
.tl-num {
  font-family: "Syncopate", sans-serif;
  font-size: 15px;
  color: var(--brand-2);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tl-item h4 { font-size: 17px; margin-bottom: 4px; }
.tl-item p { color: var(--muted); font-size: 14px; }

.terminal {
  background: #0b0d12;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}
.term-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.term-bar span { width: 12px; height: 12px; border-radius: 50%; }
.term-bar span:nth-child(1) { background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-body { padding: 20px; line-height: 1.6; }
.term-body .c-user { color: var(--brand-2); }
.term-body .c-ok { color: #28c840; }
.term-body .c-prompt { color: var(--brand); }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Stack */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.chip {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover {
  transform: translateY(-3px);
  border-color: rgba(109, 92, 255, 0.5);
  color: var(--brand-2);
}

/* CTA */
.cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
}
.cta-action { display: flex; flex-direction: column; gap: 18px; }
.cta-email { text-align: center; color: var(--muted); font-size: 15px; }
.cta-email a { color: var(--brand-2); font-weight: 600; }
.cta-email a:hover { text-decoration: underline; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-inner p { color: var(--muted); font-size: 14px; }
.footer-copy { font-size: 13px !important; opacity: 0.7; }

/* Reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 36px; }
  .approach-visual { order: -1; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(8, 9, 12, 0.98);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 0.35s, visibility 0.35s;
  }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 30px; }
}

/* Theme toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--text);
}
.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* Light theme */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f4f5f9;
  --bg-elev: #ffffff;
  --card: rgba(20, 24, 40, 0.035);
  --border: rgba(15, 18, 30, 0.12);
  --text: #0b0c10;
  --muted: #565c68;
  --shadow: 0 24px 60px rgba(20, 30, 60, 0.14);
  --grad: linear-gradient(135deg, #4a46c9, #0e9b8e);
  --grad2: linear-gradient(135deg, #0e9b8e, #4a46c9);
}
:root[data-theme="light"] .nav.scrolled { background: rgba(255, 255, 255, 0.7); }
:root[data-theme="light"] .nav-links { background: transparent; }
:root[data-theme="light"] .pill { background: rgba(15, 18, 30, 0.05); color: #565c68; }
:root[data-theme="light"] .btn-ghost { background: rgba(15, 18, 30, 0.05); }
:root[data-theme="light"] .btn-ghost:hover { background: rgba(15, 18, 30, 0.09); }
:root[data-theme="light"] .theme-toggle:hover { background: rgba(15, 18, 30, 0.09); }
:root[data-theme="light"] .hero h1,
:root[data-theme="light"] .hero-title {
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
  background-clip: initial;
  -webkit-background-clip: initial;
}
:root[data-theme="light"] .card-icon { border: 1px solid rgba(15, 18, 30, 0.1); }
:root[data-theme="light"] .card-icon:hover { border-color: rgba(124, 106, 255, 0.45); }
:root[data-theme="light"] .approach-list li::before { border: 1px solid rgba(15, 18, 30, 0.12); }
:root[data-theme="light"] .approach-list li::before:hover { border-color: rgba(14, 155, 142, 0.5); }
:root[data-theme="light"] .term { background: linear-gradient(180deg, #ffffff, #eceef5); border: 1px solid rgba(15, 18, 30, 0.12); }
:root[data-theme="light"] .term-head { background: rgba(15, 18, 30, 0.05); }
:root[data-theme="light"] .term-body { color: #d5d9e2; }
:root[data-theme="light"] .term-body .c-user { color: #7c8cff; }
:root[data-theme="light"] .bg-grid {
  background-image: linear-gradient(rgba(15, 18, 30, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 18, 30, 0.05) 1px, transparent 1px);
}
:root[data-theme="light"] .bg-glow { background: radial-gradient(circle, rgba(124, 106, 255, 0.12), transparent 60%); }
:root[data-theme="light"] .foot { border-top: 1px solid var(--border); }
:root[data-theme="light"] .foot a { color: #565c68; }
:root[data-theme="light"] .foot a:hover { color: #0b0c10; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
