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

/* ── Dracula Tokens ──────────────────────────────── */
:root {
  --bg: #282a36;
  --bg-dark: #1e1f29;
  --bg-card: #44475a;
  --fg: #f8f8f2;
  --dim: #6272a4;
  --purple: #bd93f9;
  --pink: #ff79c6;
  --green: #50fa7b;
  --cyan: #8be9fd;
  --orange: #ffb86c;
  --red: #ff5555;
  --yellow: #f1fa8c;
  --glow: rgba(189, 147, 249, 0.4);
  --radius: 8px;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--purple); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ── Header ──────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(40, 42, 54, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.header-nav { display: flex; gap: 1.5rem; align-items: center; }
.header-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--fg); opacity: 1; }
.header-nav .nav-cta {
  color: var(--bg);
  background: var(--purple);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
}
.header-nav .nav-cta:hover { opacity: 0.9; }

/* ── Main ────────────────────────────────────────── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

main > section { margin-bottom: 6rem; }
main > section:last-child { margin-bottom: 4rem; }

.section-title {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 0 2rem;
}

.hero-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(189, 147, 249, 0.3);
  border-radius: 20px;
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--dim);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 2rem;
}
.hero-tagline strong { color: var(--fg); font-weight: 600; }

.hero-cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--purple);
  padding: 0.7rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.2s;
  margin-bottom: 3rem;
}
.hero-cta:hover {
  box-shadow: 0 0 24px var(--glow);
  transform: translateY(-1px);
  opacity: 1;
}

/* ── Terminal ────────────────────────────────────── */
.hero-terminal {
  width: 100%;
  max-width: 600px;
  background: var(--bg-dark);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: rgba(68, 71, 90, 0.5);
}
.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
}
.terminal-dot:first-child { background: var(--red); }
.terminal-dot:nth-child(2) { background: var(--yellow); }
.terminal-dot:nth-child(3) { background: var(--green); }
.terminal-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
}

.terminal-body { padding: 1rem 1.2rem; }

.terminal-line {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.8;
  white-space: nowrap;
  overflow: hidden;
}

.t-prompt { color: var(--green); margin-right: 0.5rem; }
.t-muted { color: var(--dim); }
.t-green { color: var(--green); }
.t-purple { color: var(--purple); }

.terminal-line.typing {
  overflow: hidden;
  border-right: 2px solid var(--green);
  white-space: nowrap;
  animation: typing 1.5s steps(40, end) 2s forwards,
             blink-caret 0.6s step-end 6 2s;
  width: 0;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--green); }
}

/* ── Features ────────────────────────────────────── */
.features { padding-top: 2rem; }

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

.feature-card {
  background: var(--bg-dark);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(189, 147, 249, 0.06);
}

.feature-icon {
  font-size: 1.4rem;
  color: var(--purple);
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--dim);
  line-height: 1.55;
}

/* ── Architecture ────────────────────────────────── */
.arch-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.arch-step {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
}

.arch-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--purple);
  opacity: 0.3;
  margin-bottom: 0.8rem;
}

.arch-step h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.arch-step p {
  font-size: 0.85rem;
  color: var(--dim);
  line-height: 1.55;
}

.arch-connector {
  width: 60px;
  min-width: 60px;
  height: 1px;
  background: var(--bg-card);
  margin-top: 2.2rem;
  position: relative;
}
.arch-connector::after {
  content: '\203A';
  position: absolute;
  right: -4px;
  top: -10px;
  color: var(--purple);
  font-size: 1.2rem;
}

/* ── Waitlist ────────────────────────────────────── */
.waitlist {
  text-align: center;
  padding: 4rem 0;
}

.waitlist-sub {
  color: var(--dim);
  font-size: 0.95rem;
  margin-top: -2rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

.waitlist-form input {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}
.waitlist-form input::placeholder { color: var(--dim); }
.waitlist-form input:focus { border-color: var(--purple); }

.waitlist-form button {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  background: var(--purple);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.2s;
  white-space: nowrap;
}
.waitlist-form button:hover {
  box-shadow: 0 0 20px var(--glow);
  transform: translateY(-1px);
}
.waitlist-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.waitlist-msg {
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-top: 1rem;
  min-height: 1.2em;
}
.waitlist-msg.success { color: var(--green); }
.waitlist-msg.error { color: var(--red); }

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--bg-card);
  padding: 2rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.footer-inner a { color: var(--dim); }
.footer-inner a:hover { color: var(--purple); }

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

@media (max-width: 768px) {
  main { padding: 0 1.5rem; }
  main > section { margin-bottom: 4rem; }

  .header { padding: 1rem 1.5rem; }

  .arch-flow { flex-direction: column; align-items: center; gap: 1.5rem; }
  .arch-connector {
    width: 1px; height: 40px; min-width: 1px;
    margin-top: 0;
  }
  .arch-connector::after {
    content: '\203A';
    transform: rotate(90deg);
    right: -6px; top: 14px;
  }

  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  main { padding: 0 1rem; }
  .header { padding: 1rem; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 1.5rem 1.2rem; }

  .hero h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .hero-tagline br { display: none; }

  .waitlist-form { flex-direction: column; }
  .waitlist-form button { width: 100%; }

  .terminal-line { font-size: 0.65rem; }
}

/* ── Utilities ───────────────────────────────────── */
::selection { background: var(--purple); color: var(--bg); }
