/* ==========================================================================
   Вёрстка сайта-визитки. Все значения — через var(--…) из tokens.css.
   Hex/rgb в этом файле нельзя (проверяет tests/check.mjs).
   ========================================================================== */

@import url('../tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection-bg); color: var(--selection-text); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 6rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--bg-alt); }
.stack > * + * { margin-top: var(--space-4); }

/* ---------- Типографика ---------- */
h1 {
  font-family: var(--font-display); font-weight: 300; font-size: var(--fs-display);
  line-height: var(--lh-display); letter-spacing: -0.015em; text-wrap: balance;
}
h2 {
  font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h2);
  line-height: var(--lh-heading); letter-spacing: -0.01em; text-wrap: balance;
}
h3 {
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3);
  line-height: var(--lh-heading); text-wrap: balance;
}
em { font-style: italic; font-weight: 300; }
h1 em, h2 em { color: var(--accent-hover); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-muted); max-width: 52ch; text-wrap: pretty; }
.small { font-size: var(--fs-small); color: var(--text-muted); line-height: 1.55; }
p { max-width: var(--measure); text-wrap: pretty; }
.section-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); max-width: var(--container-text); }
.eyebrow { font-size: var(--fs-small); font-weight: 600; color: var(--text-muted); }
.placeholder-note { font-style: italic; }

/* ---------- Кнопки и ссылки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap); padding: 0.8rem 1.75rem; border: 1.5px solid transparent;
  border-radius: var(--radius-pill); font: 600 var(--fs-small)/1.2 var(--font-body);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }
.btn--on-deep { background: var(--cream); color: var(--ink); }
.btn--on-deep:hover { background: var(--text-on-accent); transform: translateY(-1px); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--sand); color: var(--ink-soft); cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: var(--fs-small);
  align-self: start;
  transition: color var(--dur-base) var(--ease-out), gap var(--dur-base) var(--ease-out);
}
.link-arrow:not(.link-plain) { border-bottom: 1px solid currentColor; padding-block: 0.15rem; min-height: var(--tap); box-sizing: border-box; }
.link-arrow:hover { color: var(--accent-hover); gap: var(--space-3); }
.link-arrow svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.link-plain { text-decoration: none; border: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }

/* ---------- Шапка: плавающая пилюля ---------- */
.site-header { position: sticky; top: 0; z-index: 20; padding-top: var(--space-3); }
.nav {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  width: min(100% - 2 * var(--gutter), 80rem); margin-inline: auto;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem; min-height: 3.5rem;
  background: color-mix(in srgb, var(--bg) 97%, transparent); border: 1px solid var(--border);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-float);
}
.brand { display: grid; text-decoration: none; color: var(--text); min-height: var(--tap); align-content: center; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; line-height: 1.2; }
.brand-sub { font-size: var(--fs-label); color: var(--text-muted); line-height: 1.3; max-width: 36ch; }
.nav-menu { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-5); flex: 1; }
.nav-links { display: flex; gap: var(--space-4); }
.nav-links a, .nav-actions a { white-space: nowrap; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text-muted);
  text-decoration: none; font-size: var(--fs-small); font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="true"] { color: var(--text); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: var(--space-4); }
.nav-actions .btn { padding-inline: 1.25rem; white-space: nowrap; }
.nav-burger {
  display: none; width: var(--tap); height: var(--tap); flex: none; border: 0; padding: 0;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--cream);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.nav-burger:focus-visible { outline-offset: 2px; }

@media (max-width: 1279px) {
  .brand-sub { display: none; }
  .js .nav-burger { display: inline-flex; }
  .js .nav-menu {
    display: none; position: absolute; top: calc(100% + var(--space-2)); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-4); padding: var(--space-5);
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
  }
  .js .nav[data-open="true"] .nav-menu { display: flex; }
  .js .nav-links { flex-direction: column; gap: 0; }
  .js .nav-links a { width: 100%; font-size: var(--fs-body); }
  .js .nav-actions { flex-direction: column; align-items: stretch; }
  .js .nav-actions .link-arrow { justify-content: flex-start; }
  /* без JS ссылки остаются на виду и переносятся */
  html:not(.js) .nav { flex-wrap: wrap; border-radius: var(--radius-md); }
  html:not(.js) .nav-menu { flex-wrap: wrap; justify-content: flex-start; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}

