/* =========================================================
   ÉLAN — ателье красоты
   Светлая тема «Тихая роскошь» / тёмная «Тёмный премиум»
   ========================================================= */

/* ---------- Токены ---------- */
[hidden] { display: none !important; }

:root {
  color-scheme: light;
  --bg: #f6f1ea;
  --bg-2: #eee5d9;
  --surface: #fbf8f3;
  --ink: #1f1c19;
  --ink-2: #635a51;
  --ink-3: #988d82;
  --line: rgba(31, 28, 25, .12);
  --accent: #a8834c;
  --accent-2: #d9c4a1;
  --accent-soft: rgba(168, 131, 76, .12);
  --on-accent: #fffaf2;
  --ph-1: #e6d8c4;
  --ph-2: #cdb89a;
  --shadow: 0 30px 60px -30px rgba(60, 40, 20, .35);
  --glass: rgba(246, 241, 234, .72);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 28px;
  --radius-sm: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 76px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0c0b;
  --bg-2: #171312;
  --surface: #1c1716;
  --ink: #f4ece5;
  --ink-2: #b9aba1;
  --ink-3: #85776e;
  --line: rgba(244, 236, 229, .12);
  --accent: #d6a591;
  --accent-2: #8c5c4f;
  --accent-soft: rgba(214, 165, 145, .12);
  --on-accent: #1a1210;
  --ph-1: #2a2120;
  --ph-2: #4d3630;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  --glass: rgba(14, 12, 11, .7);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(15px, .3vw + 14px, 17px)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 18px; border-radius: 99px; background: var(--ink); color: var(--bg);
  transform: translateY(-200%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

/* Зерно поверх всего — «плёночная» фактура */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 150; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(80px, 12vw, 160px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vw, 100px); }
.section--alt { background: var(--bg-2); }

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.display, .title, .h3 { font-family: var(--serif); font-weight: 400; line-height: .95; letter-spacing: -.02em; }
.display { font-size: clamp(56px, 10.5vw, 168px); }
.title { font-size: clamp(42px, 6.4vw, 96px); }
.h3 { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.05; }
.display em, .title em, .h3 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(17px, 1.1vw + 12px, 21px); color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-2); }

.section-head { display: grid; gap: 24px; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head--split { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 720px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Кнопки ---------- */
.btn {
  --h: 56px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid var(--ink);
  transition: color .5s var(--ease), border-color .5s var(--ease), background-color .5s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .5s var(--ease); }
.btn:hover svg { transform: translateX(4px) rotate(-45deg); }
/* Заливка поднимается снизу «каплей» */
.btn::before {
  content: ""; position: absolute; z-index: -1; inset: auto -10% -10% -10%; height: 0;
  border-radius: 50% 50% 0 0; background: var(--accent);
  transition: height .6s var(--ease), border-radius .6s var(--ease);
}
.btn:hover::before { height: 130%; border-radius: 0; }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { color: var(--on-accent); border-color: var(--accent); }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { color: var(--on-accent); border-color: var(--accent); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent::before { background: var(--ink); }
.btn--accent:hover { color: var(--bg); border-color: var(--ink); }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn--tg { background: #2a9fd8; border-color: #2a9fd8; color: #fff; }
.btn--wa::before, .btn--tg::before { background: var(--ink); }
.btn--wa:hover, .btn--tg:hover { color: var(--bg); border-color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); transition: border-color .3s, background-color .3s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Изображения и заглушки ---------- */
/* Пока картинки нет, видна мягкая градиентная заглушка с именем файла */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 20% 10%, var(--ph-2), transparent 60%),
    radial-gradient(90% 90% at 90% 100%, var(--accent-soft), transparent 60%),
    var(--ph-1);
}
.media::before {
  content: attr(data-ph); position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media--parallax img { inset: -12% 0; height: 124%; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  view-transition-name: header;
  transition: transform .6s var(--ease), background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 32px; }

.logo { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-size: 30px; letter-spacing: .08em; line-height: 1; }
.logo small { font-family: var(--sans); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); }

.nav { display: flex; gap: 32px; margin-inline: auto; }
.nav a { position: relative; font-size: 15px; font-weight: 500; padding-block: 6px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone { font-weight: 600; font-size: 15px; }

/* Переключатель темы: солнце ↔ луна */
.theme-toggle svg { overflow: visible; }
.theme-toggle .sun-rays { transition: transform .6s var(--ease), opacity .4s; transform-origin: center; }
.theme-toggle .moon-mask { transition: transform .6s var(--ease); }
[data-theme="dark"] .theme-toggle .sun-rays { transform: rotate(90deg) scale(.4); opacity: 0; }
.theme-toggle .moon-mask { transform: translate(8px, -8px); }
[data-theme="dark"] .theme-toggle .moon-mask { transform: translate(0, 0); }

.burger { display: none; flex-direction: column; justify-content: center; align-items: center; }
.burger span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.burger span + span { margin-top: 6px; }
.menu-open .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav, .header__phone, .header__actions .btn { display: none; }
  .burger { display: flex; }
  .header__actions { margin-left: auto; }
}

/* Мобильное меню */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 32px;
  background: var(--bg);
  clip-path: circle(0 at calc(100% - 40px) 38px);
  transition: clip-path .8s var(--ease), visibility 0s .8s;
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 40px) 38px); visibility: visible; transition: clip-path .8s var(--ease); }
.mobile-menu nav { display: grid; gap: 8px; }
.mobile-menu nav a { font-family: var(--serif); font-size: clamp(44px, 12vw, 72px); line-height: 1.1; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s var(--ease); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: .05s; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: .1s; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: .15s; }
.mobile-menu__foot { margin-top: auto; display: grid; gap: 16px; }
.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: calc(var(--header-h) + 40px) 0 60px; display: flex; align-items: center; overflow: clip; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__text { display: grid; gap: 32px; position: relative; z-index: 2; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__rating { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-2); }
.hero__rating b { font-size: 28px; font-family: var(--serif); font-weight: 500; color: var(--ink); }
.stars { display: flex; gap: 2px; color: var(--accent); }
.stars svg { width: 14px; height: 14px; }

