/* =========================================================================
   Персональная стратегия — Анна Коваль
   Дизайн-система: редакционный журнал + полевой дневник.
   Базовые стили — мобильные; сложные композиции добавляются с min-width.
   ========================================================================= */

/* ------------------------------------------------------------- 1. Токены */

:root {
  --green-dark: #131f16;
  --green-muted: #45634b;
  --orange-warm: #feae4d;
  --accent-green: #2f8f4e;
  --dark-brown: #150505;
  --bg: #fbf9f2;

  --paper: #fefcf6;
  --line: rgba(69, 99, 75, 0.22);
  --line-soft: rgba(69, 99, 75, 0.13);
  --ink-soft: rgba(21, 5, 5, 0.66);
  --on-dark: #f1ebdb;
  --on-dark-soft: rgba(241, 235, 219, 0.72);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;

  /* типографическая шкала */
  --t--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --t-0: clamp(1.0625rem, 1.03rem + 0.2vw, 1.1875rem);
  --t-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --t-2: clamp(1.4rem, 1.2rem + 0.95vw, 2rem);
  --t-3: clamp(1.7rem, 1.35rem + 1.7vw, 2.7rem);
  --t-4: clamp(2rem, 1.5rem + 2.5vw, 3.4rem);
  --t-5: clamp(2.15rem, 1.45rem + 3.5vw, 4.05rem);

  --pad: clamp(20px, 4.6vw, 72px);
  --maxw: 1280px;
  --section-y: clamp(72px, 9vw, 132px);
  --radius: 6px;
  --header-h: 68px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------- 2. База */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--dark-brown);
  font-family: var(--font-body);
  font-size: var(--t-0);
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video { max-width: 100%; height: auto; display: block; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--accent-green);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
  left: 12px; top: -80px;
  z-index: 100;
  background: var(--green-dark);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* -------------------------------------------------------- 3. Типографика */

.h2,
.h3,
.display {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--green-dark);
  letter-spacing: -0.012em;
}

.h2 {
  font-size: var(--t-4);
  line-height: 1.1;
  margin: 0 0 clamp(28px, 4vw, 56px);
  max-width: 20ch;
}

.h3 {
  font-size: var(--t-2);
  line-height: 1.2;
  margin: 0 0 1rem;
  max-width: 24ch;
}

.display { line-height: 1.22; }

.measure { max-width: 64ch; line-height: 1.68; }

.lede {
  font-size: var(--t-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hint {
  font-size: var(--t--1);
  line-height: 1.5;
  color: var(--green-muted);
  max-width: 34ch;
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t--1);
  letter-spacing: 0.06em;
  color: var(--green-muted);
  margin: 0 0 clamp(18px, 2.5vw, 28px);
}
.eyebrow__mark { width: 20px; height: 20px; flex: none; }

.marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--green-muted);
}
.marker__num {
  font-family: var(--font-display);
  font-size: var(--t-2);
  letter-spacing: 0.02em;
}
.marker__dot { width: 15px; height: 15px; color: var(--accent-green); }

/* Рисованное выделение ключевой фразы */
.mark {
  position: relative;
  display: inline;
  padding-bottom: 0.12em;
}
.mark .mark__line {
  position: absolute;
  left: 0; right: 0; bottom: -0.16em;
  width: 100%; height: 0.28em;
  color: var(--orange-warm);
}

/* -------------------------------------------------------------- 4. Слои */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--green-dark);
  color: var(--on-dark);
}
.section--dark .h2,
.section--dark .h3,
.section--dark .display { color: var(--on-dark); }

.section--warm {
  background: var(--orange-warm);
  color: var(--green-dark);
}

.paper {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow:
    0 1px 0 rgba(21, 5, 5, 0.03),
    0 22px 44px -34px rgba(32, 53, 34, 0.55);
}

.ink { color: var(--green-muted); }
.ink path,
.ink circle { vector-effect: non-scaling-stroke; }

.route {
  position: absolute;
  pointer-events: none;
  color: var(--green-muted);
  opacity: 0.55;
}
.route svg { width: 100%; height: 100%; }

