/* ============================================================
   AiPsyLab — основные стили
   Палитра:
     Основной синий ........ #2E3BB0
     Светло-голубой (фон) ... #E8ECFF
     Белый ................. #FFFFFF
     Тёмный (текст) ........ #1A1D2E
   Брейкпоинты:
     до 767px ......... мобильные
     768–1079px ....... планшеты
     от 1080px ........ десктоп
============================================================ */

:root {
  --blue: #2E3BB0;
  --blue-hover: #253092;
  --blue-deep: #27339B;
  --blue-soft: #5663D6;
  --light: #E8ECFF;
  --white: #FFFFFF;
  --dark: #1A1D2E;
  --muted: #5B6178;
  --border: #D6DCF5;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 10px 30px rgba(30, 41, 120, 0.10);
  --shadow-card-hover: 0 16px 40px rgba(30, 41, 120, 0.16);

  --container: 1140px;
  /* Высоты шапки подобраны так, чтобы бургер (44px) центрировался
     с отступом, кратным 4px: (68−44)/2 = 12, (76−44)/2 = 16.
     Это целое число физических пикселей при масштабах Windows
     100/125/150/200% — полоски не «плывут» по толщине. */
  --header-h: 68px;
  --transition: 0.25s ease;
}

@media (min-width: 768px) {
  :root { --header-h: 76px; }
}

/* ---------- Сброс и база ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--blue-hover);
}

::selection {
  background: var(--blue);
  color: var(--white);
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

/* Скрыть визуально, но оставить для скринридеров */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Ссылка «перейти к содержимому» для клавиатуры и скринридеров */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--blue);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  /* Линия снизу — тенью, а не border: рамка вычиталась бы из высоты
     и сбивала центровку бургера на полпикселя */
  box-shadow: 0 1px 0 var(--border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue);
  white-space: nowrap;
}

.logo:hover {
  color: var(--blue-hover);
}

.logo span {
  color: var(--blue-soft);
}

/* Навигация: на мобильных — выпадающая панель под шапкой */
.site-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 32px rgba(30, 41, 120, 0.12);
  padding: 8px 0 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.site-nav__list a {
  display: block;
  padding: 12px 24px;
  font-weight: 600;
  color: var(--dark);
}

.site-nav__list a:hover {
  color: var(--blue);
}

.site-nav__list a[aria-current="page"] {
  color: var(--blue);
}

/* Бургер.
   Полоски позиционируются абсолютно с шагом 8px: при системном
   масштабировании Windows (125%/150%) шаг остаётся целым числом
   физических пикселей, поэтому все три полоски рендерятся
   одинаковой толщины на любой ширине окна. */
.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 28px; }

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list {
    flex-direction: row;
    gap: 8px;
  }

  .site-nav__list a {
    padding: 8px 14px;
    border-radius: 999px;
  }

  .site-nav__list a[aria-current="page"] {
    background: var(--light);
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-hover);
  color: var(--white);
}

/* Для синих секций */
.btn--light {
  background: var(--white);
  color: var(--blue);
}

.btn--light:hover {
  background: var(--light);
  color: var(--blue-hover);
}

.btn--outline {
  border-color: var(--blue);
  color: var(--blue);
  background: transparent;
}

.btn--outline:hover {
  background: var(--light);
  color: var(--blue-hover);
}

/* Текстовая ссылка со стрелкой */
.link-arrow {
  font-weight: 700;
  white-space: nowrap;
}

.link-arrow::after {
  content: " →";
  transition: margin var(--transition);
}

.link-arrow:hover::after {
  margin-left: 4px;
}

/* ---------- Секции ---------- */

.section {
  padding: 56px 0;
}

@media (min-width: 768px) {
  .section { padding: 80px 0; }
}

@media (min-width: 1080px) {
  .section { padding: 96px 0; }
}

.section--light { background: var(--light); }

.section--blue {
  background: var(--blue);
  color: var(--white);
}

/* Тёмные поверхности: синяя секция во всю ширину и тёмные панели CTA
   (см. блок «Финальный CTA» ниже) красят текст в белый одинаково. */
:is(.section--blue, .section--cta--accent, .section--cta--ink) h2 { color: var(--white); }

.section__head {
  max-width: 680px;
  margin-bottom: 36px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--muted);
}

