/* CodeSpark landing — single stylesheet, no framework. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0b0c10;
  --surface: #141620;
  --surface-2: #1c1f2b;
  --border: #2a2e3d;
  --text: #e8ebf0;
  --text-dim: #9aa0ac;
  --accent: #d4542a; /* terracotta — CodeSpark brand */
  --accent-hover: #e26a42;
  --accent-ink: #ffffff;
  --accent-soft: rgba(212, 84, 42, 0.12);
  --accent-link: #e06a42; /* brighter for inline body text contrast */
  --cream: #f5efe8;
  --cream-ink: #1a1a1a;
  --cream-dim: #4a4846;
  --ink-dark: #1a1a1a;
  --ok: #7ad27a;
  --warn: #ffb86b;
  --max-width: 1100px;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Brand lockup ─────────────────────────────────────────────────── */

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
  color: var(--text);
  line-height: 1;
}
.brand-logo svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.brand-logo .brand-spark {
  color: var(--accent);
}
.brand-logo:hover {
  text-decoration: none;
}

/* ── Header ───────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(11, 12, 16, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-dim);
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav a.nav-cta {
  color: var(--accent);
  font-weight: 500;
}
@media (max-width: 720px) {
  .nav {
    gap: 14px;
    font-size: 13px;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  padding: 96px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container {
  position: relative;
  z-index: 1;
}
.hero-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 32px;
  display: block;
  filter: drop-shadow(0 12px 32px rgba(212, 84, 42, 0.35));
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 700;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero .tagline {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto 36px;
}
.hero .cta-row {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-meta {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.hero-meta strong {
  color: var(--text);
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 80ms ease, background 150ms ease, border 150ms ease, box-shadow 150ms ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 22px rgba(212, 84, 42, 0.28);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 28px rgba(212, 84, 42, 0.38);
}
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text-dim);
}

/* ── Section scaffolding ──────────────────────────────────────────── */

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type {
  border-bottom: none;
}
.section h2,
.features h2,
.pricing h2,
.faq h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}
.section-intro {
  color: var(--text-dim);
  margin: 0 0 40px;
  max-width: 720px;
}
.section-intro.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ── Features ─────────────────────────────────────────────────────── */

.features {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 160ms ease, transform 160ms ease;
}
.feature:hover {
  border-color: rgba(212, 84, 42, 0.45);
  transform: translateY(-2px);
}
.feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.feature-head svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: 0 0 20px;
}
.feature h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ── Steps (Как работает) ─────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}
.step-placeholder {
  margin-top: 18px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Sparks explainer tiers (concentric-ring motif) ───────────────── */

.spark-tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
}
.spark-tier-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.spark-tier-rings {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.spark-tier h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.005em;
}
.spark-tier-multiplier {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.spark-tier p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ── Models grid ──────────────────────────────────────────────────── */

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.model-card-vendor {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.model-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}
.model-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}
.model-card-tag {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Pricing ──────────────────────────────────────────────────────── */

.pricing {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.tier--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 48px -24px var(--accent-soft);
  position: relative;
}
.tier--featured::after {
  content: "Популярный";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
}
.tier-name {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.tier-price {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.tier-price small {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 400;
}
.tier-tagline {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 14px;
}
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.tier li {
  font-size: 14.5px;
  padding: 6px 0;
  color: var(--text);
}
.tier li::before {
  content: '✓';
  color: var(--ok);
  margin-right: 8px;
  font-weight: 700;
}
.tier .btn {
  width: 100%;
  text-align: center;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */

.faq {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}
.faq-item p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}
.faq-item p + p {
  margin-top: 8px;
}

/* ── Cream band (for one editorial section) ───────────────────────── */

.cream-band {
  background: var(--cream);
  color: var(--cream-ink);
  border-bottom: 1px solid var(--border);
  padding: 88px 0;
}
.cream-band h2 {
  color: var(--cream-ink);
}
.cream-band .section-kicker {
  color: var(--accent);
}
.cream-band .section-intro,
.cream-band p {
  color: var(--cream-dim);
}
.cream-band .step {
  background: #ffffff;
  border-color: rgba(26, 26, 26, 0.08);
}
.cream-band .step h3 {
  color: var(--cream-ink);
}
.cream-band .step p {
  color: var(--cream-dim);
}
.cream-band .step::before {
  background: rgba(212, 84, 42, 0.14);
}
.cream-band .step-placeholder {
  background: #faf5ee;
  border-color: rgba(26, 26, 26, 0.12);
  color: var(--cream-dim);
}
.cream-band a {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer {
  padding: 56px 0 72px;
  color: var(--text-dim);
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.site-footer a {
  color: var(--text-dim);
}
.site-footer a:hover {
  color: var(--text);
}
.site-footer-col {
  min-width: 160px;
}
.site-footer-col h4 {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 600;
}
.site-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer-col li {
  padding: 3px 0;
}
.site-footer-brand {
  max-width: 260px;
}
.site-footer-brand p {
  margin: 10px 0 0;
  font-size: 13px;
}
.site-footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  font-size: 13px;
}

/* ── Legal / docs pages ───────────────────────────────────────────── */

.doc-page {
  padding: 56px 0 80px;
}
.doc-page h1 {
  font-size: clamp(30px, 3.5vw, 44px);
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.doc-page .doc-meta {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 32px;
}
.doc-page h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}
.doc-page h3 {
  font-size: 17px;
  margin: 26px 0 8px;
  font-weight: 600;
}
.doc-page p,
.doc-page li {
  color: var(--text);
  font-size: 15.5px;
}
.doc-page ul,
.doc-page ol {
  padding-left: 20px;
}
.doc-page .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 24px 0 36px;
}
.doc-page .toc h2 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.doc-page .toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 28px;
}
.doc-page .toc li {
  font-size: 14px;
  padding: 3px 0;
}

/* ── Legal TODO callout (visible until real requisites land) ──────── */

.legal-todo {
  background: rgba(255, 184, 107, 0.08);
  border: 1px dashed var(--warn);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--text);
}
.legal-todo strong {
  color: var(--warn);
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.legal-todo code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--warn);
  background: transparent;
  border: none;
  padding: 0;
}
.legal-requisites {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
}
.legal-requisites dt {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 10px;
}
.legal-requisites dt:first-child {
  margin-top: 0;
}
.legal-requisites dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 13.5px;
}

/* ── Misc ─────────────────────────────────────────────────────────── */

code,
kbd {
  font-family: var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}
pre code {
  background: none;
  border: none;
  padding: 0;
}

.not-found {
  text-align: center;
  padding: 140px 0;
}
.not-found h1 {
  font-size: 96px;
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.not-found p {
  color: var(--text-dim);
  margin-top: 12px;
}