/* появление линии маршрута */
.route-line__path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.route-line.is-visible .route-line__path,
.no-js .route-line__path { stroke-dashoffset: 0; }
.route-line .route-line__path { transition: stroke-dashoffset 1.8s var(--ease); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--t-0);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn--warm {
  background: var(--orange-warm);
  color: var(--green-dark);
  box-shadow: 0 10px 24px -18px rgba(32, 53, 34, 0.9);
}
.btn--warm:hover { background: #ffbe6d; transform: translateY(-2px); }
.btn--warm:active { transform: translateY(0); }

.btn--dark {
  background: var(--green-dark);
  color: var(--bg);
}
.btn--dark:hover { background: #2c4830; transform: translateY(-2px); }
.btn--dark:active { transform: translateY(0); }

.btn--sm { min-height: 44px; padding: 0.5rem 1.1rem; font-size: var(--t--1); }
.btn--lg { min-height: 60px; padding: 1rem 2.2rem; font-size: var(--t-1); }

/* ------------------------------------------------------------- 6. Хедер */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 233, 0.9);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line-soft); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.header__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.15;
  margin-right: auto;
}
.header__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--green-dark);
}
.header__role {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--green-muted);
}

.nav { display: none; }
.nav__list { display: flex; gap: clamp(14px, 1.8vw, 28px); }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: var(--t--1);
  text-decoration: none;
  color: var(--green-dark);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }

.header__cta { display: none; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--green-dark);
}
.burger__box { display: block; width: 24px; }
.burger__box span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.burger__box span + span { margin-top: 6px; }
.burger[aria-expanded="true"] .burger__box span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__box span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line-soft);
  padding: 12px var(--pad) 24px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list { display: flex; flex-direction: column; }
.mobile-menu__list .nav__link {
  display: block;
  padding: 14px 0;
  min-height: 48px;
  font-size: var(--t-0);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu__cta { width: 100%; margin-top: 18px; }

/* -------------------------------------------------------- 7. Первый экран */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(94vh, 880px);
  padding-block: clamp(96px, 14vw, 160px) clamp(64px, 8vw, 110px);
  overflow: hidden;
  background: url("../images/hero-bg.png") center 60% / cover no-repeat;
}
/* Видео лежит слоем ниже затемнения (-2 против -1), поэтому оверлей за текстом
   работает одинаково и для видео, и для фотографии-заглушки под ним. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Точечное затемнение только за текстом, а не по всему кадру:
     края фото остаются светлыми, плашка не читается как отдельный слой. */
  background: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.17) 48%, rgba(0, 0, 0, 0) 78%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Заголовок длинный — держим его крупным, но не даём распухнуть по высоте:
   ограничиваем кегль и работаем шириной строки. */
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.05rem, 1.48rem + 2.65vw, 3.55rem);
  line-height: 1.1;
  letter-spacing: -0.016em;
  color: var(--on-dark);
  margin: 0 0 clamp(20px, 3vw, 30px);
  max-width: 20ch;
  text-wrap: pretty;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.hero__lede {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--t-1);
  line-height: 1.5;
  color: var(--on-dark);
  max-width: 52ch;
  margin: 0 0 clamp(28px, 4vw, 44px);
  text-wrap: pretty;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px 22px;
}
.hero__actions .hint {
  font-size: clamp(0.875rem, 0.82rem + 0.2vw, 0.95rem);
  line-height: 1.45;
  text-align: center;
  color: var(--on-dark);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}
.hero__note {
  margin-top: 20px;
  font-size: var(--t--1);
  color: var(--on-dark-soft);
  max-width: 42ch;
}

.route--hero { display: none; }

/* ------------------------------------------------------------ 8. Ситуации */

.pain__head { max-width: 16ch; margin-bottom: clamp(48px, 6vw, 80px); }

.pain__list { display: grid; row-gap: clamp(48px, 7vw, 96px); }

.pain__figure {
  margin: 0 0 20px;
  max-width: 275px;
  padding: 12px;
  overflow: hidden;
}
.pain__figure img {
  width: 100%;
  border-radius: 3px;
}

.pain__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-2);
  line-height: 1.2;
  color: var(--green-dark);
  margin: 0 0 0.7em;
  max-width: 22ch;
}

/* -------------------------------------------------------------- 9. Bridge */

.bridge {
  padding-top: clamp(41px, 5.15vw, 57px);
  padding-bottom: clamp(72px, 9vw, 100px);
}
.bridge__inner {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
}

.bridge__top {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}