/* ---------- Блок 1: Hero ---------- */
.hero { padding-block: var(--space-8) var(--section-pad); }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: var(--space-8); } }
.hero h1 { max-width: 20ch; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.75rem); }
.hero-copy { display: grid; gap: var(--space-5); justify-items: start; }
.hero-notes { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.hero-notes li { display: flex; gap: var(--space-3); align-items: baseline; color: var(--text-muted); font-size: var(--fs-small); }
.hero-notes li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--moss); transform: translateY(-2px); }
.portrait {
  aspect-ratio: 4 / 5; width: min(100%, 22rem); justify-self: center;
  border-radius: var(--radius-arch); overflow: hidden;
}
.portrait-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
@media (max-width: 899px) { .portrait { aspect-ratio: 3 / 4; border-radius: var(--radius-lg); width: min(100%, 20rem); justify-self: center; } }

/* ---------- Блок 2: карточки симптомов ---------- */
.symptoms { display: grid; gap: var(--space-5); }
@media (min-width: 760px) {
  .symptoms { grid-template-columns: repeat(6, 1fr); }
  .symptom:nth-child(1) { grid-column: span 3; }
  .symptom:nth-child(2) { grid-column: span 3; margin-top: var(--space-7); }
  .symptom:nth-child(3) { grid-column: span 2; }
  .symptom:nth-child(4) { grid-column: span 2; margin-top: var(--space-6); }
  .symptom:nth-child(5) { grid-column: span 2; }
}
.symptom { padding: var(--space-6); border-radius: var(--radius-md); background: var(--cream); display: grid; gap: var(--space-3); align-content: start; color: var(--ink); }
.symptom:nth-child(even) { background: var(--bg-soft-green); }
.symptom p { max-width: 38ch; }

/* ---------- Блок 3: сравнение ---------- */
.compare { width: 100%; border-collapse: collapse; border-top: 1px solid var(--border); }
.compare th, .compare td { text-align: left; vertical-align: top; padding: var(--space-5) var(--space-5) var(--space-5) 0; border-bottom: 1px solid var(--border); font-weight: 400; }
.compare thead th { font-size: var(--fs-small); font-weight: 600; color: var(--text-muted); padding-block: var(--space-4); }
.compare tbody th { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; width: 22%; }
.compare td:nth-child(2) { color: var(--text-muted); }
.compare td:nth-child(3)::before { content: "→"; color: var(--accent-hover); font-weight: 700; margin-right: var(--space-2); }
@media (max-width: 899px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare { border-top: 0; }
  .compare tr { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); margin-bottom: var(--space-4); }
  .compare th, .compare td { border: 0; padding: 0; }
  .compare tbody th { width: auto; margin-bottom: var(--space-3); }
  .compare td + td { margin-top: var(--space-3); }
  .compare td::before { display: block; content: attr(data-label); font-size: var(--fs-label); font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-1); }
  .compare td:nth-child(3)::before { content: "→ " attr(data-label); color: var(--accent-hover); margin: 0 0 var(--space-1); }
}

/* ---------- Блок 4: метод ---------- */
.approach-grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .approach-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; } }
.approach-grid .stack > h2 { margin-bottom: var(--space-5); }
.pillars { display: grid; gap: var(--space-4); }
.pillar { background: var(--cream); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); border: 1px solid var(--border); }
.pillar h3 { margin-bottom: var(--space-2); font-size: 1.375rem; }

