:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #283548;
  --border-color: #334155;
  --accent-green: #22c55e;
  --accent-green-hover: #16a34a;
  --accent-gold: #f59e0b;
  --accent-blue: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --board-light: #f0d9b5;
  --board-dark: #b58863;
  --board-highlight: #baca44;
  --board-target: #f7ec59;
  --board-danger: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav & Validation Banner */
.top-banner {
  background: linear-gradient(90deg, #1e3a8a 0%, #1e1b4b 100%);
  border-bottom: 1px solid #3b82f6;
  font-size: 0.85rem;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-banner .badge {
  background: #2563eb;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon {
  font-size: 1.6rem;
  line-height: 1;
}

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

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

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

/* Buttons */
.btn-primary {
  background-color: var(--accent-green);
  color: #064e3b;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #475569;
}

.btn-secondary-sm {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary-sm:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.12) 0%, rgba(15, 23, 42, 0) 70%);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.social-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.social-pill {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 100px;
}

/* Interactive Demo / Chess Board Section */
.demo-section {
  padding: 56px 0 64px;
  background-color: #0b1120;
}

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

.section-tag {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.puzzle-interactive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.puzzle-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.puzzle-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.puzzle-tab-btn {
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.puzzle-tab-btn.active {
  background: var(--accent-green);
  color: #064e3b;
  border-color: var(--accent-green);
}

.puzzle-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 32px;
  align-items: start;
}

/* Chessboard Rendering */
.board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chessboard {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border: 4px solid #1e1b4b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  user-select: none;
  overflow: hidden;
}

.square {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.1rem;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease;
}

.square.light {
  background-color: var(--board-light);
}

.square.dark {
  background-color: var(--board-dark);
}

.square.selected {
  background-color: var(--board-highlight) !important;
}

.square.dest-target::after {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.7);
  position: absolute;
}

.board-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.puzzle-info-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.puzzle-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-pill {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.meta-elo {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.puzzle-prompt-box h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feedback-card {
  padding: 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  display: none;
}

.feedback-card.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--accent-green);
  color: #86efac;
}

.feedback-card.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--board-danger);
  color: #fca5a5;
}

/* Features Grid */
.features-section {
  padding: 64px 0;
}

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

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

.feature-card:hover {
  transform: translateY(-3px);
  border-color: #475569;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card .tagline {
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 10px;
}

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

/* Problem / Solution Comparison */
.comparison-section {
  padding: 64px 0;
  background: #0b1120;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px;
}

.comp-card.negative {
  border-top: 4px solid #ef4444;
}

.comp-card.positive {
  border-top: 4px solid var(--accent-green);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-card) 100%);
}

.comp-item {
  margin-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.comp-item .aspect {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.comp-item .desc {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Competitor Matrix Table */
.matrix-section {
  padding: 64px 0;
}

.matrix-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

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

table.matrix-table th, table.matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

table.matrix-table th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  color: var(--text-muted);
}

table.matrix-table tr.highlight-row {
  background: rgba(34, 197, 94, 0.08);
}

table.matrix-table tr.highlight-row td {
  font-weight: 600;
  color: #fff;
}

/* Dedicated Pricing Section & Toggle */
.pricing-section {
  padding: 72px 0;
  background: #0b1120;
}

.pricing-toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.pricing-toggle-wrap {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
}

.pricing-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pricing-toggle-btn.active {
  background: var(--accent-green);
  color: #064e3b;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.pricing-save-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card.featured {
  border: 2px solid var(--accent-green);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, var(--bg-card) 100%);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.15);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.card-top-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: #064e3b;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 48px;
  margin-bottom: 16px;
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.price-strike {
  color: var(--text-muted);
  font-size: 1.1rem;
  text-decoration: line-through;
}

.price-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.price-unit {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  flex-grow: 1;
}

.pricing-features li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

/* 4-Phase Curriculum */
.curriculum-section {
  padding: 64px 0;
}

.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.curriculum-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phase-tag {
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.curriculum-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.curriculum-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.module-list {
  list-style: none;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.module-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.module-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

.phase-outcome {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #38bdf8;
  border-left: 2px solid #38bdf8;
}

/* ICP Quiz Section */
.quiz-section {
  padding: 64px 0;
  background: #0b1120;
}

.quiz-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f1f5f9;
}

.form-control {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.quiz-result-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: none;
}

.quiz-result-box.show {
  display: block;
}

/* Waitlist Form Section */
.waitlist-section {
  padding: 80px 0;
  text-align: center;
}

.waitlist-card {
  max-width: 640px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  border-radius: 16px;
  padding: 36px;
  text-align: left;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.waitlist-card h2 {
  font-size: 1.85rem;
  margin-bottom: 8px;
}

.waitlist-card p.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Modal Dossier */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
}

.modal-tab-btn.active {
  background: #1e293b;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  font-size: 0.95rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.tab-pane {
  display: none;
}

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

.json-pre {
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  font-family: monospace;
  font-size: 0.82rem;
  color: #93c5fd;
  overflow-x: auto;
  max-height: 380px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .hero h1 {
    font-size: 2.1rem;
  }
  .puzzle-layout {
    grid-template-columns: 1fr;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