.hero__visual { position: relative; aspect-ratio: 4 / 5; width: min(100%, calc((100svh - var(--header-h) - 120px) * .8)); justify-self: end; }
.hero__visual .media { position: absolute; box-shadow: var(--shadow); }
.hero__img-1 { inset: 0 12% 0 8%; border-radius: 999px 999px var(--radius) var(--radius); }
.hero__img-2 { width: 38%; aspect-ratio: 3 / 4; right: 0; top: 6%; }
.hero__img-3 { width: 34%; aspect-ratio: 1; left: -4%; bottom: 8%; border-radius: 50%; }

/* Вращающийся бейдж «записаться онлайн» */
.badge-rotate {
  position: absolute; z-index: 3; right: -2%; bottom: 4%;
  width: clamp(110px, 10vw, 150px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transition: transform .6s var(--ease);
}
.badge-rotate:hover { transform: scale(1.08); }
.badge-rotate svg.ring { position: absolute; inset: 8%; width: 84%; height: 84%; animation: spin 16s linear infinite; }
.badge-rotate svg.ring text { font: 600 9.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; fill: currentColor; }
.badge-rotate .arrow { width: 28px; height: 28px; transform: rotate(-45deg); }
@keyframes spin { to { rotate: 360deg; } }

/* Аврора-пятна на фоне */
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(#000 55%, transparent); }
.aurora i {
  position: absolute; width: 50vmax; aspect-ratio: 1; border-radius: 50%;
  filter: blur(80px); opacity: .55; animation: drift 22s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: var(--accent-2); top: -20%; right: -10%; }
.aurora i:nth-child(2) { background: var(--ph-1); bottom: -30%; left: -15%; animation-duration: 28s; animation-delay: -6s; }
.aurora i:nth-child(3) { background: var(--accent-soft); top: 30%; left: 30%; width: 30vmax; animation-duration: 18s; }
[data-theme="dark"] .aurora i { opacity: .35; }
@keyframes drift { to { transform: translate(10vw, 8vh) scale(1.2); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; translate: -50% 0;
  width: 1px; height: 56px; background: var(--line); overflow: hidden;
}
.scroll-hint::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: scroll-hint 2.2s var(--ease) infinite; }
@keyframes scroll-hint { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; width: 100%; justify-self: center; }
  .scroll-hint { display: none; }
}

/* ---------- Бегущая строка ---------- */
.marquee {
  --gap: 48px;
  display: flex; gap: var(--gap); overflow: hidden; user-select: none;
  padding-block: 28px; border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; flex: none; gap: var(--gap); align-items: center; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track > span { font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); font-style: italic; white-space: nowrap; }
.marquee__track > i { font-style: normal; color: var(--accent); font-size: 24px; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }

/* ---------- Цифры доверия ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 32px clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-family: var(--serif); font-size: clamp(48px, 5.5vw, 88px); line-height: 1; }
.stat__num sup { font-size: .4em; color: var(--accent); vertical-align: top; margin-left: 4px; }
.stat__label { color: var(--ink-2); margin-top: 12px; font-size: 15px; }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Карточки услуг ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--radius); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 2vw, 32px);
}
.services-grid { align-items: start; }
.service-card:nth-child(3n + 2) { margin: 60px 0 -60px; }
.service-card .media { position: absolute; inset: 0; z-index: -2; border-radius: 0; }
.service-card .media img { transition: transform 1.2s var(--ease); }
.service-card:hover .media img { transform: scale(1.08); }
.service-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20, 14, 10, .15) 0%, rgba(20, 14, 10, .1) 40%, rgba(20, 14, 10, .78) 100%);
}
.service-card__top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; letter-spacing: .14em; }
.service-card__price { padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); letter-spacing: 0; font-weight: 600; }
.service-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3vw, 44px); line-height: 1; }
.service-card ul { display: grid; gap: 4px; margin-top: 16px; font-size: 14px; opacity: .85; padding: 0; list-style: none;
  max-height: 0; overflow: hidden; transition: max-height .7s var(--ease), opacity .5s; }
.service-card:hover ul, .service-card:focus-visible ul { max-height: 120px; }
.service-card__go {
  position: absolute; right: clamp(20px, 2vw, 32px); bottom: clamp(20px, 2vw, 32px);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #1f1c19; transform: scale(0) rotate(-45deg); transition: transform .6s var(--ease);
}
.service-card__go svg { width: 18px; height: 18px; }
.service-card:hover .service-card__go { transform: scale(1) rotate(-45deg); }

/* «Прожектор» за курсором */
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 240, 220, .22), transparent 60%);
  transition: opacity .4s;
}
.spot:hover::before { opacity: 1; }

