/* Цифровой психолог Алевтина Дмитриева — единственный стилевой файл сайта.
   Порядок: шрифт → токены → сброс → примитивы → секции сверху вниз → компоненты
   → адаптив (сверху вниз по ширине) → уважение к настройкам движения. */

@font-face {
  font-family: "Tilda Sans";
  font-style: normal;
  font-weight: 250 1000;
  font-display: swap;
  src: url("../fonts/tilda-sans-vf.woff2") format("woff2");
}

:root {
  /* цвета сняты с оригинала */
  --ink: #222;
  --ink-strong: #000;
  --white: #fff;
  --panel: #f0f0f0;
  --tile: #ececec;
  --line: #eee;
  --line-input: #c7c7c7;
  --footer-bg: #171717;
  --btn-dark: #1a2026;
  --btn-cta: #0d0d0d;
  --notice-bg: #ebebeb;
  --notice-fg: #555;
  --notice-line: #999;
  --error: #d33c3c;
  --scrim: rgba(0, 0, 0, .5);

  /* сетка */
  --container: 1200px;
  --gutter: clamp(16px, 2.4vw, 20px);
  --col-10: 83.333%;

  /* Типографика повторяет шкалу оригинала: она не плавная, а ступенчатая,
     со сменой размеров на 1200px и 480px. Значения сняты с живого сайта. */
  --fs-hero-title: 48px;
  --fs-hero-descr: 24px;
  --fs-section-title: 42px;
  --fs-lead: 30px;
  --fs-sublead: 24px;
  --fs-about-text: 20px;
  --fs-bubble: 24px;
  --fs-benefit-name: 22px;
  --fs-benefit-text: 16px;
  --fs-card-title: 26px;
  --fs-card-body: 16px;
  --fs-faq-q: 24px;
  --fs-faq-a: 18px;
  --fs-footer: 14px;
  --fs-body: 16px;
  --fs-small: 14px;

  --lh-title: 1.23;
  --lh-body: 1.55;

  /* вертикальный ритм — из классов t-rec_pt/pb оригинала */
  --sp-90: clamp(45px, 6.5vw, 90px);
  --sp-60: clamp(40px, 4.5vw, 60px);
  --sp-45: clamp(30px, 3.4vw, 45px);
  --sp-30: 30px;

  --radius-bubble: 40px;
  --radius-pill: 30px;
  --radius-card: 3px;
  --dur: .2s;
}

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

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink-strong);
  font-family: "Tilda Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) { overflow: hidden; }

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

img { height: auto; }

button,
input,
textarea { font: inherit; color: inherit; }

button { -webkit-tap-highlight-color: transparent; }

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  text-underline-offset: .2em;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: var(--lh-title); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
}

.skip-link:focus { top: 16px; }

/* Ширина как в оригинале: внешние 1200 минус боковые отступы дают 1160
   полезной ширины, от которой считаются все внутренние колонки. */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- примитивы ---------- */

.section-title {
  max-width: var(--col-10);
  margin-inline: auto;
  font-size: var(--fs-section-title);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) ease-in-out, opacity var(--dur) ease-in-out;
}

.btn--dark {
  min-height: 50px;
  padding: 12px 40px;
  background: var(--btn-dark);
  color: var(--white);
}

.btn--black {
  min-height: 50px;
  padding: 12px 40px;
  background: var(--ink-strong);
  color: var(--white);
  border-radius: 0;
}

.btn--block { width: 100%; }

.btn--cta {
  min-height: 60px;
  padding: 14px clamp(30px, 4vw, 60px);
  background: var(--btn-cta);
  color: var(--white);
  font-size: var(--fs-body);
}

.btn:hover { opacity: .85; }
.btn[disabled] { opacity: .5; cursor: progress; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}

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

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  background: var(--ink-strong);
}

.hero__stage {
  position: relative;
  display: grid;
  min-height: 88vh;
  overflow: hidden;
  touch-action: pan-y;
}

@supports (height: 1svh) {
  .hero__stage { min-height: 88svh; }
}