/* ---------- Блок 5: принципы ---------- */
.principles { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(2, 1fr); gap: var(--space-7) var(--space-8); } }
.principle { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4) var(--space-5); align-items: start; }
.icon { width: 44px; height: 44px; color: var(--moss); flex: none; }
.icon * { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.principle h3 { font-size: 1.375rem; }
.principle p { margin-top: var(--space-2); color: var(--text-muted); }

/* ---------- Мои ограничения ---------- */
.limits { display: grid; gap: var(--space-3); max-width: var(--container-text); }
.limits li { border-top: 1px solid var(--border); padding-top: var(--space-3); font-size: var(--fs-lead); line-height: 1.5; color: var(--text); }
.limits li:last-child { border-bottom: 1px solid var(--border); padding-bottom: var(--space-3); }

/* ---------- Блок 6: образование ---------- */
.facts { display: grid; gap: var(--space-5) var(--space-7); margin-bottom: var(--space-7); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { border-top: 1px solid var(--border); padding-top: var(--space-4); }
.fact h3 { font-size: 1.375rem; margin-bottom: var(--space-2); }
.fact p { color: var(--text-muted); }
/* ---------- Слайдер дипломов (один диплом за раз) ---------- */
.docs-slider {
  position: relative;
  isolation: isolate;
}
.docs-viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
}
.docs-track {
  display: flex;
  transition: transform 0.42s var(--ease-out);
}
.doc-slide {
  flex: 0 0 100%;
  display: grid; gap: var(--space-4);
}

/* Рамка: фиксированная высота, серые поля, изображение вписывается целиком */
.doc-frame {
  width: 100%;
  height: clamp(360px, 60vh, 640px);
  background: var(--sand);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: none;
  cursor: zoom-in;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.doc-frame:is(button):hover { box-shadow: var(--shadow-lift); }
.doc-frame img {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  pointer-events: none;
}
.doc-frame--view { cursor: default; }
.doc-frame--view:hover { box-shadow: none; }

.doc-caption {
  font-size: var(--fs-small); color: var(--text-muted); line-height: 1.5;
  display: grid; gap: var(--space-1); text-align: center;
}
.doc-caption strong { display: block; color: var(--text); font-weight: 600; font-size: var(--fs-body); }
.doc-org { font-size: var(--fs-label); color: var(--text-muted); }

/* Кнопки ◀ ▶ — поверх картинки, по вертикали посередине рамки */
.docs-btn-prev,
.docs-btn-next {
  position: absolute;
  top: calc(clamp(360px, 60vh, 640px) / 2);
  transform: translateY(-50%);
  z-index: 3;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: none;
  background: var(--bg); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  box-shadow: var(--shadow-float);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.docs-btn-prev { left: var(--space-3); }
.docs-btn-next { right: var(--space-3); }
.docs-btn-prev:hover,
.docs-btn-next:hover { background: var(--ink); color: var(--cream); transform: translateY(-50%) scale(1.08); }
.docs-btn-prev:disabled,
.docs-btn-next:disabled { opacity: 0.3; cursor: default; }
.docs-btn-prev:disabled:hover,
.docs-btn-next:disabled:hover { background: var(--bg); color: var(--text); transform: translateY(-50%); }
.docs-btn-prev svg,
.docs-btn-next svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Точки-пагинатор под слайдером */
.docs-controls {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  margin-top: var(--space-4);
}
.docs-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0;
  background: var(--border); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.docs-dot.is-active { background: var(--moss); transform: scale(1.4); }

/* ---------- Lightbox ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(52rem, calc(100% - 2 * var(--space-4))); width: 100%; color: var(--text); overflow: visible; }
.lightbox::backdrop { background: color-mix(in srgb, var(--ink) 82%, transparent); }
.lightbox-body { background: var(--bg); border-radius: var(--radius-md); padding: var(--space-5); display: grid; gap: var(--space-4); position: relative; }
.lightbox-frame {
  max-height: 80vh; margin-inline: auto; width: 100%; border-radius: var(--radius-sm);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.lightbox-frame img { max-width: 100%; max-height: 78vh; object-fit: contain; display: block; border-radius: var(--radius-sm); }
.lightbox-caption { font-size: var(--fs-small); color: var(--text-muted); }
.lightbox-caption strong { display: block; color: var(--text); }
.lightbox-close {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; width: var(--tap); height: var(--tap);
  border: 0; border-radius: var(--radius-pill); background: var(--ink); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }

/* ---------- Блок 7: FAQ ---------- */
.faq { border-top: 1px solid var(--border); max-width: var(--container-text); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  min-height: var(--tap); padding-block: var(--space-4); cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.3125rem; line-height: 1.3; font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--dur-base) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent-hover); }
.faq details p { padding-bottom: var(--space-5); color: var(--text-muted); }

/* ---------- Блок 8: форма (тёмная секция) ---------- */
.deep { background: var(--bg-deep); color: var(--text-on-deep); }
.apply { border-radius: var(--radius-section) var(--radius-section) 0 0; padding-block: var(--section-pad) var(--space-8); }
.deep p, .deep .lead, .deep .small { color: var(--text-on-deep-muted); }
.deep h2 em { color: var(--sage); }
.deep a { color: var(--text-on-deep); }
.deep :focus-visible { outline-color: var(--sage); }
.apply-grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .apply-grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-8); align-items: start; } }

