/* Токены — единственный источник значений. Логика: _design/direction.md */
:root {
  /* Монохром, как в тату-студии с ч/б съёмкой. См. direction.md §Палитра */
  --color-bg: #151515;
  --color-surface: #1E1E1E;     /* плитки, чередование */
  --color-line: #333333;        /* разделители */
  --color-text: #FFFFFF;
  --color-text-muted: #9A9A9A;  /* 6.1:1 на --color-bg */
  --color-btn: #FFFFFF;         /* кнопки — белые «таблетки» */
  --color-btn-text: #000000;
  /* затемнение видео: снизу плотнее, там текст */
  --overlay: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.45) 100%);
  --banner-overlay: rgba(0, 0, 0, .45);

  --font-banner: "Oswald", "Arial Narrow", sans-serif;       /* огромные слова на видео */
  --font-head: "Unbounded", "Arial Black", sans-serif;       /* заголовки, кнопки */
  --font-body: "IBM Plex Mono", ui-monospace, monospace;     /* текст */

  --text-banner: clamp(3.5rem, 1rem + 11vw, 10rem);
  --text-display: clamp(1.75rem, .9rem + 3.6vw, 3.75rem);
  --text-h2: clamp(1.375rem, 1rem + 1.6vw, 2.25rem);
  --text-h3: 1rem;
  --text-lead: clamp(.9375rem, .88rem + .3vw, 1.0625rem);
  --text-body: .9375rem;

  --gutter: 12px;
  --radius-btn: 999px;
  --radius-media: 16px;
  --header-h: 72px;
  --section-y: clamp(56px, 7vw, 96px);
  --z-header: 20;
  --z-sticky: 30;
  --duration: 150ms;
  --reveal: 700ms;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 var(--text-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; }
:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

/* ===== Шапка ===== */
.topbar {
  position: absolute; inset: 0 0 auto; z-index: var(--z-header);
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { font: 900 .875rem/1 var(--font-head); text-transform: uppercase; text-decoration: none; white-space: nowrap; }
@media (min-width: 768px) { .logo { font-size: 1rem; } }
.nav { display: none; gap: 28px; }
.nav a { text-decoration: none; font-size: .875rem; }
@media (hover: hover) { .nav a:hover { text-decoration: underline; text-underline-offset: 4px; } }
@media (min-width: 900px) { .nav { display: flex; } }
.topbar-phone {
  text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .8125rem;
  min-height: 44px; display: inline-flex; align-items: center;
}

/* ===== Первый экран ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  text-align: center;
}
.hero-video, .banner-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: var(--overlay);
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 1000px; margin: 0 auto;
  /* снизу запас под плавающую кнопку WhatsApp, она видна и на первом экране */
  padding: var(--header-h) var(--gutter) calc(112px + env(safe-area-inset-bottom));
}
.hero h1 {
  margin: 0 0 20px;
  font: 900 var(--text-display)/1.1 var(--font-head); text-transform: uppercase;
}
.hero-lead {
  margin: 0 auto 32px;
  max-width: 44ch;
  font-size: var(--text-lead); color: var(--color-text-muted);
}

/* ===== Кнопки ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px;
  border-radius: var(--radius-btn);
  background: var(--color-btn); color: var(--color-btn-text);
  font: 700 .875rem/1.2 var(--font-head); text-transform: uppercase; text-decoration: none;
  transition: transform var(--duration) ease-out, opacity var(--duration) ease-out;
}
@media (hover: hover) { .btn-primary:hover { transform: scale(1.04); } }
.btn-primary:active { transform: scale(.97); opacity: .9; }
@media (max-width: 479px) { .btn-primary { width: 100%; padding: 0 16px; font-size: .8125rem; } }

/* ===== Секции ===== */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--color-surface); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow > * { max-width: 760px; }
h2 {
  margin: 0 0 32px;
  font: 700 var(--text-h2)/1.15 var(--font-head); text-transform: uppercase;
}
h3 {
  margin: 0 0 8px;
  font: 700 var(--text-h3)/1.3 var(--font-head); text-transform: uppercase;
}
p { margin: 0; }
.section p, .list { color: var(--color-text-muted); }
.lead-text { font-size: var(--text-lead); margin-bottom: 32px; }
.note { margin-top: 16px; font-size: .875rem; }

