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

:root {
  --bg:        #0f1117;
  --bg2:       #161b27;
  --surface:   #1c2133;
  --surface2:  #222840;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.12);
  --accent:    #7c6af7;
  --accent2:   #a855f7;
  --accent3:   #06b6d4;
  --text:      #f0f2f8;
  --text2:     #c8cde0;
  --muted:     #6b7494;
  --muted2:    #9aa0bc;
  --green:     #34d399;
  --yellow:    #fbbf24;
  --radius:    10px;
  --font:      'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 16px rgba(124,106,247,0.3);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,106,247,0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: var(--border2);
}

.btn-lg { padding: 13px 30px; font-size: 15px; border-radius: 12px; }

/* ── Nav ──────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 48px;
  background: rgba(15,17,23,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo { display: flex; align-items: center; }

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

.nav-links a {
  color: var(--muted2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }

a.nav-btn-dashboard {
  display: inline-block;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 2px 12px rgba(124,106,247,0.3);
}
a.nav-btn-dashboard:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0 48px 0;
}

.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.orb-1 {
  width: 700px; height: 700px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(124,106,247,0.18) 0%, transparent 70%);
}
.orb-2 {
  width: 500px; height: 500px;
  top: -100px; right: -50px;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
}
.orb-3 {
  width: 400px; height: 400px;
  bottom: -100px; left: 30%;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0 64px;
}

.hero-content { display: flex; flex-direction: column; gap: 0; }

/* ── Badge ────────────────────────────────────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  gap: 7px;
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(52,211,153,0); }
}

h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 40%, #c084fc 70%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted2);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

/* ── Social proof ─────────────────────────────────────── */
.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-avatars { display: flex; }

.sp-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}
.sp-av:first-child { margin-left: 0; }

.sp-text {
  font-size: 13px;
  color: var(--muted2);
}

/* ── IDE Mockup ───────────────────────────────────────── */
.mockup {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28ca41; }

.mockup-url {
  margin-left: 10px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 3px 14px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
  font-family: monospace;
}

/* ── IDE body: sidebar + editor + chat ─────────────────── */
.mockup-body {
  display: grid;
  grid-template-columns: 90px 1fr 150px;
  height: 320px;
  font-size: 11px;
  font-family: monospace;
}

/* ── Mock sidebar ──────────────────────────────────────── */
.mock-sidebar {
  border-right: 1px solid var(--border);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255,255,255,0.01);
}

.mock-sidebar-section { padding: 0 8px; }

.mock-sidebar-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  padding: 0 2px;
}

.mock-file {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted2);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-file.active {
  background: rgba(124,106,247,0.15);
  color: var(--accent);
}
.mock-file svg { flex-shrink: 0; }

.mock-stack-badge {
  display: inline-block;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(6,182,212,0.1);
  color: var(--accent3);
  border: 1px solid rgba(6,182,212,0.2);
  margin-bottom: 3px;
  font-family: var(--font);
}