.services-more { display: flex; justify-content: center; margin-top: 120px; }

@media (max-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; } .service-card:nth-child(3n + 2) { margin: 0; } .services-more { margin-top: 48px; } }
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card { aspect-ratio: 5 / 4; }
  .service-card ul { max-height: none; }
  .service-card__go { transform: scale(1) rotate(-45deg); }
}

/* ---------- Почему мы ---------- */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
.why__visual { position: sticky; top: calc(var(--header-h) + 32px); }
.why__visual .media { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--radius) var(--radius); }
.why__quote {
  position: absolute; left: -24px; bottom: 40px; max-width: 260px; padding: 20px 24px;
  border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow);
  font-family: var(--serif); font-size: 22px; line-height: 1.2; font-style: italic;
}
.why__quote span { display: block; margin-top: 10px; font: 500 13px var(--sans); font-style: normal; color: var(--ink-2); }
.why__list { display: grid; counter-reset: why; }
.why__item { counter-increment: why; display: grid; grid-template-columns: 72px 1fr; gap: 8px 24px; padding-block: 36px; border-top: 1px solid var(--line); }
.why__item:last-child { border-bottom: 1px solid var(--line); }
.why__item::before { content: "0" counter(why); grid-row: span 2; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); font-style: italic; }
.why__item h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; }
.why__item p { color: var(--ink-2); max-width: 52ch; }
@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
  .why__visual { position: relative; top: 0; max-width: 420px; }
  .why__quote { left: auto; right: -8px; }
  .why__item { grid-template-columns: 52px 1fr; }
  .why__item::before { font-size: 34px; }
}

