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

:root {
  --bg:        #0a0d14;
  --bg2:       #0f1320;
  --bg3:       #141928;
  --border:    rgba(255,255,255,0.08);
  --blue:      #3b82f6;
  --blue-light:#60a5fa;
  --blue-dim:  rgba(59,130,246,0.12);
  --green:     #22c55e;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --text-dim:  #525f70;
  --radius:    12px;
  --radius-sm: 8px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

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

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 600;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  transition: opacity 0.15s !important;
}

.nav-cta:hover { opacity: 0.88 !important; }

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 24px 16px;
}

.nav-mobile a {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child { border-bottom: none; color: var(--blue); font-weight: 600; }
.nav-mobile.open { display: flex; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-full { width: 100%; }

/* ── Section labels & headers ─────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-light);
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.25);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 40px;
  gap: 32px;
}

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

.stat-n {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-light);
  letter-spacing: -0.03em;
}

.stat-l {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── Problem ──────────────────────────────────────────────────────────────── */
.problem {
  padding: 100px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.problem-text h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
}

.problem-text p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.7;
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.problem-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* ── Features ─────────────────────────────────────────────────────────────── */
.features {
  padding: 100px 0;
}

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

.feature-card {
  background: var(--bg2);
  padding: 32px;
  transition: background 0.2s;
  position: relative;
}

.feature-card:hover { background: var(--bg3); }

.feature-card--wide {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg2) 0%, rgba(59,130,246,0.06) 100%);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
}

.feature-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-light);
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

/* ── Deployment ───────────────────────────────────────────────────────────── */
.deployment {
  padding: 100px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.deploy-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: border-color 0.2s;
}

.deploy-card:hover { border-color: rgba(59,130,246,0.3); }

.deploy-card--featured {
  border-color: rgba(59,130,246,0.4);
  background: linear-gradient(135deg, var(--bg3) 0%, rgba(59,130,246,0.08) 100%);
}

.deploy-badge {
  position: absolute;
  top: -1px; right: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--blue);
  color: #fff;
  padding: 3px 10px;
  border-radius: 0 0 6px 6px;
}

.deploy-icon {
  margin-bottom: 20px;
}

.deploy-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.deploy-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.deploy-cmd {
  display: block;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  color: var(--blue-light);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  padding: 8px 12px;
  border-radius: 6px;
}

.deploy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.deploy-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing {
  padding: 100px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pricing-card--addon {
  background: var(--bg3);
  border-color: var(--border);
}

.pricing-card--future {
  opacity: 0.7;
}

.pricing-tier {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 6px;
}

.pricing-desc {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.pricing-price span {
  font-size: 11px;
}

.pricing-coming {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 1px;
}

.pricing-trial {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
}

.pricing-trial strong { color: var(--green); }

/* ── Self-hosted ──────────────────────────────────────────────────────────── */
.self-hosted {
  padding: 60px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.self-hosted-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.self-hosted-inner h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.self-hosted-inner p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.6;
}

/* ── Signup ───────────────────────────────────────────────────────────────── */
.signup {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.signup::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at 50% 100%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.signup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.signup-text h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
}

.signup-text p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

.signup-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.signup-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  width: 100%;
}

.form-group input::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group select:focus { border-color: var(--blue); }

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892a4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-legal {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}

.form-success {
  text-align: center;
  padding: 20px 0;
}

.form-success svg { margin: 0 auto 16px; }

.form-success h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.form-success p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 260px;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-column: span 2; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .deploy-grid { grid-template-columns: 1fr 1fr; }
  .deploy-grid .deploy-card:last-child { grid-column: span 2; }
  .problem-inner { grid-template-columns: 1fr; gap: 40px; }
  .signup-inner { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 660px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .deploy-grid { grid-template-columns: 1fr; }
  .deploy-grid .deploy-card:last-child { grid-column: span 1; }
  .hero-stats { gap: 20px; padding: 16px 24px; }
  .footer-links { gap: 32px; }
  .footer-inner { flex-direction: column; }
  .self-hosted-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .signup-form-wrap { padding: 24px; }
}
