/* ==========================================================================
   ПЁТР ЮШКИН - лендинг v3
   Design language: near-black canvas, warm off-white ink, driven by the hero
   reference (assets/hero-portrait.png): giant wordmark behind a bleeding
   portrait photo, hand-drawn sketch accents. Contrast carries the layout;
   terracotta appears only where something needs to be picked out.

   Radius split (documented exception, not an ad hoc mix):
     - nav pill + all buttons -> full pill
     - photos / cards          -> 0 (raw, editorial)
     - form inputs             -> small radius, for legibility
   ========================================================================== */

/* Palette: 21st.dev "Darkmatter remix" - warm off-white ink on a near-black
   canvas, terracotta as the single accent, slate teal as its cool counterpart. */

:root {
  --bg: #0a0a0a;
  --bg-raised: #141413;
  --bg-raised-2: #1c1b19;
  --fg: #f6f3ec;
  --fg-muted: rgba(246, 243, 236, 0.64);
  --fg-faint: rgba(246, 243, 236, 0.42);
  --border: rgba(246, 243, 236, 0.14);
  --border-strong: rgba(246, 243, 236, 0.28);
  --on-fg: #0a0a0a;

  --accent: #d1803f;
  --accent-strong: #e5934c;
  --accent-soft: rgba(209, 128, 63, 0.16);
  --accent-2: #52706b;
  --accent-2-strong: #7ba09a;

  --r-pill: 999px;
  --r-input: 10px;

  --sp-section: 7rem;

  /* Заголовки - Prata, как в example-v4 (просьба 2026-09-15), и в сцене hero тоже.
     Своего текста этим шрифтом у hero нет: имя - картинки, «Поворотный момент» - Caveat. */
  --font-display: "Prata", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --nav-h: 84px;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  font-synthesis: style; /* у Prata одно начертание 400: без ложного полужирного там, где заголовкам задан вес 500-700 */
  background: var(--bg);
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  position: relative;
}

/* ---------- typography ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 400; /* Prata, как в example-v4 */
  letter-spacing: -0.02em;
}

.display-1 {
  font-size: clamp(2.4rem, 6.6vw, 5.6rem);
  line-height: 0.98;
}

.display-2 {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.06;
}

.display-3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 46rem;
}

.body-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 42rem;
}

.body-text strong,
p strong {
  color: var(--fg);
  font-weight: 700;
}

.stat-inline {
  font-weight: 700;
  color: var(--accent-strong);
}

p {
  margin: 0;
}

/* ---------- buttons ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* One pearl surface for every button on the site (the look first used on
   "Смотреть все работы" in the Works section). */

.btn,
.btn-primary,
.btn-subtle,
.btn-pearl {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--r-pill);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%),
    radial-gradient(120% 140% at 30% -20%, rgba(255, 255, 255, 0.14), transparent 60%),
    var(--bg-raised-2);
  border: 1px solid var(--border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 14px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.4);
  /* Только transform и border-color: тень (три слоя) при анимации
     перерисовывается на каждом кадре, а разница между состояниями и так
     почти не читается - пусть переключается сразу. 160мс - бюджет
     отклика на нажатие, ховер укладывается в него же. */
  transition: transform 160ms var(--ease-out), border-color 0.2s var(--ease-out);
}

.btn:hover,
.btn-primary:hover,
.btn-subtle:hover,
.btn-pearl:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 245, 243, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -10px 14px rgba(0, 0, 0, 0.5),
    0 14px 30px rgba(0, 0, 0, 0.5);
}

.btn:active,
.btn-primary:active,
.btn-subtle:active,
.btn-pearl:active {
  transform: translateY(1px) scale(0.98);
}

.btn svg,
.btn-pearl svg {
  width: 1em;
  height: 1em;
  color: rgba(245, 245, 243, 0.85);
  flex-shrink: 0;
}

/* "Получить помощь" keeps its gold dot. Пульс на ховере снят: это
   декорация на действии, которое видят десятки раз, и анимировала она
   box-shadow - перерисовку на каждом кадре. Свечение осталось статичным. */

.btn-subtle {
  gap: 0.65rem;
}

.btn-subtle::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgba(209, 128, 63, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary,
  .btn-subtle,
  .btn-pearl {
    transition: none;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  text-decoration: none;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--fg);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* back-link used by the story and podcast pages */

.story-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.story-back:hover {
  color: var(--fg);
}

.story-back svg {
  width: 1.05em;
  height: 1.05em;
}

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

/* The bar itself carried no surface, so page copy scrolled straight through
   the wordmark - badly on mobile, where the pill (its only backdrop) is
   hidden, and visibly on desktop too, where card tags slid under the mark.
   A scrim that fades in once the page moves keeps the top of the hero clean. */

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -22px 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.6) 62%, transparent 100%);
  transition: opacity 0.3s var(--ease-out);
}

