/* ============================================================
   _section.css — общие контентные секции главной (и будущих
   публичных страниц):
     - .section / .section-header (shared)
     - .how-grid / .how-card (4 карточки «Как я работаю»)
     - .gets-* (тёмный блок «Что остаётся»)
     - .about-* (визитка)
     - .results-* / .tl-* (timeline, для будущей /results/)
     - .lp-* (lesson preview — горизонтальные галереи + cursor zoom-in)
     - .school-* (блок «5–9 класс»)
     - .method-* (структура программы)

   Зависит от _base.css (палитра, --radius-*, --font-serif).
   ============================================================ */

/* ── Общая секция ────────────────────────────────────────── */
.section {
  padding: 56px 48px 64px;
  max-width: 1200px; margin: 0 auto;
}
.section-header { margin-bottom: 36px; }
.section-header .label {
  transition: color 0.3s;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 12px;
}
.section-header h2 em {
  font-style: italic;
  color: var(--accent-1);
}
.section-header p {
  font-size: 16px; color: var(--muted); margin-top: 12px;
  max-width: 520px; line-height: 1.65;
}

/* ── How I work — карточки (4 в старом / 3 в новом) ──────── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.how-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s;
  overflow: hidden;
}
.how-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.10); transform: translateY(-4px); }
.how-card-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent-1); margin-bottom: 16px;
}
.how-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.how-card p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* Плитка-ссылка (на главной — ведёт на /program/, /about/, /pricing/) */
.how-card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-height: 240px;
}
.how-card--link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,26,44,0.04) 0%, rgba(194,125,42,0.04) 100%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.how-card--link:hover::before { opacity: 1; }
.how-card--link:hover {
  border-color: var(--accent-2);
  transform: translateY(-6px);
  box-shadow: 0 18px 52px rgba(139,26,44,0.14),
              inset 0 0 0 1px rgba(194,125,42,0.45);
}
.how-card-arrow {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-1);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.how-card-arrow em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-block;
}
.how-card--link:hover .how-card-arrow em { transform: translateX(5px); }

/* ── Gets — светлый блок «Что остаётся» ──────────────────── */
.gets-section { background: var(--bg); }
.gets-inner {
  padding: 56px 48px 64px;
  max-width: 1200px; margin: 0 auto;
}
.gets-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 42px); font-weight: 700;
  letter-spacing: -0.015em; color: var(--dark);
  margin-top: 12px; margin-bottom: 32px;
  line-height: 1.15;
}
.gets-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
/* Вариант 3×2 для главной (6 карточек) */
.gets-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
/* Горизонтальная компоновка 2-колонки — иконка слева, текст справа.
   Используется на главной (другой ритм после 3-плиток HOW). */
.gets-grid--2col {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 28px;
}
.gets-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 14px 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.gets-card:hover {
  transform: translateX(4px);
}

/* Горизонтальная компоновка — иконка слева, текст справа */
.gets-grid--2col .gets-card {
  display: flex; gap: 18px; align-items: flex-start;
}
.gets-grid--2col .gets-card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.gets-grid--2col .gets-card-text {
  flex: 1;
}
.gets-grid--2col .gets-card-text h3 { margin-bottom: 6px; }

.gets-card-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(139,26,44,0.10), rgba(194,125,42,0.14));
  border: 1px solid rgba(194,125,42,0.30);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: var(--accent-1);
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              background 0.3s;
}
.gets-card:hover .gets-card-icon {
  transform: scale(1.06);
  border-color: var(--accent-2);
  background: linear-gradient(135deg, rgba(139,26,44,0.14), rgba(194,125,42,0.20));
}
.gets-card h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 6px; letter-spacing: -0.01em; }
.gets-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── About — визитка ─────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.about-photo {
  aspect-ratio: 3/4; border-radius: var(--radius-xl);
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 14px;
}
.about-text .label { margin-bottom: 12px; }
.about-text h2 {
  font-size: clamp(28px, 3vw, 40px); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 20px;
}
.about-text p {
  font-size: 15px; color: var(--muted); line-height: 1.75;
  margin-bottom: 16px;
}
.about-facts {
  margin-top: 32px; display: flex; flex-direction: column; gap: 12px;
}
.about-fact {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; color: var(--muted);
}
.about-fact-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-1); flex-shrink: 0; margin-top: 7px;
}

