/* Страница сайта: шапка, первый экран, прайс, портфолио, контакты, футер.
   Цвета и шрифты — токены из base.css. Всё внутри карточки записи — в booking.css (таск 04). */

:root {
  --header-h: 68px;
  /* премиальный тёплый нюд / шампань — сочетается с фото мастера */
  --hero-bg: linear-gradient(160deg, #EFE4D9 0%, #E0CDBC 50%, #CBB09A 100%);
}

html { scroll-padding-top: calc(var(--header-h) + 12px); }

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
}

.eyebrow--pink { color: var(--pink); }

h1, h2 { text-transform: uppercase; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
}
.skip-link:focus { top: 12px; }

.btn--pink {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--black);
}
.btn--pink:hover { background: var(--white); border-color: var(--white); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}
.logo__mark { flex: none; width: 44px; height: 44px; }
.logo__name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.logo .placeholder { font-family: var(--font-body); font-size: 14px; text-transform: none; }

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--pink-deep); }

.site-header__cta { padding: 10px 22px; }

/* Жирная чёрная рамка — общий стиль кнопок и меток сайта */
.btn { border-width: 4px; }
/* На первом экране рамки тоньше — не перетягивают внимание */
.hero__actions .btn { border-width: 2px; }
/* Светлые кнопки при наведении становятся чёрными с белым текстом */
.btn--light:hover:not(:disabled) { background: var(--black); color: var(--white); }

.menu-toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  margin-left: 4px;
  padding: 0;
  border: 4px solid var(--black);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  position: relative;
}
.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle__bar { top: 50%; margin-top: -1px; }
.menu-toggle__bar::before,
.menu-toggle__bar::after { content: ''; left: 0; margin-left: 0; }
.menu-toggle__bar::before { top: -6px; }
.menu-toggle__bar::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Сообщение об ошибке загрузки ---------- */
.load-error {
  padding: 12px var(--gutter);
  background: var(--black);
  color: var(--pink);
  font-weight: 600;
  text-align: center;
}

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) 400px;
  /* первый экран не ниже карточки записи — фон и фото на всю её высоту */
  grid-template-rows: minmax(680px, auto) auto;
  column-gap: 40px;
}

/* Розовый фон только под первой строкой сетки — карточка записи «наезжает» на белый блок ниже */
.hero__bg {
  grid-column: 1 / -1;
  grid-row: 1;
  /* на всю ширину окна, хотя стоит в сетке контейнера */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* премиальный фон: контрастный студийный свет за фигурой мастера, глубокое затемнение к краям, нюдовая база */
  background:
    radial-gradient(ellipse 38% 62% at 57% 44%, rgba(255, 249, 242, 0.85), rgba(255, 249, 242, 0) 72%),
    radial-gradient(ellipse 75% 95% at 100% 100%, rgba(96, 66, 48, 0.34), rgba(96, 66, 48, 0) 70%),
    radial-gradient(ellipse 55% 70% at 0% 100%, rgba(96, 66, 48, 0.16), rgba(96, 66, 48, 0) 70%),
    radial-gradient(ellipse 60% 70% at 0% 0%, rgba(255, 252, 248, 0.4), rgba(255, 252, 248, 0) 70%),
    var(--hero-bg);
  position: relative;
  z-index: 0;
  overflow: hidden;
}
/* крупная монограмма VS за фигурой мастера — бронзово-шампанский перелив с тиснением, как фольга на визитке */
.hero__mono {
  position: absolute;
  pointer-events: none;
  width: min(900px, 74vw);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  /* тиснение: светлая грань сверху, мягкая тень снизу — чёткий выпуклый край букв */
  filter:
    drop-shadow(0 -1px 0 rgba(255, 250, 244, 0.9))
    drop-shadow(0 1.5px 1px rgba(80, 55, 40, 0.35));
}
.hero__mono::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, #9A7760 0%, #CDAE93 28%, #F4E6D7 45%, #C4A287 58%, #8A6A55 100%);
  -webkit-mask: url('/img/vs-mask.png') center / contain no-repeat;
  mask: url('/img/vs-mask.png') center / contain no-repeat;
}
/* тонкая зернистость, как у дорогой матовой бумаги */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.18;
  mix-blend-mode: multiply;
}

