/* ==========================================================================
   Светлана Борисова · логопед
   Токены → база → компоненты. Внутри компонента селекторы одного уровня,
   отступы секций задаёт только .section, чтобы правила не перебивали друг друга.
   ========================================================================== */

:root {
  --paper: #fbf7f2;
  --paper-warm: #f4ebdf;
  --card: #fffdfa;
  --ink: #2a2118;
  --ink-soft: #5f5346;
  --ink-mute: #857868;
  --rule: #e4d8c8;
  --rule-strong: #cdbca6;
  --terra: #c75b39;
  --terra-deep: #9d3f20;
  --terra-tint: #f7e5da;
  --sage: #5c7052;
  --sage-tint: #e7ece1;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --step-h1: clamp(2.15rem, 1.35rem + 3.3vw, 3.65rem);
  --step-h2: clamp(1.65rem, 1.25rem + 1.7vw, 2.45rem);
  --step-h3: clamp(1.2rem, 1.06rem + 0.6vw, 1.5rem);
  --step-lead: clamp(1.06rem, 1rem + 0.35vw, 1.24rem);

  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --section-y: clamp(3.5rem, 7vw, 6.5rem);
  --radius: 14px;
}

/* --- База ---------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-h1); line-height: 1.06; }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); line-height: 1.25; }

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

a { color: var(--terra-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--terra); }

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

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

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

.wrap {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-warm); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Типографические примитивы ------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 1rem;
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section__head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head .lead { margin-top: 1.1rem; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

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

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--rule-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.55em;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--solid {
  --btn-bg: var(--terra);
  --btn-fg: #fff;
  --btn-border: var(--terra);
}
.btn--solid:hover {
  --btn-bg: var(--terra-deep);
  --btn-border: var(--terra-deep);
  color: #fff;
}

.btn--ghost:hover {
  --btn-border: var(--terra);
  color: var(--terra-deep);
}

.btn--lg { padding: 0.95em 1.9em; font-size: 1.05rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo__name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo__dot { color: var(--terra); }
.logo__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.logo:hover .logo__name { color: var(--terra-deep); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.site-nav__list a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.96rem;
  white-space: nowrap;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}
.site-nav__list a:hover { color: var(--ink); border-bottom-color: var(--terra); }
.site-nav__list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--terra); }
.site-nav__cta { font-size: 0.95rem; padding: 0.6em 1.2em; white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 2px;
  background: var(--ink);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--ink);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

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

.hero { padding-block: clamp(2.75rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title { margin-bottom: 1.35rem; }
.hero__title em {
  font-style: normal;
  color: var(--terra-deep);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero__figure {
  margin: 0;
  justify-self: end;
  max-width: 380px;
  width: 100%;
}
.hero__frame {
  position: relative;
  display: block;
}
.hero__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 4px;
}
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--terra);
  border-radius: 4px;
}
.hero__caption {
  position: relative;
  z-index: 1;
  margin-top: 2.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* --- Звуковая шкала (ключевой блок) -------------------------------------- */

.timeline__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.timeline__step {
  position: relative;
  padding: 2.2rem 1.15rem 0 0;
  border-top: 2px solid var(--rule-strong);
}
.timeline__step + .timeline__step { padding-left: 1.15rem; }

.timeline__step::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--terra);
}
.section--tint .timeline__step::before { background: var(--paper-warm); }

.timeline__step + .timeline__step::before { left: 1.15rem; }

.timeline__age {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--terra-deep);
  text-transform: uppercase;
}

.timeline__sounds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.1rem;
  margin: 0.85rem 0 0.9rem;
}

.phoneme {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--terra);
  line-height: 1.5;
}
.phoneme b {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 500;
  color: var(--ink);
  padding-inline: 0.04em;
}

.timeline__note {
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.timeline__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}
.timeline__foot p { margin: 0; max-width: 62ch; }

/* Появление шагов при прокрутке. Класс js ставит скрипт: без него контент виден сразу. */
.js .reveal .timeline__step,
.js .reveal .flags__item,
.js .reveal .service-card,
.js .reveal .process__step {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-visible .timeline__step,
.reveal.is-visible .flags__item,
.reveal.is-visible .service-card,
.reveal.is-visible .process__step {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* --- Тревожные признаки -------------------------------------------------- */

.flags__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0;
}

.flags__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem 1.5rem 1.35rem 0;
  border-top: 1px solid var(--rule);
}

.flags__age {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--terra-deep);
}
.flags__text { color: var(--ink); margin: 0; }