:is(.section--blue, .section--cta--accent, .section--cta--ink) .section__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.section__footer {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Финальный CTA перед подвалом ----------
   Почти каждая страница заканчивается призывом: оставить контакты,
   подписаться на канал или рассылку, прийти в чат. Раньше эти блоки
   верстались по-разному и упирались в соседей: синяя полоса сливалась
   с подвалом (подвал — сплошной var(--blue)), светлая — с предыдущей
   секцией. Правило теперь одно: CTA не должен совпадать по фону ни с тем,
   что над ним, ни с подвалом.

   Как это устроено. Секция даёт подложку (белую или .section--light),
   а содержимое ложится на собственную панель со скруглением — панель
   всегда отбита от подвала полосой подложки, а от предыдущей секции —
   и цветом, и скруглением. Тон панели переключается ОДНИМ классом
   на <section>:

     .section--cta--accent   синяя градиентная панель (самый громкий тон)
     .section--cta--ink      тёмная панель var(--dark)
     .section--cta--soft     светлая панель var(--light)
     .section--cta--plain    белая панель с рамкой

   Выбор подложки: после белой .section — добавьте .section--light,
   после .section--light — оставьте белую. Не ставьте --soft на светлую
   подложку и --plain на белую: панель растворится.

   На --accent и --ink кнопки внутри панели должны быть .btn--light
   (белые), иначе синяя кнопка утонет в синем фоне. */

/* Панель занимает место .container, но оставляет по бокам такие же поля,
   как обычный контент (20/32px) — иначе на мобильном она упрётся в края
   экрана и перестанет читаться карточкой. */
.section--cta > .container {
  width: calc(100% - 40px);
  max-width: 880px;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .section--cta > .container { width: calc(100% - 64px); }
}

/* Внутри панели уже есть воздух — вертикальный ритм чуть плотнее секции */
.section--cta .section__head { margin-bottom: 28px; }
.section--cta .section__footer { margin-top: 28px; }

/* Низ панели держат её собственные padding'и: гасим margin-bottom последнего
   элемента (у .container есть padding, поэтому margin наружу не схлопнется). */
.section--cta > .container > :last-child,
.section--cta > .container > :last-child > :last-child {
  margin-bottom: 0;
}

.section--cta .form {
  margin-top: 24px;
  text-align: left;
}

@media (min-width: 768px) {
  .section--cta .form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* Узкий столбец внутри панели: форма подписки, список галочек, приписка */
.cta-narrow {
  max-width: 560px;
  margin-inline: auto;
}

/* --- Тона панели --- */

.section--cta--accent > .container {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 55%, var(--blue-soft) 100%);
  color: var(--white);
  box-shadow: 0 18px 44px rgba(30, 41, 120, 0.28);
}

.section--cta--ink > .container {
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 18px 44px rgba(26, 29, 46, 0.28);
}

.section--cta--soft > .container {
  background: var(--light);
}

.section--cta--plain > .container {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* Текстовые ссылки (не кнопки) на тёмной панели: var(--blue) там не виден */
:is(.section--cta--accent, .section--cta--ink) > .container a:not(.btn) {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:is(.section--cta--accent, .section--cta--ink) > .container a:not(.btn):hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Появление при прокрутке ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hero (главная) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 64px 0;
}

@media (min-width: 768px) {
  .hero { padding: 96px 0; }
}

/* Декоративные круги */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, rgba(232, 236, 255, 0.16), transparent 70%);
}

.hero::after {
  width: 560px;
  height: 560px;
  bottom: -240px;
  left: -180px;
  background: radial-gradient(circle, rgba(86, 99, 214, 0.5), transparent 70%);
}

/* Живой фон hero — «вспышки нейронов» (canvas, js/hero-net.js):
   нейроны соединены постоянными «синапсами», вспыхивают и шлют
   по связям импульсы-искры; курсор будит нейроны рядом с собой */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
  /* Мягкий ореол цвета фона вокруг букв приглушает нейросеть
     позади текста, не выключая её совсем */
  text-shadow:
    0 0 10px var(--blue),
    0 0 24px var(--blue),
    0 0 44px var(--blue);
}

.hero__brand {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
}

.hero__title {
  color: var(--white);
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--light);
  margin: 0;
}

/* Строка миссии — чуть мельче девиза, светло-голубая, без кнопки рядом */
.hero__mission {
  max-width: 620px;
  margin: 14px auto 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  color: var(--light);
  opacity: 0.92;
}