.hero__text {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 72px 0 88px;
}

.hero__title {
  font-size: clamp(32px, 4.3vw, 58px);
  line-height: 1.04;
  margin-bottom: 20px;
}

.hero__lead {
  max-width: 440px;
  margin-bottom: 28px; /* сразу под текстом — значки соцсетей */
  font-size: 18px;
  color: #3d3a3c;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.hero__chips a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.hero__chips a:hover { background: var(--white); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero__visual {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 340px;
  margin-top: 48px;
}
.hero__visual img {
  width: 100%;
  height: auto;
}
/* Фото первого экрана — фото мастера без фона, стоит на розовом */
.hero__visual.has-photo {
  z-index: auto; /* под карточкой записи, над розовым фоном */
  align-self: stretch;
  justify-self: stretch;
  max-width: none;
  width: auto;
  margin: 0 -44px 0 -52px; /* правый край — вплотную к чёрной рамке карточки записи (40px зазор колонок + 4px под рамку) */
}
.hero__visual.has-photo img {
  /* абсолютно, чтобы высоту первого экрана задавал текст, а не фото */
  position: absolute;
  inset: 6% 0 0 0;
  width: 100%;
  height: 94%;
  object-fit: contain;
  object-position: 100% 100%; /* фото прижато к низу розового блока и к карточке записи */
  /* фото без фона (PNG с прозрачностью): без смешивания и без растворения — чёткое, в родных цветах */
}

.hero__booking {
  grid-column: 3;
  grid-row: 1 / span 2;
  position: relative;
  z-index: 2;
  align-self: start;
  margin-top: 40px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Поверхность карточки до подключения booking.css (нулевая специфичность — booking.css перекрывает) */
:where(#booking-root) > :where(.booking-card) {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-line);
}

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section__head { margin-bottom: 40px; }
.section__head h2 { margin: 0; }
.section__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

/* ---------- Направления и прайс ---------- */
.services { background: var(--white); padding-top: 48px; }

.directions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.direction {
  border-radius: var(--radius);
  background: var(--pink-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.direction__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--pink);
  overflow: hidden;
}
.direction__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.direction:hover .direction__photo img { transform: scale(1.03); }
.direction__photo::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, rgba(29, 29, 29, 0), rgba(29, 29, 29, 0.55));
  opacity: 0;
}
.direction__photo.has-photo::after { opacity: 1; }

.direction__title {
  margin: 0;
  padding: 22px 24px 6px;
  font-size: 22px;
  text-transform: uppercase;
}

