/* ============ Шапка ============ */
.site-header { position: relative; z-index: 50; }

/* Топбар */
.topbar { background: var(--ink); color: var(--pampas); }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 42px;
  font-size: 13.5px;
}
.topbar__loc { opacity: .8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__right { display: flex; align-items: center; gap: var(--r-sm); white-space: nowrap; }
.topbar__link { opacity: .8; transition: opacity .2s; }
.topbar__link:hover { opacity: 1; }
.topbar__dot { opacity: .4; }
.topbar__phone { font-weight: 700; letter-spacing: .27px; }

/* Навигация */
.nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 80px;
}
.nav__links { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
  padding-block: 6px;
  transition: color .2s;
}
.nav__links a:hover { color: var(--accent); }
.nav__caret { font-size: 10px; opacity: .6; }
.nav__cta { flex-shrink: 0; }

/* Бургер (моб.) */
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-inline-start: auto; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: .25s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Мега-меню «Услуги» ============ */
.nav__item--mega { position: static; }
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 26px 44px -30px rgba(27, 23, 20, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 60;
}
.nav__item--mega:hover .mega,
.nav__item--mega:focus-within .mega,
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega__inner { display: flex; gap: 44px; align-items: stretch; padding-block: 36px; }
.mega__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; flex: 1; min-width: 0; }
.mega__head {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 16px;
  transition: gap .2s;
}
.mega__head span { color: var(--accent); }
.mega__head:hover { gap: 12px; color: var(--accent-dark); }
.mega__col ul { display: flex; flex-direction: column; gap: 10px; }
.mega__col li a { font-size: 15px; color: var(--ink-soft); transition: color .2s; }
.mega__col li a:hover { color: var(--accent); }
.mega__cta {
  flex-shrink: 0; width: 264px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: var(--accent-soft); border-radius: var(--r-lg); padding: 26px;
}
.mega__ctaTitle { font-family: var(--font-serif); font-weight: 600; font-size: 22px; line-height: 1.15; color: var(--ink); }
.mega__ctaText { font-size: 14px; line-height: 21px; color: var(--ink-soft); }
.mega__cta .btn { margin-top: 4px; }

/* ============ Подвал ============ */
.footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 80px 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer .brand__name strong { color: #fff; }
.footer__brandcol { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.footer__tag { max-width: 284px; font-size: 15px; line-height: 24px; color: rgba(255, 255, 255, 0.7); }
.footer__colTitle {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.56px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.footer__col ul { display: flex; flex-direction: column; gap: var(--r-sm); }
.footer__col a { font-size: 15px; line-height: 24px; color: rgba(255, 255, 255, 0.7); transition: color .2s; }
.footer__col a:hover { color: #fff; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  font-size: 12.5px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.45);
}
.footer__disc { max-width: 460px; text-align: right; }

/* ============ Хлебные крошки ============ */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-mute); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: .5; }

/* ============ Внутренний герой страницы (phero) ============ */
.phero { background: var(--cream); padding-block: clamp(40px, 5vw, 56px) clamp(48px, 6vw, 70px); }
.phero__inner { display: flex; flex-direction: column; gap: 26px; }
.phero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 64px;
}
.phero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.phero__eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 1.82px; text-transform: uppercase; color: var(--accent); }
.phero__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(44px, 5.6vw, 76px); line-height: 1.0; letter-spacing: -0.015em; color: var(--ink);
}
.phero__title em { font-style: italic; color: var(--accent); }
.phero__lead { max-width: 556px; font-size: 19px; line-height: 30.4px; color: var(--ink-soft); }
.phero__ctas { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 16px; }
.phero__media { position: relative; }
.phero__slot { aspect-ratio: 1 / 1; width: 100%; }
.phero__badge {
  position: absolute; left: -24px; bottom: 36px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: #fff; border-radius: var(--r-md); padding: 18px 22px;
  box-shadow: 0 18px 50px -22px rgba(27, 23, 20, 0.28);
}
.phero__badge b { font-family: var(--font-serif); font-weight: 600; font-size: 30px; line-height: 1; color: var(--accent); }
.phero__badge span { font-size: 12px; line-height: 19.2px; color: var(--ink-mute); }

@media (max-width: 900px) {
  .phero__grid { grid-template-columns: 1fr; gap: 40px; }
  .phero__media { order: -1; max-width: 420px; }
  .phero__badge { left: auto; right: -10px; }
}