.site-nav.is-scrolled::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav::before {
    transition: none;
  }
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.5rem 0.7rem 0;
  text-decoration: none;
  color: var(--fg);
  flex-shrink: 0;
}

.nav-mark-glyph {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 2.5px;
}

.nav-mark-glyph span {
  width: 7px;
  height: 7px;
  background: var(--fg);
}

.nav-mark-glyph span:nth-child(2) {
  background: var(--accent);
}

.nav-mark-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.site-nav.is-scrolled .nav-pill {
  border-color: var(--border-strong);
  background: rgba(20, 20, 20, 0.9);
}

.nav-pill li {
  display: flex;
}

/* 21st.dev "Origin Button": a disc grows from wherever the pointer entered
   until it covers the pill, and the label flips to the canvas colour. JS feeds
   --ox/--oy (entry point) and --cover (diameter that reaches the far corner). */

.nav-pill a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0.62rem 1.15rem;
  border-radius: var(--r-pill);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

.nav-pill a::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--ox, 50%);
  top: var(--oy, 50%);
  width: var(--cover, 140px);
  height: var(--cover, 140px);
  margin: calc(var(--cover, 140px) / -2) 0 0 calc(var(--cover, 140px) / -2);
  border-radius: 50%;
  background: var(--fg);
  transform: scale(0);
  /* 250мс: ховер видят десятки раз за визит, движение должно быть почти
     незаметным по длительности; на 500мс диск догонял курсор с опозданием */
  transition: transform 250ms var(--ease-out);
}

.nav-pill a.is-filled,
.nav-pill a:focus-visible {
  color: var(--bg);
  outline: none;
}

.nav-pill a.is-filled::before,
.nav-pill a:focus-visible::before {
  transform: scale(1);
}

.nav-pill a:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .nav-pill a::before {
    transition: none;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Кнопка «Написать» в шапке - охряная, по образцу заказчика (2026-09-16).
   Цвета из палитры сайта: светлее сверху, темнее снизу, тёмный текст.
   Только шапка: кнопки в формах и на карточках остаются тёмными. */
.nav-actions .btn-primary {
  padding: 0.78rem 1.55rem;
  font-size: 0.98rem;
  color: var(--on-fg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-color: rgba(120, 66, 20, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 214, 0.65),
    inset 0 -8px 12px rgba(120, 60, 16, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.42);
}

.nav-actions .btn-primary:hover {
  border-color: rgba(120, 66, 20, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 222, 0.75),
    inset 0 -8px 12px rgba(120, 60, 16, 0.3),
    0 12px 26px rgba(0, 0, 0, 0.5);
}

.nav-actions .btn-primary svg { color: var(--on-fg); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 26px;
  height: 18px;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.34s var(--ease-out), opacity 0.2s var(--ease-out);
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 8px; }
.nav-toggle-bars span:nth-child(3) { top: 16px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.3);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Меню-плитки. Пункты — крупные карточки в две колонки, «Написать»
   во всю ширину акцентом. Появляются волной, при нажатии карточка
   вдавливается и подсвечивается.
   Вместо display:none гасим видимостью: так работают переходы, а из
   фокуса и от скринридеров закрытая панель всё равно скрыта. */
.mobile-panel {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  background: var(--bg);
  padding: 0.9rem var(--gutter) 1.6rem;

  display: grid;
  grid-template-columns: 1fr 1fr;
  /* шесть плиток занимают три ряда, четвёртый — кнопка, он по содержимому */
  grid-template-rows: repeat(3, minmax(5.5rem, 1fr)) auto;
  gap: 0.7rem;
  overflow-y: auto;
  overscroll-behavior: contain;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s var(--ease-out), visibility 0s linear 0.24s;
}

.mobile-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s var(--ease-out), visibility 0s;
}

.mobile-panel a {
  --d: 0s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-raised);

  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;

  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.36s var(--ease-out), transform 0.36s var(--ease-out),
              border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.mobile-panel a svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

.mobile-panel.is-open a {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: var(--d);
}

/* Волна: каждая следующая плитка трогается на 40мс позже */
.mobile-panel a:nth-child(1) { --d: 0.03s; }
.mobile-panel a:nth-child(2) { --d: 0.07s; }
.mobile-panel a:nth-child(3) { --d: 0.11s; }
.mobile-panel a:nth-child(4) { --d: 0.15s; }
.mobile-panel a:nth-child(5) { --d: 0.19s; }
.mobile-panel a:nth-child(6) { --d: 0.23s; }
.mobile-panel a:nth-child(7) { --d: 0.27s; }
.mobile-panel a:nth-child(8) { --d: 0.31s; }

.mobile-panel a:active {
  background: var(--bg-raised-2);
  border-color: rgba(209, 128, 63, 0.55);
  transform: scale(0.955);
  transition-duration: 0.09s;
  transition-delay: 0s;
}

.mobile-panel a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* «Написать» — во всю ширину. Вид тот же, что у кнопки в шапке (решение
   заказчика 2026-09-16): была плоская заливка охрой, стал градиент со светлым
   кантом по верхней кромке и тёмным по нижней. */
.mobile-panel .mobile-cta {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-color: rgba(120, 66, 20, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 214, 0.65),
    inset 0 -8px 12px rgba(120, 60, 16, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.42);
  color: var(--on-fg);
  font-weight: 700;
}

.mobile-panel .mobile-cta svg { color: var(--on-fg); }

.mobile-panel .mobile-cta:active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--accent-strong), var(--accent-strong));
  border-color: rgba(120, 66, 20, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-panel,
  .mobile-panel a,
  .nav-toggle-bars span { transition-duration: 0.01ms; }
  .mobile-panel.is-open a { transition-delay: 0s; }
}

