:root {
  --color-bg-0: #f8f6f0;
  --color-bg-1: #efe9dc;
  --color-navy: #1e3a5f;
  --color-navy-light: #2c4d78;
  --color-navy-dark: #142a42;
  --color-text: #33404f;
  --color-muted: #6b7785;
  --color-gold: #c9a86a;
  --color-gold-soft: #ede2c9;
  --color-card: #ffffff;
  --color-border: rgba(30, 58, 95, 0.1);
  --color-border-soft: rgba(30, 58, 95, 0.06);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  --shadow-sm:
    0 1px 2px rgba(30, 45, 66, 0.05),
    0 2px 4px rgba(30, 45, 66, 0.04);
  --shadow-md:
    0 1px 2px rgba(30, 45, 66, 0.04),
    0 6px 16px rgba(30, 45, 66, 0.06),
    0 16px 32px rgba(30, 45, 66, 0.05);
  --shadow-lg:
    0 2px 4px rgba(30, 45, 66, 0.04),
    0 12px 24px rgba(30, 45, 66, 0.07),
    0 32px 64px -12px rgba(30, 45, 66, 0.16);
  --shadow-navy:
    0 1px 2px rgba(20, 32, 48, 0.15),
    0 8px 20px -6px rgba(30, 58, 95, 0.45),
    0 20px 40px -16px rgba(30, 58, 95, 0.35);
  --shadow-navy-hover:
    0 2px 4px rgba(20, 32, 48, 0.18),
    0 14px 28px -6px rgba(30, 58, 95, 0.5),
    0 28px 56px -16px rgba(30, 58, 95, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  background:
    radial-gradient(900px 500px at 88% -8%, rgba(201, 168, 106, 0.14), transparent 60%),
    radial-gradient(700px 480px at 6% 8%, rgba(30, 58, 95, 0.06), transparent 55%),
    linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 100%);
}

body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.15 0 0 0 0 0.24 0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

main {
  position: relative;
  z-index: 2;
}

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

/* ===== Reveal-on-scroll (blocks slide up into place) ===== */
.reveal {
  opacity: 0;
  transform: translateY(64px) scale(0.985);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: transform, opacity;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered children inside a .reveal block — cascade in after the block itself */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible .reveal-stagger > *,
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0.08s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.32s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.44s; }

/* transition-delay — как отдельное (longhand) свойство — иначе применяется
   ко ВСЕМ переходам элемента, включая hover-анимацию кнопки внутри блока
   (из-за чего кнопка "зависала" перед тем как отреагировать на курсор).
   Сбрасываем его здесь — специфичность правила такая же, как у nth-child
   выше, но идёт позже по файлу и поэтому переопределяет его для .btn. */
.reveal-stagger > .btn,
.reveal-stagger > .btn:hover,
.reveal-stagger > .btn:active {
  transition-delay: 0s;
}

/* ===== Hero entrance ===== */
.hero__content > * {
  animation: fade-up 0.7s var(--ease-out) backwards;
}
.hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.hero__content > *:nth-child(2) { animation-delay: 0.16s; }
.hero__content > *:nth-child(3) { animation-delay: 0.28s; }
.hero__content > *:nth-child(4) { animation-delay: 0.4s; }
.hero__content > *:nth-child(5) { animation-delay: 0.52s; }
.hero__content > *:nth-child(6) { animation-delay: 0.64s; }

.hero__art {
  animation: art-slide-in 1s var(--ease-out) 0.25s backwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes art-slide-in {
  from { opacity: 0; transform: scale(0.96) translate(28px, 16px); }
  to   { opacity: 1; transform: scale(1) translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-stagger > * { opacity: 1; transform: none; }
}

/* ===== Kicker / eyebrow label ===== */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 1rem;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 106, 0.2);
}

.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-navy);
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}

.section-title--left {
  text-align: left;
}

/* Разделитель под заголовком: тонкая линия с ромбиком по центру — единый
   компонент для всех заголовков секций (по центру или у левого края). */
.title-divider {
  display: block;
  width: 200px;
  height: 2px;
  margin: 0 auto 2rem;
  position: relative;
  background: linear-gradient(to right, transparent, rgba(201, 168, 106, 0.55) 50%, transparent);
}

.title-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  background: var(--color-gold);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 0 5px rgba(201, 168, 106, 0.16);
}

.title-divider--left {
  margin-left: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: none;
  border-radius: 999px;
  padding: 1.05rem 1.9rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(160deg, var(--color-navy-light) 0%, var(--color-navy) 55%, var(--color-navy-dark) 100%);
  box-shadow: var(--shadow-navy);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  position: relative;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-navy-hover);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.btn--outline {
  width: 100%;
  border: 1px solid rgba(201, 168, 106, 0.55);
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== Hero ===== */
.hero {
  padding: 3.5rem 0 3rem;
  position: relative;
}

/* Паддинги задаём на этом же элементе, что и max-width — тем же способом,
   что и у .whats-inside/.video-section/.after-section, иначе из-за разной
   схемы (padding на обёртке vs padding на центрируемом блоке) края хиро
   не совпадают с остальными секциями. */
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-navy);
  font-size: clamp(2.1rem, 1.7rem + 2vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}

