/* ==========================================================================
   Главная страница. Опирается на токены и компоненты из site.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Общая типографика секций
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(72px, 8vw, 116px) 0;
}
.section--soft { background: var(--soft-veil); }

.section-title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.04em;
  font-weight: 620;
  text-wrap: balance;
}
.section-title em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}

.lead {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.section-head { max-width: 720px; }

/* --------------------------------------------------------------------------
   Первый экран. Без фотографии: слева обещание, справа — знак и три факта.
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
  padding: clamp(56px, 7vw, 88px) 0 clamp(72px, 9vw, 116px);
}

.hero h1 {
  max-width: 15ch;
  margin: 0 0 20px;
  font-size: clamp(42px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}

.hero-copy {
  max-width: 48ch;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Карточка «общей почвы»: знак плюс три коротких факта. */
.hero-panel {
  padding: clamp(28px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-l);
}

.common-ground {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto 28px;
}
.common-ground .cg-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.common-ground .cg-circle { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .55; }
.common-ground .cg-lens { fill: var(--accent); opacity: .92; }

.hero-panel__caption {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -.02em;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.hero-facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.hero-facts li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-facts strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Кто такой медиатор
   -------------------------------------------------------------------------- */
.definition {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.definition__copy h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  letter-spacing: -.025em;
}
.definition__copy p {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
}

.definition__body p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 66ch;
  font-size: 17.5px;
  line-height: 1.68;
}

/* Принципы — отдельный ряд во всю ширину, без вложенных карточек. */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.principle {
  padding: 20px;
  background: var(--surface);
}
.principle strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 750;
}
.principle span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   География. Четыре города очного приёма плюс дистанционный формат.
   -------------------------------------------------------------------------- */
.cities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 44px;
}
.city {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur) ease, transform var(--dur) var(--ease-out);
}
.city strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.03em;
}
.city span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.city-remote {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: center;
  margin-top: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-quiet);
}
.city-remote__copy { display: grid; gap: 14px; justify-items: start; }
.city-remote__photo { aspect-ratio: 16 / 9; margin: 0; }
.city-remote h3 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -.03em;
}
.city-remote p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   О практике
   -------------------------------------------------------------------------- */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.about-signature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}
.about-signature::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
}

/* Регалии живут в левой колонке — она больше не пустует. */
.credentials {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.credential {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.credential strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 750;
}
.credential span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.bio-intro {
  margin: 0 0 26px;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.34;
  letter-spacing: -.03em;
  font-weight: 550;
  text-wrap: balance;
}

/* Одна колонка: читать сверху вниз, без возврата взглядом наверх. */
.bio-body p {
  margin: 0 0 18px;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.7;
}
.bio-body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Виды споров. Равные колонки, один фон, высота по содержимому.
   -------------------------------------------------------------------------- */
.disputes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.dispute-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur) ease, transform var(--dur) var(--ease-out);
}
.dispute-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -.03em;
}
.dispute-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Как проходит медиация. Три равных шага.
   -------------------------------------------------------------------------- */
.process-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.step {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  align-content: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur) ease, transform var(--dur) var(--ease-out);
}
.step-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-quiet);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.step-tag {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.step h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.step > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
/* Номер и тег стоят в одной строке, чтобы заголовки шагов были на одной высоте. */
.step__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   Онлайн
   -------------------------------------------------------------------------- */
.online-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.online-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.online-fact {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.online-fact strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 750;
}
.online-fact span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Вопросы и ответы (единственный аккордеон на странице)
   -------------------------------------------------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.faq-aside {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.faq-aside h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -.025em;
}
.faq-aside p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative;
  padding: 22px 52px 22px 0;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 11px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 11px no-repeat;
  transition: transform var(--dur) var(--ease-in-out), background-color var(--dur) ease;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
  background-color: var(--accent-quiet);
}
.faq-answer {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.faq-answer p {
  margin: 0;
  padding: 0 44px 22px 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.65;
}
.faq-empty {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Запись
   -------------------------------------------------------------------------- */
.booking-card {
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-m);
  text-align: center;
}
.booking-card .section-title { max-width: 20ch; margin-inline: auto; }
.booking-card .lead {
  max-width: 52ch;
  margin: 18px auto 28px;
}

/* Прямые контакты — полноценный второй путь, а не сноска. */
.contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(840px, 100%);
  margin: 32px auto 0;
  text-align: left;
}
.contact-item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--soft);
  text-decoration: none;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.contact-item:hover { border-color: var(--accent); background: var(--surface); }