/* ── Mock editor + terminal ────────────────────────────── */
.mock-editor-area {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.mock-editor {
  flex: 1;
  padding: 12px;
  overflow: hidden;
}

.mock-code {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-line {
  display: block;
  font-size: 10.5px;
  color: var(--text2);
  line-height: 1.6;
  white-space: nowrap;
}

.mc-kw  { color: #c084fc; }
.mc-fn  { color: #60a5fa; }
.mc-cm  { color: var(--muted); font-style: italic; }

.mock-terminal {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}

.mock-term-bar {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
}

.mock-term-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mock-term-line { font-size: 10px; color: var(--muted2); }
.term-prompt { color: var(--accent); margin-right: 5px; }
.term-success { color: var(--green); }
.term-muted { color: var(--muted); }

.mock-term-cursor {
  color: var(--accent);
  animation: blink-cursor 1s step-end infinite;
  font-size: 10px;
}
@keyframes blink-cursor { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Mock chat ─────────────────────────────────────────── */
.mock-chat {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.01);
}

.mock-chat-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.mock-chat-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  font-family: var(--font);
}

.mock-chisel-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.mock-chat-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.mock-msg {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.5;
  font-family: var(--font);
}

.mock-msg.user {
  background: rgba(124,106,247,0.15);
  color: var(--text2);
  border: 1px solid rgba(124,106,247,0.2);
  align-self: flex-end;
  max-width: 90%;
}

.mock-msg.assistant {
  background: rgba(255,255,255,0.04);
  color: var(--text2);
  border: 1px solid var(--border);
}

.mock-msg code {
  background: rgba(124,106,247,0.15);
  color: #a78bfa;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9.5px;
}

.mock-msg-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
}

.mock-action {
  font-size: 9px;
  color: var(--green);
}

.mock-typing {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 4px 0;
}
.mock-typing span {
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: dot-bounce 1.4s infinite;
}
.mock-typing span:nth-child(2) { animation-delay: 0.2s; }
.mock-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce { 0%,80%,100%{opacity:0.2;transform:scale(0.8)} 40%{opacity:1;transform:scale(1)} }

/* ── Stats bar ────────────────────────────────────────── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 48px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 48px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted2);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Features ─────────────────────────────────────────── */
.features {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.features h2, .how-it-works h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-sub {
  color: var(--muted2);
  font-size: 17px;
  margin-bottom: 52px;
  max-width: 540px;
}

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

/* wide card spans 2 columns */
.feature-card--wide {
  grid-column: span 2;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(124,106,247,0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(124,106,247,0.1);
}

.feature-card-inner { display: flex; flex-direction: column; gap: 0; }

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,106,247,0.2) 0%, rgba(168,85,247,0.1) 100%);
  border: 1px solid rgba(124,106,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

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

/* ── Feature visual: chat preview ──────────────────────── */
.feature-visual.fv-chat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fv-msg {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.fv-msg--user {
  background: rgba(124,106,247,0.15);
  border: 1px solid rgba(124,106,247,0.25);
  color: var(--text2);
  align-self: flex-end;
  max-width: 85%;
}

.fv-msg--ai {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fv-action {
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── How it works ─────────────────────────────────────── */
.how-it-works {
  padding: 80px 48px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-it-works > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.how-it-works h2 { margin-bottom: 52px; }

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  padding: 0 32px;
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num::after {
  content: '';
  display: block;
  height: 1px;
  width: 24px;
  background: rgba(124,106,247,0.3);
}

.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.step p  { font-size: 14px; color: var(--muted2); line-height: 1.65; }

.step-arrow {
  color: var(--muted);
  font-size: 22px;
  padding-top: 8px;
  flex-shrink: 0;
}

/* ── CTA band ─────────────────────────────────────────── */
.cta-band {
  position: relative;
  padding: 120px 48px;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.cta-orb-1 {
  width: 600px; height: 400px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(124,106,247,0.2) 0%, transparent 70%);
}
.cta-orb-2 {
  width: 300px; height: 300px;
  bottom: -50px; right: 10%;
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.cta-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124,106,247,0.1);
  border: 1px solid rgba(124,106,247,0.2);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.cta-band h2 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.cta-band p {
  color: var(--muted2);
  margin-bottom: 32px;
  font-size: 17px;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  padding: 28px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
}
.footer-logo { display: flex; align-items: center; }
.footer-note { font-size: 12px; color: var(--muted); }

/* ── Auth Modal ───────────────────────────────────────── */
#auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#auth-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px;
  width: 420px;
  max-width: 95vw;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,106,247,0.1);
}

#auth-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.1s, background 0.1s;
}
#auth-close:hover { color: var(--text); background: var(--surface2); }

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-tagline {
  text-align: center;
  color: var(--muted2);
  font-size: 15px;
  margin-bottom: 24px;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 600;
  margin-bottom: -4px;
}

.auth-form input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,106,247,0.15);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
}

.auth-error {
  font-size: 12px;
  color: #f87171;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: #fff;
  color: #1f2937;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.google-btn:hover {
  background: #f3f4f6;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 0 40px; gap: 40px; }
  .mockup { display: none; }
  h1 { font-size: 38px; letter-spacing: -1px; }
  .features { padding: 60px 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; grid-template-columns: 1fr; }
  .feature-visual { display: none; }
  .how-it-works { padding: 60px 24px; }
  .steps { flex-direction: column; gap: 32px; }
  .step-arrow { transform: rotate(90deg); align-self: center; }
  .step { padding: 0; }
  .cta-band { padding: 80px 24px; }
  .cta-band h2 { font-size: 32px; }
  footer { padding: 24px; }
  nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .stats-bar { padding: 20px 24px; flex-wrap: wrap; gap: 16px; }
  .stat-item { padding: 0 16px; }
  .stat-divider { display: none; }
  .hero { padding: 0 24px; }
}
