/* =========================================================
   Тема: тёмный «вечерний салон» + светлая кремовая.
   ========================================================= */

:root[data-theme="dark"] {
  --bg: #0e0b0d;
  --bg-soft: #161114;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .22);
  --ink: #f6eef0;
  --muted: #c0aeb4;
  --accent: #e6a9b4;
  --accent-2: #d9a679;
  --accent-ink: #1a1013;
  --glow-1: rgba(217, 139, 164, .28);
  --glow-2: rgba(217, 166, 121, .2);
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

:root[data-theme="light"] {
  --bg: #fbf6f4;
  --bg-soft: #fff;
  --surface: rgba(255, 255, 255, .8);
  --surface-2: #fff;
  --line: rgba(58, 30, 38, .12);
  --line-strong: rgba(58, 30, 38, .28);
  --ink: #2a1a20;
  --muted: #715a63;
  --accent: #b8556f;
  --accent-2: #c08348;
  --accent-ink: #fff;
  --glow-1: rgba(184, 85, 111, .16);
  --glow-2: rgba(192, 131, 72, .14);
  --shadow: 0 20px 50px rgba(90, 50, 60, .12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; margin: 0 0 14px; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(44px, 10vw, 92px); }
h2 { font-size: clamp(32px, 6vw, 54px); }
h3 { font-size: clamp(19px, 3vw, 24px); }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 14px; }
a { color: inherit; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section--narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

.eyebrow {
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; font-weight: 600;
}

.section__head { margin-bottom: clamp(28px, 4vw, 48px); }

/* фоновые свечения */
.glow { position: fixed; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none; }
.glow--1 { width: 46vw; height: 46vw; background: var(--glow-1); top: -14vw; right: -12vw; }
.glow--2 { width: 38vw; height: 38vw; background: var(--glow-2); bottom: -14vw; left: -12vw; }
main, .nav, .footer, .sticky-bar { position: relative; z-index: 1; }

/* =============== навигация =============== */

.nav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.logo__mark { color: var(--accent); font-size: 15px; }
.logo__text { white-space: nowrap; }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .2s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav__links + .nav__side { margin-left: 0; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: border-color .2s ease, transform .2s ease;
}
.icon-btn:hover { border-color: var(--accent); transform: rotate(-15deg); }

/* =============== кнопки =============== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, opacity .2s ease;
}
.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px var(--accent); }
.btn--primary:disabled { opacity: .55; cursor: default; transform: none; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--wide { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 6px 0; color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.link-btn:hover { opacity: .75; }

/* =============== hero =============== */

.hero { padding: clamp(60px, 12vh, 130px) 0 clamp(30px, 6vh, 60px); }
.hero__sub { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 520px; margin: 18px 0 32px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
/* Кнопки одного размера: ширину задаёт та, где текст длиннее. */
.hero__cta .btn { flex: 0 0 240px; }   /* ровно одинаковые, а не «примерно» */
.hero__hours { margin-top: 26px; color: var(--muted); font-size: 15px; }

/* бегущая строка: две одинаковые половины и сдвиг ровно на половину — шва не видно */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0; }
.marquee__track {
  display: flex; align-items: center; width: max-content;
  animation: slide 34s linear infinite;
  font-family: 'Cormorant Garamond', serif; font-size: 24px; color: var(--muted);
}
.marquee__group { display: flex; align-items: center; }
.marquee__group > span { padding: 0 22px; white-space: nowrap; }
.marquee__track i { color: var(--accent); font-style: normal; font-size: 13px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============== услуги =============== */

.services { display: grid; gap: 12px; }
.service {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline;
  gap: 4px 16px; padding: 22px 24px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.service__go {
  grid-column: 2 / -1; color: var(--accent); font-size: 13.5px; font-weight: 600;
  opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease;
}
.service:hover .service__go, .service:focus-visible .service__go { opacity: 1; transform: none; }
.service:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.service__num { color: var(--accent); font-size: 12px; font-weight: 700; min-width: 24px; }
.service__body { flex: 1; min-width: 0; }
.service__name { font-weight: 700; font-size: 17px; margin-bottom: 3px; }
.service__sub { color: var(--muted); font-size: 14.5px; }
.service__meta { text-align: right; }
.service__time { color: var(--muted); font-size: 13.5px; white-space: nowrap; margin-top: 2px; }
.service__price { font-size: 20px; font-weight: 700; white-space: nowrap; line-height: 1.2; }

.addons-block { margin-top: 34px; padding: 26px; border: 1px dashed var(--line-strong); border-radius: 22px; }
.addons-block h3 { margin-bottom: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.tag, .tags--pick button {
  padding: 10px 17px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 15px; color: var(--ink); font-family: inherit;
}
.tag b { color: var(--accent); font-weight: 600; }
.tags--pick button { cursor: pointer; transition: all .2s ease; }
.tags--pick button:hover { border-color: var(--accent); }
.tags--pick button.is-on {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); border-color: transparent; font-weight: 600;
}

/* =============== галерея =============== */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 20px; }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: 20px; cursor: zoom-in;
  transition: transform .5s ease, filter .3s ease;
}
.gallery figure:hover img { transform: scale(1.045); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 22px 16px 12px; font-size: 13px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65)); border-radius: 0 0 20px 20px;
}
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(8, 5, 7, .92); padding: 20px; cursor: zoom-out; backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 18px; }

/* =============== как записаться =============== */

