/* ==========================================================================
   Front Man — barbershop
   Палитра взята с логотипа: чёрный и белый, больше ничего.
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --grey-on-dark: #a8a8a8;   /* вторичный текст на чёрном */
  --grey-on-light: #555;     /* вторичный текст на белом */
  --line-dark: #2a2a2a;      /* линии на чёрном */
  --line-light: #cfcfcf;     /* линии на белом */
  --orange: #F16B36;         /* оранжевый со старого сайта: кнопки, цены, акценты */
  --orange-deep: #C4501C;    /* тот же оранжевый, но для текста на белом */

  --font-display: "Montserrat", "Arial Black", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1160px;
  --header-h: 72px;
  --radius: 12px;      /* скругление кнопок */
  --radius-lg: 16px;   /* скругление карточек и фото */
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

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

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

.muted { color: var(--grey-on-dark); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius);
  border: 2px solid var(--orange);
  background: var(--orange);
  color: var(--black);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: var(--black); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; border-radius: 10px; }

/* на белых секциях оранжевая кнопка при наведении становится чёрной */
.section--light .btn:hover { background: var(--black); border-color: var(--black); color: var(--white); }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .2s, border-color .2s;
}
.site-header.is-solid {
  background: var(--black);
  border-bottom-color: var(--line-dark);
}
.header__row {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { border-radius: 50%; }
.brand__name {
  font: italic 900 1.125rem/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--orange); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: 2px solid var(--white);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span { width: 20px; height: 2px; background: var(--white); transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 32px) 0 96px;
  background:
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--black);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
}
.hero__title {
  font: italic 900 clamp(2.2rem, 4.8vw, 4.1rem)/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero__title-sub { display: block; }
.hero__lead {
  margin-top: 24px;
  max-width: 30em;
  font-size: 1.1875rem;
  color: var(--grey-on-dark);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  text-decoration: none;
}
.rating__num {
  font: italic 900 3rem/1 var(--font-display);
  color: var(--orange);
}
.rating__text {
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--grey-on-dark);
  padding-left: 16px;
  border-left: 2px solid var(--orange);
}
.rating:hover .rating__text { color: var(--white); }

.hero__logo {
  justify-self: end;
  width: min(100%, 470px);
  animation: logo-in .9s cubic-bezier(.2,.7,.2,1) both;
}
.hero__logo img { width: 100%; }

@keyframes logo-in {
  from { opacity: 0; transform: scale(.94) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Секции и «ирокез» между ними ---------- */
.section {
  position: relative;
  padding: 112px 0 96px;
}
.section--dark  { background: var(--black); color: var(--white); }
.section--light { background: var(--white); color: var(--black); }

/* рваная кромка в духе ирокеза с логотипа */
.section::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -39px;
  height: 40px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: 720px 40px;
}
.section--light::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 40' preserveAspectRatio='none'%3E%3Cpolygon fill='%23fff' points='0,40 18,12 30,30 52,2 66,28 84,16 100,36 128,6 142,26 170,14 190,38 214,4 232,30 250,18 268,36 296,8 314,28 340,0 360,32 384,14 402,34 430,10 448,30 476,2 494,26 520,16 540,38 566,6 584,28 610,12 630,34 658,4 676,26 700,16 720,40'/%3E%3C/svg%3E");
}
.section--dark::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 40' preserveAspectRatio='none'%3E%3Cpolygon fill='%23000' points='0,40 18,12 30,30 52,2 66,28 84,16 100,36 128,6 142,26 170,14 190,38 214,4 232,30 250,18 268,36 296,8 314,28 340,0 360,32 384,14 402,34 430,10 448,30 476,2 494,26 520,16 540,38 566,6 584,28 610,12 630,34 658,4 676,26 700,16 720,40'/%3E%3C/svg%3E");
}

.section__title {
  font: italic 900 clamp(2rem, 4.2vw, 3.25rem)/1 var(--font-display);
  text-transform: uppercase;
}
.section__lead {
  margin-top: 16px;
  max-width: 36em;
  color: var(--grey-on-dark);
}
.section--light .section__lead { color: var(--grey-on-light); }

