/* ============================================================
   _page.css — общий компонент для публичных «вторичных» страниц
   (/about/, /program/, /pricing/, /faq/, /contacts/, /middle-school/).

   Главная страница имеет свой полноэкранный `.hero` (см. _hero.css).
   Здесь — компактный page-hero (~440px), узкая колонка для лонгрида.

   Зависит от _base.css (палитра, --font-serif, --bg, --bg-alt).
   Канон: docs/STYLEGUIDE.md § «Канон визуального кода».
   ============================================================ */

/* ── Hero-блок страницы — компактный, картина на фоне ────── */
.page-hero-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.page-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 65%;
  filter: saturate(0.78) brightness(1.02);
  z-index: 0; pointer-events: none;
  /* Scale 1.08 даёт запас для parallax — картина смещается через
     --parallax-y, увеличение скрывает потенциальные «голые» края.
     На desktop --parallax-y не устанавливается JS-ом (он работает
     только на mobile), картина статичная. */
  transform: scale(1.08) translateY(var(--parallax-y, 0px));
  will-change: transform;
}
/* Модификаторы object-position для разных картин ─────────── */
.page-hero-bg--top       { object-position: center top; } /* самый верх */
.page-hero-bg--upper     { object-position: center 40%; } /* верх-середина */
.page-hero-bg--landscape { object-position: center 70%; } /* пейзаж: основной интерес внизу-центре (Шишкин Рожь, Левитан Над вечным покоем) */
.page-hero-bg--persons   { object-position: center 18%; } /* для картин с фигурами (Богатыри): desktop — почти верх, mobile отдельно */
.page-hero-bg--low       { object-position: center 85%; } /* низ */
.page-hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(244,239,230,0.95) 0%,
    rgba(244,239,230,0.88) 30%,
    rgba(244,239,230,0.60) 55%,
    rgba(244,239,230,0.30) 80%,
    rgba(244,239,230,0.15) 100%
  );
}
/* Усиленный градиент — для тёмных и многофигурных картин (Боярыня Морозова,
   Покорение Сибири), где обычный overlay даёт плохой контраст с текстом. */
.page-hero-overlay--strong {
  background: linear-gradient(
    to right,
    rgba(244,239,230,0.97) 0%,
    rgba(244,239,230,0.92) 40%,
    rgba(244,239,230,0.75) 65%,
    rgba(244,239,230,0.50) 85%,
    rgba(244,239,230,0.32) 100%
  );
}
/* Подпись художника — мелкая, в углу */
.page-hero-credit {
  position: absolute;
  right: 28px; bottom: 18px;
  z-index: 2;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
  background: rgba(244,239,230,0.7);
  backdrop-filter: blur(4px);
  padding: 5px 12px; border-radius: 99px;
  pointer-events: none;
}
/* Нижний градиент к фону основного контента — плавный переход.
   По умолчанию уходит в var(--bg). Если следующая секция использует
   --bg-alt — поставь на .page-hero-wrap модификатор --to-alt, и
   переход будет в --bg-alt, без резкого стыка. (Сейчас не использует
   ни одна страница — после реверса зон 17.05 hero везде → --bg.) */
.page-hero-wrap::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 24%;
  background: linear-gradient(180deg, transparent, var(--hero-bottom-color, var(--bg)));
  z-index: 1; pointer-events: none;
}
.page-hero-wrap--to-alt {
  --hero-bottom-color: var(--bg-alt);
}

/* ──────────────────────────────────────────────────────────
   Плавные переходы между секциями с разным фоном.

   Универсальное правило:
   - Каждая --bg-alt секция получает ::before с gradient transparent→--bg-alt
     сверху (36px), создавая плавный переход с предыдущей --bg секции.
   - Каждая --bg секция, идущая сразу ПОСЛЕ --bg-alt, получает ::before
     с gradient --bg-alt→transparent сверху, для обратного перехода.
   - Между двумя --bg-alt подряд переход отключаем (просвет не нужен).
   - Если перед --bg-alt секцией стоит page-hero-wrap--to-alt (он сам
     уже завершается в --bg-alt) — переход тоже отключаем.

   Селекторы покрывают:
   - .tariffs-section (/pricing/)
   - .page-section--alt (/contacts/, /faq/)
   - .cf-section (форма заявки, на всех страницах)
   - .school-teaser (главная)
   - .results-section, .method-section (резерв для будущих)
   ────────────────────────────────────────────────────────── */
/* Плавный переход --bg → --bg-alt через background-gradient (НЕ pseudo).
   Раньше использовался ::before с absolute top:-36px — могло давать
   тонкие 1px rendering-artifacts между секциями на mobile.
   Сейчас gradient встроен В САМ background-стек секции:
   первый слой gradient (top 0 transparent → 48px solid),
   второй слой solid --bg-alt.
   Через transparency на верхних 48px видна предыдущая секция.
   ВНИМАНИЕ: tariffs-section ВНЕ списка (она --bg после реверса /pricing/). */
.cf-section,
.school-teaser,
.page-section--alt,
.results-section,
.method-section {
  background:
    linear-gradient(180deg, transparent 0%, var(--bg-alt) 48px),
    var(--bg-alt);
}
.page-hero {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  min-height: 460px;
  padding: 96px 48px 80px 80px;
  max-width: 1280px; margin: 0 auto;
}
/* Вариант с фото справа (для /about/) */
.page-hero--with-photo {
  grid-template-columns: 1fr auto;
  gap: 64px;
}
.page-hero-text {
  max-width: 640px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--dark);
  margin: 14px 0 18px;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--accent-1);
}
.page-hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
}