/* ── Results — timeline (для будущей /results/) ──────────── */
.results-section { background: var(--bg-alt); }
.results-inner {
  padding: 96px 48px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.results-inner h2 {
  font-size: clamp(28px, 3vw, 40px); font-weight: 800;
  letter-spacing: -0.03em; margin-top: 12px; margin-bottom: 20px;
}
.results-inner p { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 16px; }
.results-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
}
.results-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 24px; }
.timeline { display: flex; flex-direction: column; gap: 20px; }
.tl-item { display: flex; gap: 16px; }
.tl-dot-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}
.tl-line { flex: 1; width: 1px; background: var(--border); margin-top: 4px; }
.tl-year { font-size: 12px; font-weight: 700; color: var(--accent-1); }
.tl-text { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* ── Lesson Preview — горизонтальные галереи ─────────────── */
.lp-section {
  padding: 96px 0 80px;
  background: var(--bg);
}
.lp-section-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 48px;
}
.lp-section-header {
  margin-bottom: 72px;
}
.lp-section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 12px;
}
.lp-section-header h2 em {
  font-style: italic;
  color: var(--accent-1);
}
.lp-section-header p {
  font-size: 16px; color: var(--muted);
  margin-top: 14px; max-width: 560px; line-height: 1.7;
}

.lp-block {
  margin-bottom: 64px;
}
.lp-block--last {
  margin-bottom: 0;
}
.lp-block-header {
  margin-bottom: 24px;
}
.lp-tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.lp-block-desc {
  font-size: 17px; color: var(--text); line-height: 1.7;
  max-width: 860px; margin: 0;
}

.lp-scroll-wrap {
  position: relative;
  border-radius: var(--radius-lg); overflow-x: auto; overflow-y: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 32px rgba(28,18,10,0.08);
  cursor: grab; user-select: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.lp-scroll-wrap.dragging { cursor: grabbing; }
.lp-scroll-wrap::-webkit-scrollbar { height: 5px; }
.lp-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.lp-scroll-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.lp-scroll-inner {
  display: flex; gap: 10px; padding: 14px;
  width: max-content;
}
.lp-scroll-inner img {
  height: 540px; width: auto; flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: block;
  transition: box-shadow 0.2s;
  cursor: zoom-in;
}
.lp-scroll-inner img:hover { box-shadow: 0 0 0 2px var(--accent-2), 0 6px 24px rgba(139,26,44,0.12); }

.lp-scroll-hint {
  position: absolute; right: 18px; bottom: 24px;
  font-size: 11px; font-weight: 600; color: var(--accent-2);
  background: rgba(244,239,230,0.92); backdrop-filter: blur(8px);
  padding: 4px 11px; border-radius: 99px;
  border: 1px solid rgba(194,125,42,0.25);
  pointer-events: none;
  transition: opacity 0.4s;
}

/* ── School 5–9 ──────────────────────────────────────────── */
.school-section {
  background: linear-gradient(135deg, #F0E8D8 0%, #EAE0CC 50%, #E2D6BE 100%);
  border-top: 1px solid #D4C9B0;
  border-bottom: 1px solid #D4C9B0;
}
.school-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 100px 48px;
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 80px; align-items: start;
}
.school-text .label { color: var(--accent-2); }
.school-text h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -0.03em; color: var(--dark);
  margin: 16px 0 20px;
}
.school-text p {
  font-size: 16px; line-height: 1.7; color: var(--muted);
  margin-bottom: 16px;
}
.school-cards {
  display: flex; flex-direction: column; gap: 16px;
}
.school-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(194,125,42,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex; gap: 18px; align-items: flex-start;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}
.school-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,26,44,0.10);
}
.school-card-icon {
  font-size: 26px; flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.school-card h3 {
  font-size: 16px; font-weight: 700; color: var(--dark);
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.school-card p {
  font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0;
}

/* ── Methodology — структура программы ───────────────────── */
.method-section { background: var(--bg-alt); }
.method-inner {
  padding: 96px 48px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.method-text h2 {
  font-size: clamp(28px, 3vw, 40px); font-weight: 800;
  letter-spacing: -0.03em; margin-top: 12px; margin-bottom: 20px;
}
.method-text p {
  font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 16px;
}
.method-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
}
.method-card-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.method-card-header h3 { font-size: 15px; font-weight: 700; }
.method-card-header p { font-size: 12px; color: var(--faint); margin-top: 4px; }

.method-rows { display: flex; flex-direction: column; }
.method-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.method-row:last-child { border-bottom: none; }
.method-row:hover { background: var(--bg); }
.method-row-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(37,99,235,0.1));
  border: 1px solid rgba(124,58,237,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--accent-1);
}
.method-row-title { font-size: 14px; font-weight: 600; }
.method-row-desc { font-size: 12px; color: var(--faint); margin-top: 2px; line-height: 1.4; }