.hero__slide {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease-in-out;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.hero__copy {
  position: relative;
  z-index: 1;
  width: min(100% - var(--gutter) * 2, 960px);
  padding-block: 40px;
  text-align: center;
  color: var(--white);
}

.hero__title {
  margin-bottom: 21px;
  font-size: var(--fs-hero-title);
  font-weight: 600;
  line-height: var(--lh-title);
}

.hero__descr {
  font-size: var(--fs-hero-descr);
  font-weight: 300;
  line-height: var(--lh-body);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-50%);
  cursor: pointer;
}

.hero__arrow svg { width: 7px; height: 13px; }
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }

.hero__dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.hero__dot.is-active { background: var(--white); }

/* ---------- 2. Автор ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 88vh;
  background: var(--panel);
}

@supports (height: 1svh) {
  .about { min-height: 88svh; }
}

.about__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 10%;
}

.about__title {
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.45;
}

/* в оригинале абзацы разделены пустой строкой, поэтому шаг равен межстрочному */
.about__text {
  display: grid;
  gap: 1.55em;
  font-size: var(--fs-about-text);
  font-weight: 300;
}

.about__media { height: 100%; }

.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------- 3. Отзывы ---------- */

.reviews {
  padding-block: var(--sp-90) var(--sp-45);
}

.reviews__grid {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  columns: 4;
  column-gap: 40px;
}

.reviews__item {
  display: block;
  width: 100%;
  margin: 0 0 40px;
  padding: 0;
  border: 0;
  background: var(--tile);
  break-inside: avoid;
  cursor: zoom-in;
}

.reviews__item img { width: 100%; }

/* ---------- 4–5. Вам это знакомо ---------- */

.pains { padding-block: var(--sp-45) var(--sp-60); }

.pains__lead {
  max-width: 800px;
  margin: 20px auto 0;
  font-size: var(--fs-sublead);
  font-weight: 500;
  text-align: center;
}

/* В оригинале все реплики одной ширины и идут единой лентой: между ними
   и внутри пары одинаковый шаг в 30px, и только на телефоне пары
   отделяются заметнее. */
.pains__list {
  width: min(100%, 760px);
  margin: var(--sp-45) auto 0;
  display: grid;
  gap: 30px;
}

.pains__pair {
  display: grid;
  gap: 30px;
}

.pains__bubble {
  position: relative;
  width: 100%;
  padding: 28px 40px 27px;
  border-radius: var(--radius-bubble);
  font-size: var(--fs-bubble);
  font-weight: 300;
  line-height: var(--lh-body);
}

.pains__bubble--q {
  background: var(--ink);
  color: var(--white);
}

.pains__bubble--a {
  background: var(--line);
  color: var(--ink-strong);
}

/* «хвостики» реплик, как в оригинале */
.pains__bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 26px;
  height: 26px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.pains__bubble--q::after {
  left: 32px;
  background: var(--ink);
}

.pains__bubble--a::after {
  right: 32px;
  background: var(--line);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* ---------- 6. Что вы получите ---------- */

.benefits { padding-block: var(--sp-60); }

.benefits__grid {
  max-width: var(--col-10);
  margin: 105px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 80px;
  row-gap: var(--sp-45);
}

.benefit__name {
  margin-bottom: 12px;
  font-size: var(--fs-benefit-name);
  font-weight: 600;
}

.benefit__text {
  font-size: var(--fs-benefit-text);
  font-weight: 300;
}

/* ---------- 7. Услуги ---------- */

.services {
  padding-block: var(--sp-45) var(--sp-60);
  scroll-margin-top: 20px;
}

.services__lead {
  max-width: 800px;
  margin: 20px auto 0;
  font-size: var(--fs-sublead);
  text-align: center;
}

.services__grid {
  margin-top: var(--sp-60);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  row-gap: var(--sp-60);
}

.service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service__media {
  width: 100%;
  margin-bottom: 20px;
}

.service__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.service__title {
  margin-bottom: 12px;
  font-size: var(--fs-card-title);
}

.service__price {
  margin-bottom: 12px;
  font-weight: 600;
}

.service__body {
  display: grid;
  gap: 1em;
  margin-bottom: 24px;
  font-size: var(--fs-card-body);
  font-weight: 300;
}

.service__body strong { font-weight: 600; }

.service__btn {
  margin-top: auto;
  min-height: 45px;
  padding: 11px 30px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur) ease-in-out, color var(--dur) ease-in-out;
}

.service__btn:hover {
  background: var(--ink);
  color: var(--white);
}

/* ---------- 8. FAQ ---------- */