/* ---------- Услуги ---------- */
.menu {
  columns: 2;
  column-gap: 72px;
  margin-top: 48px;
}
.menu__group {
  break-inside: avoid;
  margin-bottom: 40px;
}
.menu__group h3 {
  font: italic 800 1.25rem/1.2 var(--font-display);
  text-transform: uppercase;
  padding: 0 12px 12px;
  border-bottom: 3px solid var(--orange);
}
.svc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--line-light);
  border-radius: var(--radius);
  transition: background-color .15s, color .15s;
}
.svc:hover { background: var(--black); color: var(--white); }
.svc__btn { flex: none; min-width: 124px; }
.section--light .svc:hover .svc__btn { background: var(--orange); border-color: var(--orange); color: var(--black); }
.section--light .svc .svc__btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.svc__img { flex: none; width: 56px; height: 56px; border-radius: 50%; }
.svc__body { flex: 1; display: flex; flex-direction: column; }
.svc__name { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.svc__meta { font-size: .875rem; color: var(--grey-on-light); }
.svc:hover .svc__meta { color: var(--grey-on-dark); }
.svc__price {
  font-weight: 700;
  font-size: 1.0625rem;
  white-space: nowrap;
  color: var(--orange-deep);
}
.svc:hover .svc__price { color: var(--orange); }

/* Отец и сын */
.duo {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
  padding: 24px 32px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--black);
  color: var(--white);
}
.duo__img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius); }
.duo__title {
  font: italic 900 1.75rem/1.1 var(--font-display);
  text-transform: uppercase;
}
.duo__text p { margin-top: 6px; color: var(--grey-on-dark); }
.duo__text .duo__price {
  margin-top: 10px;
  font: italic 900 1.75rem/1 var(--font-display);
  color: var(--orange);
}

/* ---------- Мастера ---------- */
.masters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.master {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.master__photo {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center 15%;
}
.master__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 28px 32px 32px;
}
.master__name {
  font: italic 900 2.25rem/1 var(--font-display);
  text-transform: uppercase;
}
.master__role {
  margin: 8px 0 20px;
  color: var(--orange);
  font-weight: 600;
}
.master__body p + p { margin-top: 12px; }
.master__body p { color: var(--grey-on-dark); }
.master__body .master__role { color: var(--orange); }
.master .btn { margin-top: auto; }
.master__body p:nth-last-of-type(1) { margin-bottom: 28px; }

/* ---------- Работы ---------- */
.works {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.works img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.works__cta { margin-top: 40px; }

/* ---------- Интерьер ---------- */
.interior {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  margin-top: 48px;
}
.interior img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }
.interior__big { grid-row: 1 / 3; min-height: 420px; }

/* ---------- Отзывы ---------- */
.reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.reviews__score {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.reviews__score strong {
  font: italic 900 3.5rem/1 var(--font-display);
  color: var(--orange-deep);
}
.reviews__score span {
  padding-left: 16px;
  border-left: 3px solid var(--orange);
  font-size: .9375rem;
  line-height: 1.4;
}
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
  border-top: 3px solid var(--black);
}
.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line-light);
}
.review:not(:nth-child(3n+1)) {
  padding-left: 28px;
  border-left: 1px solid var(--line-light);
}
.review blockquote { font-size: 1.0625rem; line-height: 1.6; }
.review figcaption { display: flex; flex-direction: column; }
.review figcaption span { font-size: .875rem; color: var(--orange-deep); }
.reviews__more { margin-top: 40px; font-weight: 600; }
.reviews__more a { text-underline-offset: 4px; }

/* ---------- Контакты ---------- */
.contacts {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: stretch;
}
.facts { margin: 40px 0; }
.facts > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line-dark);
}
.facts > div:last-child { border-bottom: 1px solid var(--line-dark); }
.facts dt { color: var(--grey-on-dark); }
.facts a { text-underline-offset: 4px; }
.facts a:hover { color: var(--orange); }
.facts .links { display: flex; gap: 20px; flex-wrap: wrap; }

.contacts__map {
  position: relative;
  min-height: 420px;
  border: 2px solid var(--line-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
}
.contacts__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* карта в чёрно-белой гамме сайта */
  filter: grayscale(1) invert(1) contrast(.85) brightness(.95);
}
.map__link {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--black);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
}
.map__link:hover { background: var(--white); }