/* ---------- Блок «О проекте» (главная) ---------- */

.intro {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.intro__text {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 28px;
}

/* ---------- Блок «Что для нас важно» (главная) ----------
   Простые текстовые карточки-ценности, раскладка на .grid-cards */

.value-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.value-card h3 {
  margin-bottom: 8px;
  color: var(--blue);
}

.value-card p {
  margin: 0;
  color: var(--muted);
}

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

.grid-cards {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* ---------- Продукты (блок 3) ----------
   Сетка рассчитана на рост: новые продукты добавляются
   как ещё одна .product-card — без переверстки. */

/* Раскладка «1 + 3»: выделенная карточка «Попробовать» занимает весь
   первый ряд и раскрывается горизонтально, три остальных направления
   идут рядом под ней. На мобильном всё перестраивается в столбик. */
.products-grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }

  /* Выделенная карточка — на всю ширину ряда и горизонтальная (раскладка «1 + N»).
     Двойной класс повышает приоритет над .product-card { flex-direction: column } ниже по файлу */
  .product-card.product-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .product-card--featured .product-card__preview {
    flex: 0 0 38%;
  }
  .product-card--featured .product-card__icon {
    width: 120px;
    height: 120px;
  }
  .product-card--featured .product-card__body {
    justify-content: center;
  }
  /* В горизонтальной карточке текст не растягивает блок — держим компактно по центру */
  .product-card--featured .product-card__body p {
    flex-grow: 0;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Выделенная карточка витрины: мягкий голубой фон и акцентная рамка.
   Сейчас ни одна карточка её не использует (раскладка «1 + 3» освободилась
   после того, как «Попробовать» убрали из витрины) — правила оставлены
   для следующего продукта, который нужно будет выделить. */
.product-card--featured {
  background: linear-gradient(160deg, #DCE2FF, #EEF1FF);
  border: 2px solid var(--blue);
}

.product-card__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-soft));
}

/* Иконка-направление в превью карточки продукта (белый контур на градиенте) */
.product-card__icon {
  width: 92px;
  height: 92px;
  color: var(--white);
}

/* Бейдж статуса («Скоро») в углу превью */
.product-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 700;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-grow: 1;
  padding: 28px;
}

/* Длинные слова-заголовки (напр. «Проконсультироваться») переносятся,
   а не вылезают за карточку в узких колонках */
.product-card__body h3 {
  overflow-wrap: break-word;
  hyphens: auto;
}

.product-card__body p {
  color: var(--muted);
  flex-grow: 1;
}

/* Веер карт — чистый CSS, иллюстрация для превью продукта */
.card-fan {
  position: relative;
  width: 200px;
  height: 170px;
}

.card-fan span {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 96px;
  height: 140px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(20, 28, 90, 0.35);
  transform-origin: 50% 120%;
}

.card-fan span:nth-child(1) {
  background: linear-gradient(160deg, #93A0F2, #5663D6);
  transform: translateX(-50%) rotate(-16deg);
}

.card-fan span:nth-child(2) {
  background: linear-gradient(160deg, #7B86E8, #3D4BC7);
  transform: translateX(-50%) rotate(0deg) translateY(-8px);
}

.card-fan span:nth-child(3) {
  background: linear-gradient(160deg, #5663D6, #27339B);
  transform: translateX(-50%) rotate(16deg);
}

/* Экран с кнопкой воспроизведения — иллюстрация курса */
.course-screen {
  position: relative;
  width: 190px;
  height: 130px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(160deg, #7B86E8, #3D4BC7);
  box-shadow: 0 10px 24px rgba(20, 28, 90, 0.35);
}

.course-screen::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}

/* Стопка листов со «строчками» — иллюстрация методички */
.guide-pages {
  position: relative;
  width: 150px;
  height: 150px;
}

.guide-pages span {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(20, 28, 90, 0.35);
}

.guide-pages span:nth-child(1) {
  background: linear-gradient(160deg, #5663D6, #27339B);
  transform: rotate(-7deg);
}

.guide-pages span:nth-child(2) {
  background: linear-gradient(160deg, #93A0F2, #5663D6);
  transform: rotate(3deg);
}

/* «Заголовок» верхнего листа */
.guide-pages span:nth-child(2)::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 20px;
  right: 56px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
}

/* «Строчки текста» — одна полоска и её копии через box-shadow */
.guide-pages span:nth-child(2)::after {
  content: "";
  position: absolute;
  top: 48px;
  left: 20px;
  right: 24px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 18px 0 rgba(255, 255, 255, 0.55),
    0 36px 0 rgba(255, 255, 255, 0.55),
    0 54px 0 rgba(255, 255, 255, 0.35);
}

/* ---------- Команда ---------- */

.person-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.person-card__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--light);
}

.person-card__body {
  padding: 22px 24px 26px;
}

.person-card__name {
  margin-bottom: 4px;
}

.person-card__role {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--blue);
  font-size: 0.95rem;
}

.person-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* Соцссылки автора — круглые кнопки с иконкой вместо длинных URL */
.person-card__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.person-card__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light);
  color: var(--blue);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.person-card__social:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.person-card__social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* ---------- Журнал ---------- */

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Карточка кликабельна целиком: область ссылки «Читать»
   растягивается на всю карточку */