.faq { padding-block: var(--sp-45) var(--sp-90); }

.faq__list {
  max-width: var(--col-10);
  margin-inline: auto;
}

.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__heading { font-size: inherit; font-weight: inherit; }

.faq__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 27px 50px 27px 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-faq-q);
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.faq__icon {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform var(--dur) ease-in-out;
}

.faq__icon::before {
  top: 50%;
  left: 0;
  width: 16px;
  height: 1px;
}

.faq__icon::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 16px;
}

.faq__trigger[aria-expanded="true"] .faq__icon::after { transform: scaleY(0); }

.faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease-in-out;
}

.faq__panel[hidden] { display: none; }
.faq__panel.is-open { grid-template-rows: 1fr; }

.faq__text {
  overflow: hidden;
  font-size: var(--fs-faq-a);
  font-weight: 300;
}

.faq__panel.is-open .faq__text { padding-bottom: 22px; }

/* ---------- 9. Диплом ---------- */

.diploma {
  padding-block: var(--sp-45) var(--sp-30);
  text-align: center;
}

.diploma__frame {
  display: block;
  width: min(100% - var(--gutter) * 2, 860px);
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

/* ---------- 10. Контакты ---------- */

.contact {
  padding-block: var(--sp-45) var(--sp-90);
  background: var(--white);
}

.contact__lead {
  max-width: 858px;
  margin: 20px auto 0;
  font-size: var(--fs-sublead);
  text-align: center;
}

.contact__grid {
  max-width: var(--col-10);
  margin: var(--sp-60) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact__email {
  display: inline-block;
  margin-bottom: 24px;
  font-size: var(--fs-lead);
  font-weight: 600;
  text-decoration-thickness: 1px;
}

.contact__links {
  display: grid;
  gap: 10px;
  font-weight: 300;
}

/* ---------- 11. Финальный призыв ---------- */

.cta {
  position: relative;
  display: grid;
  min-height: 90vh;
  overflow: hidden;
  background: var(--ink-strong);
}

@supports (height: 1svh) {
  .cta { min-height: 90svh; }
}

.cta__media {
  grid-area: 1 / 1;
  position: absolute;
  inset: 0;
}

.cta__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta__inner {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  align-items: center;
  padding-block: var(--sp-90);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .8));
  color: var(--white);
}

.cta__title {
  max-width: 800px;
  font-size: clamp(30px, 3.6vw, 52px);
}

.cta__text {
  max-width: 800px;
  margin: 24px 0 40px;
  font-size: var(--fs-sublead);
  font-weight: 300;
}

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

.footer {
  padding-block: 15px var(--sp-60);
  background: var(--footer-bg);
  color: var(--white);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 80px;
}

.footer__legal {
  grid-column: 2;
  font-size: var(--fs-footer);
  text-align: center;
}

.footer__socials {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.footer__socials a {
  display: block;
  width: 30px;
  height: 30px;
  color: var(--white);
}

.footer__socials svg { width: 30px; height: 30px; }

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

.form { display: grid; gap: 20px; }

.field { display: grid; gap: 6px; }

.field__label {
  font-size: var(--fs-small);
  font-weight: 400;
}

.field__input {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid var(--line-input);
  border-radius: 0;
  background: var(--white);
  font-size: var(--fs-body);
}

.field__input--area {
  min-height: 102px;
  resize: vertical;
}

.field__error {
  color: var(--error);
  font-size: var(--fs-small);
}

.field__error:empty { display: none; }

.field__input[aria-invalid="true"] { border-color: var(--error); }

.field--check { gap: 8px; }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.check__box {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--ink);
}

.check__text {
  font-size: var(--fs-small);
  font-weight: 300;
  line-height: 1.4;
}

.form__result {
  padding: 14px 18px;
  background: var(--line);
  font-size: var(--fs-small);
}

.form__result.is-error {
  background: #fdecec;
  color: var(--error);
}

/* ---------- Корзина ---------- */

.cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-strong);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.cart-fab[hidden] { display: none; }
.cart-fab svg { width: 28px; height: 28px; }

.cart-fab__badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e02d2d;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.cart,
.lightbox {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.cart::backdrop,
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }

.cart__panel {
  width: min(100% - 32px, 580px);
  max-height: calc(100% - 64px);
  margin: 32px auto;
  padding: 32px;
  background: var(--white);
  overflow-y: auto;
}