.contact-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.contact-item strong {
  font-size: 14.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
  hyphens: none;
}

/* --------------------------------------------------------------------------
   Модальное окно заявки
   -------------------------------------------------------------------------- */
.application-modal[hidden] { display: none; }
.application-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.application-modal__backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(6, 18, 14, .68);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  cursor: pointer;
}
.application-modal__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 30px clamp(22px, 4vw, 40px) 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-l);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.application-modal.is-open .application-modal__backdrop,
.application-modal.is-open .application-modal__panel { opacity: 1; }
.application-modal.is-open .application-modal__panel { transform: none; }
body.has-application-modal { overflow: hidden; }

.application-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur) ease, border-color var(--dur) ease;
}
.application-modal__close:hover { background: var(--accent-quiet); border-color: var(--accent); }

.application-modal__heading { padding-right: 46px; margin-bottom: 20px; }
.application-modal__heading .eyebrow { margin-bottom: 12px; }
.application-modal__heading h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.application-modal__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.application-form { display: grid; gap: 16px; }
.application-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.application-form__error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.35;
}
.application-form__error:empty { display: none; }

.application-success {
  display: none;
  place-items: center;
  min-height: 300px;
  text-align: center;
}
.application-success.is-visible { display: grid; }
.application-success__mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on);
  font-size: 28px;
}
.application-success h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -.035em;
}
.application-success p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.application-submit.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.application-submit.is-loading span { opacity: .7; }

/* --------------------------------------------------------------------------
   Появление при прокрутке. Короткое и близкое — контент успевает
   проявиться раньше, чем читатель до него доберётся.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal] .reveal-item {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity var(--dur-reveal) var(--ease-out) var(--delay, 0ms),
                transform var(--dur-reveal) var(--ease-out) var(--delay, 0ms);
  }
  .motion-ready [data-reveal].is-visible .reveal-item {
    opacity: 1;
    transform: none;
  }
  .hero-copy-block > *,
  .hero-panel {
    opacity: 0;
    animation: intro var(--dur-reveal) var(--ease-out) forwards;
  }
  .hero-copy-block > *:nth-child(1) { animation-delay: 40ms; }
  .hero-copy-block > *:nth-child(2) { animation-delay: 100ms; }
  .hero-copy-block > *:nth-child(3) { animation-delay: 160ms; }
  .hero-copy-block > *:nth-child(4) { animation-delay: 220ms; }
  .hero-panel { animation-delay: 160ms; }
}
@keyframes intro {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .dispute-card:hover,
  .city:hover,
  .step:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
  }
  .faq-list summary:hover::after { background-color: var(--accent-quiet); }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero h1 { max-width: 18ch; }
  .definition,
  .about-layout,
  .online-layout,
  .faq-layout { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: 1fr; }
  .step { grid-template-rows: auto; }
  .cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .city-remote { grid-template-columns: 1fr; gap: 20px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .hero { padding-top: 44px; gap: 36px; }
  .principles,
  .cities { grid-template-columns: 1fr; }
  .disputes-grid,
  .contact-row { grid-template-columns: 1fr; }
  .application-form__row { grid-template-columns: 1fr; }
  .application-modal { padding: 10px; }
  .application-modal__panel { padding: 22px 18px 20px; }
  .booking-card { padding: 32px 20px; }

  /* Форма из пяти полей на телефоне и так длинная — снимаем всё лишнее,
     чтобы кнопка отправки была ближе к первому экрану. */
  .application-modal__heading { margin-bottom: 16px; }
  .application-modal__heading .eyebrow { display: none; }
  .application-modal__heading p { font-size: 14.5px; }
  .application-form { gap: 12px; }
  .application-form__row { gap: 12px; }
  .application-modal .field textarea { min-height: 88px; }
  .consent { padding: 12px 14px; }
}