/* ── Личный вариант hero (для /about/) — без картины-фона ──
   Чистый тёплый фон + крупное фото в двойной золотой рамке слева. */
.page-hero-wrap--personal {
  background: var(--bg);
  /* Тонкое тёплое свечение в правом верхнем углу — даёт атмосферу
     без перегрузки картиной */
  position: relative;
}
.page-hero-wrap--personal::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(194,125,42,0.10), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.page-hero-wrap--personal::after {
  /* Линия-разделитель под hero — золотая, очень тонкая */
  content: '';
  position: absolute; left: 50%; bottom: 0;
  width: 64px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  z-index: 1;
}
.page-hero--personal {
  grid-template-columns: auto 1fr;
  gap: 56px;
  min-height: 400px;
}

/* Декоративная двойная рамка вокруг фото */
.page-hero-photo-frame {
  position: relative;
  width: 280px; height: 280px;
  flex-shrink: 0;
}
.page-hero-photo-frame::before {
  /* Внешнее золотое кольцо — пунктирная декорация */
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(194,125,42,0.45);
  pointer-events: none;
}
.page-hero-photo-frame::after {
  /* Мягкое тёплое свечение под фото */
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 60%, rgba(139,26,44,0.10) 100%);
  pointer-events: none;
}
.page-hero-photo {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow:
    0 0 0 3px var(--bg),                   /* тонкий зазор */
    0 0 0 5px var(--accent-2),             /* золотое кольцо */
    0 18px 48px rgba(28,18,10,0.18),       /* мягкая тень снизу */
    0 6px 16px rgba(139,26,44,0.10);       /* лёгкий тёплый свет */
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Hover-эффект на фото (desktop) — мягкое увеличение + усиление золотой ауры */
.page-hero-photo-frame:hover .page-hero-photo {
  transform: scale(1.03);
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 5px var(--accent-2),
    0 22px 56px rgba(28,18,10,0.22),
    0 8px 24px rgba(194,125,42,0.25);
}
/* Tap-feedback на mobile — фото слегка «утопает» при нажатии */
.page-hero-photo-frame:active .page-hero-photo {
  transform: scale(0.97);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ✨ Sparkle-искры около фото Алибека — золотые точки редко
   вспыхивают (раз в 8с каждая, со staggered delays).
   Тот же приём что на главной hero для картины. */
.page-hero-sparkle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194,125,42,0.95) 0%, rgba(194,125,42,0) 70%);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.page-hero-sparkle--1 { top: 12%; right: -6px; animation: pageHeroSparkle 8s ease-in-out 2.5s infinite; }
.page-hero-sparkle--2 { bottom: 18%; left: -4px; animation: pageHeroSparkle 8s ease-in-out 6.0s infinite; }

@keyframes pageHeroSparkle {
  0%, 88%, 100% { opacity: 0; transform: scale(0.6); }
  92%           { opacity: 1; transform: scale(1.3); }
  96%           { opacity: 0.6; transform: scale(1.0); }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero-sparkle { animation: none; opacity: 0; }
}

/* ── Лонгрид-секция страницы ─────────────────────────────── */
.page-section {
  background: var(--bg);
  padding: 56px 48px 80px;
}
.page-article {
  max-width: 720px;
  margin: 0 auto;
}
.page-article > section {
  padding: 16px 0;
}
.page-article > section + section {
  margin-top: 20px;
  border-top: 1px solid rgba(212,201,176,0.5);
  padding-top: 36px;
}
.page-article h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--dark);
  margin: 0 0 18px;
}
.page-article h2 em {
  font-style: italic;
  color: var(--accent-1);
}
.page-article p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 16px;
}
.page-article p:last-child { margin-bottom: 0; }
.page-article a {
  color: var(--accent-1);
  border-bottom: 1px solid rgba(139,26,44,0.3);
  transition: border-color 0.2s, color 0.2s;
}
.page-article a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}
.page-article h3 {
  font-family: var(--font-serif);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--dark);
  margin: 24px 0 10px;
}
.page-article h3:first-child { margin-top: 0; }

.page-article strong { color: var(--dark); font-weight: 600; }

/* ── Общий список с золотыми маркерами ──────────────────── */
.page-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.page-list li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  padding-left: 22px;
  position: relative;
}
.page-list li::before {
  content: '';
  position: absolute;
  left: 4px; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ── Список с иконками вместо точек-маркеров (Tabler Icons) ─── */
.page-list--icons li {
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.page-list--icons li::before { display: none; }
.page-list-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  color: var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.page-list-icon svg { width: 28px; height: 28px; }

/* ── Альтернативная зона (для последовательных page-section) ── */
.page-section--alt { background: var(--bg-alt); }

/* ============================================================
   ВИНЬЕТКИ-РАЗДЕЛИТЕЛИ — два варианта.
   Использовать ТОЛЬКО где есть смысловой разрыв (новая глава мысли),
   не как украшение между однотипными блоками.

   .vignette-diamonds  — V2, золотые линии + 3 ромба в центре.
                         Для разделения КРУПНЫХ секций (между h2-разделами,
                         между зонами страницы).
   .vignette-asterism  — V4, тройной астериск без линий.
                         Для разделения ПОДРАЗДЕЛОВ внутри одной секции
                         (между смысловыми блоками внутри h2).
   ============================================================ */

.vignette-diamonds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 56px auto;
  max-width: 280px;
  color: var(--accent-2);
}
.vignette-diamonds::before, .vignette-diamonds::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-2);
  opacity: 0.55;
}
.vignette-diamonds-dot {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--accent-2);
  flex-shrink: 0;
}
.vignette-diamonds-dot:nth-child(2) {
  background: var(--accent-1);
  width: 9px;
  height: 9px;
}

