:root {
  --bg-base: #fbfbfe;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --brand-dark: #121417;
  --brand-glow-sky: #cfe6ff;
  --brand-glow-lavender: #ece2fe;
  --brand-glow-blush: #fde5e8;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  --card-bg: rgba(255, 255, 255, 0.90);
  --card-border: rgba(226, 232, 240, 0.85);
  --card-shadow: 0 24px 48px -12px rgba(100, 116, 139, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.7);

  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
}

.aurora-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1020px;
  background:
    radial-gradient(circle at 50% -8%, var(--brand-glow-sky) 0%, transparent 48%),
    radial-gradient(circle at 14% 18%, var(--brand-glow-lavender) 0%, transparent 42%),
    radial-gradient(circle at 86% 16%, var(--brand-glow-blush) 0%, transparent 42%);
  opacity: 0.9;
  z-index: -1;
  pointer-events: none;
  filter: blur(48px);
}

/* NAVBAR */
.nav-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0 20px;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.nav-wrapper.nav-hidden {
  transform: translateY(-140%);
  opacity: 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 920px;
  padding: 8px 12px 8px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.7);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 15px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-nav-enterprise {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-nav-enterprise:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.nav-cta {
  background: var(--brand-dark);
  color: white;
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cta:hover {
  background: #27272a;
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .desktop-only { display: none; }
}

/* HERO */
.hero {
  padding: 150px 20px 45px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(238, 242, 255, 0.8);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.7);
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.8vw, 28px);
  font-style: italic;
  font-weight: 400;
  color: #334155;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-github-primary {
  background: var(--brand-dark);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 24px -6px rgba(18, 19, 22, 0.22);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn-github-primary:hover {
  background: #27272a;
  transform: translateY(-1px);
}

.btn-scroll-sim {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(203, 213, 225, 0.9);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.btn-scroll-sim:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.install-pill {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.install-pill:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.prompt-sym { color: #94a3b8; user-select: none; }
.copy-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-sans);
}

/* SIMULATOR */
.sim-section {
  max-width: 1060px;
  margin: 30px auto 90px;
  padding: 0 20px;
}

.sim-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.sim-toolbar {
  padding: 12px 20px;
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sim-tabs-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-tab {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.sim-tab.active {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.sim-body-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  min-height: 440px;
  position: relative;
}

@media (max-width: 860px) {
  .sim-body-grid { grid-template-columns: 1fr; }
}

.editor-pane {
  padding: 24px;
  background: rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-gutter-line { display: flex; gap: 18px; }
.line-no { color: #cbd5e1; user-select: none; text-align: right; width: 20px; flex-shrink: 0; }
.line-text { white-space: pre; }
.kwd { color: #7c3aed; font-weight: 600; }
.prop { color: #0284c7; }
.str { color: #059669; }
.cmt { color: #94a3b8; font-style: italic; }
.val { color: #d97706; }
.line-drift-alert {
  background: rgba(244, 63, 94, 0.12);
  border-radius: 4px;
  padding: 0 4px;
  border: 1px dashed rgba(244, 63, 94, 0.4);
}

.terminal-container {
  position: relative;
  background: #0b0f19;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
}

.terminal-pane {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.terminal-pane.blurred {
  filter: blur(10px);
  user-select: none;
  pointer-events: none;
}

.terminal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: rgba(11, 15, 25, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  text-align: center;
}

.terminal-overlay.hidden { display: none; }

.btn-run-centered {
  background: #ffffff;
  color: #0b0f19;
  border: none;
  padding: 16px 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.overlay-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.5;
}

.term-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 16px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.term-status-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}

.status-blocked { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-passed { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.term-logs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  line-height: 1.6;
}

.log-entry { display: flex; gap: 8px; }
.log-dim { color: #64748b; }
.log-err { color: #ef4444; font-weight: 600; }
.log-ok { color: #10b981; font-weight: 600; }

.term-action-box {
  margin-top: 16px;
  padding: 14px;
  background: #131b2e;
  border-radius: 10px;
  border-left: 3px solid #f43f5e;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-action-box.box-passed { border-left-color: #10b981; }

.btn-fix-action {
  background: #38bdf8;
  color: #0b0f19;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-reset-sim {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  align-self: center;
  margin-top: 4px;
}

/* ==========================================================================
   EDITIONS SECTION (COMMUNITY VS ENTERPRISE)
   ========================================================================== */
.editions-section {
  max-width: 1060px;
  margin: 60px auto 100px;
  padding: 0 20px;
}

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

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.editions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

@media (max-width: 820px) {
  .editions-grid { grid-template-columns: 1fr; }
}

.edition-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.edition-card.edition-featured {
  border-color: var(--primary-border);
  background:
    radial-gradient(circle at 90% 10%, rgba(238, 242, 254, 0.8) 0%, transparent 60%),
    rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 60px -12px rgba(79, 70, 229, 0.14), 0 0 0 1px rgba(199, 210, 254, 0.8);
}

.edition-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 999px;
  margin-bottom: 16px;
}

.edition-badge.badge-enterprise {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.edition-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.edition-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 40px;
}

.edition-price {
  margin: 20px 0 24px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.price-val {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.price-term {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.edition-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 32px;
  flex: 1;
}

.edition-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.check-icon {
  width: 17px;
  height: 17px;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

.check-icon.text-indigo {
  color: var(--primary);
}

.btn-edition {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  display: inline-block;
}

.btn-edition-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid rgba(203, 213, 225, 0.9);
}

.btn-edition-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn-edition-primary {
  background: var(--brand-dark);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px -4px rgba(18, 20, 23, 0.25);
}

.btn-edition-primary:hover {
  background: #27272a;
  transform: translateY(-1px);
}

/* Feature Comparison Table */
.matrix-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.matrix-table th {
  padding: 10px 14px;
  border-bottom: 1px solid #cbd5e1;
  font-weight: 700;
  color: var(--text-main);
}

.matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  color: #334155;
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.text-center { text-align: center; }
.text-bold { font-weight: 700; }
.text-indigo { color: var(--primary); }

/* ENTERPRISE CONTACT MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 100%;
  max-width: 580px;
  padding: 30px 32px;
  box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.25);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-close-modal:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.modal-body-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-input, .modal-select, .modal-textarea {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input:focus, .modal-select:focus, .modal-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modal-textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid transparent;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}

.btn-cancel:hover { background: #f1f5f9; }

.btn-submit-enterprise {
  background: var(--brand-dark);
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(18, 20, 23, 0.2);
  transition: all 0.15s ease;
}

.btn-submit-enterprise:hover { background: #27272a; }

.modal-success-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 10px;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid #a7f3d0;
}

/* ARTICLES LIST */
.articles-grid {
  max-width: 900px;
  margin: 20px auto 80px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-row-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: 0 8px 24px -6px rgba(100, 116, 139, 0.06);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.article-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
  display: inline-block;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.article-snippet {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-meta {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-subtle);
  display: flex;
  gap: 16px;
}

/* FOOTER */
footer {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 44px 20px 36px;
  background: rgba(255, 255, 255, 0.7);
}

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