.bridge__open,
.bridge__aside {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  line-height: 1.35;
  color: var(--green-dark);
  max-width: 46ch;
  margin: 0;
}

.bridge__divider {
  display: none;
  flex: none;
  align-self: stretch;
  width: 16px;
  opacity: 0.6;
}
.bridge__divider svg { display: block; width: 100%; height: 100%; }

.bridge__note {
  margin: clamp(40px, 6vw, 64px) 0 0;
  text-align: center;
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.5rem);
  color: var(--ink-soft);
}
.bridge__note strong.mark {
  font-weight: 400;
  color: var(--green-dark);
}

/* ----------------------------------------------------------- 11. Изменения */

.shift__topo {
  position: absolute;
  top: -30px; right: -60px;
  width: min(520px, 70vw); height: auto;
  color: var(--on-dark);
  opacity: 0.12;
}

.shift__inner { position: relative; }

/* Заголовок — самостоятельная шапка секции, тот же вертикальный ритм,
   что и у .pain__head: не должен сливаться с текстом до/после. */
.shift__title {
  max-width: 24ch;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.shift__intro {
  font-size: var(--t-3);
  max-width: 44ch;
  margin: 0 0 clamp(40px, 6vw, 72px);
}
.shift__intro strong { font-weight: 400; color: var(--orange-warm); }

.shift__lead {
  font-size: var(--t--1);
  letter-spacing: 0.05em;
  color: var(--on-dark-soft);
  margin-bottom: 8px;
}

.shift__list { border-top: 1px solid rgba(241, 235, 219, 0.2); }
.shift__bullet {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 4px 12px;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgba(241, 235, 219, 0.2);
  color: var(--on-dark);
}
.shift__bullet-index {
  font-family: var(--font-display);
  font-size: var(--t-1);
  color: var(--on-dark-soft);
}
.shift__bullet strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1em;
  color: var(--orange-warm);
}

.shift__mid {
  margin: clamp(44px, 6vw, 76px) 0 clamp(36px, 5vw, 56px);
  font-family: var(--font-display);
  font-size: var(--t-2);
  line-height: 1.28;
  max-width: 52ch;
}
.shift__mid strong { font-weight: 400; color: var(--orange-warm); }


/* --------------------------------------------------------------- 12. Анна */

.about__head { max-width: 18ch; }

.about__portrait {
  position: relative;
  margin: 0 0 clamp(56px, 7vw, 72px);
  max-width: 420px;
}
.about__portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 50% 50% var(--radius) var(--radius) / 24% 24% 2% 2%;
}
.about__plate {
  position: absolute;
  z-index: 0;
  inset: 22px -20px -20px 22px;
  background: var(--orange-warm);
  border-radius: 50% 50% var(--radius) var(--radius) / 22% 22% 2% 2%;
  opacity: 0.9;
}
.about__card {
  position: absolute;
  z-index: 2;
  left: 8px; bottom: -26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  max-width: 88%;
}
.about__name {
  font-family: var(--font-display);
  font-size: var(--t-1);
  color: var(--green-dark);
  line-height: 1.2;
}
.about__tagline {
  font-size: var(--t--1);
  color: var(--green-muted);
  line-height: 1.4;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: clamp(6px, 1vw, 12px);
  column-gap: clamp(16px, 3vw, 32px);
  margin-bottom: clamp(24px, 4vw, 36px);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
/* первая пара — отдельной строкой по центру над остальными двумя */
.stat:nth-child(1) { grid-column: 1 / -1; }
.stat__value {
  flex: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--orange-warm);
}
/* единица измерения мельче цифры: иначе «1000+ часов» не влезает в колонку */
.stat__unit {
  font-size: 0.5em;
  font-weight: 400;
  letter-spacing: 0;
}
.stat__label {
  font-size: var(--t--1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-muted);
  text-wrap: pretty;
}
.section--dark .stat__label { color: var(--on-dark-soft); }

