/* StartKlar — той самий світ, що в листках і каруселях:
   карійований папір, чорнило, червона вчительська ручка.
   Розмітка не змінювалася, перевдягнені тільки стилі. */

@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap");

:root {
  --paper: #f6f7f4;
  --grid: #dbe3df;
  --grid2: #c9d5d0;
  --ink: #11171a;
  --ink-soft: #5f6b68;
  --ink-faint: #8c9794;
  --pen: #d8362a;
  --pen-dark: #b32a20;
  --ok: #0e7c66;
  --card: #ffffff;
  --line: #e2e6e1;
  --radius: 4px;
  --shadow: 0 2px 0 rgba(17, 23, 26, 0.05), 0 18px 40px -28px rgba(17, 23, 26, 0.45);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* карійований папір — та сама сітка, що на слайдах */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 45px 45px;
  opacity: 0.5;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid2) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid2) 1.5px, transparent 1.5px);
  background-size: 225px 225px;
  opacity: 0.45;
}
body > * { position: relative; z-index: 1; }

/* поле зошита — червона лінія, як у Rechenheft */
body > main::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 72px;
  width: 2px; background: var(--pen); opacity: 0.18; pointer-events: none;
}
@media (max-width: 1100px) { body > main::before { display: none; } }

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

/* ─────────────────────── типографіка ─────────────────────── */

h1, h2, h3, h4 {
  overflow-wrap: break-word;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 6vw, 76px); letter-spacing: -0.04em; }
h2 { font-size: clamp(26px, 4vw, 50px); }
h3 { font-size: clamp(22px, 2.4vw, 29px); line-height: 1.12; }
h4 { font-size: 20px; letter-spacing: -0.02em; }
p { max-width: 68ch; overflow-wrap: break-word; }
p + p, h2 + p, h3 + p, h4 + p, .section-heading p { margin-top: 16px; }
.founder-facts { display: grid; gap: 14px; margin-top: 24px; }
.founder-facts p { margin-top: 0; }
.section-heading h2 + p { margin-top: 20px; font-size: 18px; color: var(--ink-soft); }
strong, b { font-weight: 700; }

/* червоний надзаголовок із рискою — рівно як eyebrow на слайдах */
.section-kicker, .eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pen);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.section-kicker::after, .eyebrow::after {
  content: ""; height: 2px; flex: 1; max-width: 170px;
  background: var(--pen); opacity: 0.35;
}
.section-heading.inverse .section-kicker { color: #ff6a5e; }
.section-heading.inverse .section-kicker::after { background: #ff6a5e; }

.muted, .disclaimer, .form-note { color: var(--ink-soft); font-size: 15px; }
.disclaimer { border-left: 3px solid var(--line); padding-left: 16px; }

/* ─────────────────────── каркас ─────────────────────── */

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 24px; }
.compact-section { padding: 56px 24px; }
.section-heading { margin-bottom: 48px; }
.section-heading.wide { max-width: 860px; }
.page-offset { padding-top: 96px; }

/* ─────────────────────── шапка ─────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 16px 32px;
  background: rgba(246, 247, 244, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header > * { min-width: 0; }
.site-header.scrolled { box-shadow: 0 12px 30px -26px rgba(17, 23, 26, 0.6); }
.brand {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 19px;
}
.brand-mark {
  width: 44px; height: 36px; display: grid; place-items: center;
  border: 2.5px solid var(--pen); border-radius: 3px;
  color: var(--pen); font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0;
  line-height: 1;
}
.desktop-nav { display: flex; gap: 26px; margin-left: auto; }
.desktop-nav a {
  text-decoration: none; font-weight: 500; font-size: 15.5px;
  color: var(--ink-soft); padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.desktop-nav a:hover { color: var(--ink); border-bottom-color: var(--pen); }
.header-cta { flex-shrink: 0; }

/* ─────────────────────── кнопки ─────────────────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 26px; border-radius: var(--radius);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s, background 0.15s, color 0.15s;
}
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover { background: var(--pen); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button.secondary:hover { border-color: var(--pen); color: var(--pen); }
.button.full { width: 100%; }

/* ─────────────────────── герой ─────────────────────── */

.hero {
  position: relative; padding: 110px 24px 96px;
  border-bottom: 1px solid var(--line);
}
.hero-overlay, .subhero-overlay, .hero-image { display: none; }

/* знак кореня — той самий, що на аватарі; ледь помітний водяний знак */
.hero::after {
  content: "\221A";
  position: absolute; right: 56px; top: 50%; transform: translateY(-46%);
  font-size: 340px; line-height: 1; font-weight: 400;
  color: var(--pen); opacity: 0.07; pointer-events: none;
}
.hero-content, .subhero-content { max-width: var(--maxw); margin: 0 auto; }
.hero-copy { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; margin-top: 64px; background: var(--line);
  border: 1px solid var(--line);
}
.hero-stats > div { background: var(--paper); padding: 24px 22px; }
.hero-stats dt {
  font-size: 54px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--pen); line-height: 0.9; margin-bottom: 12px;
}
.hero-stats dd {
  font-size: 15px; line-height: 1.4; color: var(--ink-soft); max-width: 24ch;
}