.cart__close,
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.cart__close svg,
.lightbox__close svg { width: 24px; height: 24px; }

.cart__title {
  margin-bottom: 20px;
  font-size: var(--fs-faq-q);
}

.cart__items {
  display: grid;
  border-top: 1px solid var(--line);
}

.cart__row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart__name { font-weight: 600; }

.cart__note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--notice-fg);
}

.cart__qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart__qty button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-input);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.cart__remove {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--notice-line);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cart__sum,
.cart__total {
  margin-top: 20px;
  font-weight: 600;
  text-align: right;
}

.cart__empty { padding: 20px 0; color: var(--notice-fg); }
.cart__form { margin-top: 24px; }

/* ---------- Просмотр изображений ---------- */

.lightbox {
  display: none;
  place-items: center;
}

.lightbox[open] { display: grid; }

.lightbox__image {
  width: auto;
  height: auto;
  max-width: min(92vw, 1200px);
  max-height: 84vh;
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 14px;
  color: var(--white);
  font-size: var(--fs-small);
  text-align: center;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  transform: translateY(-50%);
  cursor: pointer;
}

.lightbox__nav svg { width: 9px; height: 16px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* ---------- Cookie ---------- */

.cookie {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 600px;
  max-width: calc(100% - 40px);
  padding: 15px 25px;
  border-radius: 5px;
  background: var(--notice-bg);
  color: var(--notice-fg);
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
}

.cookie[hidden] { display: none; }

.cookie__text { font-size: var(--fs-body); }

.cookie__btn {
  flex: none;
  min-width: 60px;
  padding: 8px 16px;
  border: 1px solid var(--notice-line);
  border-radius: 3px;
  background: transparent;
  color: var(--notice-fg);
  cursor: pointer;
}

/* пока баннер виден, он не должен перекрывать кнопку корзины */
body:has(.cookie:not([hidden])) .cart-fab { bottom: 100px; }

.noscript {
  padding: 20px;
  background: var(--notice-bg);
  text-align: center;
}

/* ---------- Страница 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  text-align: center;
}

@supports (height: 1svh) {
  .notfound { min-height: 100svh; }
}

.notfound__code {
  color: var(--notice-line);
  font-size: var(--fs-section-title);
  font-weight: 600;
}

.notfound__title {
  margin: 12px 0 16px;
  font-size: var(--fs-lead);
}

.notfound__text { margin-bottom: 30px; font-weight: 300; }

/* ---------- Правовые страницы ---------- */

.legal { padding-block: var(--sp-60) var(--sp-90); }

.legal__back { margin-bottom: var(--sp-45); font-size: var(--fs-small); }

.legal__title {
  max-width: 860px;
  font-size: var(--fs-section-title);
}

.legal__meta {
  margin-top: 12px;
  color: var(--notice-fg);
  font-size: var(--fs-small);
}

.legal__toc {
  max-width: 860px;
  margin-top: var(--sp-45);
  padding: 24px 28px;
  background: var(--panel);
}

.legal__toc-list {
  display: grid;
  gap: 10px;
  padding-left: 1.2em;
  list-style: decimal;
  font-weight: 300;
}

.legal__part { max-width: 860px; }

.legal__part-title {
  margin-top: var(--sp-60);
  padding-top: var(--sp-45);
  border-top: 1px solid var(--line);
  font-size: var(--fs-card-title);
  scroll-margin-top: 20px;
}

.legal__note {
  max-width: 860px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--panel);
  font-weight: 300;
}

.legal__accent {
  padding: 16px 20px;
  border-left: 3px solid var(--ink);
  background: var(--panel);
}

.legal__section {
  max-width: 860px;
  margin-top: var(--sp-45);
  display: grid;
  gap: 1em;
  font-weight: 300;
}

.legal__section h3 {
  font-size: var(--fs-benefit-name);
  font-weight: 600;
}

.legal__back--bottom { margin-top: var(--sp-60); }

.footer__operator {
  display: inline-block;
  margin-top: 6px;
  opacity: .7;
}

.legal__list {
  display: grid;
  gap: .5em;
  padding-left: 1.2em;
  list-style: disc;
}

.legal a { text-decoration: underline; }

