/* ═══════════════════════════════════════════════════════════════════════════
   Совушка — стили лендинга. Один файл, без сборки.
   Порядок: шрифт → палитра → база → общие элементы → секции сверху вниз.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---------- Шрифт Inter, локально (папка fonts/) ---------- */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/inter-cyrillic-ext.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/inter-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- Палитра и размеры ---------- */
:root {
  /* Акцент один: кнопки, акцент в заголовке, бейджи, иконки.
     --brand-hover светлее базового: кнопка подсвечивается, а не темнеет. */
  --brand-600: #4f9df5;
  --brand-hover: #62a9f7;
  --brand-500: #79b4f7;
  --brand-300: #b3d3fa;
  --brand-200: #d6e7fd;
  --brand-100: #e7f1ff;
  --brand-050: #f4f9ff;

  /* Текст: нейтральный, не синий */
  --ink: #10151c;
  --ink-soft: #5f6b7a;
  --muted: #a7b0bc;

  /* Фон страницы белый. Голубизну сверху даёт картинка первого экрана. */
  --page: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f9ff;        /* плитки и «тихие» блоки */
  --surface-hover: #f7fbff;    /* кнопки и плитки при наведении */
  --surface-menu: #ecf3fb;     /* пункты меню при наведении */
  --panel: linear-gradient(160deg, #f7fbff, #eff6fe); /* крупные блоки */
  --line: #e4ecf6;
  --line-hover: #c3d5ea;

  --accent-yellow: #ffc94d;    /* звёзды в отзывах — единственный несиний */

  --font-base: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --header-h: 60px;     /* высота «острова» шапки */
  --header-gap: 14px;   /* его отступ от верха экрана */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 900px) {
  :root { --gutter: 18px; --header-gap: 8px; }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--header-gap) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -0.025em; font-weight: 650; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-200); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Появление блоков при прокрутке: класс .rv, скрипт вешает .in.
   Задержку каскада задавай инлайном: style="transition-delay:.08s" */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.rv.in { opacity: 1; transform: none; }
/* у карточек есть своя transition для рамки при наведении — она не должна перебивать появление,
   поэтому здесь список объединён (специфичность выше, чем у .course и .why-card) */
.rv.rv { transition: opacity 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), border-color 0.18s ease, background-color 0.18s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .rot, .rot .rw { transition: none !important; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}