.hero__text {
  margin: 0 0 1.75rem;
  color: var(--color-text);
  font-size: 1.05rem;
  max-width: 46ch;
}

/* Флекс-ряд вместо двух независимых инлайн-элементов — иначе кнопка и
   плашка с ценой выравниваются по базовой линии текста, а не визуально
   по центру, и кнопка "плавает" на пару пикселей относительно плашки. */
.hero__cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

/* Кнопка никогда не тянется на 100% ширины — только естественный размер.
   Пока рядом с плашкой цены хватает места, они стоят в одну строку;
   как только не помещается, flex-wrap просто переносит кнопку на новую
   строку тем же размером — на любой ширине экрана, без брейкпоинтов. */
.hero__cta .btn {
  width: auto;
  flex-shrink: 0;
}

.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-card);
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  padding: 0.65rem 1.3rem 0.65rem 0.65rem;
  font-size: 1rem;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.price-chip strong {
  color: var(--color-navy);
  font-weight: 700;
}

.price-chip__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--color-gold-soft), #f7f0de);
  color: var(--color-navy);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 4px rgba(201, 168, 106, 0.25);
}

.price-chip__icon svg {
  width: 17px;
  height: 17px;
}

.hero__note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.hero__note svg {
  width: 18px;
  height: 18px;
  color: var(--color-navy);
  flex-shrink: 0;
}

/* Иллюстрация растворяется в фоне страницы — не отдельная фото-карточка,
   а мягкая подложка позади контента. Маска — прямоугольное перо по всем
   четырём краям (не овал), чтобы содержимое картинки (арка, углы) не обрезалось. */
.hero__art {
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  /* Подстраховка от "grid blowout": без этого некоторые браузеры дают
     карточке взять высоту по контенту (реальным пикселям картинки),
     игнорируя aspect-ratio, внутри узкой grid-колонки. */
  min-width: 0;
  min-height: 0;
  /* Пока текст и картинка стоят друг под другом (примерно до 1024px),
     картинка не должна тянуться на всю ширину контейнера — на планшетных
     ширинах (768–1015px) это превращало её в гигантский блок на весь
     экран по высоте. Ограничиваем и центрируем. */
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* Настоящая прозрачная маска (не имитация цветом фона — фон страницы не
   сплошной, а с градиентом, и "подделка" давала видимый шов другого
   оттенка ровно по краю картинки). Без mask-composite: контейнер гасит
   картинку по горизонтали, сама картинка внутри — по вертикали;
   наложение двух масок на разных осях даёт то же прямоугольное перо
   без композита, с которым разные браузеры ведут себя по-разному. */
.hero__art {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
}

/* ===== Что внутри ===== */
.whats-inside {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5rem 1.25rem 5.5rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  transition: transform 0.35s var(--ease-out);
}

.feature:hover {
  transform: translateY(-3px);
}

.feature__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(160deg, #eef3f9 0%, #dfe8f2 100%);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(30, 58, 95, 0.08),
    0 10px 24px -10px rgba(30, 58, 95, 0.35);
  transition: box-shadow 0.35s var(--ease-out);
}

.feature:hover .feature__icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(30, 58, 95, 0.08),
    0 16px 32px -10px rgba(30, 58, 95, 0.45);
}

.feature__icon svg {
  width: 28px;
  height: 28px;
}

.feature p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.98rem;
  max-width: 22ch;
}

/* ===== Video ===== */
.video-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem 5.5rem;
}

.video-player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #33455c;
  box-shadow: var(--shadow-lg);
}

.video-player__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-player::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.video-player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(30, 58, 95, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 32px -8px rgba(10, 16, 24, 0.6);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.video-player__play:hover {
  background: rgba(30, 58, 95, 0.75);
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 4px 0 rgba(201, 168, 106, 0.35),
    0 16px 40px -8px rgba(10, 16, 24, 0.65);
}

.video-player__play svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.video-player__bar {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(15, 24, 36, 0.4);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  z-index: 2;
}

.video-player__control {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.video-player__control:hover {
  color: var(--color-gold);
  transform: scale(1.08);
}

.video-player__control svg {
  width: 20px;
  height: 20px;
}

.video-player__time {
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.video-player__progress {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  min-width: 40px;
}

.video-player__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 36%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f8db0, #e7edf4);
}

.video-player__progress-thumb {
  position: absolute;
  left: 36%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(10, 16, 24, 0.5);
}

/* ===== After section ===== */
.after-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
}

.after-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-card);
  box-shadow: var(--shadow-lg);
}

/* Мобильная раскладка: иллюстрация сверху (растворяется в белый снизу),
   текст под ней во всю ширину — так короткий заголовок не разваливается
   на много строк в узкой колонке. С планшета раскладка меняется на
   горизонтальную (текст слева, картинка справа — см. медиа-запрос ниже). */
.after-card__art-wrap {
  position: relative;
  width: 100%;
  height: clamp(220px, 58vw, 320px);
}

