:root {
  --pink: #e38aa4;
  --pink-deep: #cf6a87;
  --pink-soft: #f7dae2;
  --pink-pale: #fdeef2;
  --cream: #f3ebe1;
  --white: #ffffff;
  --ink: #4a373c;
  --ink-soft: #9a8087;
  --line: #efdde3;
  --shadow: 0 24px 70px rgba(176, 94, 118, 0.22);
  --shadow-sm: 0 10px 26px rgba(176, 94, 118, 0.14);
  --radius: 28px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
}

/* ---------- Фон с живыми цветами ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--cream);
}
.bg__image {
  position: absolute;
  inset: -4%;
  background-image: url("assets/salon-bg-desktop.jpg");
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.bg__petals { position: absolute; inset: 0; pointer-events: none; }
.petal {
  position: absolute;
  top: -8%;
  will-change: transform;
  filter: blur(0.3px);
  opacity: 0.8;
}

/* ---------- Прогресс ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  z-index: 20;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--pink-deep);
  border-radius: 0 4px 4px 0;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Сцена и слайды ---------- */
.stage {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 22px 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  width: 100%;
  display: none;
  flex-direction: column;
}
.slide.is-active { display: flex; }

.card {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 38px;
  width: 100%;
}

/* ---------- Типографика вопроса ---------- */
.q-step {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 18px;
}
.q-title {
  font-size: 27px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.q-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 28px;
  line-height: 1.55;
}
.q-title + .q-sub { margin-top: 6px; }

/* ---------- Варианты ответов ---------- */
.options { display: flex; flex-direction: column; gap: 11px; }

.option {
  appearance: none;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 500;
  text-align: left;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
  display: flex;
  align-items: center;
  gap: 13px;
}
.option:hover { border-color: var(--pink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.option.is-selected {
  border-color: var(--pink-deep);
  background: var(--pink-soft);
}
.option__check {
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1.5px solid var(--pink);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: background 0.25s, border-color 0.25s;
}
.option.is-selected .option__check { background: var(--pink-deep); border-color: var(--pink-deep); }
.option__check::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.option.is-selected .option__check::after { transform: scale(1); }
.option--multi .option__check { border-radius: 6px; }
.option--multi .option__check::after { border-radius: 2px; }
.option__label { font-weight: 500; }
.option__price {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pink-deep);
  white-space: nowrap;
}

/* ---------- Поля ввода ---------- */
.field {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field::placeholder { color: #c7adb5; font-weight: 400; }
.field:focus { outline: none; border-color: var(--pink-deep); background: #fff; box-shadow: var(--shadow-sm); }
textarea.field { resize: vertical; min-height: 120px; line-height: 1.55; }

/* ---------- Навигация ---------- */
.nav {
  position: fixed;
  z-index: 20;
  bottom: 0; left: 0; right: 0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 22px calc(22px + env(safe-area-inset-bottom));
}

.btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.25s, background 0.25s, color 0.25s, opacity 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--pink-deep);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(207, 106, 135, 0.4);
  flex: 1;
}
.btn--primary:hover { background: #c45c7b; box-shadow: 0 16px 34px rgba(207, 106, 135, 0.5); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--pink-deep);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--pink); }
.btn--ghost.is-hidden { display: none; }

.btn--skip {
  background: transparent;
  color: var(--ink-soft);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line);
  padding: 10px;
  margin-top: 18px;
  align-self: center;
  font-size: 14.5px;
}
.btn--skip:hover { color: var(--pink-deep); }

/* ---------- Лендинг ---------- */
.intro { text-align: center; align-items: center; }
.intro .card { padding: 56px 40px; }
.intro__badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 20px;
}
.intro__title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.intro__name { color: var(--pink-deep); font-weight: 700; }
.intro__text {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 20px auto 36px;
  max-width: 400px;
}
.intro .btn--primary { flex: none; padding: 16px 46px; font-size: 16.5px; }

/* ---------- Финал ---------- */
.final { text-align: center; align-items: center; }
.final .card { padding: 56px 40px; }
.final__title {
  font-size: 29px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.final__text {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}
.final__text strong { color: var(--ink); font-weight: 600; }

.sending__spinner {
  width: 46px; height: 46px;
  border: 3px solid var(--pink-soft);
  border-top-color: var(--pink-deep);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error__text { color: var(--pink-deep); font-weight: 500; margin-top: 10px; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 600px) {
  .bg__image { background-image: url("assets/salon-bg-mobile.jpg"); }
  body { letter-spacing: 0.005em; }
  .stage { padding: 34px 15px 150px; align-items: flex-start; }
  .card { padding: 30px 22px; border-radius: 24px; }
  .intro .card, .final .card { padding: 40px 24px; }

  .q-step { margin-bottom: 14px; font-size: 11px; }
  .q-title { font-size: 23px; }
  .q-sub { font-size: 15px; margin-bottom: 22px; }

  .option { font-size: 16px; padding: 14px 17px; }
  .option__price { font-size: 13px; }
  .field { font-size: 16px; }

  .intro__title { font-size: 34px; }
  .intro__text { font-size: 16px; margin: 16px auto 30px; }
  .final__title { font-size: 25px; }
  .final__text { font-size: 16.5px; }

  .nav {
    gap: 10px;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    backdrop-filter: blur(16px) saturate(1.1);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 -10px 30px rgba(176, 94, 118, 0.12);
  }
  .btn { padding: 17px 24px; font-size: 16px; border-radius: 16px; }
  .btn--primary { flex: 1; }
  .btn--ghost { flex: 0 0 auto; min-width: 96px; }
}

@media (max-width: 380px) {
  .intro__title { font-size: 30px; }
  .q-title { font-size: 21px; }
}

/* Доступность: уменьшение движения */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; }
  .progress__bar { transition: none; }
}