/* ---------- Иконки из спрайта ---------- */
.ic { width: 1em; height: 1em; flex: 0 0 auto; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  /* только цвет: ничего не летает и не прыгает */
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn .ic { width: 20px; height: 20px; }
.btn-primary { color: #fff; background: var(--brand-600); border: 1px solid var(--brand-600); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--line-hover); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }
.btn .ic-end { transition: transform 0.25s var(--ease); }
.btn:hover .ic-end { transform: translateX(3px); }

/* ---------- Слоты под картинки ----------
   <span class="slot" data-slot="имя-файла" style="aspect-ratio:W/H">
     <img src="images/имя-файла.png" onerror="this.parentNode.classList.add('empty')">
   </span>
   Файла нет — рисуется пунктирная рамка с именем. Положил файл — картинка. */
.slot { position: relative; display: block; width: 100%; overflow: hidden; }
.slot img { width: 100%; height: 100%; object-fit: contain; }
.slot-cover img { object-fit: cover; }
.slot.empty img { display: none; }
.slot.empty::before {
  content: attr(data-slot);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  color: var(--brand-600);
  background:
    repeating-linear-gradient(135deg, rgba(74, 144, 242, 0.05) 0 10px, rgba(74, 144, 242, 0) 10px 20px),
    var(--brand-050);
  border: 2px dashed var(--brand-300);
  border-radius: var(--radius-md);
}
.slot-round.empty::before { border-radius: 50%; font-size: 0; }
.slot-compact.empty::before { font-size: 0; border-radius: 12px; } /* мелкий слот: только рамка */

/* Фон плитки: ложится под содержимое, файла нет — просто нет фона.
   <img class="bg" src="images/x.png" alt="" onerror="this.remove()"> */
.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ---------- Логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { flex: 0 0 auto; width: 28px; }
.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-name { font-size: 19px; font-weight: 650; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.logo-sub { font-size: 10px; font-weight: 550; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .logo-mark { width: 24px; } .logo-name { font-size: 18px; } }

/* ═══════════════════ Шапка ═══════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--header-gap); /* прозрачный зазор — за счёт него плашка «висит» */
}
.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1004px;
  margin-inline: auto;
  height: var(--header-h);
  padding: 0 10px 0 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(230, 234, 240, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 24px -14px rgba(16, 24, 40, 0.18);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.header.scrolled .header-bar { background: rgba(255, 255, 255, 0.95); box-shadow: 0 12px 32px -14px rgba(16, 24, 40, 0.28); }
.header-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.header-link {
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.header-link:hover { color: var(--ink); background: var(--surface-menu); }
.burger { display: none; flex-direction: column; gap: 5px; padding: 10px; border-radius: var(--radius-sm); }
.burger span { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .header-bar { padding-inline: 16px; }
  /* мобильное меню — отдельной плашкой под «островом» */
  .header-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 14px 18px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px -14px rgba(16, 24, 40, 0.28);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .header-nav.open { transform: none; opacity: 1; visibility: visible; }
  .header-link { padding: 12px 8px; font-size: 16px; }
  .burger { display: flex; order: 3; margin-left: auto; margin-right: -4px; }   /* прижат к правому краю «острова» */
}

/* ═══════════════════ Первый экран ═══════════════════ */
.hero-area {
  position: relative;
  /* фон уходит вверх под шапку и немного ниже первого экрана */
  --backdrop-top: calc(-1 * (var(--header-h) + var(--header-gap) * 2));
  --backdrop-bottom: -40px;
}
.backdrop {
  position: absolute;
  top: var(--backdrop-top, 0);
  right: 0;
  bottom: var(--backdrop-bottom, 0);
  left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.backdrop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.backdrop-fade { position: absolute; inset: auto 0 0; height: 140px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--page)); }
/* запасные пятна, пока картинки фона нет */
.cloud { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.9; }
.cloud-a { top: 0; left: -140px; width: 420px; height: 380px; background: #e8f1fc; }
.cloud-b { top: 20px; right: -140px; width: 420px; height: 380px; background: #eef4fd; }

.hero { position: relative; padding: 76px 0 88px; }
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-title {
  max-width: 860px;
  margin-inline: auto;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.028em;
  color: var(--ink);
}
.accent { color: var(--brand-600); }
/* Сменяющийся предмет в заголовке — барабан, как у botyx: старое слово укатывается
   вверх, новое одновременно подкатывается снизу; окно обрезано по высоте строки,
   ширина плавно подстраивается под новое слово. Строка не переносится. */
.h1l { white-space: nowrap; }
.rot {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  clip-path: inset(-4px -9999px);
  transition: width 0.42s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.rot .rw { display: inline-block; transition: transform 0.42s cubic-bezier(0.3, 0.7, 0.2, 1); }
.rot .rw.up { transform: translateY(-115%); }
.rot .rw.nx { position: absolute; left: 0; top: 0; transform: translateY(115%); }
.rot .rw.nx.go { transform: translateY(0); }
.br-m { display: none; } /* перенос «от 300 ₽» на свою строку — только на телефоне */
.hero-lead { max-width: 62ch; margin: 24px auto 0; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 12px 34px; justify-content: center; margin-top: 34px; }
.chip { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.chip .ic { width: 18px; height: 18px; color: var(--brand-600); }
@media (max-width: 620px) {
  .hero { padding: 36px 0 44px; }
  .hero-title { font-size: min(30px, 7.4vw); }
  .hero-lead { margin-top: 18px; font-size: 15px; }
  .hero-actions, .hero-chips { margin-top: 26px; }
  .br-m { display: inline; }
  .hero-chips { gap: 10px 20px; }
  .chip { font-size: 12.5px; }
}

/* ═══════════════════ Заголовок секции ═══════════════════ */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 32px; }
.section-title { font-size: clamp(27px, 3.1vw, 40px); font-weight: 650; line-height: 1.14; letter-spacing: -0.025em; color: var(--ink); }
.section-subtitle { max-width: 60ch; margin-top: 12px; font-size: 16px; color: var(--ink-soft); }
@media (max-width: 640px) { .section-head { margin-bottom: 24px; } }

/* общий квадрат под иконку в карточках */
.icon-box { display: grid; place-items: center; flex: 0 0 auto; color: var(--brand-600); background: var(--brand-100); }
.icon-box .ic { width: 24px; height: 24px; }

/* плашка «Популярно у учеников» / «Хит среди учеников» */
.badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 650;
  color: var(--brand-600);
  background: var(--brand-100);
  border-radius: var(--radius-pill);
}

/* ═══════════════════ Школы ═══════════════════ */
.schools { padding: 26px 0 44px; }
/* слева панель на всю высоту, справа 3×2 карточки и широкая плитка снизу */
.schools-grid { display: grid; grid-template-columns: 2.1fr repeat(3, 1fr); grid-template-rows: auto auto auto; gap: 14px; }
.tile { position: relative; display: block; overflow: hidden; background: var(--surface-2); border-radius: 18px; }
.tile-content { position: relative; z-index: 1; }
.tile-feature { grid-column: 1; grid-row: 1 / 4; min-height: 330px; }
/* текст занимает левую часть панели, правая — под иллюстрацию фона */
.tile-feature .tile-content { max-width: 60%; padding: 24px 24px 28px; }
.tile-feature .bg { object-position: right center; }
.tile-more { grid-column: 2 / 5; }
.feature-title { font-size: clamp(22px, 2.2vw, 27px); font-weight: 650; letter-spacing: -0.022em; line-height: 1.15; color: var(--ink); }
.points { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.point { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); }
.point .ic { width: 18px; height: 18px; color: var(--brand-600); }
.tile-card .tile-content { padding: 18px 18px 20px; }
.school-head { display: flex; align-items: center; gap: 11px; }
.school-logo { flex: 0 0 auto; width: 42px; border-radius: 12px; }
.school-name { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.school-text { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.more-content { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
/* три точки без плашки, прямо на фоне плитки; размер оставлен, чтобы стоять вровень с логотипами */
.more-icon { width: 42px; height: 42px; background: none; }
.more-text { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 1080px) {
  .schools-grid { grid-template-columns: repeat(2, 1fr); }
  .tile-feature { grid-column: 1 / 3; grid-row: auto; min-height: 300px; }
  .tile-feature .tile-content { max-width: 46%; }
  .tile-more { grid-column: 1 / 3; }
}
@media (max-width: 620px) {
  .schools { padding-bottom: 34px; }
  .schools-grid { grid-template-columns: 1fr; }
  .tile-feature, .tile-more { grid-column: 1; }
  /* на телефоне текст сверху, иллюстрация фона — в нижних двух третях панели */
  .tile-feature { min-height: 540px; }
  .tile-feature .tile-content { max-width: none; }
  .tile-feature .bg { top: auto; height: 54%; object-position: center bottom; }
}

/* ═══════════════════ Почему выбирают ═══════════════════ */
.why { padding: 26px 0 44px; }
/* слева иллюстрация 5:4 во всю плитку, справа три карточки, растянутые на её высоту */
.why-grid { display: grid; grid-template-columns: 1.04fr 1fr; gap: 18px; align-items: stretch; }
.why-art { position: relative; overflow: hidden; aspect-ratio: 5 / 4; background: var(--surface-2); border-radius: 22px; }
.why-art .slot { position: absolute; inset: 0; }
.why-list { display: grid; grid-auto-rows: 1fr; gap: 16px; }
.why-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 22px 22px 24px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.18s;
}
.why-card:hover { border-color: var(--line-hover); }
/* иконка карточки — картинка пользователя на светлой плашке */
.why-icon { flex: 0 0 auto; width: 60px; height: 60px; background: var(--brand-100); border-radius: 16px; }
.why-icon.empty::before { border-radius: 16px; }
.why-body { flex: 1 1 auto; min-width: 0; }
.why-title { font-size: 16px; font-weight: 650; letter-spacing: -0.012em; line-height: 1.3; color: var(--ink); }
.why-text { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
/* стрелка справа: на ховер карточки только меняет цвет */
.why-go {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--brand-600);
  background: var(--brand-100);
  border-radius: 50%;
  transition: background-color 0.18s;
}
.why-go .ic { width: 16px; height: 16px; }
.why-card:hover .why-go { background: var(--brand-200); }
@media (max-width: 1080px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-list { grid-auto-rows: auto; }
}
@media (max-width: 620px) {
  .why { padding-bottom: 34px; }
  .why-card { gap: 14px; padding: 18px 16px 18px 18px; }
  .why-icon { width: 50px; height: 50px; border-radius: 14px; }
  .why-title { font-size: 15px; }
  .why-text { font-size: 13px; }
}

/* ═══════════════════ Бесплатные материалы ═══════════════════ */
.materials { padding: 26px 0 44px; }
/* слева текст и три карточки, справа большая иллюстрация на всю высоту панели */
.mat-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 10px;
  padding: 36px 0 36px 40px;
  background: var(--panel);
  border-radius: 22px;
}
.mat-copy, .mat-art { position: relative; z-index: 1; } /* над слоем фона .bg */
.mat-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 6px 14px 6px 11px; font-size: 12.5px; }
.mat-badge .ic { width: 15px; height: 15px; }
.mat-title { font-size: clamp(26px, 3vw, 38px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.14; color: var(--ink); }
.mat-subtitle { max-width: 50ch; margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.mat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.mat-card { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 14px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
/* иконка карточки — картинка пользователя на светлой плашке */
.mat-icon { width: 52px; height: 52px; margin-bottom: 16px; background: var(--brand-100); border-radius: 14px; }
.mat-icon.empty::before { border-radius: 14px; }
.mat-body { display: block; min-width: 0; }
.mat-name { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.mat-text { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
/* иллюстрация занимает правую половину панели: чуть шире колонки и сдвинута за правый край,
   мягкий край облака обрезается панелью, содержимое картинки остаётся целиком */
.mat-art { align-self: end; width: calc(100% + 32px); margin-bottom: -36px; }
.mat-art .slot img { object-position: right bottom; }
.mat-art .slot { width: 100%; }
/* когда колонка текста узкая (панель в две колонки на 900–1150 и телефон) —
   карточки в столбик: иконка слева, текст справа */
@media (max-width: 1150px) and (min-width: 901px), (max-width: 620px) {
  .mat-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mat-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
  .mat-icon { flex: 0 0 auto; margin-bottom: 0; }
}
@media (max-width: 900px) {
  .mat-panel { grid-template-columns: minmax(0, 1fr); padding: 28px 22px 0; }
  .mat-art { max-width: 520px; margin: 8px auto 0; }
}
@media (max-width: 620px) {
  .materials { padding-bottom: 34px; }
}

/* ═══════════════════ Предметы ═══════════════════ */
.subjects { padding: 26px 0 44px; }
.subjects-grid { display: grid; grid-template-columns: 1.05fr 2.4fr; grid-template-rows: auto auto; gap: 14px; }
.subject-feature {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 240px;
  padding: 22px 22px 24px;
  background: var(--panel);
  border-radius: 18px;
}
.subject-feature > :not(.bg) { position: relative; z-index: 1; } /* текст над слоем фона */
.subject-feature-name { font-size: 24px; font-weight: 650; letter-spacing: -0.022em; color: var(--ink); }
.subject-feature-text { max-width: 20ch; margin: 8px 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.subject-feature-cta { margin-top: auto; } /* кнопка прижата к низу плитки */
.subjects-row { display: grid; gap: 14px; }
.subjects-row-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subjects-row-bottom { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* карточка предмета: иконка сверху, под ней заголовок и описание */
.subject-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: 16px 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.subject-card > :not(.bg) { position: relative; z-index: 1; } /* иконка и текст над слоем фона */
/* иконка предмета — картинка пользователя на светлой плашке */
.subject-icon { flex: 0 0 auto; width: 42px; height: 42px; margin-bottom: 14px; background: var(--brand-100); border-radius: 12px; }
.subject-text { min-width: 0; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.subject-text b { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 650; color: var(--ink); }
@media (max-width: 1080px) {
  .subjects-grid { grid-template-columns: minmax(0, 1fr); }
  .subject-feature { grid-row: auto; min-height: 190px; }
  .subjects-row-top, .subjects-row-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .subjects { padding-bottom: 34px; }
  .subjects-row-top, .subjects-row-bottom { grid-template-columns: minmax(0, 1fr); }
}

/* ═══════════════════ Отзывы ═══════════════════ */
.reviews { position: relative; overflow: hidden; padding: 26px 0 44px; }
/* фон секции — фиксированный холст 1440×500 по центру: не тянется и не масштабируется,
   на широких экранах по краям белое, на узких края холста обрезаются. Схема — images/reviews-bg-scheme.png */
.reviews > .bg { inset: auto; top: 0; left: 50%; width: 1440px; height: 500px; transform: translateX(-50%); }
.reviews-inner { position: relative; z-index: 1; } /* над слоем фона */
@media (min-width: 901px) { .reviews { min-height: 500px; } }
/* лента карточек чуть шире контейнера: первая карточка выровнена по контейнеру, крайние
   выходят за него на --edge (до 72px) и в этой полосе плавно растворяются */
.reviews-track {
  --edge: min(72px, max(24px, calc((100% - 1152px) / 2)));
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  width: min(100%, calc(1152px + 2 * 72px));
  margin-inline: auto;
  padding: 26px var(--edge) 22px; /* сверху и снизу — запас под наклон и увеличенную центральную карточку */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
}
.reviews-track::-webkit-scrollbar { display: none; }
.review {
  position: relative;
  flex: 0 0 calc((100% - 40px) / 3.25);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transform: rotate(-2deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1), border-color 0.18s;
}
.review:nth-child(even) { transform: rotate(2deg); }
/* карточка в центре ленты — ровная, крупнее соседних и чуть приподнята */
.review.is-center { z-index: 1; transform: translateY(-6px) scale(1.07); border-color: var(--brand-200); }
/* декоративная кавычка в углу */
.review-quote { position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; color: var(--brand-200); pointer-events: none; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar { flex: 0 0 auto; width: 54px; border-radius: 50%; }
/* фото нет — буква имени на светлой плашке вместо пунктирной рамки */
.review .review-avatar.empty::before {
  content: attr(data-letter);
  font-size: 21px;
  font-weight: 650;
  color: var(--brand-600);
  background: var(--brand-100);
  border: 0;
  border-radius: 50%;
}
.review-name { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.review-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.review-stars { display: flex; gap: 3px; color: var(--accent-yellow); }
.review-stars .ic { width: 18px; height: 18px; }
.review-text { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
/* стрелки и точки под лентой */
.reviews-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 6px; }
.reviews-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.reviews-arrow:hover { background: var(--surface-hover); border-color: var(--line-hover); }
.reviews-arrow .ic { width: 16px; height: 16px; }
.reviews-arrow[data-prev] .ic { transform: scaleX(-1); }
.reviews-dots { display: flex; gap: 8px; }
.reviews-dot { width: 9px; height: 9px; padding: 0; background: var(--brand-200); border: 0; border-radius: 50%; cursor: pointer; transition: background-color 0.18s; }
.reviews-dot.on { background: var(--brand-600); }
@media (max-width: 900px) { .review { flex-basis: calc((100% - 20px) / 2.15); } }
@media (max-width: 620px) {
  .reviews { padding-bottom: 34px; }
  .reviews-track { gap: 14px; padding-top: 6px; padding-bottom: 14px; }
  .review, .review:nth-child(even), .review.is-center { flex-basis: 86%; transform: none; } /* на телефоне без наклона и увеличения */
}

/* ═══════════════════ FAQ ═══════════════════ */
.faq { padding: 26px 0 44px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; align-items: start; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color 0.16s ease; }
.faq-item:hover { border-color: var(--line-hover); }
.faq-item.open { border-color: var(--brand-300); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 15px 20px; text-align: left; font-size: 14.5px; font-weight: 550; color: var(--ink); }
.faq-plus { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; color: var(--brand-600); transition: transform 0.3s var(--ease); }
.faq-plus .ic { width: 16px; height: 16px; }
.faq-item.open .faq-plus { transform: rotate(45deg); }
.faq-a-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s var(--ease); }
.faq-item.open .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a { overflow: hidden; }
.faq-a-inner { padding: 0 50px 16px 20px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 800px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .faq { padding-bottom: 34px; } .faq-a-inner { padding-right: 20px; } }

/* ═══════════════════ Финальный призыв ═══════════════════ */
.cta { padding: 26px 0 52px; }
/* панель 1152×345 на десктопе: фон cta-bg на всю панель, текст и кнопки по центру поверх */
.cta-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 345px;
  padding: 44px 36px;
  text-align: center;
  background: var(--panel);
  border-radius: 22px;
}
.cta-copy { position: relative; z-index: 1; max-width: 640px; }
.cta-badge { margin-bottom: 18px; padding: 7px 16px; font-size: 13px; }
.cta-title { font-size: clamp(26px, 3.2vw, 40px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.14; color: var(--ink); }
.cta-text { max-width: 52ch; margin: 14px auto 26px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 900px) { .cta-panel { min-height: 0; padding: 36px 24px; } }
@media (max-width: 620px) {
  .cta { padding-bottom: 40px; }
  .cta-panel { padding: 30px 20px; }
  .cta-text { font-size: 15px; }
}

/* ═══════════════════ Документы: политика и оферта ═══════════════════ */
.legal { padding: 40px 0 76px; }
.legal-inner { max-width: 780px; margin-inline: auto; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 13px; font-weight: 550; color: var(--ink-soft); transition: color 0.15s ease; }
.legal-back .ic { width: 16px; height: 16px; transform: rotate(180deg); }   /* стрелка смотрит назад */
.legal-back:hover { color: var(--brand-600); }
.legal h1 { font-size: clamp(27px, 3.1vw, 40px); font-weight: 650; line-height: 1.14; letter-spacing: -0.025em; color: var(--ink); }
.legal-date { margin-top: 10px; font-size: 13px; color: var(--muted); }
.legal h2 { margin-top: 40px; font-size: 19px; font-weight: 650; letter-spacing: -0.015em; color: var(--ink); }
.legal p { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.legal p b { margin-right: 4px; font-weight: 600; color: var(--ink); }      /* номер пункта */
.legal ul { margin-top: 10px; }
.legal li { position: relative; margin-top: 8px; padding-left: 18px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.legal li::before { content: ''; position: absolute; top: 9px; left: 2px; width: 5px; height: 5px; background: var(--brand-300); border-radius: 50%; }
.legal code { padding: 2px 6px; font-size: 13.5px; background: var(--surface-2); border-radius: 6px; }
.legal-final { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .legal { padding: 28px 0 56px; } .legal h2 { margin-top: 32px; font-size: 18px; } }

/* ═══════════════════ Подвал ═══════════════════ */
.footer { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer-desc { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-link { font-size: 13px; font-weight: 550; color: var(--ink-soft); transition: color 0.15s ease; }
.footer-link:hover { color: var(--brand-600); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-legal .footer-link { font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 860px) {
  .footer-top { justify-content: flex-start; }
  .footer-nav { order: 3; width: 100%; gap: 18px; }
}