.vignette-asterism {
  text-align: center;
  margin: 40px auto;
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--accent-2);
  letter-spacing: 8px;
  line-height: 1;
  user-select: none;
}
.vignette-asterism em {
  font-style: italic;
  color: var(--accent-1);
}

@media (max-width: 720px) {
  .vignette-diamonds { margin: 40px auto; max-width: 220px; }
  .vignette-asterism { margin: 32px auto; font-size: 22px; letter-spacing: 6px; }
}

/* ── Page-callout — выделенный inline-блок в page-article ── */
.page-callout {
  position: relative;
  margin: 32px 0 8px;
  padding: 26px 28px 24px;
  background: rgba(244,239,230,0.55);
  border: 1px solid rgba(212,201,176,0.7);
  border-left: 3px solid var(--accent-1);
  border-radius: 10px;
}
.page-callout--gold {
  background: rgba(247,236,210,0.45);
  border-left-color: var(--accent-2);
}
.page-callout-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 8px;
}
.page-callout--gold .page-callout-label { color: var(--accent-2); }
.page-callout h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}
.page-callout .page-list:last-child { margin-bottom: 0; }
.page-callout p:last-child { margin-bottom: 0; }

/* ============================================================
   КОМПОНЕНТЫ СТРАНИЦЫ /program/
   ============================================================ */

/* ── Таблица темпов прохождения ─────────────────────────── */
.program-tempo-wrap {
  max-width: 980px;
  margin: 28px auto 8px;
  padding: 0 48px;
}
.program-tempo {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(28,18,10,0.04);
}
.program-tempo-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
}
.program-tempo-row > div {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text);
}
.program-tempo-row:first-child > div { border-top: none; }
.program-tempo-row--head > div {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--bg-alt);
}
.program-tempo-cell-label {
  font-weight: 700;
  color: var(--dark);
}
.program-tempo-note {
  max-width: 760px;
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  text-align: left;
  text-align: center;
  padding: 0 20px;
}
.program-tempo-note a {
  color: var(--accent-1);
  border-bottom: 1px solid rgba(139,26,44,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.program-tempo-note a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

/* ── Секция 7 модулей программы ─────────────────────────── */
.program-modules-section {
  background: var(--bg);
  padding: 64px 48px 80px;
}
.program-modules-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.program-modules-header {
  text-align: center;
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.program-modules-header .label {
  margin-bottom: 10px;
}
.program-modules-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--dark);
  margin: 0 0 14px;
}
.program-modules-header p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.program-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.program-module {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  padding: 28px 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
.program-module {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}
.program-module:hover {
  transform: translateY(-5px);
  border-color: var(--accent-2);
  box-shadow:
    0 18px 48px rgba(139,26,44,0.14),
    0 4px 16px rgba(194,125,42,0.12),
    inset 0 0 0 1px rgba(194,125,42,0.45);
}
.program-module-num {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              text-shadow 0.35s ease;
}
.program-module:hover .program-module-num {
  transform: scale(1.08);
  text-shadow: 0 4px 16px rgba(194,125,42,0.35);
}
.program-module:active {
  transform: translateY(-2px) scale(0.99);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
.program-module-num {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--accent-1);
  letter-spacing: -0.02em;
  line-height: 1;
  padding-top: 6px;
  min-width: 54px;
}
.program-module-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.program-module-period {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.program-module-topics {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.program-module-topics li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.program-module-topics li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  top: 0;
}

/* ── Responsive — таблица и модули ──────────────────────── */
@media (max-width: 720px) {
  /* Таблица темпов на мобайле — перестраиваем в карточки, без скролла.
     !important на display:none необходим — иначе .program-tempo-row базовое
     правило (display: grid) перебивает за счёт каскада. */
  .program-tempo-wrap {
    padding: 0 20px;
    overflow-x: visible;
  }
  .program-tempo { min-width: 0; }
  .program-tempo-row--head { display: none !important; }
  .program-tempo-row {
    display: block;
    padding: 20px 22px;
  }
  .program-tempo-row + .program-tempo-row { border-top: 1px solid var(--border); }
  .program-tempo-row > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 7px 0;
    border: none;
    font-size: 14.5px;
  }
  .program-tempo-row > div::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
    flex-shrink: 0;
    padding-right: 16px;
  }
  .program-tempo-cell-label {
    display: block !important;
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-1);
    letter-spacing: -0.005em;
    margin: 0 0 8px;
    padding: 0 0 12px !important;
    border-bottom: 1px solid var(--border) !important;
  }

  /* Note под таблицей — на mobile делаем callout-блоком с warm-bg,
     чтобы абзац визуально оформлен и не сливался с таблицей. */
  .program-tempo-note {
    margin: 22px 20px 0;
    padding: 16px 18px;
    background: rgba(244,239,230,0.65);
    border-left: 3px solid var(--accent-2);
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    line-height: 1.6;
    text-align: left;
  }
  .program-tempo-cell-label::before { content: '' !important; padding: 0 !important; }
}
@media (max-width: 900px) {
  .program-tempo-wrap { padding: 0 24px; }
  .program-modules-section { padding: 48px 24px 64px; }
  .program-module {
    gap: 20px;
    padding: 24px 24px;
  }
  .program-module-num {
    font-size: 28px;
    min-width: 44px;
  }
}
@media (max-width: 640px) {
  .program-tempo-wrap { padding: 0 20px; }
  .program-modules-section { padding: 40px 20px 56px; }
  .program-module {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 20px;
  }
  .program-module-num {
    font-size: 24px;
    padding-top: 0;
  }
  .program-module-title { font-size: 18px; }
  .program-module-topics li { font-size: 14px; }
}

