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

:root {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;
  --accent: #e4e4e7;
  --accent-2: #a1a1aa;
}

html { scroll-behavior: smooth; }

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

/* Grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(9,9,11,0.8);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 32px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  text-decoration: none; letter-spacing: -0.01em;
}

.logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--text); display: flex;
  align-items: center; justify-content: center; color: var(--bg);
}

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

.nav-links a {
  font-size: 0.8rem; font-weight: 500; color: var(--text-2);
  text-decoration: none; transition: color 0.2s; letter-spacing: 0.01em;
}

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

.nav-gh {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); display: flex !important;
  align-items: center; justify-content: center; transition: border-color 0.2s;
}

.nav-gh:hover { border-color: var(--border-hover); }

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 100vh; display: flex;
  align-items: center; justify-content: center; text-align: center;
  padding: 140px 32px 80px; overflow: hidden;
}

.hero-glow { display: none; }

.hero-inner { max-width: 640px; position: relative; }

.overline {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 800;
  line-height: 1.12; letter-spacing: -0.035em; margin-bottom: 24px;
}

.shimmer { color: var(--text-2); }

.subtitle {
  font-size: 1.05rem; color: var(--text-2); max-width: 480px;
  margin: 0 auto 48px; line-height: 1.7;
}

/* Capsule demo */
.capsule-demo { margin-bottom: 48px; }

.capsule {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 26px; padding: 12px 24px; min-width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.waveform { display: flex; align-items: center; gap: 3px; height: 24px; }

.waveform span {
  display: block; width: 3px; border-radius: 3px;
  background: var(--text-2); animation: wave 1.2s ease-in-out infinite;
}

.waveform span:nth-child(1)  { height: 8px;  animation-delay: 0s; }
.waveform span:nth-child(2)  { height: 14px; animation-delay: 0.1s; }
.waveform span:nth-child(3)  { height: 20px; animation-delay: 0.15s; }
.waveform span:nth-child(4)  { height: 12px; animation-delay: 0.2s; }
.waveform span:nth-child(5)  { height: 18px; animation-delay: 0.25s; }
.waveform span:nth-child(6)  { height: 24px; animation-delay: 0.3s; }
.waveform span:nth-child(7)  { height: 16px; animation-delay: 0.35s; }
.waveform span:nth-child(8)  { height: 22px; animation-delay: 0.4s; }
.waveform span:nth-child(9)  { height: 10px; animation-delay: 0.45s; }
.waveform span:nth-child(10) { height: 18px; animation-delay: 0.5s; }
.waveform span:nth-child(11) { height: 14px; animation-delay: 0.55s; }
.waveform span:nth-child(12) { height: 20px; animation-delay: 0.6s; }
.waveform span:nth-child(13) { height: 8px;  animation-delay: 0.65s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.capsule-text {
  font-size: 0.85rem; font-weight: 500; color: var(--text);
  white-space: nowrap; min-width: 120px; text-align: left;
}

.cursor { animation: blink 0.8s step-end infinite; color: var(--text-2); }

@keyframes blink { 50% { opacity: 0; } }

.capsule-label {
  margin-top: 16px; font-size: 0.75rem; color: var(--text-3);
  letter-spacing: 0.02em;
}

/* Buttons */
.hero-actions {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 32px;
}

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 0.85rem;
  font-weight: 600; text-decoration: none; transition: all 0.25s;
  cursor: pointer; border: none; letter-spacing: 0.01em;
}

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

.btn-primary:hover {
  background: var(--accent); transform: translateY(-1px);
}

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

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

.btn-lg { padding: 14px 32px; font-size: 0.9rem; }

/* Hotkey */
.hotkey-hint {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 0.8rem; color: var(--text-3);
}

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 28px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; font-family: inherit; font-size: 0.75rem;
  font-weight: 600; color: var(--text-2);
  box-shadow: 0 1px 0 var(--border);
}

.hint-label { margin-left: 4px; }