.subhero { padding: 76px 24px 60px; border-bottom: 1px solid var(--line); }

/* ─────────────────────── картки ─────────────────────── */

.course-card, .legal-card, .founder-card, .method-grid > *, .audience-grid > *,
.steps-grid > *, .compare-grid > *, .purchase-flow > *, .inside-steps > * {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 5px solid var(--ink);
  padding: 34px 32px 34px;
}
.course-card { display: flex; flex-direction: column; gap: 16px; border-left-color: var(--pen); }
.course-card > div {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
}
.course-card h3 { margin: 0; }
.course-card p { font-size: 16px; color: var(--ink-soft); margin: 0; }
.course-card .button { margin-top: auto; align-self: flex-start; }

.course-card-grid, .audience-grid, .method-grid, .steps-grid,
.compare-grid, .apply-grid, .footer-grid, .contact-options {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.purchase-flow, .inside-steps { display: grid; gap: 18px; }
.inside-layout { display: grid; gap: 34px; grid-template-columns: 1fr; }

.card-icon {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; margin-bottom: 16px;
  border: 2.5px solid var(--pen); border-radius: 3px;
  color: var(--pen); font-weight: 800;
}

/* теги й ціна */
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block; align-self: flex-start;
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; padding: 7px 12px; border-radius: 3px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft);
  text-transform: uppercase; margin-bottom: 2px;
}
.course-meta .tag, .course-meta span { align-self: auto; }
.price, .launch-price {
  font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink);
}
.launch-price { color: var(--pen); }
.module-list { list-style: none; display: grid; gap: 12px; }
.module-list li { padding-left: 32px; position: relative; font-size: 16px; }
.module-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 17px; height: 17px; border: 2.5px solid var(--pen); border-radius: 2px;
}

/* ─────────────────────── темна смуга ─────────────────────── */