/* ============================================================
   КОМПОНЕНТЫ СТРАНИЦЫ /pricing/
   ============================================================ */

/* ── Секция тарифов: широкая, на всю ширину, чередование зон ── */
.tariffs-section {
  background: var(--bg);
  padding: 64px 48px 72px;
}
/* Две тарифные секции подряд читаются как одна зона —
   убираем дубль-padding между ними и добавляем тонкую золотую разделительную полосу. */
.tariffs-section + .tariffs-section {
  padding-top: 0;
}
.tariffs-section + .tariffs-section .tariffs-wrap {
  border-top: 1px solid rgba(194,125,42,0.18);
  padding-top: 56px;
}
.tariffs-wrap {
  max-width: 1080px;
  margin: 0 auto;
}
.tariffs-header {
  text-align: center;
  margin: 0 auto 36px;
  max-width: 520px;          /* узкий блок, чтобы заголовок и подзаголовок шли единой колонкой */
}
.tariffs-header .label { margin-bottom: 10px; }
.tariffs-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--dark);
  margin: 0 0 12px;
}
.tariffs-header p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 auto;
  max-width: 380px;          /* подзаголовок ещё уже — не «торчит» шире h2 */
}

/* ── Сетка карточек ──────────────────────────────────────── */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;     /* все карточки одной высоты */
}

/* ── Карточка тарифа ─────────────────────────────────────── */
.tariff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Тонкая тень для отделения белой карточки от светлого --bg фона
     секции (после реверса зон /pricing/) */
  box-shadow: 0 4px 16px rgba(28, 18, 10, 0.04);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
.tariff-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-2);
  box-shadow:
    0 20px 48px rgba(139,26,44,0.12),
    0 4px 16px rgba(194,125,42,0.10),
    inset 0 0 0 1px rgba(194,125,42,0.45);
}
.tariff-card:active {
  transform: translateY(-2px) scale(0.99);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
.tariff-card--featured {
  border-color: var(--accent-2);
  border-width: 1.5px;
  /* Outer-тень золотистая + лёгкий inner-glow — featured заметно выпуклый,
     не сливается с базовыми карточками. */
  box-shadow: 0 16px 40px rgba(194,125,42,0.16),
              inset 0 0 0 1px rgba(194,125,42,0.25);
}
.tariff-card--featured:hover {
  transform: translateY(-7px);
  box-shadow:
    0 28px 64px rgba(139,26,44,0.20),
    0 6px 22px rgba(194,125,42,0.20),
    inset 0 0 0 1px rgba(194,125,42,0.55);
}

/* ✨ Sparkle вокруг featured-карточки — золотые точки рядом с бейджем
   «Большинство берёт этот». Привлекают внимание к лучшему выбору. */
.tariff-sparkle {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194,125,42,0.95) 0%, rgba(194,125,42,0) 70%);
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}
.tariff-sparkle--1 { top: -8px; left: 18%;  animation: tariffSparkle 7s ease-in-out 2s   infinite; }
.tariff-sparkle--2 { top: -6px; right: 18%; animation: tariffSparkle 7s ease-in-out 5.5s infinite; }
@keyframes tariffSparkle {
  0%, 86%, 100% { opacity: 0; transform: scale(0.55); }
  91%           { opacity: 1; transform: scale(1.35); }
  96%           { opacity: 0.6; transform: scale(1.0); }
}
@media (prefers-reduced-motion: reduce) {
  .tariff-sparkle { animation: none; opacity: 0; }
}

/* Zoom-stagger для появления тарифных карточек — переопределяет
   базовый [data-stagger] на scale+translate (вместо просто translate).
   При scroll к секции тарифов 3 карточки появляются «прыжком из глубины». */
