/* ── Design Tokens ─────────────────────────────── */
:root {
  --bg-deep: #020617;
  --bg-base: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border: #334155;
  --border-subtle: #1e293b;

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dim: #065f46;
  --accent-glow: rgba(16, 185, 129, 0.15);

  --danger: #ef4444;
  --warning: #f59e0b;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Typography ───────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

/* ── Layout ───────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* ── Navigation ───────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

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

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

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg-deep) !important;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--accent-light);
  color: var(--bg-deep) !important;
  transform: translateY(-1px);
}

.nav-cta svg {
  width: 18px;
  height: 18px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  position: relative;
  padding: 180px 0 120px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: heroPulse 6s ease-in-out infinite;
}

@keyframes heroPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.hero h1 {
  position: relative;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #6ee7b7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  border-color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.btn-primary svg,
.btn-secondary svg {
  width: 20px;
  height: 20px;
}

/* Hero screenshot */
.hero-screenshot {
  position: relative;
  max-width: 900px;
  margin: 64px auto 0;
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.hero-screenshot img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 120px var(--accent-glow);
}

/* ── Tiny Stats Row ───────────────────────────── */
.tiny-stats {
  padding: 40px 0 0;
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.tiny-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.tiny-stat {
  text-align: center;
}

.tiny-stat .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.tiny-stat .value .accent {
  color: var(--accent);
}

.tiny-stat .label {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* ── Section Headers ──────────────────────────── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-header .overline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 12px;
}

/* ── Feature Cards ────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card>* {
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Lightweight Section ──────────────────────── */
.lightweight {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.lightweight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.lightweight-content h2 {
  margin-bottom: 16px;
}

.lightweight-content>p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.lightweight-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lw-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
}

.lw-stat:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.lw-stat .big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.lw-stat .desc {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.lightweight-visual {
  position: relative;
}

.pi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pi-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.pi-emoji {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}

.pi-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.pi-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.comparison {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.comparison-row:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-row .name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comparison-row .size {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.comparison-row .size.green {
  color: var(--accent);
}

.comparison-row .size.red {
  color: var(--text-subtle);
}

/* ── Architecture / Differentiators ───────────── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, border-color 0.25s;
}

.diff-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.25);
}

.diff-card .icon {
  font-size: 1.75rem;
  margin-bottom: 16px;
  display: block;
}

.diff-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.diff-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Quick Start ──────────────────────────────── */
.quickstart {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.quickstart-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.quickstart-tab {
  padding: 10px 24px;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.quickstart-tab.active {
  background: var(--accent);
  color: var(--bg-deep);
}

.quickstart-tab:hover:not(.active) {
  color: var(--text);
}

.code-block {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.code-block-dots {
  display: flex;
  gap: 8px;
}

.code-block-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.code-block-dots span:nth-child(1) {
  background: #ef4444;
}

.code-block-dots span:nth-child(2) {
  background: #f59e0b;
}

.code-block-dots span:nth-child(3) {
  background: #22c55e;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

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

.code-block pre {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}

.code-block code {
  font-family: inherit;
}

.code-block .comment {
  color: var(--text-subtle);
}

.code-block .command {
  color: var(--accent);
}

.code-block .string {
  color: #fbbf24;
}

.code-block .flag {
  color: #94a3b8;
}

/* Tab content visibility */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── Footer ───────────────────────────────────── */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 24px;
  width: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

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

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

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

/* ── Animations ───────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .lightweight-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .lightweight-visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .lightweight-stats {
    grid-template-columns: 1fr;
  }

  .diff-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .tiny-stats-inner {
    gap: 32px;
  }

  .hero-screenshot {
    margin: 48px -12px 0;
  }

  .hero-screenshot img {
    border-radius: 12px;
  }

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