.stats__tail {
  display: table;
  margin-inline: auto;
  font-size: var(--t--1);
  font-weight: 500;
  color: var(--green-dark);
  background: var(--orange-warm);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.about__text p.measure { color: var(--ink-soft); }
.section--dark .about__text p.measure { color: var(--on-dark-soft); }

/* ------------------------------------------------------------ 13. Процесс */

.process__intro {
  font-size: var(--t-1);
  color: var(--ink-soft);
  margin-bottom: clamp(36px, 5vw, 60px);
}
.process__intro strong { font-weight: 500; color: var(--green-dark); }

/* Маршрут из пяти этапов: лёгкие карточки в шахматном порядке, соединённые
   тонкой кривой. Мобильная база — колонка карточек, зигзаг и линия с 768px. */

.steps-wrap { position: relative; }

.steps {
  position: relative;
  display: grid;
  gap: clamp(16px, 2.6vw, 22px);
}

/* Карточка держится на бумаге и волосяной рамке — без теней и заливок,
   иначе блок читается как интерфейс, а не как разворот. Отступ сверху/снизу
   больше, чем по бокам, — карточка читается вертикальной, а не плашкой. */
.step {
  position: relative;
  padding-block: clamp(28px, 3.4vw, 40px);
  padding-inline: clamp(20px, 2.2vw, 28px);
  background: var(--paper);
  border: 1px solid rgba(69, 99, 75, 0.14);
  border-radius: 18px;
}

/* номер + уходящая вправо волосяная линейка */
.step__num {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(12px, 1.4vw, 16px);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--accent-green);
  opacity: 0.7;
}
.step__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(47, 143, 78, 0.32), rgba(47, 143, 78, 0));
}

.step__body { position: relative; }
.step__text {
  font-size: var(--t-0);
  line-height: 1.55;
  max-width: 52ch;
  margin: 0;
  color: rgba(21, 5, 5, 0.84);
}
.step__items {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(69, 99, 75, 0.12);
}
.step__items li {
  position: relative;
  padding-left: 18px;
  font-size: var(--t--1);
  line-height: 1.45;
  color: rgba(21, 5, 5, 0.78);
}
.step__items li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  opacity: 0.75;
}

/* маршрут между карточками — рисуется по их фактическим краям в site.js */
.steps__route { display: none; }

.process__closing {
  position: relative;
  margin: clamp(34px, 4.5vw, 56px) 0 0;
  padding-top: clamp(24px, 3.2vw, 34px);
  border-top: 1px solid var(--line);
  font-size: var(--t-3);
  max-width: 28ch;
}
.process__closing-dot {
  display: inline-block;
  width: 0.4em; height: 0.4em;
  margin-left: 0.25em;
  color: var(--accent-green);
  vertical-align: middle;
}

/* Зигзаг: карточки слева/справа, каждая следующая стартует на середине
   предыдущей — за счёт того, что карточка занимает две строки сетки,
   а соседние сдвинуты на одну. */
@media (min-width: 768px) {
  /* Средняя дорожка — коридор, по которому идёт линия между карточками.
     Карточки уже, чем раньше, — так они читаются вертикальными, а не
     широкими плашками. */
  .steps {
    grid-template-columns: minmax(0, 36fr) minmax(0, 26fr) minmax(0, 36fr);
    column-gap: 0;
    row-gap: clamp(12px, 1.6vw, 20px);
  }

  .steps__route {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .steps__route svg {
    width: 100%; height: 100%;
    color: var(--accent-green);
    opacity: 0.45;
  }

  /* Каждая карточка занимает две строки, соседние сдвинуты на одну —
     следующая стартует примерно на середине предыдущей. */
  .step:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .step:nth-child(2) { grid-column: 3; grid-row: 2 / span 2; }
  .step:nth-child(3) { grid-column: 1; grid-row: 3 / span 2; }
  .step:nth-child(4) { grid-column: 3; grid-row: 4 / span 2; }
  .step:nth-child(5) { grid-column: 1; grid-row: 5 / span 2; }

  /* карточки прижаты к верху своей области, чтобы не растягиваться пустотой */
  .step { align-self: start; }

  /* Карточка 3 со списком заметно выше соседних и съедает зазор до пятой.
     Резервируем место под ней, иначе 3 и 5 почти слипаются. */
  .step:nth-child(3) { margin-bottom: clamp(26px, 3.2vw, 42px); }

  /* точка, в которой линия подходит к карточке */
  .step::after {
    content: "";
    position: absolute;
    top: 50%;
    margin-top: -3.5px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0.55;
  }
  .step:nth-child(odd)::after { right: -3.5px; }
  .step:nth-child(even)::after { left: -3.5px; }
}

/* Список третьего шага в две колонки, а сама карточка чуть шире соседних:
   иначе она вдвое выше остальных и в правой колонке появляется провал. */
@media (min-width: 1000px) {
  .step:nth-child(3) { width: 114%; }
  .step__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
  /* пятый пункт — нечётный, один в строке: растягиваем на всю ширину */
  .step__items li:last-child { grid-column: 1 / -1; }
}

/* --------------------------------------------------------- 13b. Кейсы */

.cases__head { max-width: 20ch; }

.cases__list {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  margin-top: clamp(28px, 4vw, 44px);
}

.case__item {
  padding: clamp(24px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.case__mark {
  display: block;
  width: 16px; height: 16px;
  margin-bottom: 16px;
  color: var(--accent-green);
}
.case__title {
  font-family: var(--font-display);
  font-size: var(--t-1);
  color: var(--green-dark);
  margin: 0 0 10px;
}
.case__text {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42ch;
}
.case__attribution {
  margin: 12px 0 0;
  font-size: var(--t--1);
  color: var(--green-muted);
}
.case__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: var(--t--1);
  font-weight: 600;
  color: var(--accent-green);
  cursor: pointer;
}
.case__more::after { content: "→"; transition: transform 0.2s var(--ease); }
.case__more:hover { color: var(--green-dark); }
.case__more:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------- 14. Результаты */

.outcomes__head { max-width: 20ch; }

.kit { position: relative; }

.kit__sheet {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vw, 48px);
}
.kit__sheet::before {
  content: "";
  position: absolute;
  inset: 14px -10px -12px 12px;
  z-index: -1;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transform: rotate(-1.2deg);
}

.kit__list { display: grid; gap: 4px; }
.kit__item {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--green-dark);
}
.kit__item:last-child { border-bottom: 0; }
.kit__num {
  font-family: var(--font-display);
  font-size: var(--t-1);
  color: var(--accent-green);
}