/* ============ Контакт-блок + форма (общий для главной и контактов) ============ */
.contact-cta { background: var(--ink); padding-block: clamp(72px, 10vw, 150px) clamp(72px, 8vw, 120px); }
.contact-cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 72px;
  align-items: start;
}
.contact-cta__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
.contact-cta__eyebrow {
  font-weight: 700; font-size: 13px; letter-spacing: 1.82px;
  text-transform: uppercase; color: var(--accent);
}
.contact-cta__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(38px, 4.6vw, 58px); line-height: 1.04; color: #fff;
}
.contact-cta__title em { font-style: italic; color: var(--accent); }
.contact-cta__lead { max-width: 505px; font-size: 18px; line-height: 28.8px; color: rgba(255, 255, 255, 0.72); }
.contact-cta__info { width: 100%; display: flex; flex-direction: column; gap: 22px; padding-top: 27px; }
.contact-cta__infoItem {
  display: flex; flex-direction: column; gap: 3px;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.contact-cta__infoLabel { font-size: 12px; letter-spacing: 1.68px; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.contact-cta__infoValue { font-weight: 600; font-size: 19px; line-height: 30.4px; color: #fff; }

/* Карточка формы */
.contact-form {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 42px;
  display: flex; flex-direction: column; gap: 16px;
}
.contact-form__title { font-family: var(--font-serif); font-weight: 600; font-size: 28px; line-height: 44.8px; color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-weight: 600; font-size: 13.5px; line-height: 21.6px; color: var(--ink-soft); }
.field input, .field select {
  width: 100%;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--grey); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238a817a' stroke-width='1.5' d='M1 1.5 6 6l5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 17px center;
  padding-right: 40px;
}
.contact-form .btn { width: 100%; justify-content: center; height: 56px; margin-top: 4px; }
.contact-form__consent { text-align: center; font-size: 12.5px; line-height: 20px; color: var(--ink-mute); }
.contact-form__consent a { color: var(--accent); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-form__ok {
  display: none;
  padding: 16px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}
.contact-form.is-sent .contact-form__ok { display: block; }

/* ============ Адаптив ============ */
@media (max-width: 900px) {
  .contact-cta__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .mega { display: none; }

  /* раскрытое моб-меню */
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 24px;
    box-shadow: 0 12px 24px -16px rgba(0,0,0,.3);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__links.is-open > li { width: 100%; }
  .nav__links.is-open a { font-size: 17px; padding-block: 10px; }

  /* «Услуги» как аккордеон в мобильном меню */
  .nav__item--mega { position: static; }
  .nav__item--mega > a { display: inline-flex; align-items: center; gap: 6px; }
  .nav__caret { transition: transform .2s; }
  .nav__item--mega.is-expanded .nav__caret { transform: rotate(180deg); }
  .mega { position: static; opacity: 1; visibility: visible; transform: none;
          box-shadow: none; border: 0; background: transparent; }
  .mega.is-open { display: block; }
  .mega__inner { display: block; padding: 2px 0 6px; gap: 0; }
  .mega__cols { display: block; }
  .mega__col { margin-bottom: 14px; }
  .mega__head { font-size: 14px; padding: 6px 0; }
  .mega__col ul { gap: 0; padding-left: 12px; border-left: 2px solid var(--line); }
  .mega__col li a { display: block; font-size: 15px; padding-block: 8px; }
  .mega__cta { display: none; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brandcol { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .topbar__loc { display: none; }
  .topbar__inner { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .footer__disc { text-align: left; max-width: none; }
}

/* ============ Карточка кейса «до/после» + лайтбокс ============
   Общие для галереи и блоков «Фото до и после» на страницах процедур (переехали из gallery.css) */
.gcase {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}

/* Медиа-склейка «до/после» (кликабельна → лайтбокс) */
.gcase__media {
  position: relative; display: block; width: 100%;
  aspect-ratio: 1 / 1; padding: 0; border: 0; margin: 0;
  background: var(--bg); cursor: zoom-in; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.gcase__media img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform .35s ease;
}
.gcase__media:hover img { transform: scale(1.03); }
.gcase__media:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gcase__cat {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-weight: 700; font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--accent); background: rgba(255, 255, 255, 0.92);
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: 0 1px 4px rgba(27, 23, 20, 0.08);
}
.gcase__zoom {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27, 23, 20, 0.62); color: #fff; font-size: 16px;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.gcase__media:hover .gcase__zoom, .gcase__media:focus-visible .gcase__zoom { opacity: 1; transform: none; }

.gcase__foot { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; }
.gcase__title { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.gcase__meta { font-size: 13.5px; color: var(--ink-mute); }

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(20, 16, 14, 0.86); padding: 4vw;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: min(96vw, 1100px); max-height: 92vh;
  object-fit: contain; border-radius: var(--r-sm);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 28px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.28); }
.gcase__count {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(27, 23, 20, 0.62); padding: 4px 10px; border-radius: var(--r-pill);
}
.lightbox__fig {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: min(96vw, 1100px);
}
.lightbox__cap { color: rgba(255, 255, 255, 0.85); font-size: 14px; letter-spacing: .2px; }
.lightbox__cap[hidden] { display: none; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 34px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
@media (max-width: 620px) {
  .lightbox { padding: 12px; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 28px; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
}

/* ============ Соцсети: иконки в верхней полоске и в подвале (work/gen-social.py) ============ */
.soc { display: inline-flex; align-items: center; justify-content: center; color: inherit; transition: color .2s, background-color .2s, border-color .2s, opacity .2s; }
.soc svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.topbar__social { display: inline-flex; align-items: center; gap: 14px; }
.soc--sm { width: 16px; height: 16px; opacity: .8; }
.soc--sm:hover, .soc--sm:focus-visible { opacity: 1; color: var(--accent); }
.footer__social { display: flex; flex-wrap: wrap; gap: 10px; }
.soc--lg { width: 42px; height: 42px; padding: 11px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.8); }
.soc--lg:hover, .soc--lg:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
.soc:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