.flags__note {
  margin-top: 2.25rem;
  padding: 1.4rem 1.6rem;
  background: var(--sage-tint);
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* --- Направления работы -------------------------------------------------- */

.services__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 1.75rem 1.6rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover {
  border-color: var(--terra);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -22px rgba(42, 33, 24, 0.55);
  color: var(--ink);
}

.service-card__age {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.service-card__title { font-size: 1.28rem; }
.service-card__text {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
  flex-grow: 1;
}
.service-card__more {
  font-weight: 500;
  color: var(--terra-deep);
  font-size: 0.96rem;
}
.service-card:hover .service-card__more { color: var(--terra); }

/* --- Как проходят занятия ------------------------------------------------ */

.process__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: clamp(1.5rem, 2.4vw, 2rem);
}

.process__step {
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.process__marker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.85rem;
}
.process__num { color: var(--terra); }

.process__title { margin-bottom: 0.6rem; }
.process__text { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

/* --- Обо мне ------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about__figure { margin: 0; }
.about__figure img { border-radius: var(--radius); }

.about__name {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 1rem 0 0;
}

.about__text p { color: var(--ink-soft); }
.about__text p:first-of-type { color: var(--ink); font-size: var(--step-lead); line-height: 1.55; }

.credentials {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.credentials__title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin: 0 0 1rem;
}
.credentials li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.credentials li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 8px;
  height: 1px;
  background: var(--terra);
}

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

.reviews__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 3.5vw, 3rem);
}
/* Короткие отзывы идут в две колонки; для трёх и более так не остаётся дыр в ряду. */
@media (min-width: 48rem) {
  .reviews__list { grid-template-columns: 1fr 1fr; }
}

.review {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-top: 1.4rem;
  border-top: 2px solid var(--rule-strong);
}
/* Длинный отзыв-история: во всю ширину блока, иначе колонка вытягивается втрое. */
.review--wide { grid-column: 1 / -1; }
.review--wide .review__text { max-width: 74ch; }

.review__text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.62;
  text-wrap: pretty;
  margin: 0 0 1.5rem;
  flex-grow: 1;
}
.review__text p { margin: 0 0 0.9em; }
.review__text p:last-child { margin-bottom: 0; }
.review__author { margin: 0 0 0.15rem; font-weight: 500; font-size: 0.96rem; }
.review__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* --- Вопросы ------------------------------------------------------------- */

.faq__list { max-width: 78ch; border-top: 1px solid var(--rule); }

.faq__item { border-bottom: 1px solid var(--rule); }

.faq__q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.35;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--terra-deep); }

.faq__sign {
  flex: none;
  width: 20px;
  height: 20px;
  position: relative;
  translate: 0 0.2em;
}
.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  background: var(--terra);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.faq__sign::before { top: 9px; left: 2px; width: 16px; height: 2px; }
.faq__sign::after { top: 2px; left: 9px; width: 2px; height: 16px; }
.faq__item[open] .faq__sign::after { transform: scaleY(0); opacity: 0; }

.faq__a {
  padding-bottom: 1.4rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

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

.breadcrumbs {
  padding-top: 1.5rem;
  font-size: 0.86rem;
  color: var(--ink-mute);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li::after { content: "/"; margin-left: 0.4rem; color: var(--rule-strong); }
.breadcrumbs li:last-child::after { content: none; }
.breadcrumbs a { color: var(--ink-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--terra-deep); text-decoration: underline; }

.page-head { padding-block: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1rem, 2vw, 1.5rem); }
.page-head__age {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.9rem;
}
.page-head .lead { margin-top: 1.25rem; }

.article__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Документ без боковой колонки: строка не должна тянуться на всю ширину. */
.prose--doc { max-width: 74ch; }

.prose h2 { margin-bottom: 1.1rem; }
.prose h2 + p { margin-top: 0; }
.prose p { color: var(--ink-soft); }
.prose > * + h2 { margin-top: 2.75rem; }

.checklist { margin-top: 0.5rem; max-width: 78ch; }
.checklist li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2.1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 1.15em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--terra);
  border-radius: 3px;
}

.callout {
  margin-top: 2.5rem;
  padding: 1.5rem 1.7rem;
  border-radius: var(--radius);
  background: var(--terra-tint);
  color: var(--ink);
}
.callout__title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin: 0 0 0.6rem;
}
.callout--sage { background: var(--sage-tint); }
.callout--sage .callout__title { color: var(--sage); }

.aside {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.aside__title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.aside__text { margin: 0.6rem 0 1.15rem; color: var(--ink-soft); font-size: 0.96rem; }
.aside__links li + li { margin-top: 0.55rem; }
.aside__links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.aside__links a:hover { color: var(--terra-deep); border-bottom-color: var(--terra); }
.aside .btn { width: 100%; }
.aside .btn + .btn { margin-top: 0.6rem; }

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

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
}
.contacts__block { border-top: 2px solid var(--ink); padding-top: 1.35rem; }
.contacts__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.7rem;
}
.contacts__value { font-size: 1.15rem; font-weight: 500; }
.contacts__value + .contacts__value { margin-top: 0.4rem; }
.contacts__value a { text-decoration: none; }
.contacts__value a:hover { text-decoration: underline; }
.contacts__extra { color: var(--ink-soft); font-size: 0.96rem; margin-top: 0.5rem; }

.map { margin-top: clamp(2rem, 4vw, 3rem); border-radius: var(--radius); overflow: hidden; }
.map iframe { display: block; width: 100%; min-height: 380px; border: 0; }
.map__link { margin-top: 0.85rem; font-size: 0.96rem; color: var(--ink-soft); }

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