/* ---------- Мастера (горизонтальная лента) ---------- */
.h-scroll { overflow: hidden; }
.h-scroll__track { display: flex; gap: 20px; width: max-content; padding-inline: var(--gutter); }
.master-card { width: clamp(260px, 24vw, 340px); flex: none; display: grid; gap: 16px; }
.master-card .media { aspect-ratio: 3 / 4; }
.master-card .media img { filter: grayscale(.5); transition: filter .8s var(--ease), transform 1.2s var(--ease); }
.master-card:hover .media img { filter: none; transform: scale(1.05); }
.master-card__name { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.master-card__role { color: var(--ink-2); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.master-card__role b { color: var(--accent); font-weight: 600; }
.master-card--all { place-content: center; aspect-ratio: 3 / 4; border-radius: var(--radius); border: 1px dashed var(--ink-3); text-align: center; transition: background-color .4s; }
.master-card--all:hover { background: var(--accent-soft); }
.master-card--all .title { font-size: 56px; }

/* На тач-устройствах — нативный скролл со snap */
@media (max-width: 1024px), (pointer: coarse) {
  .h-scroll { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .h-scroll::-webkit-scrollbar { display: none; }
  .master-card { scroll-snap-align: center; }
}

/* ---------- До / после ---------- */
.ba { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; --pos: 50%; user-select: none; }
.ba .media { position: absolute; inset: 0; border-radius: 0; }
.ba__after { clip-path: inset(0 0 0 var(--pos)); }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: #fff; pointer-events: none; }
.ba__knob {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #1f1c19; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.ba__knob svg { width: 26px; height: 26px; }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba__tag { position: absolute; top: 20px; padding: 8px 14px; border-radius: 99px; background: rgba(20, 14, 10, .45); color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.ba__tag--before { left: 20px; }
.ba__tag--after { right: 20px; }
.ba-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 900px) { .ba-wrap { grid-template-columns: 1fr; } .ba { aspect-ratio: 4 / 5; } }

/* ---------- Отзывы ---------- */
.reviews { display: grid; gap: 20px; }
.reviews .marquee { border: 0; padding: 0; --gap: 20px; }
.reviews .marquee__track { animation-duration: 70s; align-items: stretch; }
.review {
  width: clamp(300px, 30vw, 420px); padding: 28px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; align-content: start;
}
.review p { font-size: 15px; color: var(--ink-2); white-space: normal; }
.review__head { display: flex; align-items: center; gap: 14px; }
.review__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-size: 20px; }
.review__name { font-weight: 600; }
.review__meta { font-size: 13px; color: var(--ink-3); }
.review .stars { margin-left: auto; }
.reviews__note { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* ---------- Подарочный сертификат ---------- */
.gift { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.gift__text { display: grid; gap: 28px; justify-items: start; }
.gift__stage { perspective: 1200px; display: grid; place-items: center; padding: 40px 0; }
.gift-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; width: min(100%, 460px); aspect-ratio: 1.6; border-radius: 22px; padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #2a2016; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .2s ease-out;
  background: linear-gradient(135deg, #f4e6cf 0%, #d4b384 45%, #f7ead6 55%, #c39c66 100%);
  box-shadow: 0 50px 80px -40px rgba(80, 50, 10, .6), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
[data-theme="dark"] .gift-card { background: linear-gradient(135deg, #3a2622 0%, #b9806d 45%, #e6bfae 55%, #6e4438 100%); color: #fff5ef; }
.gift-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .8) 45%, transparent 60%) var(--shine, 0%) 0 / 250% 100% no-repeat;
}
.gift-card__top { display: flex; justify-content: space-between; align-items: start; }
.gift-card .logo { font-size: 34px; }
.gift-card .logo small { color: inherit; opacity: .7; }
.gift-card__sum { font-family: var(--serif); font-size: clamp(44px, 5vw, 64px); line-height: 1; transform: translateZ(40px); }
.gift-card__foot { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.gift__amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 99px;
  border: 1px solid var(--line); font-size: 14px; font-weight: 500; transition: all .3s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 900px) { .gift { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 6vw, 100px); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 28px 0; font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: linear-gradient(var(--ink) 0 0) center / 14px 1.5px no-repeat, linear-gradient(var(--ink) 0 0) center / 1.5px 14px no-repeat;
  transition: transform .5s var(--ease), background-color .3s;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details::details-content { height: 0; overflow: clip; transition: height .5s var(--ease), content-visibility .5s allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq details p { padding: 0 64px 28px 0; color: var(--ink-2); }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } .faq details p { padding-right: 0; } }

/* ---------- Запись ---------- */
.booking { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.booking__aside { display: grid; gap: 32px; }
.contact-list { display: grid; gap: 20px; padding: 0; list-style: none; }
.contact-list li { display: grid; gap: 4px; }
.contact-list small { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.contact-list a, .contact-list span { font-size: 18px; font-weight: 500; }
.messengers { display: flex; gap: 12px; flex-wrap: wrap; }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: clamp(24px, 3vw, 44px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.form__title { grid-column: 1 / -1; font-family: var(--serif); font-size: clamp(32px, 3vw, 44px); line-height: 1; margin-bottom: 8px; }
.field { position: relative; display: grid; }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; height: 60px; padding: 24px 18px 8px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line); outline: 0; appearance: none;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { height: 110px; resize: vertical; padding-top: 28px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 28px, calc(100% - 17px) 28px; background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 40px; cursor: pointer;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field label {
  position: absolute; left: 19px; top: 19px; font-size: 15px; color: var(--ink-3); pointer-events: none;
  transform-origin: left top; transition: transform .3s var(--ease), color .3s;
}
/* Плавающая подпись: поднимается при фокусе/заполнении */
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label, .field input[type="date"] + label {
  transform: translateY(-11px) scale(.78); color: var(--accent);
}
.field input:user-invalid { border-color: #c4553f; }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check a { text-decoration: underline; text-underline-offset: 3px; }
.form__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.form__note { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); text-align: center; }
@media (max-width: 900px) { .booking { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form, .form__actions { grid-template-columns: 1fr; } }

/* ---------- Футер ---------- */
.footer { padding-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 20px; }
.footer ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.footer ul a { transition: color .3s; }
.footer ul a:hover { color: var(--accent); }
.footer__word {
  font-family: var(--serif); font-size: clamp(120px, 27vw, 420px); line-height: .8; letter-spacing: -.02em; text-align: center;
  margin-top: 64px; translate: 0 8%;
  background: linear-gradient(180deg, var(--ink) 20%, transparent 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .9;
}
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Мобильная панель записи ---------- */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  display: none; gap: 8px; padding: 8px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow); transition: transform .5s var(--ease);
}
.mobile-cta .btn { flex: 1; }
.mobile-cta .icon-btn { width: 56px; height: 56px; flex: none; background: var(--surface); }
.mobile-cta.is-hidden { transform: translateY(150%); }
@media (max-width: 720px) { .mobile-cta { display: flex; } .footer { padding-bottom: 88px; } }

/* ---------- Внутренние страницы ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(60px, 10vw, 140px)) 0 clamp(48px, 6vw, 80px); overflow: clip; }
.page-hero__inner { display: grid; gap: 28px; }
.crumbs { display: flex; gap: 10px; font-size: 13px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: .5; }

/* Прайс */
.price-nav {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px; margin-bottom: 48px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: top .6s var(--ease);
}
.header.is-hidden ~ main .price-nav { top: 8px; }
.price-nav .search { margin-left: auto; position: relative; }
.price-nav .search input { height: 40px; width: 220px; padding: 0 16px 0 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); outline: 0; }
.price-nav .search input:focus { border-color: var(--accent); }
.price-nav .search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--ink-3); }
@media (max-width: 900px) {
  .price-nav { border-radius: var(--radius-sm); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .price-nav .chip { flex: none; }
  .price-nav .search { order: -1; flex: none; margin-left: 0; }
  .price-nav .search input { width: 160px; }
}

.price-block { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 5vw, 80px); padding-block: 56px; border-top: 1px solid var(--line); }
.price-block__aside { position: sticky; top: calc(var(--header-h) + 100px); align-self: start; display: grid; gap: 20px; }
.price-block__aside .media { aspect-ratio: 4 / 5; }
.price-block__aside p { color: var(--ink-2); font-size: 15px; }
.price-list { display: grid; padding: 0; list-style: none; }
.price-row {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease), background-color .4s;
}
.price-row:hover { padding-inline: 16px; background: var(--accent-soft); border-radius: 14px; }
.price-row__name { font-weight: 600; font-size: 17px; }
.price-row__name small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.price-row__time { font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.price-row__price { font-family: var(--serif); font-size: 26px; white-space: nowrap; }
.price-row__book { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all .4s var(--ease); }
.price-row__book svg { width: 16px; height: 16px; transform: rotate(-45deg); }
.price-row:hover .price-row__book { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.price-empty { padding: 60px 0; text-align: center; color: var(--ink-2); font-size: 18px; }
@media (max-width: 900px) {
  .price-block { grid-template-columns: 1fr; padding-block: 40px; }
  .price-block__aside { position: static; grid-template-columns: 120px 1fr; align-items: center; }
  .price-block__aside .media { aspect-ratio: 1; border-radius: var(--radius-sm); }
}
@media (max-width: 560px) {
  .price-row { grid-template-columns: 1fr auto; }
  .price-row__time { grid-row: 2; }
  .price-row__book { grid-row: 1 / 3; grid-column: 2; display: none; }
}

/* Сетка мастеров */
.masters-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 48px; }
.masters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 20px; }
.masters-grid .master-card { width: auto; text-align: left; cursor: pointer; }
.masters-grid .master-card[hidden] { display: none; }
.master-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.master-card__tags span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 1100px) { .masters-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .masters-grid { grid-template-columns: 1fr 1fr; gap: 32px 12px; } .master-card__name { font-size: 22px; } }

/* Карточка мастера — нативный <dialog> */
.dialog {
  margin: auto; width: min(960px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: auto;
  opacity: 0; transform: translateY(40px) scale(.97);
  transition: opacity .5s var(--ease), transform .6s var(--ease), overlay .6s allow-discrete, display .6s allow-discrete;
}
.dialog[open] { opacity: 1; transform: none; }
@starting-style { .dialog[open] { opacity: 0; transform: translateY(40px) scale(.97); } }
.dialog::backdrop { background: rgba(10, 8, 6, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog__grid { display: grid; grid-template-columns: 1fr 1.2fr; }
.dialog__grid .media { border-radius: 0; min-height: 420px; }
.dialog__body { padding: clamp(24px, 4vw, 48px); display: grid; gap: 20px; align-content: start; }
.dialog__close { position: absolute; top: 16px; right: 16px; z-index: 2; background: var(--surface); }
.dialog__facts { display: flex; gap: 32px; padding: 0; list-style: none; }
.dialog__facts b { display: block; font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1; }
.dialog__facts span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) { .dialog__grid { grid-template-columns: 1fr; } .dialog__grid .media { min-height: 0; aspect-ratio: 4 / 3; } }

/* Контакты */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card { padding: 28px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; position: relative; overflow: hidden; }
.contact-card svg.ic { width: 28px; height: 28px; color: var(--accent); }
.contact-card small { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.contact-card b { font-size: 18px; font-weight: 600; }
.contact-card p { color: var(--ink-2); font-size: 14px; }
@media (max-width: 1024px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }

.map { position: relative; aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__roads path { fill: none; stroke: var(--surface); stroke-linecap: round; }
.map__blocks rect { fill: var(--ph-1); opacity: .6; }
.map__pin { position: absolute; left: 52%; top: 46%; translate: -50% -100%; display: grid; justify-items: center; gap: 8px; }
.map__pin-label { padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.map__pin-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 24px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.map__open { position: absolute; right: 20px; bottom: 20px; }
@media (max-width: 720px) { .map { aspect-ratio: 4 / 5; } }

/* Тост */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 160; translate: -50% 0;
  max-width: calc(100% - 32px); padding: 16px 24px; border-radius: 16px; background: var(--ink); color: var(--bg);
  font-size: 15px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none;
}
.toast.is-shown { opacity: 1; transform: none; }

/* ---------- JS-зависимые начальные состояния ---------- */
/* Скрываем только при включённом JS; страховка — показать через 2.5 с, если скрипты не загрузились */
.js [data-hero] { visibility: hidden; animation: failsafe 0s 2.5s forwards; }
@keyframes failsafe { to { visibility: visible; } }

/* ---------- Переходы между страницами (View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .45s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-30px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(40px); } }
/* Смена темы и фильтр мастеров: без анимации всей страницы (круг для темы — в JS) */
.vt-inplace::view-transition-old(root), .vt-inplace::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-inplace .header { view-transition-name: none; }
.vt-inplace body { transition: none; }
.h-scroll[data-hscroll] { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(48px, 7vh, 90px); }
.h-scroll[data-hscroll] .section-head { margin-bottom: clamp(24px, 4vh, 48px); }
.h-scroll[data-hscroll] .master-card { width: clamp(240px, min(24vw, 36svh), 340px); }
span.media { display: block; }
.masters-grid .master-card { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

/* ---------- Меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee__track { animation: none; }
  .js [data-hero] { visibility: visible; animation: none; }
}