/* ---------- Подвал ---------- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line-dark);
  color: var(--grey-on-dark);
  font-size: .9375rem;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer .brand { color: var(--white); }

/* ---------- Частые вопросы ---------- */
.faq { margin-top: 88px; }
.faq__list { margin-top: 32px; border-top: 3px solid var(--black); }
.faq__item { border-bottom: 1px solid var(--line-light); }
.faq__item summary {
  position: relative;
  padding: 20px 48px 20px 0;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font: 700 1.75rem/1 var(--font-body);
  color: var(--orange-deep);
}
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding: 0 48px 22px 0; max-width: 46em; color: var(--grey-on-light); }

/* ---------- Нижняя панель на телефоне ---------- */
.dock { display: none; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__logo { order: -1; justify-self: start; width: min(48%, 200px); }
  .hero { align-items: flex-start; }
  .menu { columns: 1; }
  .contacts { grid-template-columns: 1fr; gap: 48px; }
  .contacts__map { min-height: 360px; }
  .reviews { grid-template-columns: 1fr; }
  .review, .review:not(:nth-child(3n+1)) { padding: 24px 0; border-left: 0; }
}

@media (max-width: 900px) {
  .header__cta { display: none; }
  .burger { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 24px 24px;
    background: var(--black);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform .25s, visibility .25s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a { padding: 16px 0; font-size: 1.125rem; border-bottom: 1px solid var(--line-dark); }
  .site-header.is-open { background: var(--black); }
  .masters { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .duo { grid-template-columns: 180px 1fr; }
  .duo .btn { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .wrap { padding-inline: 20px; }
  .section { padding: 88px 0 72px; }
  .section::before { background-size: 480px 28px; height: 28px; top: -27px; }
  .hero { padding-bottom: 72px; }
  .hero__lead { font-size: 1.0625rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .master__body { padding: 24px 20px 28px; }
  .duo { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .duo__img { height: 200px; }
  .interior { grid-template-columns: 1fr; grid-template-rows: auto; }
  .interior__big { grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .interior img:not(.interior__big) { aspect-ratio: 16 / 10; }
  .svc { display: grid; grid-template-columns: 48px 1fr auto; grid-template-areas: "img body btn" "img price btn"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 8px; }
  .svc__img { grid-area: img; width: 48px; height: 48px; }
  .svc__body { grid-area: body; align-self: end; }
  .svc__price { grid-area: price; align-self: start; font-size: 1rem; }
  .svc__btn { grid-area: btn; min-width: 0; min-height: 42px; padding: 0 14px; font-size: .875rem; }
  .svc__name { font-size: 1rem; }
  .faq { margin-top: 64px; }
  .faq__item summary { font-size: 1.0625rem; padding-right: 36px; }
  .faq__item p { padding-right: 0; }
  .master__body .btn, .duo .btn, .works__cta .btn, .contacts__info > .btn { width: 100%; }
  .reviews__head { align-items: flex-start; }

  body { padding-bottom: 76px; }
  .dock {
    position: fixed;
    border-radius: 16px 16px 0 0;
    inset: auto 0 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--black);
    border-top: 1px solid var(--line-dark);
  }
  .dock .btn { min-height: 48px; padding: 0 12px; border-radius: 12px; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: 16px; }
  .hero__title { font-size: 2rem; }
  .brand__name { font-size: 1rem; }
  .svc__btn { padding: 0 10px; font-size: .8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Отзывы Яндекс Карт (виджет) ---------- */
.yreviews {
  margin-top: 48px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.yreviews iframe { display: block; width: 100%; height: 900px; border: 0; }
@media (max-width: 720px) { .yreviews { margin-top: 32px; } .yreviews iframe { height: 700px; } }

.duo__tag {
  display: inline-block;
  margin-left: 10px;
  padding: 5px 10px;
  vertical-align: middle;
  border-radius: 8px;
  background: var(--orange);
  color: var(--black);
  font: 800 .75rem/1 var(--font-body);
  font-style: normal;
  letter-spacing: .04em;
}