.kit__photo {
  position: relative;
  z-index: 2;
  margin: -18px 0 0;
  padding: 10px;
  max-width: 300px;
  transform: rotate(1.6deg);
}
.kit__photo img { width: 100%; border-radius: 3px; }

.kit__sprig { display: none; }

/* ------------------------------------------------------------ 15. Форматы */

.pricing__head { max-width: 14ch; }

/* тёплое свечение под карточками: они читаются как освещённые на тёмном фоне */
.pricing::before {
  content: "";
  position: absolute;
  left: 50%; top: 55%;
  width: min(1180px, 94%);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(254, 174, 77, 0.11), rgba(254, 174, 77, 0) 72%);
  pointer-events: none;
}
.pricing > .wrap { position: relative; }

.formats { display: grid; gap: clamp(24px, 3vw, 36px); }

.format {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 36px) clamp(24px, 3vw, 42px) clamp(22px, 2.4vw, 32px);
  background: linear-gradient(180deg, #fffefa 0%, var(--paper) 45%, #faf5e9 100%);
  border: 1px solid rgba(69, 99, 75, 0.11);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(9, 18, 11, 0.3),
    0 34px 62px -36px rgba(4, 11, 6, 0.8);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

/* приглушённая латунная линия по верхнему краю — акцент вместо цветной плашки */
.format::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(254, 174, 77, 0.55), rgba(254, 174, 77, 0) 58%);
}