/* Между 861 и 1200px пилюля из шести пунктов в увеличенном виде уже не
   влезает между логотипом и кнопкой — там отыгрываем размеры назад,
   но не до исходных. Ниже 861px пилюля всё равно уступает место бургеру.
   2026-10-17: пункт «Помощь» стал «Консультации» - диапазон расширен с 1080
   до 1200px, пункты больше не переносятся на две строки, а до 1000px
   значок 18+ у логотипа скрыт (он есть в подвале). */
.nav-pill a { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1200px) {
  .nav-pill { padding: 0.35rem; }
  .nav-pill a { padding: 0.55rem 0.8rem; font-size: 0.9rem; }
  .nav-mark-text { font-size: 1.02rem; }
  .nav-actions .btn-primary { padding: 0.68rem 1.2rem; font-size: 0.9rem; }
}
@media (min-width: 861px) and (max-width: 1000px) {
  .nav-pill a { padding: 0.5rem 0.55rem; font-size: 0.86rem; }
  .nav-mark .age-badge { display: none; }
}

@media (max-width: 860px) {
  .nav-pill {
    display: none;
  }
  .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: block;
  }

  /* the pill is gone here, so the bar needs a solid surface rather than the
     desktop scrim - headings run the full width and would show through */
  .site-nav.is-scrolled {
    background: rgba(10, 10, 10, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-scrolled::before {
    opacity: 0;
  }
}

/* ---------- 01 hero ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  padding-top: var(--nav-h);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg);
  overflow: hidden;
}

/* Ambient glow behind the figure (21st.dev "Background snippets"): a soft
   light bloom from the upper middle, falling away to the page black.
   Light only - no tint, no disc, no hard edge, so the hero and the section
   below it sit on one continuous background. */

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 46% at 50% 20%, rgba(246, 243, 236, 0.13), transparent 68%),
    radial-gradient(46% 34% at 50% 34%, rgba(246, 243, 236, 0.09), transparent 70%);
}

.hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-marquee {
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 50%;
  width: 108%;
  transform: translateX(-50%) rotate(-1.4deg) scale(1.06);
  overflow: hidden;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.8rem 0;
  pointer-events: none;
}

.hero-marquee-track {
  display: flex;
  width: max-content;
  animation: hero-marquee-scroll 32s linear infinite;
}

@keyframes hero-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-marquee-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}

.hero-marquee-dot {
  color: var(--fg-faint);
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track {
    animation: none;
  }
}

/* The stage reproduces assets/hero-portrait.png exactly. Every offset below is
   that 1672x941 reference measured in place and expressed as a percentage of
   the stage, so the composition is identical at every viewport width - the
   Р and the Ю sit behind the figure at the same point on a phone as on a
   desktop. Do not convert these to vh/px: that is what broke it before. */

.hy-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  margin: 0 auto;
}

/* on a short desktop window a full-bleed 16:9 banner would swallow the whole
   screen, so cap it by height there and let it centre */
@media (min-width: 900px) and (max-height: 800px) {
  .hy-stage {
    max-width: calc(72vh * 1672 / 941);
  }
}

.hy-word {
  position: absolute;
  bottom: 30.82%;
  height: auto;
  opacity: 0;
  z-index: 2;
  filter: drop-shadow(0 0 26px rgba(246, 243, 236, 0.28));
}

.hy-w1 {
  left: 7.3%;
  width: 31.94%;
  transform: translateX(-70px);
  animation: hy-slide 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards;
}