/* Настоящая прозрачная маска вместо наложения непрозрачных градиентов —
   два независимых слоя цвета давали видимый стык на стыке зон. Здесь
   карточка снизу белая сплошным цветом, так что маска и не нужна была бы
   строго, но оставляем тот же приём для единообразия и без риска шва. */
.after-card__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 55%;
  display: block;
  /* Небольшой перехлёст, чтобы у скруглённых углов карточки не проступала
     тонкая светлая кайма фона из-за субпиксельного антиалиасинга. */
  transform: scale(1.02);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 60%, transparent 96%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 60%, transparent 96%);
}

.after-card__body {
  position: relative;
  z-index: 1;
  margin-top: -2.5rem;
  padding: 0 1.5rem 2.5rem;
}

.after-card__body p {
  margin: 0 0 1.9rem;
  color: var(--color-text);
}

/* Отдельный, более сдержанный размер шрифта для заголовка в этой узкой
   колонке — общий .section-title скроен под ширину viewport, а не под
   ограниченную ширину карточки, и на планшете начинает переносить слова. */
.after-card__body .section-title {
  font-size: 1.5rem;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  border-top: 1px solid var(--color-border-soft);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer__legal {
  margin: 0 0 1.1rem;
}

.footer__legal a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__legal a:hover {
  color: var(--color-navy);
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.footer__links-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 168, 106, 0.55);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.footer__links-btn:hover {
  color: var(--color-navy-dark);
  border-color: var(--color-navy);
}

.footer__copy {
  margin: 0;
  color: var(--color-muted);
  opacity: 0.8;
}

@media (min-width: 640px) {
  .footer__links {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }
}

/* ===== Legal modal (оферта / политика — во всплывающем окне, не отдельной страницей) ===== */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 48, 0.55);
  backdrop-filter: blur(2px);
  animation: legal-fade-in 0.25s var(--ease-out);
}

.legal-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 880px);
  height: min(88vh, 960px);
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: legal-pop-in 0.3s var(--ease-out);
}

.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-soft);
  flex-shrink: 0;
}

.legal-modal__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-navy-dark);
}

.legal-modal__close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-bg-1);
  color: var(--color-navy);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.legal-modal__close svg {
  width: 18px;
  height: 18px;
}

.legal-modal__close:hover {
  background: var(--color-navy);
  color: #fff;
  transform: scale(1.05);
}

.legal-modal__frame {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--color-bg-0);
}

@keyframes legal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes legal-pop-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.legal-modal-open {
  overflow: hidden;
}

/* ===== Tablet ===== */
@media (min-width: 640px) {
  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  /* Планомерное сжатие вместо резкого переключения на 1024px: колонки —
     на fr-единицах, они и так плавно сужаются вместе с шириной экрана.
     Двухколоночная раскладка теперь держится до самой мобильной версии,
     на неё переходим только ниже границы планшета (640px). */
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    padding: 0 2rem;
  }

  .hero__art {
    max-width: none;
    margin: 0;
  }

  /* Отдельный, более сдержанный размер заголовка для 640–1023px — общий
     clamp скроен под одну колонку (полная ширина текста), а тут у текста
     уже только ~50% ширины из-за соседней картинки: "Измена, обида" на
     полном размере не помещалась и рвалась на 3 строки с "и" сиротой. */
  .hero__title {
    font-size: clamp(1.7rem, 1.3rem + 2.2vw, 2.6rem);
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
    row-gap: 2.25rem;
  }

  .feature {
    padding: 0 1.25rem;
  }

  .feature + .feature {
    border-left: 1px solid rgba(30, 58, 95, 0.15);
  }

  .whats-inside {
    padding: 5.5rem 2rem 6rem;
  }

  .video-section,
  .after-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }

}

/* Отдельный, более высокий порог именно для блока "После просмотра": в
   узкой текстовой колонке горизонтальной раскладки кнопке "Перейти к
   остальным продуктам" физически не хватает места вплоть до ~900px
   (переносится на 2-3 строки) — поэтому эта секция переключается на
   горизонтальную раскладку позже остальных блоков страницы. */
@media (min-width: 900px) {
  .after-card__art-wrap {
    position: absolute;
    inset: 0;
    height: auto;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 46%, #000 74%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 46%, #000 74%, #000 100%);
  }

  .after-card__art {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 96%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 96%);
  }

  .after-card__body {
    margin-top: 0;
    padding: 2.75rem 2rem;
    max-width: 52%;
  }

  .after-card__body .section-title {
    font-size: 1.45rem;
  }

  .btn--outline {
    width: auto;
  }
}

/* ===== Desktop ===== */
@media (min-width: 1024px) {
  .hero__inner {
    gap: 4.5rem;
    padding: 0 2.5rem;
  }

  .hero {
    padding: 6.5rem 0 5rem;
  }

  .video-section,
  .after-section,
  .whats-inside {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .after-card__art-wrap {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 40%, #000 66%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 40%, #000 66%, #000 100%);
  }

  .after-card__body {
    padding: 3.5rem;
    max-width: 410px;
  }

  .after-card__body .section-title {
    font-size: 1.85rem;
  }
}