/* Текстовая страница (политика): шапка поверх, отступ под неё */
.page { padding-top: calc(var(--header-h) + var(--section-y)); }
.page h1 { margin: 0 0 16px; font: 700 var(--text-h2)/1.15 var(--font-head); text-transform: uppercase; }
.page h3 { margin-top: 40px; }
.page p + p, .page .list + p, .page p + .list { margin-top: 12px; }

/* Видео-баннер: широкая плитка с огромным словом поверх */
.banner {
  position: relative; overflow: hidden;
  height: clamp(200px, 32vw, 420px);
  margin-bottom: 48px;
  border-radius: var(--radius-media);
  background: var(--color-surface);
  display: grid; place-items: center;
}
.banner::after { content: ""; position: absolute; inset: 0; background: var(--banner-overlay); }
.banner-title {
  position: relative; z-index: 1; margin: 0; padding: 0 16px;
  font: 500 var(--text-banner)/.9 var(--font-banner); text-transform: uppercase;
  letter-spacing: .02em; text-align: center;
}

/* Три шага */
.steps, .timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps { display: grid; gap: 32px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 1px solid var(--color-line); padding-top: 24px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 16px;
  font: 500 4rem/1 var(--font-banner);
}

/* Сеанс: вертикальная линия с номерами */
.timeline { max-width: 760px; }
.timeline li { counter-increment: step; position: relative; padding: 0 0 32px 56px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-btn); color: var(--color-btn-text);
  font: 700 .875rem/1 var(--font-head);
}
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 17.5px; top: 40px; bottom: 4px;
  width: 1px; background: var(--color-line);
}

/* Цена: видео-плитка + текст */
.split { display: grid; gap: 32px; align-items: start; } /* по верху: опросник растёт по ответам, фото не прыгает */
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.split-media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; max-height: 640px;
  border-radius: var(--radius-media);
  background: var(--color-surface);
}

/* Опросник цены: вопросы — «таблетки», выбранная — белая, как кнопка */
/* Якорь кнопки первого экрана: запас на подъём блока при проявлении (40px) */
#calc { scroll-margin-top: 56px; }
.no-js .quiz { display: none; }
.quiz .lead-text { margin-bottom: 0; }
.quiz { margin-bottom: 32px; display: grid; gap: 24px; }
.quiz fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quiz fieldset[hidden] { display: none; }
.quiz legend { margin-bottom: 12px; padding: 0; font: 700 var(--text-h3)/1.3 var(--font-head); text-transform: uppercase; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  min-height: 44px; padding: 0 18px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--color-line); border-radius: var(--radius-btn);
  color: var(--color-text); font-size: .875rem;
  transition: background var(--duration) ease-out, border-color var(--duration) ease-out;
}
@media (hover: hover) { .chip:hover span { border-color: var(--color-text-muted); } }
.chip input:checked + span { background: var(--color-btn); border-color: var(--color-btn); color: var(--color-btn-text); }
.chip input:focus-visible + span { outline: 2px solid var(--color-text); outline-offset: 3px; }
.quiz-result:empty { display: none; }
.quiz-result { border-top: 1px solid var(--color-line); padding-top: 24px; }
.quiz .quiz-price {
  margin-bottom: 12px; color: var(--color-text);
  font: 900 var(--text-h2)/1.15 var(--font-head); font-variant-numeric: tabular-nums;
}
.quiz-price span { font: 400 var(--text-body)/1 var(--font-body); color: var(--color-text-muted); }