.hy-w2 {
  right: 6.34%;
  width: 48.74%;
  transform: translateX(70px);
  animation: hy-slide 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards;
}

.hy-subject {
  position: absolute;
  left: 48.71%;
  bottom: -2.98%;
  width: 48.39%;
  height: auto;
  z-index: 3;
  opacity: 0;
  transform: translateX(-50%) translateY(46px);
  animation: hy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes hy-slide { to { opacity: 1; transform: translateX(0); } }
@keyframes hy-rise { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .hy-word, .hy-subject {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hy-subject {
    transform: translateX(-50%);
  }
}

.hero-footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
}

.hero-eyebrow {
  display: block;
}

.hero-tagline {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--fg-muted);
  max-width: 22rem;
}

/* The stage is a fixed-ratio banner, so on a phone it is short: pull the copy
   under it in tight instead of leaving the block floating in dead space. */

@media (max-width: 760px) {
  :root {
    --sp-section: 3.75rem;
  }
  .hero {
    padding-bottom: 1.5rem;
  }
  .hero-footer {
    gap: 1.1rem;
    padding-top: 1.25rem;
  }
  .hero-footer > div {
    width: 100%;
  }
  .hero-tagline {
    max-width: none;
  }
  .hero-marquee {
    padding: 0.45rem 0;
  }
  .hero-marquee-item {
    font-size: 0.6rem;
    gap: 0.9rem;
    padding: 0 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-footer .btn-row {
    gap: 0.55rem;
  }
  .hero-footer .btn,
  .hero-footer .btn-subtle {
    padding: 0.75rem 1.15rem;
    font-size: 0.9rem;
  }
}

/* ---------- 02 personal ---------- */

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
}

.split-media img {
  width: 100%;
  height: auto;
  /* Без grayscale: здесь не фото, а графика — неоновый контур, и его
     жёлтый совпадает с акцентом сайта. Обесцвечивание убивало смысл
     картинки, а в палитру она и так попадает. */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Портрет 800x1178 вытянут сильнее рамки 4:5, поэтому режется снизу.
     Окно прижато к верху: рожки и наушники — часть рисунка, их нельзя
     срезать. Уходит только низ худи под карманом. */
  object-position: center top;
}

/* Третий абзац раньше стоял внутри общего .body-text и отбивался инлайновым
   margin-top. Теперь он отдельный блок (на мобильном уезжает под фото),
   поэтому отступ живёт здесь — его можно переопределить в медиазапросе. */
.split-rest {
  margin-top: 1rem;
}

.split-questions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.split-questions p {
  position: relative;
  padding-left: 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
}

.split-questions p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 2px;
  background: var(--accent);
}

@media (max-width: 860px) {
  /* На телефоне порядок читается иначе, чем на десктопе: сначала заголовок и
     вступительные абзацы, потом фото, потом остальной текст. Раньше первым
     шло фото — оно занимало весь первый экран секции, а заголовок оказывался
     за складкой.

     display: contents растворяет обёртку .split-copy: заголовок, абзацы и
     блок вопросов становятся элементами того же грида, что и фото, и их
     можно переставить через order. Разметка при этом не дублируется. */
  .split {
    grid-template-columns: 1fr;
    /* Раз текстовые блоки стали элементами грида, общий gap в 2rem встал бы
       между КАЖДЫМ абзацем. Вертикальный интервал возвращаем нулём и
       оставляем на собственных margin блоков — ритм текста не меняется.
       Воздух вокруг фото задан отдельно, ниже. */
    row-gap: 0;
  }

  .split-copy {
    display: contents;
  }

  /* По умолчанию всё из текстовой колонки идёт ПОД фото — так новый блок,
     если он появится, не выскочит наверх сам собой. */
  .split-copy > *          { order: 4; }
  .split-copy > h2         { order: 1; }
  .split-copy > .split-lead { order: 2; }
  .split-media             { order: 3; margin: 2rem 0; }

  /* Отступ был нужен, пока абзац шёл третьим подряд. После фото он лишний —
     воздух даёт margin самого фото. */
  .split-rest {
    margin-top: 0;
  }
}

/* ---------- panels (replace pastel color-blocks with dark surfaces) ---------- */

.panel-section {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
}