.path-band {
  background: var(--ink); color: #f2f1ec; padding: 88px 0;
  position: relative; overflow: hidden;
}
.path-band::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(#1d262a 1px, transparent 1px),
    linear-gradient(90deg, #1d262a 1px, transparent 1px);
  background-size: 45px 45px;
}
.path-band > * { position: relative; }
.path-band .steps-grid > * {
  background: rgba(255, 255, 255, 0.045);
  border-left-color: var(--pen);
  box-shadow: none;
}
.path-band p { color: #9aa7a4; }
.path-band h2, .path-band h3 { color: #f2f1ec; }

/* ─────────────────────── форма ─────────────────────── */

.lead-form { display: grid; gap: 16px; max-width: 620px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.lead-form input, .lead-form textarea, .lead-form select {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 16px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
.lead-form input:focus, .lead-form textarea:focus, .lead-form select:focus {
  outline: none; border-color: var(--pen);
}
.lead-form textarea { min-height: 130px; resize: vertical; }

/* Telegram поруч із формою — рівноцінний шлях, а не виноска */
.contact-direct {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  margin-top: 26px; padding: 26px 26px 28px;
  background: var(--card); border-left: 5px solid var(--pen);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-direct-lead { font-size: 16px; color: var(--ink-soft); margin: 0; }
.contact-direct .button { width: 100%; justify-content: center; }
.apply-grid { align-items: start; gap: 34px; }

/* портал-прев'ю */
.portal-preview { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.portal-topbar { background: var(--ink); color: var(--paper); padding: 13px 20px; font-family: "JetBrains Mono", monospace; font-size: 13px; letter-spacing: 0.08em; }
.portal-body { padding: 26px 24px; }

/* ─────────────────────── підвал ─────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 24px 48px;
  margin-top: 40px;
}
.footer-grid { align-items: start; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--pen); }

.legal-card { border-left-color: var(--ink-soft); }
.elegant { font-weight: 500; }

/* ─────────────────────── телефон ─────────────────────── */

@media (max-width: 1240px) { .hero::after { display: none; } }

@media (max-width: 860px) {
  body { font-size: 16px; }
  h1 { font-size: 34px; letter-spacing: -0.03em; }
  h2 { font-size: 27px; }
  h3 { font-size: 21px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats dt { font-size: 42px; }
  .hero-actions .button { width: 100%; }
  .brand { font-size: 14px; line-height: 1.2; }
  .brand-mark { width: 38px; height: 30px; font-size: 15px; }
  .header-cta { font-size: 14px; }
  .site-header { padding: 13px 18px; gap: 14px; }
  .desktop-nav { display: none; }
  .section { padding: 60px 18px; }
  .hero { padding: 72px 18px 64px; }
  .hero-stats { margin-top: 44px; }
  .container { padding: 0 18px; }
  .section-kicker::after, .eyebrow::after { max-width: 60px; }
  .course-card, .legal-card, .founder-card,
  .method-grid > *, .audience-grid > *, .steps-grid > *,
  .compare-grid > *, .purchase-flow > *, .inside-steps > * { padding: 24px 22px 26px; }
}


/* ─────────── пропуски між словами ───────────
   У розмітці <strong> і наступний текст стоять упритул, без пробілу.
   Поки вони інлайнові, слова зліплюються: «StartklarAdmission».
   Тому скрізь, де це пара «назва + пояснення», кладемо їх у стовпчик. */

.brand > span:not(.brand-mark) {
  display: flex; flex-direction: column; line-height: 1.15; min-width: 0;
}
.brand small {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.module-list li strong, .portal-body li strong,
.inside-steps article strong, .compare-grid li strong {
  display: block; margin-bottom: 3px;
}
.module-list li span, .portal-body li span,
.compare-grid li span {
  display: block; color: var(--ink-soft); font-size: 15px; font-weight: 400;
}
.portal-body ul { list-style: none; display: grid; gap: 16px; margin-top: 18px; }
.portal-body li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.portal-body li:last-child { border-bottom: 0; }

.site-footer p strong { display: block; margin-bottom: 4px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 10px; }

/* ─────────── повітря між картками ───────────
   У темній смузі картки стояли впритул: видно було лише червоні риски. */

.steps-grid, .path-band .steps-grid { gap: 26px; }
.path-band .steps-grid > * { padding: 30px 28px 32px; }
.inside-steps article {
  background: var(--card); border-left: 5px solid var(--pen);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 28px 30px;
}
.inside-steps article > span {
  display: inline-block; font-family: "JetBrains Mono", monospace;
  font-size: 13px; color: var(--pen); font-weight: 600;
  letter-spacing: 0.14em; margin-bottom: 12px;
}
.inside-steps article h3 { margin-bottom: 10px; }
.inside-steps { gap: 22px; }

.product-stats {
  display: grid; gap: 1px; margin-top: 34px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--line); border: 1px solid var(--line);
}
.product-stats article { background: var(--paper); padding: 22px 20px; }
.product-stats strong {
  display: block; font-size: 38px; font-weight: 800; color: var(--pen);
  letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px;
}
.product-stats span { font-size: 14px; color: var(--ink-soft); line-height: 1.35; }

/* ─────────── фото менші ───────────
   Герой-картинка займала весь екран і відсувала текст за згин. */

.hero-image, .subhero img, .course-card img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); object-fit: cover;
}
.course-card img { max-height: 180px; margin-bottom: 4px; }
/* Обкладинка в герої дублювала б заголовок двома реченнями підряд,
   тому на головній її не показуємо — сам папір і так працює. */
.hero-image { display: none; }
@media (max-width: 860px) {
  .course-card img { max-height: 140px; }
}


/* ─────────── справжні екрани курсів ─────────── */
.shots-grid {
  display: grid; gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
.shots-grid figure {
  margin: 0; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; border-left: 5px solid var(--pen);
}
.shots-grid img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--line); }
.shots-grid figcaption { padding: 20px 24px 22px; }
.shots-grid figcaption strong {
  display: block; font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.shots-grid figcaption span { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 860px) {
  .shots-grid { grid-template-columns: 1fr; gap: 22px; }
}


/* знак у шапці — той самий корінь, що на аватарі в Telegram і Instagram */
img.brand-mark {
  width: 40px; height: 40px; border: 0; border-radius: 6px;
  flex-shrink: 0; background: transparent; padding: 0;
}
@media (max-width: 860px) { img.brand-mark { width: 34px; height: 34px; } }

/* на сторінці курсу скрін один — даємо йому всю ширину */
.shots-single { grid-template-columns: 1fr; max-width: 920px; }

/* обкладинка на сторінці курсу — та сама, що на картці, але ширша */
.page-cover {
  display: block; width: 100%; max-width: 860px; height: auto;
  margin: 40px 0 8px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .page-cover { margin: 28px 0 4px; } }


/* ─────────── загальний вертикальний ритм ───────────
   `* { margin: 0 }` на початку прибрав усі відступи, і там, де блок не має
   власних стилів, елементи стають упритул. Тут вони повертаються — але так,
   щоб не ламати картки й сітки, у яких відступи задає gap. */

main h3 { margin-top: 34px; }
main h4 { margin-top: 26px; }
main ul, main ol { margin-top: 20px; }
main li + li { margin-top: 10px; }
main .button + h2,
main .button + h3,
main .button + p,
main .button + ul { margin-top: 36px; }
main p + .button,
main ul + .button,
main h2 + .button,
main h3 + .button { margin-top: 26px; }
main p + h2, main ul + h2 { margin-top: 48px; }
main p + h3, main ul + h3 { margin-top: 34px; }

/* усередині компонентів відступи вже є — там ритм вимикаємо */
.course-card h3, .course-card ul, .course-card p,
.inside-steps article h3, .shots-grid figcaption strong,
.hero-stats *, .product-stats *, .contact-direct *,
.portal-body h3, .portal-body ul, .section-heading h2,
.lead-form *, .footer-grid * { margin-top: 0; }
.course-card .button, .contact-direct .button { margin-top: auto; }

/* ─────────── блок про індивідуальні заняття ─────────── */
.consultation-preview {
  display: grid; gap: 34px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: start;
}
.consultation-copy .button { margin-top: 28px; }
.question-panel {
  background: var(--card); border-left: 5px solid var(--pen);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 30px 32px;
}
.question-panel h3 { margin-top: 0; }
.question-panel ul { list-style: none; margin-top: 20px; }
.question-panel li {
  position: relative; padding-left: 30px; font-size: 16px; line-height: 1.4;
}
.question-panel li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 15px; height: 15px; border: 2.5px solid var(--pen); border-radius: 2px;
}

/* приманка для ботів — прибрана з потоку, але не display:none,
   бо приховане через display частина ботів свідомо пропускає */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* стан відправки заявки */
.form-note.success,
.form-note.error {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.5;
}

.form-note.success {
  color: var(--ok);
  background: rgba(14, 124, 102, 0.08);
  box-shadow: inset 0 0 0 1px rgba(14, 124, 102, 0.25);
  font-weight: 600;
}

.form-note.error {
  color: var(--pen-dark);
  background: rgba(216, 54, 42, 0.07);
  box-shadow: inset 0 0 0 1px rgba(216, 54, 42, 0.25);
}

.form-note.error a {
  color: var(--pen-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