/* второй формат — флагманский: чуть глубже бумага и золотой контур */
.format--2 {
  background: linear-gradient(180deg, #fdf9ec 0%, #f7f1e0 50%, #f2ead4 100%);
  border-color: rgba(69, 99, 75, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 1px rgba(254, 174, 77, 0.22),
    0 1px 2px rgba(9, 18, 11, 0.34),
    0 44px 74px -36px rgba(4, 11, 6, 0.88);
}
.format--2::before {
  background: linear-gradient(90deg, rgba(254, 174, 77, 0.7), rgba(254, 174, 77, 0) 68%);
}

@media (hover: hover) {
  .format:hover {
    transform: translateY(-5px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 2px 3px rgba(9, 18, 11, 0.3),
      0 52px 82px -34px rgba(4, 11, 6, 0.9);
  }
  .format--2:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 0 0 1px rgba(254, 174, 77, 0.34),
      0 2px 3px rgba(9, 18, 11, 0.34),
      0 58px 90px -34px rgba(4, 11, 6, 0.95);
  }
}

.format__title {
  font-family: var(--font-display);
  font-weight: 400;
  /* кегль привязан к ширине карточки: длинный заголовок держится в одну строку */
  font-size: clamp(1.26rem, 0.24rem + 2.15vw, 1.9rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--green-dark);
  margin: 0 0 clamp(20px, 2.4vw, 28px);
  max-width: 26ch;
  text-wrap: balance;
}

@media (min-width: 720px) {
  .format__title--nowrap { white-space: nowrap; }
}

/* механика формата — мягко тонированная площадка, без рамки */
.format__spec {
  margin: 0 0 clamp(20px, 2.2vw, 26px);
  padding: clamp(13px, 1.5vw, 17px) clamp(15px, 1.8vw, 19px);
  background: rgba(69, 99, 75, 0.035);
  border-radius: 8px;
}
.format__schedule {
  font-size: var(--t-0);
  font-weight: 500;
  line-height: 1.35;
  color: var(--green-dark);
  margin: 0 0 0.4em;
}
.format__schedule-note {
  font-size: var(--t--1);
  line-height: 1.5;
  color: var(--green-muted);
  margin: 0;
  max-width: 40ch;
}

.format__group { margin-bottom: clamp(20px, 2.2vw, 26px); }
.format__group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green-muted);
  margin: 0 0 1.15em;
}
.format__group-title::after {
  content: "";
  flex: 1;
  max-width: 56%;
  height: 1px;
  background: rgba(69, 99, 75, 0.15);
}

.format__list { display: grid; gap: 0.8em; }
.format__list li {
  position: relative;
  padding-left: 22px;
  font-size: var(--t--1);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
}
.format__list li::before {
  content: "";
  position: absolute;
  left: 3px; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--orange-warm);
  transform: rotate(45deg);
}

.format__fit {
  margin: auto 0 clamp(18px, 2.2vw, 24px);
  padding-top: clamp(18px, 2vw, 22px);
  border-top: 1px solid rgba(69, 99, 75, 0.15);
  font-size: var(--t--1);
  line-height: 1.6;
  color: var(--green-dark);
  max-width: 46ch;
}
.format__fit-lead {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--t-0);
  letter-spacing: 0.01em;
  color: var(--green-muted);
  margin-bottom: 0.3em;
}

.format__price {
  display: flex;
  align-items: baseline;
  gap: 0.06em;
  margin: 0;
  padding-top: clamp(17px, 2vw, 22px);
  border-top: 1px solid rgba(69, 99, 75, 0.15);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--green-dark);
  font-variant-numeric: lining-nums tabular-nums;
}
.format__price-cur {
  display: inline-block;
  font-size: 0.4em;
  letter-spacing: 0;
  color: var(--green-muted);
  transform: translateY(-0.62em);
}

/* примечание после карточек: без заливки, только тонкая латунная линия слева */
.footnote {
  position: relative;
  display: flex;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(14px, 1.8vw, 20px) clamp(18px, 2.2vw, 26px);
  background: transparent;
  border-left: 1px solid rgba(254, 174, 77, 0.45);
  border-radius: 0;
}
.footnote__nudge {
  flex: none;
  width: 30px; height: 25px;
  margin-top: 3px;
  color: var(--green-muted);
}
.footnote__body { max-width: 58ch; }
.footnote__body p { font-size: var(--t--1); color: var(--green-dark); }
.footnote__body p:first-child { font-size: var(--t-0); }

/* на тёмной секции: фон совпадает с фоном секции, текст светлый */
.section--dark .footnote { background: var(--green-dark); }
.section--dark .footnote__nudge { color: rgba(254, 174, 77, 0.5); }
.section--dark .footnote__body p { color: rgba(241, 235, 219, 0.6); }
.section--dark .footnote__body p:first-child { color: var(--on-dark); }

/* ---------------------------------------------------------------- 16. FAQ */

.faq__list { border-top: 1px solid var(--line); max-width: 74ch; }
.faq__item { border-bottom: 1px solid var(--line); }

.faq__summary {
  display: grid;
  grid-template-columns: 2.6rem 1fr 1.6rem;
  gap: 10px;
  align-items: baseline;
  min-height: 56px;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
}
.faq__summary::-webkit-details-marker { display: none; }
.faq__summary:hover .faq__question { color: var(--green-muted); }