.panel {
  border-radius: 0;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.panel--deep {
  background:
    radial-gradient(90% 70% at 8% 0%, rgba(82, 112, 107, 0.14), transparent 62%),
    var(--bg-raised-2);
}

/* -- 03 big question -- */

.statement {
  text-align: center;
}

.statement-lead {
  max-width: 30rem;
  margin: 0 auto 1.25rem;
  color: var(--fg-muted);
}

.statement-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.statement-question {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 04 then/now ---------- */

.compare {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.compare-cell {
  background: var(--bg);
  padding: 2.5rem clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compare-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.compare-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.compare-photo--contain img {
  object-fit: contain;
  background: var(--bg);
}

/* Снимок «сегодня» — портрет 772x860, чуть выше квадрата. Режем по
   ширине, окно у верхнего края: остаётся немного воздуха над головой,
   уходит только нижний край рубашки. */
.compare-photo--now img {
  object-fit: cover;
  object-position: center 7%;
}

.compare-cell h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 600;
  margin: 0.5rem 0 0.6rem;
}

.compare-cell p {
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 32ch;
}

.compare-pull {
  text-align: center;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.compare-pull p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.3;
  max-width: 22ch;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 06 video ---------- */

.video-block {
  padding-top: clamp(4rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.45);
}

/* ---------- YouTube slots (shared with the reels page) ---------- */

[data-yt].has-video {
  cursor: pointer;
}

.yt-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* dimmed so the overlay copy stays legible, full colour on hover */
  filter: grayscale(1) brightness(0.5);
  /* transform 300мс - потолок для ховера; filter короче, он дорогой на
     больших картинках; opacity - чтобы обложка гасла под плеером, а не
     пропадала рывком (см. [data-yt].is-playing ниже) */
  transition: filter 250ms var(--ease-out), transform 300ms var(--ease-out), opacity 200ms var(--ease-out);
}

[data-yt].has-video:hover .yt-cover {
  filter: grayscale(0) brightness(0.72);
  transform: scale(1.03);
}

[data-yt]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.yt-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  border: 0;
}

[data-yt].is-playing .yt-cover,
[data-yt].is-playing .video-frame-content,
[data-yt].is-playing .reel-overlay {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .yt-cover {
    transition: none;
  }
  [data-yt].has-video:hover .yt-cover {
    transform: none;
  }
}

.video-frame-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  transition: opacity 200ms var(--ease-out); /* гаснет вместе с обложкой */
}

.play-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 8px rgba(209, 128, 63, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.play-ring svg {
  width: 22px;
  height: 22px;
  color: var(--accent-strong);
  margin-left: 3px;
}

.video-frame-content p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 500;
  max-width: 24ch;
  margin: 0 auto;
}

.video-frame-content span {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--fg-faint);
}

/* ---------- 07 portfolio ---------- */

.portfolio-section {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
}

.portfolio-head {
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  max-width: 40rem;
}

.portfolio-head p {
  margin-top: 0.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  /* Фон был цвета границы и работал как разделители в зазорах. Но
     квадратный флагман не дотягивается до высоты ряда, который задают
     соседние карточки, и остаток проступал серой плитой. Фон страницы
     делает этот остаток незаметным, а разделители рисуют сами карточки. */
  background: var(--bg);
}

.portfolio-card + .portfolio-card,
.portfolio-card--spotlight {
  box-shadow: 0 0 0 1px var(--border);
}

.portfolio-card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.portfolio-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.portfolio-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 300ms var(--ease-out); /* потолок для ховера */
}

.portfolio-card:hover .portfolio-card-image img {
  transform: scale(1.04);
}

.portfolio-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--bg);
  border: 1px solid rgba(209, 128, 63, 0.45);
  padding: 0.32rem 0.6rem;
}

.portfolio-card-body {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.portfolio-card-body h3 {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 600;
  line-height: 1.25;
}

.portfolio-card-body p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

/* «Подробнее» носит ту же перламутровую поверхность, что и остальные
   кнопки сайта, — здесь только раскладка внутри карточки. Прижимаем
   к низу, чтобы в сетке кнопки стояли на одной линии при разной
   длине описаний. */
.portfolio-cta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.portfolio-cta svg {
  color: var(--accent);
  transition: transform 0.25s var(--ease-out);
}

.portfolio-cta:hover svg {
  transform: translate(2px, -2px);
}

.portfolio-card--spotlight {
  position: relative;
  background: var(--bg-raised-2);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  justify-content: flex-end;
}

.portfolio-card--spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(480px circle at var(--mx, 30%) var(--my, 15%), rgba(255, 255, 255, 0.14), transparent 62%);
  transition: background 0.5s var(--ease-out);
  pointer-events: none;
}

.portfolio-card--spotlight::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -10%;
  width: 60%;
  height: 220%;
  background: linear-gradient(18deg, transparent 42%, rgba(255, 255, 255, 0.14) 48%, rgba(255, 255, 255, 0.04) 54%, transparent 60%);
  transform: rotate(-8deg);
  pointer-events: none;
}

.portfolio-card--spotlight .portfolio-tag {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
}