/* Комплексы со скидкой — под карточками направлений, тёмные, чтобы выделялись */
.combos { margin-top: 40px; }
.combos[hidden] { display: none; }
.combos__title { margin: 0 0 18px; font-size: 22px; text-transform: uppercase; }
.combos__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'name price' 'note book';
  align-items: center;
  gap: 8px 24px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
}
.combo__name { grid-area: name; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.combo__note { grid-area: note; margin: 0; font-size: 14px; color: var(--pink); }
.combo__price { grid-area: price; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 28px; white-space: nowrap; color: var(--pink-soft); }
.combo__book { grid-area: book; justify-self: end; }
.combo .btn--light:hover:not(:disabled) { background: var(--pink-soft); color: var(--black); }
@media (max-width: 767px) {
  .combos { margin-top: 28px; }
  .combos__list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .combo { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'name' 'note' 'price' 'book'; padding: 22px 20px; }
  .combo__book { justify-self: stretch; }
}

.price-list {
  margin: 0;
  padding: 4px 24px 18px;
  list-style: none;
}
.price-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(29, 29, 29, 0.10);
}
.price-item:first-child { border-top: 0; }
.price-item__name { font-weight: 700; }
.price-item__desc { grid-column: 1; margin: 2px 0 0; font-size: 14px; color: var(--gray); }
.price-item__meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
  white-space: nowrap;
}
.price-item__price { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.price-item__dur { display: block; font-size: 13px; color: var(--gray); }
.price-list__empty { padding: 16px 0; font-size: 15px; }

.direction__book {
  display: flex;
  margin: auto 24px 24px;
}
.direction__book .btn { width: 100%; }
/* кнопки «Записаться» в карточках — чёрные с белым текстом, без отдельной рамки */
.direction__book .btn,
.direction__book .btn--light { background: var(--black); border-color: var(--black); color: var(--white); }
.direction__book .btn:hover,
.direction__book .btn--light:hover:not(:disabled) { background: #3A3633; border-color: #3A3633; color: var(--white); }

/* ---------- Портфолио ---------- */
.portfolio { background: var(--pink-soft); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: var(--tap);
  padding: 8px 20px;
  border: 4px solid var(--black);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.filter:hover { background: var(--white); }
.filter[aria-pressed="true"] { background: var(--black); color: var(--white); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery__btn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--pink);
  aspect-ratio: 1;
  cursor: zoom-in;
}
.gallery__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery__btn:hover img { transform: scale(1.04); }
.gallery__tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
}

/* «Показать ещё» под портфолио */
.gallery-more { display: flex; justify-content: center; margin-top: 28px; }
.gallery-more[hidden] { display: none; }
.gallery-more__btn { min-width: 240px; }

.gallery-empty {
  padding: 56px 24px;
  border: 1.5px dashed rgba(29, 29, 29, 0.25);
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}
.gallery-empty__title {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}

/* ---------- Чёрный блок-призыв ---------- */
.cta {
  background: var(--black);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1.5px solid rgba(220, 198, 179, 0.35);
  pointer-events: none;
}
.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  z-index: 1;
}
.cta__title { color: var(--pink); max-width: 760px; margin-bottom: 12px; }
.cta__text { margin: 0; color: rgba(255, 255, 255, 0.75); }

/* ---------- Контакты ---------- */
.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  align-items: stretch;
}
.contacts__card {
  padding: 40px;
  border-radius: var(--radius);
  background: var(--pink);
}
.contacts__list { margin: 24px 0; }
.contacts__list > div { margin-bottom: 16px; }
.contacts__list dt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contacts__list dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}
.contacts__list dd a { text-decoration: none; }
.contacts__list dd a:hover { text-decoration: underline; }
.route-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.route-buttons .btn { white-space: nowrap; }
.contacts__social-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  /* розовая рамка, как у блока контактов */
  padding: 8px;
  background: var(--pink);
}
.map__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--gray);
}
.map__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 404px;
  border: 0;
  border-radius: calc(var(--radius) - 8px);
  background: var(--pink-soft);
}

/* ---------- Футер ---------- */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 56px 0 32px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}
/* Логотип и название — одной строкой, одного цвета */
.site-footer__logo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.site-footer__mark { display: block; flex: none; width: 56px; height: 56px; }
.site-footer__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #F8F2EC; /* цвет логотипа */
}
.site-footer__dirs { margin-bottom: 6px; color: var(--pink); font-weight: 600; }
.site-footer__brand p:last-child { margin: 0; color: rgba(255, 255, 255, 0.75); }
.site-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
}
.site-footer__bottom a { color: rgba(255, 255, 255, 0.8); }
.site-footer__bottom a:hover { color: var(--pink); }

.social--pink a { background: var(--pink); color: var(--black); }
.social--pink a:hover { background: var(--white); color: var(--black); }

/* ---------- Просмотр фото ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 56px 16px 48px;
  background: rgba(20, 18, 19, 0.94);
  color: var(--white);
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  user-select: none;
}
.lightbox__caption { margin-top: 12px; text-align: center; color: rgba(255, 255, 255, 0.85); }
.lightbox__caption:empty { display: none; }
.lightbox__close,
.lightbox__nav {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--pink); color: var(--black); }
.lightbox__close { position: absolute; top: 12px; right: 12px; }
.lightbox__counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
body.is-locked { overflow: hidden; }

/* ---------- Страница политики ---------- */
.legal { padding: 56px 0 88px; background: linear-gradient(to bottom, var(--pink-soft), var(--white) 320px); }
.legal__inner { max-width: 820px; }
.legal__title { font-size: clamp(26px, 4vw, 44px); }
.legal section { margin-top: 36px; }
.legal h2 { font-size: clamp(18px, 2.4vw, 22px); text-transform: none; }
.legal ul:not(.social) { padding-left: 1.2em; }
.legal li { margin-bottom: 4px; }
.legal__social { margin: 12px 0 16px; }
.legal__error { margin: 20px 0; border-radius: var(--radius-sm); }
.legal__back { margin-left: auto; }