/* ---- TRUST STRIP ---- */
.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0; background: var(--surface);
}

.trust-inner {
  max-width: 1120px; margin: 0 auto; padding: 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}

.trust-item {
  display: flex; align-items: flex-start; gap: 14px;
}

.trust-item svg { flex-shrink: 0; color: var(--text-2); margin-top: 2px; }
.trust-item div { display: flex; flex-direction: column; gap: 2px; }
.trust-item strong { font-size: 0.85rem; font-weight: 600; }
.trust-item span { font-size: 0.78rem; color: var(--text-3); }

/* ---- SECTIONS ---- */
section { padding: 120px 32px; }

.section-inner { max-width: 1120px; margin: 0 auto; }

.section-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 16px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem; color: var(--text-2); text-align: center;
  max-width: 460px; margin: 0 auto 64px;
}

/* ---- FEATURES ---- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border-radius: 16px; overflow: hidden;
}

.fcard {
  background: var(--surface); padding: 36px;
  transition: background 0.3s;
}

.fcard:hover { background: var(--surface-2); }

.fcard-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(255,255,255,0.05); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.fcard h3 {
  font-size: 0.95rem; font-weight: 650; margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.fcard p { font-size: 0.85rem; color: var(--text-2); line-height: 1.65; }

/* ---- HOW IT WORKS ---- */
#how-it-works { background: var(--bg); }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  max-width: 900px; margin: 0 auto;
}

.step-card {
  position: relative; padding: 0 32px; text-align: center;
}

.step-num {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--text-3); opacity: 0.5; margin-bottom: 20px;
}

.step-line {
  position: absolute; top: 28px; right: -8px;
  width: 48px; height: 1px; background: var(--border);
}

.step-card:last-child .step-line { display: none; }

.step-card h3 {
  font-size: 0.95rem; font-weight: 650; margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-card p { font-size: 0.85rem; color: var(--text-2); line-height: 1.65; }
.step-card kbd { font-size: 0.7rem; }

/* ---- ENGINES ---- */
#engines { background: var(--surface); border-top: 1px solid var(--border); }

.engines-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 960px; margin: 0 auto;
}

.engine {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px; transition: border-color 0.3s;
}

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

.engine-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.engine h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }

.engine-tag {
  font-size: 0.65rem; font-weight: 700; padding: 3px 8px;
  border-radius: 5px; letter-spacing: 0.04em; text-transform: uppercase;
}

.tag-coreml { background: rgba(255,255,255,0.06); color: var(--text-2); }
.tag-mlx { background: rgba(255,255,255,0.06); color: var(--text-2); }

.engine p {
  font-size: 0.85rem; color: var(--text-2); line-height: 1.65;
  margin-bottom: 16px;
}

.engine-detail {
  font-size: 0.75rem; color: var(--text-3); font-weight: 500;
  padding-top: 14px; border-top: 1px solid var(--border);
}

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

.cta-inner { position: relative; max-width: 600px; margin: 0 auto; }

.cta-glow { display: none; }

.cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 12px;
}

.cta-sub { color: var(--text-2); font-size: 1rem; margin-bottom: 36px; }

.cta-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border); padding: 56px 32px 48px;
  background: var(--bg);
}

.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 48px;
}

.footer-left { max-width: 280px; }
.footer-left .logo { margin-bottom: 12px; }
.footer-left p { font-size: 0.8rem; color: var(--text-3); line-height: 1.6; }
.logo-sm .logo-icon { width: 24px; height: 24px; border-radius: 6px; }
.logo-sm { font-size: 0.85rem; }

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

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.82rem; color: var(--text-2); text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- REVEAL ---- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links a:not(.nav-gh) { display: none; }
  .hero { padding: 120px 24px 60px; min-height: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .step-line { display: none; }
  .engines-row { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr; gap: 20px; }
  section { padding: 80px 24px; }
  .capsule { min-width: auto; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 40px; }
}