.portfolio-card--spotlight .portfolio-card-body {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 3vw, 2.75rem);
  /* сверху больше: над заголовком стоит абсолютный бейдж «Флагман»
     (top 1.25rem + ~1.6rem высоты), обычный отступ на него не рассчитан */
  padding-top: 4.25rem;
}

.portfolio-card--spotlight h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  max-width: 20ch;
}

.portfolio-card--spotlight p {
  max-width: 34ch;
}

.portfolio-card-glow {
  position: absolute;
  z-index: 0;
  right: 4%;
  bottom: -18%;
  width: min(30vw, 320px);
  height: min(30vw, 320px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 128, 63, 0.55) 0%, rgba(209, 128, 63, 0.22) 45%, transparent 72%);
  filter: blur(46px);
  pointer-events: none;
}

.portfolio-card--spotlight .portfolio-card-body {
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card--spotlight::before {
    transition: none;
  }
}

@media (max-width: 760px) {
  .portfolio-card-glow {
    display: none;
  }
}

.portfolio-card-image--pattern {
  background-color: var(--bg-raised);
  background-image: radial-gradient(rgba(245, 245, 243, 0.16) 1px, transparent 1.5px);
  background-size: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card-image--pattern .pattern-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg-faint);
}

.portfolio-card-image--mark {
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card-image--mark svg {
  width: 40%;
  height: 40%;
  color: var(--fg);
  opacity: 0.85;
}

@media (max-width: 620px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  /* в одну колонку квадрат вырастает во весь экран и почти пустует —
     там карточка снова по содержимому */
  .portfolio-card--spotlight {
    aspect-ratio: auto;
    min-height: 16rem;
  }
}

/* -- library -- */

.library-head {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.library-head p {
  margin-top: 0.5rem;
}

/* Основной текст под «Работами» - того же кегля, что и под «Коротко» у
   рилсов (просьба 2026-09-16). */
.portfolio-head .lede {
  max-width: none;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.35;
  color: var(--fg);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.library-link {
  background: var(--bg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 9rem;
  justify-content: space-between;
  transition: background 0.2s var(--ease-out);
}

.library-link:hover {
  background:
    linear-gradient(180deg, rgba(82, 112, 107, 0.16), transparent 70%),
    var(--bg-raised);
}

.library-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.library-link-top svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  color: var(--accent);
}

.library-link p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.88rem;
}

.library-foot {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.library-foot p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .library-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ: «Прежде чем написать» ---------- */

.faq-head {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.faq-head p {
  margin-top: 0.5rem;
}

.faq-list {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--fg);
  cursor: pointer;
}

.faq-trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 200ms var(--ease-out); /* в такт панели */
}

.faq-item.is-open .faq-trigger svg {
  transform: rotate(45deg);
}

/* Раскрытие через grid-template-rows 0fr -> 1fr, а не max-height до
   фиксированных 12rem: с max-height открытие обрывалось раньше конца
   (текст короче 12rem), а закрытие начиналось с мёртвой паузы, пока
   max-height шёл от 12rem до реальной высоты. Сетка анимирует ровно
   до высоты содержимого. 200мс - бюджет аккордеона: это одна из
   немногих анимаций, которая считает layout на каждом кадре. */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 200ms var(--ease-out), opacity 200ms var(--ease-out);
}

/* обёртка-строка сетки: без неё padding абзаца оставлял бы 16px и в
   закрытом состоянии - отступы боксов при 0fr не сжимаются */
.faq-panel > div {
  min-height: 0;
  overflow: hidden;
}

.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-panel p {
  padding-bottom: 1rem;
  color: var(--fg-muted);
  max-width: 40rem;
}

/* ---------- help ---------- */

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

/* the source frame is 16:9 and the consultation reads only with both people
   in it, so crop to a square from the centre rather than to a portrait */
.help-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1);
}

.help-content h3 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.help-content > p {
  color: var(--fg-muted);
  margin: 0 0 1.5rem;
  max-width: 34rem;
}

.help-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.help-list li {
  padding-left: 1.3rem;
  position: relative;
  line-height: 1.55;
}

.help-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.7rem;
  height: 2px;
  background: var(--accent);
}

.help-disclaimer {
  font-size: 0.85rem;
  color: var(--fg-faint);
  line-height: 1.55;
  max-width: 32rem;
  margin: 0 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  .help-grid {
    grid-template-columns: 1fr;
  }
}

/* -- center -- */

/* photo runs full height down the left, copy and the list stack beside it */

.center-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.center-media {
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* the point of this frame is the gesture towards the bunk, so keep the shot
   at its own 4:5 instead of stretching it to the column and cropping it off */
.center-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1122 / 1402;
  object-fit: cover;
  filter: grayscale(1);
}