/* ---------- Планшет ---------- */
@media (max-width: 1099px) {
  /* Планшет: слева — текст сверху и фото мастера во весь рост справа от него, на нюдовом фоне; справа — карточка записи */
  .hero__grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(660px, auto) auto; column-gap: 32px; }
  .hero__bg { grid-row: 1 / 3; }
  .hero__visual { display: none; }
  .hero__visual.has-photo {
    display: block;
    position: relative;
    z-index: auto;
    grid-column: 1;
    grid-row: 1 / 3;
    justify-self: end;
    align-self: stretch;
    width: 66%;
    max-width: none;
    margin: 0 -12px 0 0;
  }
  .hero__visual.has-photo img {
    position: absolute;
    inset: 150px 0 0 0;               /* фото начинается под заголовком */
    width: 100%;
    height: calc(100% - 150px);
    object-fit: contain;
    object-position: 100% 100%;       /* стоит на нижнем краю фона, прижато вправо */
  }
  .hero__text { grid-row: 1 / 3; grid-column: 1; align-self: start; padding: 44px 0 48px; }
  .hero__lead { max-width: min(44%, 230px); }
  .hero__booking { grid-column: 2; grid-row: 1 / 3; }
  .directions { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-line);
    box-shadow: 0 16px 30px rgba(29, 29, 29, 0.08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 17px;
    border-bottom: 1px solid var(--gray-line);
  }
  .site-nav a:last-child { border-bottom: 0; }
  .menu-toggle { display: inline-block; }
  .site-header__cta { margin-left: auto; }
  .contacts__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Телефон ---------- */