.article-card .link-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
}

.article-card .link-arrow:focus-visible {
  outline: none;
}

.article-card:focus-within {
  outline: 3px solid var(--blue-soft);
  outline-offset: 2px;
}

/* Заглушка изображения статьи: градиент + символ через data-symbol */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb::after {
  content: attr(data-symbol);
  font-size: 56px;
  color: rgba(255, 255, 255, 0.55);
}

.thumb--1 { background: linear-gradient(135deg, #2E3BB0, #5663D6); }
.thumb--2 { background: linear-gradient(135deg, #3D4BC7, #7B86E8); }
.thumb--3 { background: linear-gradient(135deg, #27339B, #4D5AD1); }
.thumb--4 { background: linear-gradient(135deg, #5663D6, #93A0F2); }
.thumb--5 { background: linear-gradient(135deg, #2E3BB0, #6E7AE0); }
.thumb--6 { background: linear-gradient(135deg, #323FB8, #8A94E8); }

.article-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-grow: 1;
  padding: 24px;
}

.article-card__body h3 {
  margin: 0;
}

.article-card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  flex-grow: 1;
  /* две строки текста, как в ТЗ */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Новости ---------- */

.news-list {
  max-width: 860px;
  margin-inline: auto;
}

.news-item {
  display: grid;
  gap: 2px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:first-child {
  border-top: 1px solid var(--border);
}

.news-item__date {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
}

.news-item__text {
  margin: 0;
}

@media (min-width: 768px) {
  .news-item {
    grid-template-columns: 120px 1fr auto;
    align-items: baseline;
  }
}

/* ---------- Партнёры ---------- */

.partners-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
}

/* ---------- «Остаться с нами» (блок 8) ---------- */

.stay-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.stay-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
}

.stay-card h3 {
  color: var(--white);
}

.stay-card p {
  color: rgba(255, 255, 255, 0.85);
  flex-grow: 1;
}

/* ---------- Формы ---------- */

.form {
  width: 100%;
}

.form__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form.is-sent .form__body {
  display: none;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form__label {
  font-size: 0.92rem;
  font-weight: 700;
}

.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  color: var(--dark);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232E3BB0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

/* Серый текст плейсхолдера «Выберите тему», пока тема не выбрана */
.form select:invalid {
  color: var(--muted);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.form textarea {
  resize: vertical;
  min-height: 120px;
}

.form__message {
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--light);
  color: var(--blue);
  font-weight: 700;
}

:is(.section--blue, .section--cta--accent, .section--cta--ink) .form__message {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Компактная форма в одну строку (подписка на журнал) */
.form--inline .form__body {
  flex-direction: column;
}

@media (min-width: 480px) {
  .form--inline .form__body {
    flex-direction: row;
    align-items: stretch;
  }

  .form--inline .form__field {
    flex: 1 1 auto;
  }
}

/* ---------- Внутренние страницы ---------- */

.page-hero {
  background: var(--light);
  padding: 56px 0 64px;
}

@media (min-width: 768px) {
  .page-hero { padding: 72px 0 80px; }
}

.page-hero__inner {
  max-width: 760px;
}

.page-hero__lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--muted);
  margin: 0;
}

/* Что бы ни стояло под описанием — кнопка («Попробовать бесплатно») или
   подпись автора статьи — отбивку задаём здесь: у .page-hero__lead margin: 0. */
.page-hero__lead + * {
  margin-top: 24px;
}

.page-hero__lead + p {
  margin-bottom: 0;
}

/* Хлебные крошки — первая строка .page-hero__inner на каждой внутренней
   странице. Размечены списком, а не строкой текста: скринридер читает путь
   как последовательность шагов, а не как один абзац. Последний шаг —
   текущая страница: не ссылка, помечена aria-current="page". */
.breadcrumbs {
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.breadcrumbs__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* Разделитель принадлежит шагу, а не отдельному элементу списка:
   так он не попадает в озвучку и не ломает перенос длинного пути */
.breadcrumbs__list li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--muted);
  opacity: 0.45;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Юридическая страница (特定商取引法に基づく表記 и подобные).
   Длинный структурированный текст: разделы с заголовком,
   абзацами и выделенными примечаниями */
.legal {
  max-width: 760px;
  margin-inline: auto;
}

.legal__section {
  margin-bottom: 30px;
}

.legal__section:last-child {
  margin-bottom: 0;
}

.legal__section h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--blue);
}

.legal__section p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.8;
}

.legal__section p:last-child {
  margin-bottom: 0;
}

.legal__name,
.legal__highlight {
  font-weight: 700;
  color: var(--dark);
}

/* Примечания (※ ...) — приглушённый блок на светлом фоне */
.legal__note {
  margin: 14px 0 0;
  padding: 16px 18px;
  background: var(--light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

.legal__footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.legal__footer p {
  margin: 0 0 4px;
}

.legal__footer p:last-child {
  margin-bottom: 0;
}

/* Текст статьи / длинные тексты */
.prose {
  max-width: 720px;
  margin-inline: auto;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.5rem;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 16px 24px;
  border-left: 4px solid var(--blue);
  background: var(--light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

/* Подпись автора под заголовком статьи. Раньше здесь был .article-meta —
   дата, имя и время чтения в один ряд с равными отступами, отчего они
   читались как три однородных значения. Теперь аватар и имя — единый блок
   «кто это написал», а дата отдельной строкой под именем. */
.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-byline__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  /* Тот же кадр, что у фотографий на team.html: портреты вертикальные,
     по центру в кружок попадает не лицо */
  object-position: 50% 25%;
  background: var(--border);
}

.article-byline__author {
  margin: 0;
  font-weight: 700;
  color: var(--dark);
}

.article-byline__date {
  display: block;
  margin-top: 2px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Простые информационные карточки (о проекте, контакты, шаги) */
.info-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section--light .info-card {
  border: 0;
  box-shadow: var(--shadow-card);
}

.info-card h3 {
  margin-bottom: 8px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.info-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--light);
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 800;
}

/* Нумерованные шаги (страница карт) */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
}

/* ---------- Демо метафорических карт ---------- */

.demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.demo-card {
  width: min(320px, 82vw);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  border-radius: 22px;
  color: var(--white);
  box-shadow: var(--shadow-card-hover);
  background: linear-gradient(160deg, var(--blue-deep), var(--blue-soft));
}

/* «Рубашка» карты до первого вытягивания */
.demo-card--back {
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

.demo-card__symbol {
  font-size: 56px;
  line-height: 1;
}

.demo-card__word {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.demo-card__question {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.92);
}

.demo-card.theme-1 { background: linear-gradient(160deg, #2E3BB0, #5663D6); }
.demo-card.theme-2 { background: linear-gradient(160deg, #3D4BC7, #7B86E8); }
.demo-card.theme-3 { background: linear-gradient(160deg, #27339B, #4D5AD1); }
.demo-card.theme-4 { background: linear-gradient(160deg, #5663D6, #93A0F2); }
.demo-card.theme-5 { background: linear-gradient(160deg, #2E3BB0, #6E7AE0); }

@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(-4deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.demo-card.is-dealt {
  animation: deal 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .demo-card.is-dealt { animation: none; }
}

.demo__hint {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--blue);
  color: var(--white);
  padding: 48px 0 32px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer__inner {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer .logo {
  color: var(--white);
}

.site-footer .logo span {
  color: var(--light);
}

.site-footer__tagline {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.75);
}

.site-footer__title {
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.site-footer__bottom p {
  margin: 0;
}

/* ============================================================
   Разделы «Приобрести» и «Создать»
   Каталоги готовых решений, комплектации/варианты программ,
   спокойные информационные блоки. Карточки — на светло-голубом
   фоне (--light); синий (--blue) только на акцентах (заголовки,
   кнопки, рамки), не как фон больших блоков.
   Без градиентов, glassmorphism и анимаций при загрузке.
============================================================ */

/* Сетка каталога/направлений: растёт добавлением карточек в ряд,
   без переверстки. На мобильном перестраивается в столбик. */
.solution-grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* Кликабельная целиком карточка (каталог решений, направления «Создать»).
   Сама карточка — ссылка (<a>), поэтому вложенных кнопок внутри нет. */
.solution-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--light);
  border: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--dark);
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
}

.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--blue);
  color: var(--dark);
}

/* Акцент синим — только на заголовке карточки */
.solution-card h3 {
  margin: 0;
  color: var(--blue);
}

.solution-card p {
  margin: 0;
  color: var(--muted);
  flex-grow: 1;
}

/* Псевдо-указатель «Подробнее» внутри кликабельной карточки:
   визуально подсказывает переход, но кликом является вся карточка */
.solution-card__more {
  margin-top: 8px;
  font-weight: 700;
  color: var(--blue);
}

.solution-card__more::after {
  content: " →";
  transition: margin var(--transition);
}

.solution-card:hover .solution-card__more::after {
  margin-left: 4px;
}

/* Равновесные карточки-комплектации и варианты программы.
   Все одинакового размера и веса — без «рекомендуемых» акцентов,
   бейджей и разного цвета. */
.plan-grid {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 4vw, 32px);
  background: var(--light);
  border-radius: var(--radius);
}

.plan-card h3 {
  margin: 0;
}

.plan-card__lead {
  margin: 0;
  color: var(--muted);
}

.plan-card__list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-card__meta {
  margin: 0;
  font-weight: 700;
  color: var(--blue);
}

.plan-card__price {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}

/* Две цены рядом (групповой / индивидуальный формат) */
.plan-card__prices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-card__price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plan-card__price-label {
  color: var(--muted);
  font-weight: 600;
}

.plan-card__price-value {
  font-weight: 800;
  white-space: nowrap;
}

/* Низ карточки прижат к основанию — кнопки/подписи выравниваются
   между карточками разной высоты */
.plan-card__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.plan-card__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Вторичная текстовая ссылка (не кнопка): приглушённая, со стрелкой
   в самом тексте. Не обрамляется рамкой и не красится в акцент. */
.link-soft {
  display: inline-block;
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-soft:hover {
  color: var(--blue);
}

/* Крупная цена в информационном блоке («Разбор идеи»).
   Идёт сразу за <h2> панели, поэтому отбивка снизу задаётся здесь:
   у <p> под ней верхнего margin нет, и без этого цена липла к тексту.
   Размер сопоставим с h2 — цена и есть главное число блока. */
.price-tag {
  display: block;
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--blue);
}

/* Спокойный информационный блок (условия сообщества, разбор идеи):
   белая карточка с мягкой тенью — «всплывает» на светло-голубой
   секции, давая контраст без ярких акцентов. */
.info-panel {
  max-width: 760px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Центрированный вариант (условия сообщества) */
.info-panel--center {
  margin-inline: auto;
  text-align: center;
}

.info-panel h2 {
  margin-top: 0;
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.info-panel .btn {
  margin-top: 20px;
}

/* ---------- Список с галочками (результат программы, финальный призыв) ----------
   Тот же ритм, что и .plan-card__list, но с ✓ вместо маркера: используется
   там, где перечисляется полученный результат, а не состав комплекта. */

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--blue);
}

/* На синей секции и тёмной панели CTA галочка и текст — белые */
:is(.section--blue, .section--cta--accent, .section--cta--ink) .check-list li::before { color: var(--white); }

/* ---------- Частые вопросы (аккордеон на <details>) ----------
   Без JS: раскрытие делает сам браузер. Маркер-стрелка рисуется
   псевдоэлементом, чтобы убрать разнобой нативных треугольников. */

.faq {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq__item[open] {
  border-color: var(--blue);
  box-shadow: var(--shadow-card);
}

.faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 32px 16px 0;
  font-weight: 700;
  color: var(--dark);
}

/* Убираем нативный треугольник в WebKit */
.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
  transition: transform var(--transition);
}

.faq__item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.faq__item summary:hover { color: var(--blue); }

.faq__item summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq__item p {
  margin: 0;
  padding: 0 0 18px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .faq__item summary::after { transition: none; }
}