.center-copy { grid-column: 2; grid-row: 1; }

.center-dirs {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0.5rem;
}

.center-copy .eyebrow {
  margin-bottom: 0.75rem;
}

.center-copy h2 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.center-copy > p {
  color: var(--fg-muted);
  max-width: 30rem;
  margin: 0 0 1.5rem;
}

.center-negatives {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.center-negatives p {
  color: var(--fg-muted);                     /* было --fg-faint, 42% - не читалось (2026-10-01) */
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);    /* было 0.95rem */
  line-height: 1.5;
}

.center-negatives strong {
  color: var(--accent-strong);
}

/* строки «Не ...» - крупно, заявлением (2026-10-01, заказчик: «шрифт больше»). Было как у
   абзаца «Сначала разобраться» под ними: clamp(1.1rem, 1.3vw, 1.3rem), а в приклеенной
   сцене на экранах ниже 950px - 1rem. Абзац остался прежним. До правки - _before-center-ne/. */
.center-negatives p:not(:last-child) {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.25;
}

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

.center-directions li {
  list-style: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .center-inner {
    grid-template-columns: 1fr;
  }
  .center-media,
  .center-copy,
  .center-dirs {
    grid-column: 1;
    grid-row: auto;
  }
  .center-media img {
    height: auto;
    min-height: 0;
  }
}

/* ---------- final / contact ---------- */

.final-panel {
  text-align: center;
}

.final-statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.08;
  max-width: 20ch;
  margin: 0 auto 1.25rem;
}

.final-panel .lede {
  margin: 0 auto 2rem;
}

.contact-form {
  text-align: left;
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-align: left;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--fg);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.form-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--fg-faint);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a5a1' stroke-width='1.6'><path d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.contact-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--fg-muted);
  min-height: 1.2em;
}

.contact-status.is-error {
  color: var(--fg);
}

@media (max-width: 560px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  /* space-between stranded the button on the right edge once the status line
     above it was empty; stack them and let the button span the field width */
  .contact-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .contact-submit-row .btn-primary {
    justify-content: center;
    width: 100%;
  }
  .contact-status {
    text-align: center;
    min-height: 0;
  }
}

/* ---------- pre-footer: dotted-border nav + socials ---------- */

.pre-footer {
  padding-top: clamp(3rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 4rem);
  border-top: 1px solid var(--border);
}

.pre-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.75rem clamp(2rem, 6vw, 5rem);
}

.pre-footer-brand { grid-column: 1; grid-row: 1; }
.pre-footer-socials { grid-column: 1; grid-row: 2; align-self: end; }
.pre-footer-links { grid-column: 2; grid-row: 1 / span 2; }

.pre-footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

/* 2026-10-20: имя в подвале - ссылка на главную */
a.pre-footer-mark {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a.pre-footer-mark:hover,
a.pre-footer-mark:focus-visible {
  color: var(--accent-strong);
}

.pre-footer-brand p {
  margin-top: 0.4rem;
  color: var(--fg-muted);
  font-size: 0.88rem;
  max-width: 22rem;
}

/* the legal note used to sit in a closing bar under the footer; it now rides
   directly under the section links, where it reads as part of the footer copy */

.pre-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
}

.pre-footer-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.pre-footer-note {
  color: var(--fg-faint);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: right;
  max-width: 32rem;
}

.dotted-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border: 1px dotted var(--border-strong);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.dotted-chip:hover {
  transform: translateY(-3px);
  color: var(--fg);
  border-color: var(--fg);
}

.pre-footer-socials {
  display: flex;
  gap: 0.6rem;
}

.dotted-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px dotted var(--border-strong);
  border-radius: 10px;
  color: var(--fg-muted);
  transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.dotted-icon:hover {
  transform: translateY(-3px);
  color: var(--fg);
  border-color: var(--fg);
}

.dotted-icon--top {
  border-radius: var(--r-pill);
  background: none;
  cursor: pointer;
  font: inherit;
}

.dotted-icon svg {
  width: 17px;
  height: 17px;
}