.tariffs-grid[data-stagger] > .tariff-card {
  opacity: 0;
  transform: scale(0.92) translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.tariffs-grid[data-stagger].visible > .tariff-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.tariff-card-badge {
  position: absolute;
  top: -14px; left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  background: var(--accent-2);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(194,125,42,0.30),
              0 0 0 3px var(--bg-alt);
}
.tariff-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 6px;
}
.tariff-card-period {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.tariff-card-value {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.015em;
  line-height: 1;
  margin-bottom: 18px;
}
.tariff-card-value span {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 4px;
}
.tariff-card-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* ── Примечание под карточками ───────────────────────────── */
.tariffs-note {
  text-align: center;
  margin: 28px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}
.tariffs-note strong {
  color: var(--dark);
  font-weight: 600;
}

/* ── Responsive — тарифы ─────────────────────────────────── */
@media (max-width: 900px) {
  .tariffs-section { padding: 48px 24px 56px; }
  .tariffs-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .tariff-card { padding: 24px 22px; }
  .tariff-card-value { font-size: 30px; }
}
@media (max-width: 640px) {
  .tariffs-section { padding: 40px 20px 48px; }
  .tariffs-header { margin-bottom: 28px; }
  .tariffs-grid { gap: 22px; }
  .tariff-card { padding: 22px 20px; }
  .tariff-card-value { font-size: 26px; }
  .page-callout { padding: 22px 22px 20px; }
}

/* ============================================================
   КОМПОНЕНТЫ СТРАНИЦЫ /contacts/
   ============================================================ */

.contacts-primary {
  max-width: 760px;
  margin: 0 auto;
}
.contacts-tg {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 32px 36px 32px 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
.contacts-tg::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, #229ED9, #1a82b3);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.contacts-tg:hover {
  transform: translateY(-5px);
  border-color: var(--accent-2);
  box-shadow:
    0 24px 56px rgba(34,158,217,0.14),
    0 6px 18px rgba(194,125,42,0.10),
    inset 0 0 0 1px rgba(194,125,42,0.45);
}
.contacts-tg:hover::before { width: 6px; }
.contacts-tg:active {
  transform: translateY(-2px) scale(0.995);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Shimmer-полоса по карточке при hover (как у CTA hero на главной) */
.contacts-tg::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -100%; width: 60%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(194,125,42,0.10) 50%,
    transparent 100%
  );
  transform: skewX(-22deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.contacts-tg:hover::after {
  opacity: 1;
  animation: contactsTgShimmer 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes contactsTgShimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* Status-бейдж в hero — pulse-dot + live clock Москвы.
   Зелёная точка пульсирует когда на связи (Пн-Сб 8-22 МСК),
   серая статичная — в выходные / ночь. */
.contacts-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(244,239,230,0.88);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  color: var(--dark);
  max-width: 100%;
}
@media (max-width: 640px) {
  /* На mobile inline-flex может выйти за viewport при длинном detail-row.
     flex (block-level) + max-width гарантируют что pill вписывается. */
  .contacts-status {
    display: flex;
    width: fit-content;
    max-width: calc(100vw - 40px);
  }
}
.contacts-status-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contacts-status-detail {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.contacts-status-detail[hidden] { display: none; }
.contacts-status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6B7280;
  flex-shrink: 0;
}
.contacts-status--on .contacts-status-dot {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: contactsStatusPulse 2s ease-in-out infinite;
}
.contacts-status--on .contacts-status-text strong {
  color: #16a34a;
}
.contacts-status--off .contacts-status-text strong {
  color: var(--muted);
}
.contacts-status-text { font-weight: 500; }
.contacts-status-text strong { font-weight: 700; letter-spacing: 0.01em; }
@keyframes contactsStatusPulse {
  0%, 100% { box-shadow: 0 0 4px #22c55e; }
  50%      { box-shadow: 0 0 10px #22c55e, 0 0 20px rgba(34,197,94,0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .contacts-status--on .contacts-status-dot { animation: none; }
}

/* Карточка «Когда я отвечаю» — выделение через warm aura.
   Главная фишка страницы: гарантия быстрого ответа. */
.contacts-hours {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(194,125,42,0.25);
  padding: 28px 32px !important;
  margin: 8px 0 32px;
  box-shadow:
    0 14px 40px rgba(194,125,42,0.10),
    0 2px 8px rgba(28,18,10,0.05);
}
.contacts-hours::before {
  /* Тёплая аура вокруг карточки */
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(194,125,42,0.08) 0%,
    rgba(194,125,42,0.03) 60%,
    transparent 80%
  );
  z-index: -1;
  pointer-events: none;
}
.contacts-hours h2 { margin-top: 0; }
.contacts-hours .page-list {
  margin: 8px 0 12px;
}
.contacts-hours .page-list li {
  padding: 8px 0;
  padding-left: 0; /* точки-маркеры скрыты ниже — отступ слева не нужен */
  border-bottom: 1px solid rgba(194,125,42,0.12);
}
.contacts-hours .page-list li:last-child { border-bottom: none; }
/* Точки-маркеры скрываем — в контексте warm-card они «висят» слева */
.contacts-hours .page-list li::before { display: none; }

/* Усиленный hover на phone/email карточках */
.contact-alt {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}
.contact-alt:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  box-shadow:
    0 16px 40px rgba(28,18,10,0.10),
    0 3px 12px rgba(194,125,42,0.10),
    inset 0 0 0 1px rgba(194,125,42,0.30);
}
.contact-alt:active {
  transform: translateY(-1px) scale(0.99);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
.contacts-tg-icon {
  width: 72px; height: 72px;
  flex-shrink: 0;
}
.contacts-tg-icon svg { width: 100%; height: 100%; display: block; }

.contacts-tg-body { min-width: 0; }
.contacts-tg-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.contacts-tg-handle {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.contacts-tg-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.contacts-tg-cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-1);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.contacts-tg-cta span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.contacts-tg:hover .contacts-tg-cta span { transform: translateX(6px); }

/* ── Вторичные контакты — телефон + email ────────────────── */
.contacts-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.contact-alt {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 20px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
/* Кармин-полоска слева — в семействе TG-карточки, чтобы все три
   contact-карточки были визуально консистентны. */
.contact-alt::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent-1), #6e1422);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.contact-alt:hover::before { width: 5px; }
.contact-alt:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 12px 28px rgba(28,18,10,0.06),
              inset 0 0 0 1px rgba(194,125,42,0.25);
}
.contact-alt-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.contact-alt-value {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-bottom: 6px;
  word-break: break-word;
}
.contact-alt-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .contacts-tg {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 24px;
    gap: 16px;
  }
  .contacts-tg-icon {
    width: 56px; height: 56px;
    margin: 0 auto;
  }
  .contacts-tg-cta { justify-content: center; }
  .contacts-tg-handle { font-size: 22px; }
  .contacts-secondary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .contact-alt-value { font-size: 17px; }
}

/* ============================================================
   КОМПОНЕНТЫ СТРАНИЦЫ /middle-school/
   ============================================================ */

/* Одиночная тарифная карточка по центру (5-8 класс) */
.ms-price {
  max-width: 380px;
  margin: 20px auto 8px;
  position: relative;
  /* Мягкая тёплая аура вокруг единственной тарифной карточки 1200₽.
     /middle-school/ — родительская аудитория: тёплая подача без sparkle
     и агрессивного gradient-shift, который применён к featured на /pricing/.
     Аура статичная, спокойная — как лампа над семейным столом. */
}
.ms-price::before {
  content: '';
  position: absolute;
  inset: -28px;
  border-radius: 32px;
  background: radial-gradient(
    ellipse at center,
    rgba(194,125,42,0.10) 0%,
    rgba(194,125,42,0.05) 50%,
    transparent 75%
  );
  z-index: -1;
  pointer-events: none;
}
.ms-price .tariff-card--featured {
  /* Усиленная тёплая тень вместо холодной карминной — для родительской подачи */
  box-shadow:
    0 18px 44px rgba(194,125,42,0.14),
    0 4px 14px rgba(28,18,10,0.06),
    inset 0 0 0 1px rgba(194,125,42,0.30);
}

/* Stagger для пунктов <ul class="page-list" data-stagger> —
   пункты «Кому подходит» появляются один за другим (на /middle-school/).
   Эффект мягкий — без zoom, только slide-up. */
.page-list[data-stagger] > li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-list[data-stagger].visible > li {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   КОМПОНЕНТЫ СТРАНИЦЫ /faq/
   ============================================================ */

/* ── 2-колонный layout: main (вопросы) + sticky TOC справа ── */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  /* align-items: stretch (default) — критично для sticky внутри grid:
     иначе ячейка aside равна высоте контента, и липнуть некуда. */
}
.faq-main { min-width: 0; }

/* ── Sticky TOC ──────────────────────────────────────────── */
.faq-toc {
  position: relative;
  align-self: stretch;
}
.faq-toc-sticky {
  position: sticky;
  top: 88px; /* учёт фиксированного nav 68px + 20px воздух */
  padding: 22px 18px 24px;
  background: var(--bg-alt);
  border: 1px solid rgba(194,125,42,0.20);
  border-radius: var(--radius-lg);
  box-shadow:
    0 6px 28px rgba(28,18,10,0.06),
    0 2px 8px rgba(194,125,42,0.08);
}
.faq-toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 4px 12px;
}
.faq-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq-toc-item {
  display: block;
  padding: 10px 12px 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  line-height: 1.35;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.faq-toc-item:hover {
  color: var(--accent-1);
  background: rgba(139,26,44,0.05);
}
.faq-toc-item.active {
  color: var(--accent-1);
  background: rgba(139,26,44,0.08);
  border-color: rgba(139,26,44,0.20);
  font-weight: 600;
  padding-left: 18px;
}
/* Золотая полоса слева у активного пункта TOC — как у открытого
   .faq-item, визуально связывает sticky-меню с текущей категорией */
.faq-toc-item::before {
  content: '';
  position: absolute;
  left: 0; top: 14%;
  width: 3px; height: 72%;
  background: linear-gradient(180deg, var(--accent-2), #a36a1f);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-toc-item.active::before { transform: scaleY(1); }

/* ── Категории FAQ ──────────────────────────────────────── */
.faq-category {
  scroll-margin-top: 88px;
}
.faq-category h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212,201,176,0.6);
}
/* Карминовый em-акцент в заголовках категорий FAQ — класс .faq-category
   не наследовал .page-article, поэтому требует свой селектор. */
.faq-category h2 em {
  font-style: italic;
  color: var(--accent-1);
}
.faq-category + .faq-category {
  margin-top: 40px;
}
.faq-category .faq-item { background: transparent; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* TOC СКРЫТ на мобайле: 5 категорий + 23 вопроса — юзер просто скроллит
     сверху вниз, навигация-pill только мешает. Раньше TOC pill висел
     сверху страницы, плюс scrollIntoView в site_faq_toc.js «возвращал»
     юзера обратно к TOC при scroll. Решено в Ответе 4 mobile-полировки.
     Scroll-spy в JS продолжает работать вхолостую (active class на
     невидимом элементе) — без видимых эффектов и performance impact. */
  .faq-toc { display: none; }
  /* Старые правила .faq-toc-sticky / list / item на mobile оставлены
     ниже как dormant — на случай возврата TOC в будущем. */
  .faq-toc-sticky {
    position: relative;
    top: 0;
    padding: 14px 16px;
    box-shadow: none;
  }
  .faq-toc-title {
    text-align: center;
    margin-bottom: 10px;
  }
  .faq-toc-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .faq-toc-item {
    padding: 8px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 12.5px;
  }
  .faq-toc-item.active {
    background: rgba(139,26,44,0.08);
    border-color: rgba(139,26,44,0.30);
    color: var(--accent-1);
  }
}
@media (max-width: 640px) {
  .faq-category h2 { font-size: 21px; }
  .faq-category + .faq-category { margin-top: 32px; }
}

/* ============================================================
   ОБЩИЙ RESPONSIVE
   ============================================================ */
/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  /* padding-top: 100px учитывает nav (68px) + воздух */
  .page-hero {
    padding: 100px 32px 64px;
    grid-template-columns: 1fr;
    min-height: 360px;
  }
  .page-hero--personal {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: start;
  }
  .page-hero-photo-frame {
    width: 200px; height: 200px;
  }
  .page-hero-wrap--personal::before {
    width: 280px; height: 280px;
    top: -80px; right: -80px;
  }
  .page-section { padding: 48px 24px 64px; }
}

