/* HairRescue — статика без внешних зависимостей.
   Палитра тёплая нейтральная, один акцент. Шрифты системные: ничего не грузим
   по сети, страница открывается мгновенно даже на мобильном интернете. */

:root {
  --bg: #fbf7f3;
  --surface: #ffffff;
  --text: #1c1613;
  --muted: #6c6157;
  --line: #e7ddd3;
  --accent: #a2553a;
  --accent-dark: #863f28;
  --ok: #2c6b4f;
  --err: #b3261e;
  --radius: 14px;
  --wrap: 1080px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", "PT Serif", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 5.2vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.9rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 620px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- шапка ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { text-decoration: none; color: var(--text); display: block; }
.brand__mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .06em;
  display: block;
}
.brand__mark span { color: var(--accent); }
.brand__mark--small { font-size: 1rem; }
.brand__note { font-size: .8rem; color: var(--muted); display: block; }
.topbar__phone { white-space: nowrap; text-decoration: none; font-weight: 600; }

/* ---------- первый экран ---------- */
.hero { padding: clamp(32px, 7vw, 64px) 0 clamp(24px, 5vw, 44px); }
/* фото слева, текст справа */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 36px);
  align-items: center;
}
.hero__media { margin: 0; }
.hero__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--surface);
}
/* текст первого экрана — это заголовок страницы (h1), оформлен как обычный текст */
.hero__copy {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  margin: 0;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- секции ---------- */
.section { padding: clamp(32px, 6vw, 56px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--surface); }
/* липкая шапка не должна перекрывать заголовок при переходе по якорю */
section[id] { scroll-margin-top: 80px; }

/* ---------- видео ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #201a17 url("/assets/video-poster.svg") center / cover no-repeat;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
/* видео файлом с сервера: кадр тот же 16:9, вертикальное видео — по центру, с полями */
.video video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(20, 15, 12, .32);
  color: #fff;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.video__play:hover { background: rgba(20, 15, 12, .3); }
.video__play-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  padding-left: 4px;
}
.video__play-text { text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }

/* несколько инструкций друг под другом — все в одном размере и формате */
.video-item { margin-top: 30px; }
.video-item h3 { margin-bottom: .5em; }

/* ---------- вопросы и ответы ---------- */
.faq { margin-top: 22px; display: grid; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color .15s ease;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--accent-dark); }
.faq__item[open] .faq__q { color: var(--accent); }
.faq__icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(162, 85, 58, .12);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  background: var(--accent);
  transition: transform .18s ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); } /* плюс превращается в минус */
.faq__a { padding: 0 18px 16px; }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- форма ---------- */
.form { margin-top: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field .req { color: var(--accent); }
input[type="text"],
input[type="tel"],
input[type="email"] {
  font: inherit;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(162, 85, 58, .45);
  outline-offset: 2px;
}
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--accent); }
.field--check label { font-weight: 400; font-size: .95rem; color: var(--muted); }
.field__hint { font-size: .85rem; color: var(--muted); margin: 0; }
.field__error { color: var(--err); font-size: .9rem; margin: 0; }
.field--invalid input { border-color: var(--err); }
.form__status { margin: 0; font-size: .95rem; }
.form__status[data-state="ok"] { color: var(--ok); }
.form__status[data-state="error"] { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- контакты и футер ---------- */
.contacts { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.contacts__label { display: inline-block; min-width: 96px; color: var(--muted); }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer p { margin: 0; }

/* ---------- страницы политики и благодарности ---------- */
.page { padding: clamp(28px, 6vw, 56px) 0; }
.page h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.page h2 { margin-top: 1.6em; font-size: 1.2rem; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: .4em; }
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
