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

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #161618;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #58a6ff;
  --accent-2: #a371f7;
  --accent-3: #f778ba;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(88, 166, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(163, 113, 247, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(247, 120, 186, 0.08), transparent),
    var(--bg);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.9em;
  padding: 0.15em 0.45em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand img {
  border-radius: 6px;
}

.nav-links {
  display: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 24px rgba(88, 166, 255, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 32px rgba(88, 166, 255, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem) 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
}

/* Preview mock */
.hero-preview {
  perspective: 1200px;
}

.preview-window {
  max-width: 880px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(88, 166, 255, 0.08);
  overflow: hidden;
  transform: rotateX(4deg);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: rotateX(4deg) translateY(0);
  }
  50% {
    transform: rotateX(2deg) translateY(-8px);
  }
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}
.dot.yellow {
  background: #febc2e;
}
.dot.green {
  background: #28c840;
}

.preview-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 280px;
  text-align: left;
}

.preview-sidebar {
  padding: 12px 8px;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.preview-item {
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: 8px;
  margin-bottom: 4px;
}

.preview-item.active {
  color: var(--text);
  background: rgba(88, 166, 255, 0.12);
}

.preview-main {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-msg {
  font-size: 0.7rem;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 85%;
}

.preview-msg.user {
  align-self: flex-end;
  background: rgba(88, 166, 255, 0.15);
  color: var(--text-secondary);
}

.preview-msg.ai {
  position: relative;
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.preview-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0.12;
  z-index: -1;
  filter: blur(8px);
}

.preview-editor {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  padding: 10px 12px;
  background: #0d1117;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.line-num {
  color: var(--text-muted);
  margin-right: 8px;
  user-select: none;
}

.code-kw {
  color: #ff7b72;
}

@media (max-width: 640px) {
  .preview-body {
    grid-template-columns: 1fr;
  }
  .preview-sidebar {
    display: none;
  }
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 4vw, 3rem);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
}

.grid.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Modes */
.mode-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.mode-card {
  padding: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.mode-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.mode-tag.learn {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
}
.mode-tag.fix {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}
.mode-tag.vibe {
  background: rgba(163, 113, 247, 0.15);
  color: var(--accent-2);
}

.mode-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.mode-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* CTA */
.cta-box {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 80px rgba(88, 166, 255, 0.06);
}

.cta-logo {
  margin-bottom: 1.25rem;
  border-radius: 10px;
}

.cta-box h2 {
  margin-bottom: 0.75rem;
}

.cta-box > p {
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 1.5rem;
  font-size: 0.9375rem;
}

.cta-hint {
  margin-top: 1.25rem !important;
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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