@media (max-width: 640px) {
  /* ──────────────────────────────────────────────────────────
     Mobile split-hero для всех публичных страниц.
     Картина 40vh сверху → мягкий fade в bg → текст на бежевом ниже.
     Аналогично mobile hero главной (split + corners + box-shadow).
     ────────────────────────────────────────────────────────── */

  .page-hero-wrap {
    /* Тень слабее — раньше воспринималась как видимая «полоска» между
       hero и следующей секцией. Сделана едва-уловимой. */
    box-shadow: 0 6px 18px -14px rgba(28, 18, 10, 0.10);
  }

  .page-hero-bg {
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%; height: 40vh;
    object-position: center 30%;
    transform: scale(1.08) translateY(var(--parallax-y, 0px));
  }
  /* Mobile-overrides модификаторов crop'а — desktop-значения --top (center top)
     срезают фигуры на 40vh-высоте, нужны более «человеческие» значения.
     Конкретные срезы выбраны для каждой картины так, чтобы в первом
     экране были видны фигуры/лица персонажей. */
  .page-hero-bg--top {
    /* /faq/ Боярыня Морозова — лицо в середине-верху картины */
    object-position: center 22%;
  }
  .page-hero-bg--upper {
    /* /pricing/ Маковский Под венец, /middle-school/ Устный счёт —
       фигуры/середина картины */
    object-position: center 38%;
  }
  .page-hero-bg--landscape {
    /* /about/ Шишкин Рожь, /program/ Левитан Над вечным покоем —
       на mobile акцент чуть выше центра (тропа + холм видны в кадре,
       небо вверху). */
    object-position: center 55%;
  }
  .page-hero-bg--persons {
    /* Модификатор для картин с центральной фигурой/группой —
       crop сдвинут чуть выше дефолта, чтобы лица не уходили под текст hero. */
    object-position: center 35%;
  }
  .page-hero-bg--low {
    object-position: center 62%;
  }

  /* Overlay — fade картины в bg около 35-40vh, дальше чистый бежевый.
     Восстановлен после неудачного эксперимента с flex-flow: parallax
     ломал слой картины, потому что картина была в потоке и при
     translateY наезжала на текст ниже. */
  .page-hero-overlay {
    background: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 28vh,
      rgba(244,239,230,0.55) 35vh,
      rgba(244,239,230,0.95) 40vh,
      var(--bg) 42vh,
      var(--bg) 100%
    );
  }
  .page-hero-overlay--strong {
    background: linear-gradient(
      to bottom,
      rgba(244,239,230,0.20) 0%,
      rgba(244,239,230,0.35) 25vh,
      rgba(244,239,230,0.78) 36vh,
      rgba(244,239,230,0.97) 40vh,
      var(--bg) 42vh,
      var(--bg) 100%
    );
  }

  /* Декоративные золотые уголки в верхних углах картины */
  .page-hero-overlay::before,
  .page-hero-overlay::after {
    content: '';
    position: absolute;
    top: 14px;
    width: 22px; height: 22px;
    pointer-events: none;
    opacity: 0;
    animation: pageHeroCornerDraw 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.0s both;
  }
  .page-hero-overlay::before {
    left: 14px;
    border-top: 1.5px solid var(--accent-2);
    border-left: 1.5px solid var(--accent-2);
  }
  .page-hero-overlay::after {
    right: 14px;
    border-top: 1.5px solid var(--accent-2);
    border-right: 1.5px solid var(--accent-2);
    animation-delay: 1.15s;
  }

  /* Hero text сдвигается под картину */
  .page-hero {
    padding: 44vh 20px 56px;
    min-height: auto;
    gap: 16px;
  }

  /* Picture-credit — подпись К картине, ПОД картиной в fade-зоне overlay.
     Строго 1 строка (white-space: nowrap), без ellipsis — все credits
     сокращены до коротких канонических форм («Запорожцы», «Устный счёт»). */
  .page-hero-credit {
    top: 40.5vh; bottom: auto;
    right: auto; left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--faint);
    font-size: 10.5px;
    letter-spacing: 0.10em;
    padding: 0 36px;
    border-radius: 0;
    white-space: nowrap;
    text-align: center;
  }
  /* На очень узких экранах (320-360px) ещё компактнее. */
  @media (max-width: 360px) {
    .page-hero-credit {
      font-size: 9px;
      letter-spacing: 0.06em;
      padding: 0 24px;
    }
    .page-hero-credit::before,
    .page-hero-credit::after { width: 18px; }
  }
  .page-hero-credit::before,
  .page-hero-credit::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28px;
    height: 1px;
  }
  .page-hero-credit::before {
    right: 100%;
    margin-right: 4px;
    background: linear-gradient(to right, transparent, var(--accent-2));
  }
  .page-hero-credit::after {
    left: 100%;
    margin-left: 4px;
    background: linear-gradient(to right, var(--accent-2), transparent);
  }

  /* Фото на /about/ при split-hero — оборачиваем под текстом */
  .page-hero--with-photo,
  .page-hero--personal {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }
  .page-hero-photo-frame {
    width: 200px; height: 200px;
  }
  .page-hero-photo {
    box-shadow:
      0 0 0 2px var(--bg),
      0 0 0 4px var(--accent-2),
      0 16px 40px rgba(28,18,10,0.22),
      0 6px 18px rgba(194,125,42,0.18);
  }
  .page-hero-photo-frame::before {
    inset: -12px;
  }

  .page-section { padding: 40px 20px 56px; }
  .page-article > section { padding: 12px 0; }
  .page-article > section + section {
    padding-top: 28px;
    margin-top: 16px;
  }
  .page-article p { font-size: 16px; }
}