.form { display: grid; gap: var(--space-5); max-width: 34rem; }
.field { display: grid; gap: var(--space-2); border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: var(--fs-small); font-weight: 600; color: var(--text-on-deep); padding: 0; }
.field .hint { font-weight: 400; color: var(--text-on-deep-muted); }
.field input[type="text"], .field textarea {
  width: 100%; min-height: 3.25rem; padding: 0.85rem 1.25rem; font: inherit; color: var(--cream);
  background: color-mix(in srgb, var(--cream) 8%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--cream) 40%, transparent); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-on-deep-muted); opacity: 0.85; }
.field input[type="text"]:hover, .field textarea:hover { border-color: var(--sage); }
.field input[type="text"]:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--sage); outline-offset: 2px; border-color: var(--sage);
  background: color-mix(in srgb, var(--cream) 16%, transparent);
}
.field.has-error input[type="text"] { border-color: var(--cream); border-width: 2px; }
.error {
  display: block; width: fit-content; max-width: 100%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--terracotta-deep) !important; font-size: var(--fs-small); font-weight: 600; line-height: 1.4;
}
.segmented { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1.25rem;
  border: 1.5px solid color-mix(in srgb, var(--cream) 40%, transparent); border-radius: var(--radius-pill);
  font-size: var(--fs-small); font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.segmented input:checked + span { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 3px; }
.segmented input:hover:not(:checked) + span { border-color: var(--sage); }
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; min-height: var(--tap); font-weight: 400 !important; font-size: var(--fs-small); color: var(--text-on-deep-muted) !important; line-height: 1.5; cursor: pointer; }
.check input { width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--cream); cursor: pointer; }
.check a { text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: grid; gap: var(--space-3); justify-items: start; }
html:not(.js) .form-actions { display: none; }
.form-status { color: var(--text-on-deep) !important; font-size: var(--fs-small); font-weight: 600; }
.form-status:empty { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.form-result { display: grid; gap: var(--space-3); justify-items: start; }
.form-result textarea { min-height: 8rem; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--bg-deep); color: var(--text-on-deep); padding-block: 0 var(--space-7); }
.site-footer p, .site-footer .small { color: var(--text-on-deep-muted); }
.site-footer a { color: var(--text-on-deep); }
.site-footer :focus-visible { outline-color: var(--sage); }
.site-footer .wrap > :first-child { border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent); padding-top: var(--space-7); }
.footer-grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-7); } }
.footer-title { color: var(--text-on-deep) !important; font-weight: 600; font-size: var(--fs-small); }
.footer-title strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; }
.footer-links { display: grid; gap: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-small); }
.footer-links a:hover, .site-footer .link-arrow:hover { color: var(--sage); }
.site-footer .link-plain { display: inline-block; padding-block: 0.6rem; line-height: 1.5; font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .link-arrow { color: var(--text-on-deep); }
.footer-bar {
  margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent);
  display: grid; gap: var(--space-3); font-size: var(--fs-label);
}
.footer-bar p { font-size: var(--fs-label); }
@media (min-width: 900px) { .footer-bar { grid-template-columns: 1fr 1.4fr; gap: var(--space-7); } }

/* ---------- Юридические страницы ---------- */
.legal { padding-block: var(--space-8) var(--section-pad); min-height: 60vh; }
.legal .stack { max-width: var(--container-text); }
.legal h1 { font-size: var(--fs-h2); margin-bottom: var(--space-5); }
.legal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }

/* ---------- Мягкое появление первого экрана ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .portrait { animation: rise var(--dur-slow) var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .portrait { animation-delay: 200ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