.faq__index {
  font-family: var(--font-display);
  font-size: var(--t-0);
  color: var(--green-muted);
}
.faq__question {
  font-family: var(--font-display);
  font-size: var(--t-1);
  line-height: 1.32;
  color: var(--green-dark);
  transition: color 0.2s var(--ease);
}
.faq__sign {
  position: relative;
  align-self: center;
  width: 16px; height: 16px;
  justify-self: end;
}
.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.5px;
  background: var(--green-muted);
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.faq__sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__details[open]:not(.faq--js) .faq__sign::after,
.faq__details[data-open="true"] .faq__sign::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.faq__panel { overflow: hidden; }

/* Плавное раскрытие: строка грида 0fr → 1fr. Если браузер не умеет
   интерполировать fr, раскрытие просто происходит мгновенно. */
.faq--js .faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease);
}
.faq--js[data-open="true"] .faq__panel { grid-template-rows: 1fr; }
.faq--js .faq__answer { min-height: 0; overflow: hidden; }
/* нижний отступ задаётся margin'ом последнего абзаца, иначе в свёрнутом
   состоянии padding оставлял бы видимую полосу */
.faq__answer {
  margin-left: calc(2.6rem + 10px);
  max-width: 62ch;
  color: var(--ink-soft);
}
.faq__answer > :last-child { margin-bottom: 1.5rem; }
.faq__answer strong { font-weight: 500; color: var(--green-dark); }

/* ---------------------------------------------------- 17. Финал и подвал */

/* Финальный экран — фотография вместо заливки. Тёмная вуаль идёт по
   диагонали: слева, где лежит текст, она плотная, справа отпускает кадр. */
.contact {
  text-align: left;
  background-color: var(--green-dark);
  background-image:
    linear-gradient(
      104deg,
      rgba(10, 19, 12, 0.94) 0%,
      rgba(10, 19, 12, 0.86) 34%,
      rgba(10, 19, 12, 0.6) 62%,
      rgba(10, 19, 12, 0.38) 100%
    ),
    url("../images/contact-bg.jpg");
  background-repeat: no-repeat;
  background-position: center 55%;
  background-size: cover;
  color: var(--on-dark);
}
.contact__inner { position: relative; }

.route--contact {
  position: absolute;
  left: 2px; top: calc(-1 * var(--section-y) - 10px);
  width: 60px; height: calc(var(--section-y) + 40px);
  color: var(--orange-warm);
  opacity: 0.55;
}

.contact__eyebrow { color: rgba(241, 235, 219, 0.75); }

.contact__title {
  font-size: var(--t-4);
  max-width: 20ch;
  margin-bottom: clamp(28px, 4vw, 40px);
  color: var(--on-dark);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
}

.contact__action { margin: 0; }
.contact__cta {
  box-shadow: 0 14px 30px -20px rgba(21, 5, 5, 0.75);
}