@media (max-width: 767px) {
  :root { --header-h: 60px; }
  .site-header__inner { gap: 10px; }
  .logo { font-size: 14px; gap: 8px; }
  .logo__mark { width: 38px; height: 38px; }
  .site-header__cta { padding: 6px 12px; font-size: 14px; }

  .hero { padding-bottom: 48px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; }
  /* Текст и фото мастера — в одной области на нюдовом фоне: фото справа во весь рост, текст поверх слева */
  .hero__text { grid-row: 1 / 3; grid-column: 1; padding: 40px 0 112px; }
  .hero__text .eyebrow { width: max-content; max-width: calc(100vw - 2 * var(--gutter)); }
  .hero__title { font-size: 34px; max-width: 62%; } /* «Твоя / красота» в две строки, как раньше */
  .hero__lead { font-size: 15px; max-width: min(46vw, 160px); } /* подзаголовок — левее фото, на руку с пинцетом не заходит */
  /* мягкий нюдовый ореол — текст читается поверх фото */
  .hero__text .eyebrow, .hero__title, .hero__lead { text-shadow: 0 0 10px #E6D6C7, 0 0 18px #E6D6C7; }
  .hero__visual.has-photo {
    display: block;
    position: relative;
    z-index: 0;
    grid-column: 1;
    grid-row: 1 / 3;
    justify-self: end;
    align-self: stretch;
    width: 66%;
    margin: 0 calc(-1 * var(--gutter)) 0 0; /* до правого края экрана */
  }
  .hero__visual.has-photo img {
    position: absolute;
    inset: 16px 0 0 0;
    width: 100%;
    height: calc(100% - 16px);
    object-fit: contain;
    object-position: 100% 100%; /* фото прижато к низу и к правому краю */
  }
  .hero__booking {
    grid-column: 1;
    grid-row: 3;
    margin-top: -64px;
  }

  .section { padding: 64px 0; }
  .services { padding-top: 32px; }
  .section__head { margin-bottom: 28px; }
  .directions { grid-template-columns: minmax(0, 1fr); }
  /* 1. Прайс компактнее: фото направления — широкой полосой, а не квадратом */
  .direction__photo { aspect-ratio: 16 / 9; }
  .direction__title { padding: 18px 20px 4px; }
  .price-list { padding: 4px 20px 14px; }
  .direction__book { margin: 0 20px 20px; }

  /* 4. Фильтры портфолио — одной строкой, при нехватке места листаются вбок */
  .filters { width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; padding: 8px 16px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  /* 6. Блок «Запишитесь онлайн» на телефоне не нужен — карточка записи на первом экране, кнопка внизу */
  .cta { display: none; }

  .contacts__card { padding: 28px 20px; }
  .contacts__list dd { font-size: 18px; }
  .route-buttons .btn { flex: 1 1 140px; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
  /* 5. Карта ниже */
  .map { min-height: 240px; }
  .map__frame { min-height: 224px; }

  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .site-footer { padding-bottom: 96px; } /* место под закреплённой кнопкой */

  .lightbox { grid-template-columns: minmax(0, 1fr); padding: 64px 8px 56px; }
  .lightbox__nav {
    position: absolute;
    bottom: 8px;
    width: 48px;
    height: 48px;
  }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}

@media (max-width: 380px) {
  .logo .placeholder { font-size: 12px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
}

/* Узкий телефон: в шапке только круглый логотип, название не помещается */
@media (max-width: 440px) {
  .site-header .logo__name { display: none; }
  .site-header .logo__mark { width: 44px; height: 44px; }
}

/* 2. Закреплённая кнопка «Записаться» — только на телефоне */
.mobile-book { display: none; }
@media (max-width: 767px) {
  .mobile-book {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 999px;
    background: var(--black);
    color: var(--white);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(29, 29, 29, 0.28);
    transition: opacity 0.2s, transform 0.2s;
  }
  .mobile-book[hidden] { display: none; }
  .mobile-book.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
}

/* Телефон боком / маленький планшет: места много — подзаголовок шире, не узкой колонкой у края */
@media (min-width: 481px) and (max-width: 767px) {
  .hero__lead { max-width: 46vw; }
}

/* Телефон: водяной знак VS — за фото мастера, не под текстом */
@media (max-width: 767px) {
  .hero__mono { left: auto; right: 0; width: 92vw; transform: translateY(-50%); } /* не выходит за правый край экрана */
}

/* Вертикальный планшет (768–899): как на телефоне, но просторнее — текст и фото мастера сверху, карточка записи под ними */
@media (min-width: 768px) and (max-width: 899px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .hero__bg { grid-row: 1 / 3; }
  .hero__text { grid-row: 1 / 3; padding: 56px 0 120px; }
  .hero__title { font-size: 52px; max-width: 58%; } /* «Твоя / красота» в две строки — не по лицу на фото */
  .hero__lead { max-width: 300px; font-size: 18px; }
  .hero__visual.has-photo { grid-row: 1 / 3; width: 56%; margin: 0 calc(-1 * var(--gutter)) 0 0; }
  .hero__visual.has-photo img { inset: 40px 0 0 0; height: calc(100% - 40px); }
  .hero__booking { grid-column: 1; grid-row: 3; justify-self: center; width: 100%; max-width: 560px; margin-top: -72px; }
}

/* Фото мастера — вплотную к правому краю: рукав уходит за край экрана.
   Сдвиг — через transform (одинаково в Safari и Chrome), лишнее обрезает .hero по горизонтали. */
.hero { overflow-x: clip; }
/* страница никогда не шире экрана — на iPhone её нельзя «сдвинуть» пальцем вбок */
html, body { overflow-x: clip; }
@media (max-width: 767px) {
  .hero__visual.has-photo img { transform: translateX(2.5vw); } /* край руки и рукава — встык к правому краю экрана, кисточки в кадре */
  .hero__visual.has-photo { overflow: hidden; } /* выступ сдвинутой картинки обрезается краем экрана */
}
/* горизонтальный планшет: правый край фото — вплотную к чёрной рамке карточки записи, как на компьютере */
@media (min-width: 900px) and (max-width: 1099px) {
  .hero__visual.has-photo { margin-right: -36px; }
}

@media (min-width: 768px) and (max-width: 899px) {
  .hero__visual.has-photo img { transform: translateX(1.5vw); } /* вертикальный планшет и телефон боком — встык к правому краю */
  .hero__visual.has-photo { overflow: hidden; }
}