.cta { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta__title { color: var(--paper); max-width: 20ch; }
.cta__text { margin: 1rem 0 0; color: #cfc3b3; max-width: 46ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.cta .btn--ghost { --btn-border: rgba(251, 247, 242, 0.35); --btn-fg: var(--paper); }
.cta .btn--ghost:hover { --btn-border: var(--paper); color: var(--paper); }

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

.site-footer { background: var(--paper-warm); padding-block: clamp(2.75rem, 5vw, 4rem) 2rem; }

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.site-footer__brand p { margin-top: 0.9rem; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.9rem;
}
.site-footer__col li { margin-bottom: 0.5rem; font-size: 0.96rem; }
.site-footer__col a { color: var(--ink); text-decoration: none; }
.site-footer__col a:hover { color: var(--terra-deep); text-decoration: underline; }
.site-footer__muted { color: var(--ink-mute); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
  font-size: 0.85rem;
  color: var(--ink-mute);
}
.site-footer__bottom p { margin: 0; }

/* --- Окно записи --------------------------------------------------------- */

.modal {
  width: min(440px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal::backdrop { background: rgba(28, 21, 14, 0.55); }

.modal__inner:focus { outline: none; }
.modal__inner {
  position: relative;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgba(28, 21, 14, 0.6);
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink-mute);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--ink); border-color: var(--rule-strong); }

.modal__title { font-size: 1.5rem; margin-bottom: 0.75rem; }
.modal__text { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1.5rem; }

.modal__phones {
  display: grid;
  gap: 0.9rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.modal__phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
}
.modal__number {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.modal__number:hover { color: var(--terra-deep); }
.modal__copy { padding: 0.5em 0.95em; font-size: 0.85rem; }
.modal__copy:disabled { color: var(--sage); border-color: var(--sage); cursor: default; }

.modal__row { padding-top: 1.15rem; }
.modal__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.35rem;
}
.modal__links { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.modal__links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.modal__links a:hover { color: var(--terra-deep); border-bottom-color: var(--terra); }
.modal__links--plain { display: block; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.5; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in 0.22s ease-out; }
  @keyframes modal-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* --- Панель связи на мобильных ------------------------------------------- */

.callbar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  gap: 1px;
  background: var(--rule-strong);
  border-top: 1px solid var(--rule-strong);
}
.callbar__link {
  flex: 1;
  padding: 0.9rem 0.5rem;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.callbar__link--main { background: var(--terra); color: #fff; }
/* Номер целиком на узком экране: мельче основного текста панели, но читаемо. */
.callbar__link--phone { font-size: 0.86rem; white-space: nowrap; padding-inline: 0.35rem; }
@media (max-width: 360px) {
  .callbar__link--phone { font-size: 0.78rem; letter-spacing: -0.01em; }
}

/* --- Уведомление о cookie ------------------------------------------------ */

.cookie-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 34rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(42, 33, 24, 0.14);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Правило display выше перебило бы атрибут hidden, поэтому скрываем явно. */
.cookie-notice[hidden] { display: none; }
.cookie-notice.is-visible { opacity: 1; transform: none; }

.cookie-notice__text {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cookie-notice__btn { flex-shrink: 0; }

/* --- Адаптив ------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { justify-self: start; max-width: 320px; }
  .article__grid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .about__grid { grid-template-columns: 1fr; }
  .about__figure { max-width: 300px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .timeline__grid { grid-template-columns: 1fr; }
  .timeline__step {
    padding: 0 0 1.75rem 1.75rem;
    border-top: 0;
    border-left: 2px solid var(--rule-strong);
  }
  .timeline__step + .timeline__step { padding-left: 1.75rem; }
  .timeline__step::before,
  .timeline__step + .timeline__step::before { top: 0; left: -7px; }
  .timeline__step:last-child { padding-bottom: 0; }
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .site-header__inner { flex-wrap: wrap; min-height: 66px; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-bottom: 1.25rem;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .site-nav__list a:hover,
  .site-nav__list a[aria-current="page"] { border-bottom-color: var(--rule); }
  .site-nav__cta { margin-top: 1rem; }
  .callbar { display: flex; }
  body { padding-bottom: 56px; }
  /* Плашка садится над панелью звонка, чтобы не перекрывать номера. */
  .cookie-notice { bottom: calc(56px + 0.75rem); }
  .site-footer__grid { grid-template-columns: 1fr; }
  .flags__item { padding-right: 0; }
  .cta__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  /* смещённая рамка не должна упираться в край вьюпорта */
  .hero__figure { max-width: calc(100% - 14px); }
  .hero__frame::before { inset: 12px -12px -12px 12px; }
  .site-header__inner { gap: 0.75rem; }
  .logo__name { font-size: 1.05rem; }
  .logo__dot, .logo__role { display: none; }
  .nav-toggle { padding: 0.45rem 0.8rem; }
  .page-head { padding-bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal .timeline__step,
  .js .reveal .flags__item,
  .js .reveal .service-card,
  .js .reveal .process__step { opacity: 1; transform: none; }
}

@media print {
  .site-header, .callbar, .cta, .btn, .cookie-notice { display: none; }
  body { background: #fff; }
}