.columns { display: grid; gap: 40px; }
@media (min-width: 900px) { .columns { grid-template-columns: repeat(3, 1fr); } }
.list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* До и после: пара кадров рядом, метка в углу */
.results { display: grid; gap: 40px; }
@media (min-width: 900px) { .results { grid-template-columns: repeat(2, 1fr); } }
.result { margin: 0; }
.result-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.result-shot {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-media);
  background: var(--color-surface);
}
.result-shot img { width: 100%; height: 100%; object-fit: cover; }
.result-tag {
  position: absolute; left: 10px; bottom: 10px;
  padding: 6px 14px; border-radius: var(--radius-btn);
  background: var(--color-bg); color: var(--color-text);
  font: 700 .75rem/1.2 var(--font-head); text-transform: uppercase;
}
.result-tag-after { background: var(--color-btn); color: var(--color-btn-text); }
.result figcaption {
  margin-top: 12px; text-align: center;
  font: 700 .8125rem/1.3 var(--font-head); text-transform: uppercase;
}

/* Видео-ответы: вертикальные ролики 9:16 с обложкой-вопросом, цветные (это речь мастера, не фон) */
.faq-clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; margin-bottom: 48px; }
@media (min-width: 768px) { .faq-clips { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 16px; } }
.faq-clip { margin: 0; }
.faq-clip video {
  width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: var(--radius-media); background: var(--color-surface);
}
.faq-clip figcaption {
  margin-top: 10px;
  font: 700 .8125rem/1.3 var(--font-head); text-transform: uppercase;
}

/* FAQ на нативном details */
.faq { border-top: 1px solid var(--color-line); max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--color-line); }
.faq summary {
  list-style: none; cursor: pointer;
  min-height: 64px; padding: 18px 44px 18px 0; position: relative;
  display: flex; align-items: center;
  font: 700 var(--text-h3)/1.3 var(--font-head); text-transform: uppercase;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px;
  font: 400 1.75rem/1 var(--font-body);
  transition: transform var(--duration) ease-out;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; max-width: 62ch; }

/* Контакты */
.section-contacts { text-align: center; }
.section-contacts .container > * { margin-left: auto; margin-right: auto; }

.footer {
  padding: 56px 0 calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-line);
  font-size: .875rem; line-height: 1.8; color: var(--color-text-muted);
}
@media (min-width: 768px) { .footer { padding-bottom: 32px; } }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-title {
  margin: 0 0 12px; color: var(--color-text);
  font: 500 1.75rem/1 var(--font-banner); text-transform: uppercase;
}
.footer p { margin: 0; }
.footer a { text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .footer a:hover { color: var(--color-text); } }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding: 2px 0; }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-btn); color: var(--color-btn-text);
  transition: transform var(--duration) ease-out;
}
@media (hover: hover) { .socials a:hover { transform: scale(1.08); color: var(--color-btn-text); } }
.socials svg { width: 22px; height: 22px; fill: currentColor; }
.footer-copy { margin-top: 48px; font-size: .8125rem; }

/* Кнопка записи, когда своей кнопки на экране нет */
.sticky-cta {
  position: fixed; z-index: var(--z-sticky);
  left: var(--gutter); right: var(--gutter); bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 52px; border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  background: var(--color-btn); color: var(--color-btn-text);
  font: 700 .875rem/1.2 var(--font-head); text-transform: uppercase; text-decoration: none;
  box-shadow: 0 0 0 4px var(--color-bg);
  transform: translateY(calc(100% + 32px));
  transition: transform 200ms ease-out;
}
.sticky-cta.is-visible { transform: none; }
@media (min-width: 768px) {
  .sticky-cta { left: auto; right: 32px; bottom: 32px; padding: 0 32px; }
}

/* Появление при прокрутке: только когда JS работает и движение не выключено */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity var(--reveal) ease-out, transform var(--reveal) ease-out;
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .banner.reveal { transform: scale(.94); }
  .js .banner.reveal.is-in { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