/* ── Pricing-strip — три пилюли на главной ───────────────── */
.pricing-strip {
  padding-bottom: 56px;
}
.pricing-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
.pricing-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s;
}
.pricing-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,26,44,0.05) 0%, rgba(194,125,42,0.05) 100%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.pricing-pill::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.pricing-pill:hover {
  transform: translateY(-5px);
  border-color: var(--accent-2);
  box-shadow: 0 18px 48px rgba(139,26,44,0.14),
              inset 0 0 0 1px rgba(194,125,42,0.4);
}
.pricing-pill:hover::before { opacity: 1; }
.pricing-pill:hover::after { transform: scaleY(1); }

.pricing-pill-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.pricing-pill-value {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dark);
  line-height: 1.1;
}
.pricing-pill-value span {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0;
  margin-left: 4px;
}
.pricing-pill-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-strip-foot {
  text-align: center;
}
.pricing-strip-foot .btn em {
  font-style: normal;
  font-weight: 700;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pricing-strip-foot .btn:hover em { transform: translateX(4px); }

/* ── 5-8 тизер — финальная зона (один тон с формой) ──────── */
.school-teaser {
  background: var(--bg-alt);
  padding: 56px 48px;
}
.school-teaser-inner {
  /* Узкий блок по центру страницы — контент внутри по левому краю */
  max-width: 720px;
  margin: 0 auto;
}
/* h2 с курсивным акцентом «5-8 класс» — в стиле прочих заголовков */
.school-teaser h2 em {
  font-style: italic;
  color: var(--accent-1);
}
.school-teaser-cta {
  margin-top: 8px;
}

/* ── FAQ CTA на главной ──────────────────────────────────── */
.faq-cta {
  margin-top: 24px;
  text-align: center;
}
.faq-cta .btn em {
  font-style: normal;
  font-weight: 700;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-cta .btn:hover em { transform: translateX(4px); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .section { padding: 64px 24px; }
  .section-header p { max-width: 100%; }

  .how-grid { grid-template-columns: 1fr 1fr; }
  .how-grid--3 { grid-template-columns: 1fr; gap: 16px; }
  .how-card--link { min-height: auto; }

  .pricing-strip-grid { grid-template-columns: 1fr; gap: 14px; }
  .gets-grid--3 { grid-template-columns: 1fr; gap: 14px; }
  .gets-grid--2col { grid-template-columns: 1fr; gap: 4px 0; }
}

/* Дублирующее правило на ≤640px на случай если предыдущее не подхватилось
   (видел сломанное 2-колоночное на узком экране — форсируем 1fr). */
@media (max-width: 640px) {
  .gets-grid--2col { grid-template-columns: 1fr !important; }

  .school-teaser { padding: 56px 24px; }

  .school-inner { grid-template-columns: 1fr; gap: 36px; padding: 64px 24px; }

  .gets-grid { grid-template-columns: repeat(2, 1fr); }
  .gets-inner { padding: 64px 24px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .results-inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px; }

  .method-inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px; }

  .lp-section { padding: 64px 0 56px; }
  .lp-section-inner { padding: 0 24px; }
  .lp-section-header { margin-bottom: 48px; }
  .lp-block { margin-bottom: 48px; }
  .lp-scroll-inner img { height: 400px; }
}

@media (max-width: 640px) {
  .how-grid { grid-template-columns: 1fr; }

  .section { padding: 48px 20px; }

  /* Gets — компактная 2×4 */
  .gets-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gets-inner { padding: 48px 16px 40px; }
  .gets-inner h2 { font-size: 24px; margin-bottom: 24px; }
  .gets-card { padding: 16px 14px; border-radius: 14px; }
  .gets-card-icon { width: 32px; height: 32px; margin-bottom: 12px; font-size: 14px; }
  .gets-card h3 { font-size: 14px; margin-bottom: 6px; }
  .gets-card p { font-size: 12px; line-height: 1.5; }

  /* School — иконка сверху, текст снизу */
  .school-inner { padding: 48px 16px; gap: 28px; }
  .school-card { padding: 18px 16px; flex-direction: column; gap: 10px; align-items: flex-start; }
  .school-card-icon { font-size: 22px; width: 36px; height: 36px; }
  .school-card h3 { font-size: 15px; margin-bottom: 4px; }
  .school-card p { font-size: 13px; line-height: 1.55; }

  .lp-section { padding: 48px 0 40px; }
  .lp-section-inner { padding: 0 20px; }
  .lp-section-header { margin-bottom: 36px; }
  .lp-block { margin-bottom: 36px; }
  .lp-scroll-inner img { height: 300px; }
  .lp-scroll-wrap { border-radius: var(--radius-md); }
  .lp-scroll-hint { display: none; }
  .lp-block-desc { font-size: 14px; }
}