.dotted-icon--brand svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 860px) {
  .pre-footer-inner {
    grid-template-columns: 1fr;
  }
  .pre-footer-brand,
  .pre-footer-socials,
  .pre-footer-links {
    grid-column: 1;
    grid-row: auto;
  }
  .pre-footer-links {
    align-items: flex-start;
  }
  .pre-footer-chips {
    justify-content: flex-start;
  }
  .pre-footer-note {
    text-align: left;
  }
  .pre-footer-socials {
    flex-wrap: wrap;
  }
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- движение по ховеру - только там, где есть ховер ----------
   На тач-устройствах :hover срабатывает от тапа и залипает: кнопка
   остаётся сдвинутой, обложка - увеличенной, пока не тронешь что-то ещё.
   Сдвиги и масштаб по ховеру оставляем мыши; цвет и рамка меняются как
   прежде. :not(:active) - чтобы не задавить отклик на нажатие.
   Тот же список - для prefers-reduced-motion: там убираем движение,
   а цветовые переходы оставляем. Аналоги для карусели и подкаста -
   в конце shorts.css и reels.css. */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .btn:hover:not(:active),
  .btn-primary:hover:not(:active),
  .btn-subtle:hover:not(:active),
  .btn-pearl:hover:not(:active),
  .dotted-chip:hover:not(:active),
  .dotted-icon:hover:not(:active),
  .portfolio-card:hover .portfolio-card-image img,
  .portfolio-cta:hover svg,
  [data-yt].has-video:hover .yt-cover {
    transform: none;
  }
}

/* ---------- плавающая кнопка Telegram-бота (2026-10-20) ----------
   На всех страницах в правом нижнем углу. Ниже мобильного меню (z-index 49),
   чтобы открытое меню её перекрывало. На узком экране - только значок. */
.tg-fab {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.15rem 0.45rem 0.45rem;
  border-radius: var(--r-pill);
  background: #26a5e4;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.tg-fab:hover,
.tg-fab:focus-visible {
  background: #1e96d1;
  transform: translateY(-2px);
}

.tg-fab svg {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
}

@media (max-width: 700px) {
  .tg-fab {
    padding: 0.35rem;
  }

  .tg-fab span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tg-fab:hover,
  .tg-fab:focus-visible {
    transform: none;
  }
}

@media print {
  .tg-fab {
    display: none;
  }
}

/* ---------- «Что пишут»: скриншоты сообщений (2026-10-19) ----------
   На широком экране - три колонки «кирпичами», на телефоне - лента
   с прокруткой вбок и примагничиванием к карточке. */
.reviews-section {
  padding-top: var(--sp-section);
}

.reviews-head {
  max-width: 44rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.reviews-head .display-2 {
  margin: 0.5rem 0 0.75rem;
}

.reviews-list {
  columns: 3 280px;
  column-gap: 1.25rem;
}

.review {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #0d1015;
}

.review img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 700px) {
  .reviews-list {
    columns: auto;
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 0.5rem;
    scrollbar-width: none;
  }

  .reviews-list::-webkit-scrollbar {
    display: none;
  }

  .review {
    flex: 0 0 82%;
    margin: 0;
    align-self: center;
    scroll-snap-align: center;
  }
}

/* ---------- правовой блок (2026-10-01) ----------
   Маркировка 18+ по 436-ФЗ: значок рядом с именем в шапке и строка в подвале,
   плашка в начале страниц о зависимости, страницы дисклеймера и политики
   обработки персональных данных. Метки «ЗАПОЛНИТЬ» (.fill-me) - места под
   реквизиты владельца; с ними сайт выкладывать нельзя. С 2026-10-17 значок
   18+ и юридический подвал стоят и на главной (решение заказчика). */
.age-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55rem;
  padding: 0.1rem 0.42rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--accent-strong);
  border: 1px solid rgba(209, 128, 63, 0.55);
  border-radius: 6px;
  vertical-align: middle;
}
.legal-plate {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  max-width: 46rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: rgba(246, 243, 236, 0.03);
}
.legal-plate-mark {
  flex: none;
  padding-top: 0.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent-strong);
}
.legal-plate p {
  margin: 0;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg-muted);
}
.pre-footer-legal {
  margin: 0;
  max-width: 32rem;
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: right;
  color: var(--fg-faint);
}
.pre-footer-legal a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.pre-footer-legal .age-badge { margin: 0 0.4rem 0 0; }
.fill-me {
  padding: 0 0.25em;
  border-radius: 3px;
  color: var(--accent-strong);
  background: rgba(209, 128, 63, 0.12);
}
.legal-page {
  max-width: 52rem;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: var(--sp-section);
}
.legal-page h1 { margin: 0.5rem 0 1rem; }
.legal-page h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}
.legal-page p,
.legal-page li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-muted);
}
.legal-page ul { padding-left: 1.2rem; }
.legal-page .legal-plate { margin: 1.5rem 0 2rem; }
.legal-page .legal-plate p { font-size: 0.9rem; line-height: 1.6; }   /* иначе .legal-page p даёт 16px против 14 на остальных страницах */
.legal-meta {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--fg-faint);
}
@media (max-width: 860px) {
  .pre-footer-legal { text-align: left; }
}