/* Незаполненные реквизиты оператора видно сразу, чтобы не выложить их случайно */
[data-todo] {
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff3cd;
  color: #7a5c00;
}

/* =========================================================
   Адаптив.
   Базовый набор — 1024 / 767 / 520, как в соседнем проекте.
   Дополнительно оставлены точки самой Тильды, без которых
   вёрстка расходится с оригиналом: 1200 (колонки отзывов),
   980 (блок автора складывается), 960 (отступы и колонки),
   640 (кнопка на всю ширину).
   ========================================================= */

@media (max-width: 1200px) {
  :root {
    --fs-hero-title: 44px;
    --fs-section-title: 38px;
    --fs-lead: 26px;
    --fs-sublead: 22px;
    --fs-about-text: 18px;
    --fs-benefit-name: 20px;
    --fs-benefit-text: 14px;
    --fs-card-title: 24px;
    --fs-card-body: 14px;
    --fs-faq-q: 22px;
  }

  .reviews__grid { columns: 3; }

  .pains__list { width: 63%; }
}

@media (max-width: 1024px) {
  .contact__grid { gap: 50px; }
}

@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; min-height: 0; }

  .footer__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 30px;
    padding-block: 25px;
  }

  .footer__legal { grid-column: 1; }
  .footer__socials { grid-column: 1; justify-content: center; }
  .benefits__grid { margin-top: 45px; }

  /* в оригинале портрет уезжает наверх и разворачивается на всю ширину */
  .about__media { order: -1; }
  .about__media img { height: auto; }

  .about__copy { padding: 30px var(--gutter) var(--sp-45); }

  .services__grid { grid-template-columns: repeat(2, 1fr); }

  .reviews__grid {
    columns: 2;
    column-gap: 20px;
  }

  .reviews__item { margin-bottom: 20px; }

  .benefits__grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: var(--sp-30);
  }

  .hero__arrow--prev { left: 10px; }
  .hero__arrow--next { right: 10px; }
}

@media (max-width: 767px) {
  .services__grid {
    grid-template-columns: 1fr;
    row-gap: var(--sp-45);
  }

  .service {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
  }

  .contact__grid { grid-template-columns: 1fr; }

  .pains__bubble { padding: 16px 20px 15px; border-radius: 20px; }
  .pains__bubble::after { bottom: -8px; width: 20px; height: 20px; }
  .pains__bubble--q::after { left: 20px; }
  .pains__bubble--a::after { right: 20px; }

  .cart__panel { padding: 24px 20px; }

  .lightbox__nav { width: 36px; height: 36px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

@media (max-width: 640px) {
  .btn--dark,
  .btn--black { width: 100%; }

  .faq__trigger { padding: 15px 40px 14px 0; }
  .faq__panel.is-open .faq__text { padding-bottom: 15px; }
}

@media (max-width: 480px) {
  .pains__list { gap: 50px; }
  .pains__pair { gap: 20px; }
  .benefits__grid { margin-top: 45px; }

  :root {
    --fs-hero-title: 30px;
    --fs-hero-descr: 20px;
    --fs-section-title: 30px;
    --fs-lead: 22px;
    --fs-sublead: 20px;
    --fs-about-text: 16px;
    --fs-bubble: 16px;
    --fs-benefit-name: 18px;
    --fs-benefit-text: 18px;
    --fs-card-title: 20px;
    --fs-card-body: 16px;
    --fs-faq-q: 20px;
    --fs-footer: 12px;
  }

}

@media (max-width: 520px) {
  .hero__arrow { display: none; }

  .cart {
    /* на узком экране модалка ведёт себя как «шторка» снизу */
    display: flex;
    align-items: flex-end;
  }

  .cart__panel {
    width: 100%;
    max-height: 92svh;
    margin: 0;
    border-radius: 12px 12px 0 0;
  }

  /* На узком экране название занимает всю строку, а количество, цена
     и крестик выстраиваются под ним в одну линию. */
  .cart__row {
    grid-template-columns: auto 1fr auto;
    row-gap: 8px;
  }

  .cart__name { grid-column: 1 / -1; }
  .cart__price { text-align: right; }

  .cookie {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
  }
}

@media (max-width: 980px) {
  .cookie {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

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

@media print {
  .hero__arrow,
  .hero__dots,
  .cart-fab,
  .cookie { display: none !important; }
}