.steps-how { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps-how li { padding: 28px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.steps-how__num {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
}
.steps-how h3 { font-size: 20px; margin-bottom: 8px; }
.how__cta { margin-top: 28px; }
.steps-how p { color: var(--muted); font-size: 15px; margin: 0; }

/* =============== карточка записи =============== */

.section--book { max-width: 720px; }
.back-link {
  display: inline-block; margin-bottom: 18px; color: var(--muted);
  text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.back-link:hover { color: var(--accent); }

.booking-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow);
}

.progress { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.progress__item { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.progress__item::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong);
  transition: background .3s ease, box-shadow .3s ease;
}
.progress__item.is-on { color: var(--ink); }
.progress__item.is-on::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.progress__item.is-done::before { background: var(--accent-2); }

.step { margin-bottom: 30px; animation: fadeUp .45s ease both; }
.step:last-child { margin-bottom: 0; }
.step__title { font-size: 20px; margin-bottom: 14px; }

.options { display: grid; gap: 10px; }
.option {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; text-align: left;
  width: 100%; padding: 18px 20px; border-radius: 18px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: inherit; font: inherit;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.option:hover { border-color: var(--line-strong); transform: translateX(3px); }
.option.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.option__name { font-weight: 700; font-size: 16.5px; }
.option__meta { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.option__price { font-size: 18px; font-weight: 700; white-space: nowrap; }

.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.days::-webkit-scrollbar { height: 5px; }
.days::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.day {
  scroll-snap-align: start; padding: 14px 8px; border-radius: 16px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: inherit; font: inherit; text-align: center;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.day:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-2px); }
.day.is-on { border-color: transparent; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.day.is-on .day__wd, .day.is-on .day__free { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.day:disabled { opacity: .3; cursor: default; }
.day__num { font-size: 22px; font-weight: 700; display: block; line-height: 1.15; }
.day__wd { font-size: 13px; display: block; }
.day__free { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; }
.time {
  padding: 14px 4px; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
  background: var(--bg-soft); border: 1px solid var(--line); color: inherit;
  transition: border-color .2s ease, transform .15s ease, background .2s ease;
}
.time:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.time.is-on { border-color: transparent; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 13.5px; }
input, textarea {
  display: block; width: 100%; margin-top: 7px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft);
  font: 16px/1.4 'Manrope', sans-serif; color: var(--ink); font-weight: 500;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); font-weight: 400; }
input:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { resize: vertical; }
.error { color: #ff8090; font-size: 14px; margin-bottom: 12px; }

/* липкая панель итога */
.sticky-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  animation: fadeUp .3s ease both;
}
.sticky-bar[hidden] { display: none; }
.sticky-bar__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sticky-bar__info b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =============== страница записи =============== */

.result {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow);
}
.status-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 22px; border: 1px solid var(--line-strong);
}
.status-chip--pending { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.status-chip--confirmed { color: #6fcf97; border-color: rgba(111, 207, 151, .45); }
.status-chip--off { color: var(--muted); }
.result h2 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 6px; }
.result__row { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.result__row:last-of-type { border-bottom: 0; }
.result__key { color: var(--muted); min-width: 116px; font-size: 14px; }
.result__code { font-size: 20px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.result__actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.timeline { margin: 22px 0 0; padding: 20px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line); }
.timeline p { margin: 0 0 8px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
.timeline p:last-child { margin-bottom: 0; }
.timeline b { color: var(--ink); font-weight: 600; }

/* =============== подвал =============== */

.footer { border-top: 1px solid var(--line); padding: 40px 0 calc(60px + env(safe-area-inset-bottom)); margin-top: 40px; }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__contacts { text-align: right; font-size: 14.5px; }
.footer__contacts p { margin: 0 0 6px; }
.footer a { color: var(--accent); text-decoration: none; }

/* =============== анимации =============== */

/* Прячем только если JS работает — иначе контент должен остаться видимым. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =============== адаптив =============== */

/* Липкая панель нужна только на телефоне — на десктопе шаги и так на виду. */
@media (min-width: 861px) {
  .sticky-bar { display: none; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .fields { grid-template-columns: 1fr; }
  .gallery figure:first-child { grid-column: span 2; grid-row: span 1; }
  .footer__inner { flex-direction: column; }
  .footer__contacts { text-align: left; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { flex: 1 1 auto; width: 100%; }
  .service { padding: 16px 18px; grid-template-columns: 22px 1fr auto; gap: 3px 10px; }
  .service__go { display: none; }   /* на телефоне вся карточка и так кликается */
  .service__name { font-size: 15.5px; }
  .service__sub { font-size: 12.5px; }
  .service__price { font-size: 21px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery figure:first-child { grid-column: span 2; }
  .progress__item { font-size: 12px; }
  .section--book { max-width: 720px; }
.back-link {
  display: inline-block; margin-bottom: 18px; color: var(--muted);
  text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.back-link:hover { color: var(--accent); }

.booking-card { border-radius: 22px; }
}

/* =============== мои записи =============== */

.my-list { display: grid; gap: 12px; margin-bottom: 22px; }
.my-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px 22px;
}
.my-card.is-past { opacity: .62; }
.my-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.my-card__head .status-chip { margin-bottom: 0; }
.my-card__code { font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.my-card__when { font-size: 18px; font-weight: 600; }
.my-card__service { color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.my-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.my-card__actions { display: flex; gap: 16px; align-items: center; }
.my-card__actions .link-btn { text-decoration: none; }
.my-card__cancel { color: var(--muted); }
.my-card__cancel:hover { color: #ff8090; opacity: 1; }

.my-login__step label { margin-top: 6px; }
