/* Цвет акцента задаётся в config.js, здесь только запасное значение. */
:root {
  --accent: #e0b800;
  --accent-ink: #0d0c0a;

  --bg: #13110e;
  --surface: #1b1814;
  --text: #f2ece1;
  --muted: #b3a996;
  --line: rgba(242, 236, 225, 0.14);

  --font-display: "Prata", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", "Segoe UI", Arial, sans-serif;

  --header-h: 72px;
  --gutter: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Стрелка для кнопок */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M0 5h18M14 1l4 4-4 4'/%3E%3C/svg%3E");

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--accent) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border: 3px solid var(--bg); }

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }

a { color: inherit; text-underline-offset: 0.25em; }

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

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn::after {
  content: "";
  flex: none;
  width: 20px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform 0.3s var(--ease);
}
.btn:hover::after { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--text); color: var(--bg); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-small { min-height: 44px; padding: 0 20px; font-size: 0.75rem; }
.btn-small::after { display: none; }

/* Кнопка в шапке: появляется, когда кнопки первого экрана ушли из вида */
#header-book { transition: opacity 0.3s var(--ease), visibility 0.3s, transform 0.3s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease); }
.cta-hidden #header-book { opacity: 0; visibility: hidden; transform: translateY(-6px); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(19, 17, 14, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
}
.brand-sub {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-logo {
  height: 44px;
  width: auto; /* логотип нужен с прозрачным фоном (PNG) */
}
.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 1px;
  transition: color 0.2s var(--ease), background-size 0.35s var(--ease);
}
.nav a:hover { color: var(--text); background-size: 100% 1px; }

/* ---------- Первый экран ---------- */
/* Первый экран всегда до низа окна, строка стоит по его нижнему краю */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  object-fit: cover;
  object-position: 70% 40%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 17, 14, 0.92) 0%, rgba(19, 17, 14, 0.62) 45%, rgba(19, 17, 14, 0.12) 100%),
    linear-gradient(0deg, rgba(19, 17, 14, 0.85) 0%, rgba(19, 17, 14, 0) 35%);
}
.hero-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 56px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 8.4vw, 6rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-line.is-accent { color: var(--accent); }
.hero-line-inner {
  display: block;
  animation: rise 0.9s var(--ease) both;
}
@keyframes rise {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

.hero-sub {
  margin-top: 32px;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  max-width: 28ch;
}
.hero-note {
  margin-top: 8px;
  max-width: 44ch;
  color: var(--muted);
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Строка под первым экраном ---------- */
.strip { position: relative; border-top: 1px solid var(--line); }
.strip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 0;
  padding-block: 22px;
}
.strip-item {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.8vw, 1.375rem);
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}
/* Ромбик-разделитель между словами */
.strip-item + .strip-item::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-inline: clamp(18px, 3.5vw, 44px);
  background: var(--accent);
  transform: rotate(45deg);
}
/* На телефоне: аккуратная сетка 2×2 без разделителей */
@media (max-width: 719px) {
  .strip-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding-block: 20px; }
  .strip-item { justify-content: center; white-space: normal; text-align: center; }
  .strip-item + .strip-item::before { display: none; }
}