/* ──────────────────────────────────────────────────────────
   Общие анимации появления page-hero на всех viewports.
   При заходе на любую публичную страницу: картина fade-in,
   потом stagger eyebrow → h1 → p, потом credit.
   Сначала появляется визуальный фон, потом текст «читается»
   сверху вниз — естественный порядок чтения.
   ────────────────────────────────────────────────────────── */
.page-hero-bg {
  animation: pageHeroBgFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.page-hero-text > * {
  animation: pageHeroTextFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-hero-text > *:nth-child(1) { animation-delay: 0.35s; }
.page-hero-text > *:nth-child(2) { animation-delay: 0.50s; }
.page-hero-text > *:nth-child(3) { animation-delay: 0.65s; }
.page-hero-text > *:nth-child(4) { animation-delay: 0.80s; }

.page-hero-photo-frame {
  animation: pageHeroPhotoIn 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) 0.5s both;
}
.page-hero-credit {
  animation: pageHeroFadeSimple 0.6s ease 0.85s both;
}

@keyframes pageHeroBgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pageHeroTextFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageHeroPhotoIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pageHeroFadeSimple {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pageHeroCornerDraw {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 0.75; transform: scale(1); }
}

/* Mobile credit с своей анимацией fade — переопределяем общую,
   чтобы сохранить translateX(-50%) при появлении */
@media (max-width: 640px) {
  .page-hero-credit {
    animation: pageHeroCreditMobileFade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.4s both;
  }
}
@keyframes pageHeroCreditMobileFade {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Accessibility — отключить анимации page-hero для prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .page-hero-bg,
  .page-hero-text > *,
  .page-hero-photo-frame,
  .page-hero-credit,
  .page-hero-overlay::before,
  .page-hero-overlay::after {
    animation: none;
  }
  .page-hero-text > * { opacity: 1; transform: none; }
  .page-hero-photo-frame { opacity: 1; transform: none; }
  .page-hero-credit { opacity: 1; }
  .page-hero-overlay::before,
  .page-hero-overlay::after { opacity: 0.75; }
}

/* ─────────────────────────────────────────────
   404 — страница «не найдено»
   Тёмная, минималистичная, отключает chrome через
   пустые override-блоки в шаблоне.
   Картина-фон передаётся через inline-style:
   <div class="e404-bg" style="background-image: url(...)"></div>
   ───────────────────────────────────────────── */
.e404-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 24px;
}
.e404-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.25);
  z-index: 0;
}
.e404-content {
  position: relative; z-index: 1;
  max-width: 560px;
}
.e404-mark {
  width: clamp(60px, 8vw, 88px);
  height: auto;
  display: block;
  margin: 0 auto 24px;
  opacity: 0.92;
}
.e404-code {
  font-size: clamp(96px, 18vw, 160px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  color: #fff;
  opacity: 0.12;
  margin-bottom: -24px;
  user-select: none;
  position: relative;
}
/* Sparkle ✨ × 2 у цифры «404» — оживить статичную страницу */
.e404-content {
  position: relative;
}
.e404-content::before,
.e404-content::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194,125,42,0.95) 0%, rgba(194,125,42,0) 70%);
  pointer-events: none;
  opacity: 0;
}
.e404-content::before {
  top: 24%; right: 18%;
  animation: e404Sparkle 9s ease-in-out 1.5s infinite;
}
.e404-content::after {
  top: 38%; left: 16%;
  animation: e404Sparkle 9s ease-in-out 5s infinite;
}
@keyframes e404Sparkle {
  0%, 88%, 100% { opacity: 0; transform: scale(0.6); }
  92%           { opacity: 1; transform: scale(1.4); }
  96%           { opacity: 0.6; transform: scale(1.0); }
}
@media (prefers-reduced-motion: reduce) {
  .e404-content::before,
  .e404-content::after { animation: none; opacity: 0; }
}
.e404-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}
.e404-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 36px;
}
.e404-btn {
  display: inline-block;
  height: 48px;
  padding: 0 28px;
  line-height: 48px;
  background: #fff;
  color: var(--dark);
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.e404-btn:hover { opacity: 0.88; }
.e404-credit {
  margin-top: 48px;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.04em;
}