.footer {
  padding-block: clamp(28px, 3.6vw, 40px);
  border-top: 1px solid var(--line-soft);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-0);
  color: var(--green-dark);
  margin: 0;
}
.footer__copyright {
  margin: 0;
  font-size: var(--t--1);
  color: var(--green-muted);
  max-width: 44ch;
}
.footer__email {
  margin: 0;
  font-size: var(--t--1);
}
.footer__email a {
  color: var(--green-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer__email a:hover {
  color: var(--green-dark);
  border-bottom-color: currentColor;
}
.footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.4em;
  text-align: right;
}
.footer__legal-list li:not(:last-child)::after {
  content: "·";
  margin-left: 0.4em;
  color: var(--line);
}
.footer__legal-list a {
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--green-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer__legal-list a:hover {
  color: var(--green-dark);
  border-bottom-color: currentColor;
}

/* ------------------------------------------------------------ 18. Планшет */

@media (min-width: 720px) {

  .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }

  .kit__photo {
    position: absolute;
    right: -8px; bottom: -46px;
    margin: 0;
    width: 260px;
    max-width: 40%;
  }
  .kit__sheet { padding-right: clamp(48px, 12vw, 150px); }

  .pain__figure { max-width: 325px; }
}

/* ------------------------------------------------------------- 19. Десктоп */

@media (min-width: 960px) {
  .nav { display: block; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }
  .mobile-menu { display: none !important; }

  /* --- первый экран: фото на весь экран, текст по центру --- */
  .hero__title { max-width: 26ch; }

  /* --- ситуации: страницы дневника со смещением --- */
  .pain__list { grid-template-columns: repeat(12, 1fr); }
  .pain__item {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 32px;
    align-items: start;
  }
  .pain__figure { margin: 0; max-width: none; }

  /* фото крупнее на 25% относительно трека сетки — трек тот же (3 колонки),
     поэтому позиция и раскладка body не меняются, растёт только сама карточка */
  .pain__item--1 .pain__figure { grid-column: 1 / 4; transform: rotate(-2.4deg) scale(1.25); transform-origin: left top; }
  .pain__item--1 .pain__body { grid-column: 5 / 11; }

  /* grid-row: 1 обязателен для обоих: иначе sparse-упаковка сочтёт, что фигура
     (col 9–13, идёт первой в DOM) блокирует более левую колонку body (col 2–8),
     и перенесёт body на следующую строку */
  .pain__item--2 .pain__body { grid-column: 2 / 8; grid-row: 1; }
  /* тот же трек-охват (3 колонки), что у пункта 1 — картинка и её «бумажная»
     подложка получаются одного размера во всех трёх пунктах */
  .pain__item--2 .pain__figure { grid-column: 10 / 13; grid-row: 1; justify-self: end; transform: rotate(2deg) scale(1.25); transform-origin: right top; }

  .pain__item--3 .pain__figure { grid-column: 3 / 6; grid-row: 1; transform: rotate(-1.4deg) scale(1.25); transform-origin: left top; }
  /* наложение только на поле: текст начинается заведомо правее фотографии */
  .pain__item--3 .pain__body {
    grid-column: 6 / 13;
    grid-row: 1;
    /* трек сетки (и с ним фото) растёт вместе с шириной окна до --maxw —
       отступ должен расти вслед за ним, иначе на широких экранах текст
       заезжает под фото */
    padding-left: clamp(130px, 14vw, 160px);
  }

  /* --- bridge: два текста в ряд, одного размера и стиля, вывод — по центру снизу --- */
  .bridge__top {
    flex-direction: row;
    align-items: center;
    gap: clamp(24px, 3.5vw, 40px);
  }
  .bridge__open,
  .bridge__aside {
    font-size: clamp(1.55rem, 1.25rem + 1.1vw, 1.95rem);
    max-width: none;
  }
  .bridge__divider { display: block; }
  .bridge__open,
  .bridge__aside { flex: 1 1 0; }

  /* --- Анна --- */
  .about__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 40px;
    align-items: start;
  }
  .about__portrait { grid-column: 1 / 6; max-width: none; margin: 0; }
  .about__card { left: auto; right: -40px; bottom: -30px; max-width: 74%; }
  .about__text { grid-column: 7 / 13; }

  /* --- процесс --- */
  .process__inner { position: relative; }
  .process__closing { font-size: var(--t-4); }

  /* --- кейсы: карточки в ряд --- */
  .cases__list { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .case__item { display: flex; flex-direction: column; }

  /* --- результаты --- */
  .outcomes__inner { position: relative; }
  .kit__sheet { width: 74%; padding: clamp(36px, 4vw, 56px); }
  .kit__photo { right: 0; bottom: -40px; width: 320px; max-width: 30%; }
  .kit__item { grid-template-columns: 3rem 1fr; font-size: var(--t-1); }
  .kit__sprig {
    display: block;
    position: absolute;
    left: 66%; top: -96px;
    width: 52px; height: 88px;
    color: var(--green-muted);
    opacity: 0.55;
  }

  /* --- финал --- */
  .contact__inner { padding-left: 90px; }
  .route--contact { left: 0; width: 74px; }
  .contact__title { font-size: var(--t-5); }
}

@media (min-width: 1180px) {
  .hero__title { max-width: 21ch; }
}

/* ---------------------------------------------------- 20. Анимации, motion */

/* Первый экран не ждёт JS: анимация появления запускается сразу при отрисовке,
   поэтому заголовок не «мигает» пустотой. */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero__title { animation: rise 0.8s var(--ease) both; }
.hero__lede { animation: rise 0.9s var(--ease) 0.12s both; }
.hero__actions { animation: rise 0.9s var(--ease) 0.2s both; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .route-line__path { stroke-dashoffset: 0; }
  .format:hover { transform: none; }
}
