/* ============================================================
   Менторство по C++ — Денис Злобин
   Дизайн-токены и стили. Тёмная тема (единственная, осознанно).
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --surface: #141417;
  --surface-2: #1b1b20;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #ececf1;
  --text-2: #a5a5b1;
  --text-3: #71717d;

  --accent: #7aa5ff;

  --btn-bg: #f4f4f6;
  --btn-bg-hover: #ffffff;
  --btn-text: #0a0a0b;

  --radius: 14px;
  --radius-sm: 10px;

  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;

  --container: 1100px;
  --pad-x: 24px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(122, 165, 255, 0.28); }

img { max-width: 100%; display: block; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- типографика ---------- */

h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }

h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.section-lead {
  color: var(--text-2);
  max-width: 46em;
  margin-top: 16px;
}

.muted { color: var(--text-2); }
.mono { font-family: var(--font-mono); }

/* ---------- секции ---------- */

.section { padding: 104px 0; }
.section + .section { border-top: 1px solid var(--border); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.cta-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 12px;
}

/* ---------- шапка ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 0.25s ease;
}
.site-header.shown { transform: translateY(0); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.site-header .brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.site-header .brand:hover { text-decoration: none; }

.site-header .btn { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- hero ---------- */

.hero { padding: 120px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 20px; }

.hero .sub {
  color: var(--text-2);
  font-size: 1.1rem;
  max-width: 34em;
  margin-bottom: 32px;
}

/* карточка с кодом */
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.code-card .win {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.code-card .win span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.code-card pre { white-space: pre; }
.code-card .kw  { color: #c792ea; }
.code-card .ty  { color: var(--accent); }
.code-card .id  { color: var(--text); }
.code-card .cm  { color: #5f6b5f; }

/* полоса фактов (KPI-ряд hero) */
.stats {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats .stat {
  padding: 22px 20px;
  border-left: 1px solid var(--border);
}
.stats .stat:first-child { border-left: none; }
.stat .value {
  font-weight: 650;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}
.stat .label {
  color: var(--text-3);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* ---------- карточки ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--border-strong); }

.card .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  display: block;
  margin-bottom: 12px;
}

.card h3 { margin-bottom: 14px; }

.card ul { list-style: none; margin-top: 4px; }
.card ul li {
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
}
.card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-3);
}

.card .card-fact {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

/* сетка «почему это работает» */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.trio .card p { color: var(--text-2); font-size: 0.95rem; }

/* ---------- процесс ---------- */

.steps {
  list-style: none;
  margin-top: 48px;
  max-width: 46em;
}
.steps li {
  position: relative;
  padding: 0 0 40px 64px;
}
.steps li::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.steps li::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 48px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.steps li:last-child::after { display: none; }

.steps h3 { margin-bottom: 4px; font-size: 1.1rem; }
.steps .dur {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  display: block;
  margin-bottom: 10px;
}
.steps p { color: var(--text-2); }

/* ---------- обо мне ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-top: 44px;
  align-items: start;
}

.photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph-initials {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--text-3);
}

.about-facts { list-style: none; }
.about-facts li {
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  position: relative;
}
.about-facts li::before {
  content: "//";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.about-facts li strong { color: var(--text); font-weight: 600; }

.about-links { margin-top: 24px; display: flex; gap: 24px; flex-wrap: wrap; }
.about-links a { font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- результаты (KPI-ряд) ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.kpi .value {
  font-weight: 650;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  letter-spacing: -0.02em;
}
.kpi .label {
  color: var(--text-2);
  font-size: 0.88rem;
  margin-top: 6px;
  line-height: 1.45;
}

.reviews-title { margin-top: 56px; }

.reviews-frame {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: var(--radius);
  margin-top: 24px;
  background: var(--surface);
}

/* ---------- цена ---------- */

.price-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.price-card h3 { margin-bottom: 20px; }

.price-line { margin-bottom: 18px; }
.price-line .p-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  display: block;
  margin-bottom: 4px;
}
.price-line .p-value { font-weight: 650; font-size: 1.15rem; }
.price-line .p-detail { color: var(--text-2); font-size: 0.92rem; margin-top: 4px; }

.example {
  margin-top: auto;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-2);
}
.example strong { color: var(--text); font-weight: 600; }

.doc-link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.price-note {
  margin-top: 28px;
  color: var(--text-2);
  max-width: 46em;
}

/* ---------- кому не подойдёт ---------- */

.notfor { list-style: none; margin-top: 40px; max-width: 46em; }
.notfor li {
  padding: 18px 0 18px 30px;
  border-bottom: 1px solid var(--border);
  position: relative;
  color: var(--text-2);
}
.notfor li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-3);
}
.notfor li strong { color: var(--text); font-weight: 600; display: block; }

/* ---------- как проходит созвон ---------- */

.call-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
  counter-reset: call;
}
.call-steps .card { counter-increment: call; }
.call-steps .card::before {
  content: "0" counter(call);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.call-steps h3 { font-size: 1.05rem; margin-bottom: 10px; }
.call-steps p { color: var(--text-2); font-size: 0.95rem; }

/* ---------- FAQ ---------- */

.faq { margin-top: 44px; max-width: 46em; }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-3);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .faq-body { padding: 0 0 22px; color: var(--text-2); max-width: 44em; }
.faq .faq-body p + p { margin-top: 10px; }

/* ---------- финальный CTA ---------- */

.final { text-align: center; }
.final h2 { margin-bottom: 14px; }
.final p { color: var(--text-2); max-width: 36em; margin: 0 auto 32px; }

/* ---------- футер ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--text-3);
  font-size: 0.88rem;
}
.site-footer .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }

.site-footer .legal {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-3);
}
.site-footer .legal a { color: var(--text-3); }

/* ---------- sticky CTA (мобильный) ---------- */

.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: none;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-cta.shown { transform: translateY(0); }
.sticky-cta .btn { width: 100%; text-align: center; }

/* ---------- появление секций ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .site-header, .sticky-cta { transition: none; }
}

/* ============================================================
   Мобильная версия
   ============================================================ */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .code-card { display: none; } /* декор убираем: скорость и фокус на оффере */
  .trio, .call-steps { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .photo { max-width: 300px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 96px 0 48px; }
  .cards, .price-cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat { border-left: none; border-top: 1px solid var(--border); }
  .stats .stat:nth-child(-n+2) { border-top: none; }
  .stats .stat:nth-child(even) { border-left: 1px solid var(--border); }
  .sticky-cta { display: block; }
  .site-footer { padding-bottom: 110px; } /* место под sticky-CTA */
  .btn { width: 100%; text-align: center; }
  .site-header .btn { width: auto; }
}

@media (max-width: 420px) {
  .kpi-row { grid-template-columns: 1fr; }
}