/* ---------- Секции ---------- */
.section { padding-block: clamp(64px, 10vw, 128px); }
.section-alt { background: var(--surface); }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead { margin-top: 14px; max-width: 42ch; color: var(--muted); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* ---------- Прайс ---------- */
/* Переключатель групп: только на телефоне */
.price-tabs {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--gutter)) 24px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.price-tabs::-webkit-scrollbar { display: none; }
.price-tab {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.price-tab:hover { color: var(--text); border-color: var(--text); }
.price-tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.price-group { display: none; }
.price-group.is-active { display: block; animation: group-in 0.35s var(--ease) both; }
@keyframes group-in {
  from { opacity: 0; transform: translateY(8px); }
}
.price-group-title {
  display: none;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.2;
}

/* Строка прайса: название, точки, цена */
.price-row {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(24px, 1fr) auto;
  column-gap: 10px;
  align-items: end;
  padding: 11px 0;
}
.price-name { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.price-dots {
  align-self: end;
  margin-bottom: 0.45em;
  border-bottom: 1px dotted rgba(242, 236, 225, 0.32);
}
.price-value {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.price-desc { grid-column: 1 / -1; margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.price-row:hover .price-value { color: var(--accent); }

/* С планшета: все группы сразу, колонками */
@media (min-width: 720px) {
  .price-tabs { display: none; }
  .price-groups { columns: 2; column-gap: 56px; }
  .price-group,
  .price-group.is-active { display: block; break-inside: avoid; margin-bottom: 44px; animation: none; }
  .price-group-title { display: block; }
}
@media (min-width: 1100px) {
  .price-groups { columns: 3; column-gap: 64px; }
}

/* ---------- Мастера ---------- */
.masters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.master-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg);
}
.master-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.master:hover .master-photo img { transform: scale(1.04); }
.master-info {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  padding-top: 16px;
}
.master-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
}
.master-role { grid-column: 1; color: var(--muted); }

/* Запись к мастеру: тихая текстовая ссылка, не спорит с главной кнопкой */
.master-book {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.master-book::after {
  content: "";
  width: 20px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform 0.3s var(--ease);
}
.master-book:hover { color: var(--text); }
.master-book:hover::after { transform: translateX(4px); }

/* ---------- Галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: 8px;
}
.gallery-item { overflow: hidden; background: var(--surface); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:nth-child(1) { grid-row: span 2; }
.gallery-item:nth-child(6) { grid-column: span 2; }

/* ---------- Отзывы (карточки в стиле Яндекс.Карт) ---------- */
.reviews-summary { display: inline-block; margin-top: 16px; color: var(--muted); }
.reviews { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: stretch; }
.review {
  --card-ink: #1a1a1a;
  --card-muted: #6f6f6f;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: #ffffff;
  color: var(--card-ink);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
}
.review-who { display: flex; flex-direction: column; min-width: 0; }
.review-name { font-size: 1rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.review-level { font-size: 0.8125rem; color: var(--card-muted); }
.review-meta { display: flex; align-items: center; gap: 10px; }
.review-stars { display: inline-flex; gap: 2px; }
.review-star { width: 18px; height: 18px; fill: #e0e0e0; }
.review-star.is-on { fill: #fc0; }
.review-date { font-size: 0.8125rem; color: var(--card-muted); }
.review-text { display: grid; gap: 10px; font-size: 1rem; line-height: 1.5; }
.review-text p { font-family: inherit; font-weight: 400; text-wrap: pretty; }
.review-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--card-muted);
}
.review-likes { display: inline-flex; align-items: center; gap: 6px; }
.review-thumb { width: 16px; height: 16px; fill: #9a9a9a; }
.review-source { color: #3b6fe0; text-decoration: none; }
.review-source:hover { text-decoration: underline; }
.review .review-source:focus-visible { outline-color: #3b6fe0; }
@media (min-width: 960px) {
  .reviews { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* Заготовка: пустые места под отзывы */
.review-slot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed rgba(242, 236, 225, 0.28);
}
.review-slot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-slot-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--line);
}
.review-slot-who { display: grid; gap: 8px; flex: 1; }
.review-slot-bar { display: block; height: 10px; width: 100%; background: var(--line); }
.review-slot-bar.is-name { width: 55%; height: 12px; }
.review-slot-bar.is-short { width: 35%; }
.review-slot-bar.is-mid { width: 70%; }
.review-slot-text {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--muted);
}

/* ---------- Контакты ---------- */
.contact-list { margin-top: 32px; display: grid; gap: 0; }
.contact-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:first-child { border-top: 1px solid var(--line); }
.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.3;
}
.socials { display: inline-flex; gap: 20px; flex-wrap: wrap; }
.link { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; }
.link:hover { color: var(--accent); }

.map {
  min-height: 420px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map:not(.map-empty) { height: 480px; }
.map-link { margin-top: 12px; }
.map-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 24px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}
.map-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--accent);
}
.map-address { color: var(--muted); }

/* ---------- Финальный призыв ---------- */
.closing {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(64px, 10vw, 128px);
}
.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
.closing-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Подвал ---------- */
.site-footer { padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Заглушка записи ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 16px 24px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-align: center;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .masters { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .master-info { grid-template-columns: 1fr; row-gap: 4px; }
  .master-book { grid-column: 1; grid-row: auto; margin-top: 4px; justify-self: start; }
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; }
  .gallery-item:nth-child(5) { grid-column: span 2; }
  .gallery-item:nth-child(6) { grid-column: auto; }
}

@media (min-width: 960px) {
  :root { --gutter: 48px; }
  .split { grid-template-columns: 4fr 7fr; gap: 72px; align-items: start; }
  .split-head { position: sticky; top: calc(var(--header-h) + 32px); }
  .closing-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Телефон ---------- */
@media (max-width: 859px) {
  .nav { display: none; }
}
@media (max-width: 479px) {
  :root { --header-h: 64px; }
  .brand-sub { display: none; }
  .btn-small { padding: 0 14px; font-size: 0.6875rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .gallery { grid-auto-rows: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-line-inner,
  .price-group.is-active { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
