:root {
  --bg: #0b1020;
  --bg-alt: #070b12;
  --card: #141b2f;
  --card-hover: #1a2332;
  --border: #24304f;
  --text: #e8ecf8;
  --muted: #9aa6c2;
  --accent: #5b8cff;
  --accent2: #2dd4bf;
  --accent-dim: #3b5bdb;
  --green: #22c55e;
  --gold: #f59e0b;
  --radius: 0.75rem;
  --font: "Segoe UI", "DM Sans", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

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

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

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* —— Hero (SAT-style shell + leads gradient) —— */
.hero {
  padding: 2rem clamp(1rem, 4vw, 4rem) 4rem;
  background: radial-gradient(circle at top right, #1a2850 0%, var(--bg) 55%);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

nav strong, .nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-right: auto;
}

nav a, .nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1100px;
}

@media (max-width: 860px) {
  .hero-layout { grid-template-columns: 1fr; }
  nav a:not(.btn) { display: none; }
}

.hero-copy { max-width: 52rem; }

.eyebrow {
  color: var(--accent2);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.lead, .hero-copy > p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 38rem;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.hero-stats strong {
  display: block;
  font-size: 1.65rem;
  color: var(--accent2);
}

.hero-stats span { font-size: 0.78rem; color: var(--muted); }

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.code-preview {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #a5d4ff;
  overflow-x: auto;
  white-space: pre;
}

.code-caption {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Buttons (TUCE gradient) —— */
.btn {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.btn-block { display: block; width: 100%; margin-bottom: 0.75rem; }

button.btn, form button[type="submit"] {
  font-family: inherit;
}

/* —— Grid sections (SAT-style) —— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.grid article, .card, .feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.grid article h2, .grid article h3, .card h3, .feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.grid article p, .card p, .feature p {
  color: var(--muted);
  font-size: 0.92rem;
}

.card code, .feature code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
}

.section-head {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 4rem) 0;
}

.section-head h2 { font-size: 1.65rem; margin-bottom: 0.35rem; }
.section-head p { color: var(--muted); }

.section-alt {
  background: linear-gradient(180deg, #0d1324 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* —— Algorithm columns —— */
.algo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem clamp(1rem, 4vw, 4rem) 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.algo-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.algo-col h4 {
  color: var(--accent2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.algo-col ul { list-style: none; }
.algo-col li {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid #1f2a44;
}

.algo-col li::before { content: "→ "; color: var(--accent); }

/* —— Pricing (leads plan-grid) —— */
.pricing-wrap {
  padding: 0 clamp(1rem, 4vw, 4rem) 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.15s;
  cursor: default;
}

.price-card:hover, .price-card.featured {
  border-color: var(--accent);
}

.price-card.featured {
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.35);
}

.price-card .badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  background: linear-gradient(135deg, var(--accent2), #14b8a6);
  color: #04221e;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.price-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.price-card .amount { font-size: 2rem; font-weight: 700; margin: 0.4rem 0; }
.price-card .amount span { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.price-card .desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.price-card ul { list-style: none; margin: 0 0 1.25rem; }
.price-card li { font-size: 0.86rem; color: var(--muted); padding: 0.28rem 0; }
.price-card li::before { content: "✓ "; color: var(--green); }

/* —— Checkout panel (SAT proposal style) —— */
.checkout-form, .proposal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 36rem;
  margin: 2rem auto 0;
}

.checkout-form h3, .proposal h2 { margin-bottom: 0.5rem; }

form { display: grid; gap: 0.75rem; }

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input, select, textarea {
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid #2a3858;
  background: #0f1528;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

button[type="submit"] {
  width: fit-content;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 0.45rem;
  background: var(--accent2);
  color: #04221e;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.checkout-form button[type="submit"] { width: 100%; }

/* —— FAQ —— */
.faq {
  padding: 2rem clamp(1rem, 4vw, 4rem) 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq h2 { font-size: 1.5rem; margin-bottom: 1rem; }

details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin-top: 0.5rem; font-size: 0.92rem; }

/* —— Footer (SAT-style) —— */
footer, .site-footer {
  padding: 2rem clamp(1rem, 4vw, 4rem);
  color: var(--muted);
  border-top: 1px solid #1f2a44;
  text-align: center;
}

.fine { font-size: 0.8rem; margin-top: 0.5rem; }

.status { margin-top: 0.5rem; font-size: 0.9rem; }
.status.success { color: var(--accent2); font-weight: 600; }
.status.error { color: #f87171; }

/* —— Success page —— */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, #1a2850, var(--bg));
}

.success-card {
  max-width: 480px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}

.success-icon {
  width: 56px;
  height: 56px;
  line-height: 56px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent2);
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.license-key {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  background: #0f1528;
  padding: 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  margin: 0.5rem 0 1rem;
  word-break: break-all;
}

.tier-badge { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.download-list { text-align: left; }
