/* demo-kitup: визуальная копия q.kitup.net/ru/quiz —
   Poppins, кремовый фон, узкая колонка, белые карточки-опции,
   прогресс из 4 вех, фиксированная синяя CTA снизу */
:root {
  --bg: #fdf6f1;
  --ink: #2a2a2e;
  --muted: #8b8790;
  --brand: #f0537a;   /* розовый акцент kitUP */
  --cta: #0d6ef9;     /* синяя кнопка */
  --card: #ffffff;
  --card-border: #efe7e1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- шапка: логотип + прогресс-вехи + Back ---- */
.top { position: relative; padding: 18px 20px 6px; }

.back {
  position: absolute;
  left: 14px; top: 14px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s, border-color 0.2s;
}
.back:hover { color: var(--ink); border-color: #c9d7f4; }

.logo {
  text-align: center;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
}
.logo span { color: var(--brand); }

.progress { max-width: 300px; margin: 14px auto 0; }
.progress__track {
  position: relative;
  height: 3px;
  background: #e5e9f2;
  border-radius: 2px;
}
.progress__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0; background: var(--cta); border-radius: 2px;
  transition: width 0.4s ease;
}
.progress__dot {
  position: absolute; top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff; border: 2px solid #dfe4ee;
  transition: border-color 0.3s, background 0.3s;
}
.progress__dot[data-mile="0"] { left: 2%; }
.progress__dot[data-mile="1"] { left: 34%; }
.progress__dot[data-mile="2"] { left: 66%; }
.progress__dot[data-mile="3"] { left: 98%; }
.progress__dot--done { border-color: var(--cta); background: var(--cta); }
.progress__label {
  margin-top: 10px;
  text-align: center;
  color: var(--cta);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---- сцена: один экран за раз ---- */
.stage {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 140px;
  position: relative;
}

.screen {
  display: none;
  animation: rise 0.35s ease;
}
.screen--active { display: block; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.screen__title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}
.screen__title .brand, .screen__title b { color: var(--brand); }
.screen__title b { font-weight: 700; }

.screen__quote {
  margin: 18px auto 0;
  max-width: 400px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.screen__hint {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---- социальное доказательство (вместо пресс-логотипов kitUP) ---- */
.proof {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.proof__item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
}
.proof__item b { display: block; font-size: 22px; font-weight: 700; }
.proof__item small { color: var(--muted); font-size: 12px; }

/* ---- карточки-опции ---- */
.options {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.option:hover { border-color: #c9d7f4; transform: translateY(-1px); }
.option--selected { border-color: var(--cta); background: #eef4ff; }
.option__emoji { font-size: 24px; line-height: 1; min-width: 30px; text-align: center; }

/* 12 стран: компактная сетка 2×6, чтобы экран влезал в 360×640 (инвариант 11) */
.options--countries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.options--countries .option { padding: 13px 12px; font-size: 15px; gap: 8px; }
.options--countries .option__emoji { font-size: 18px; min-width: 22px; }

/* регионы (до 9 пунктов) — ужатые строки */
.options--regions { gap: 8px; }
.options--regions .option { padding: 12px 14px; font-size: 14px; line-height: 1.3; gap: 10px; }
.options--regions .option__emoji { font-size: 16px; min-width: 20px; }

/* ---- даты и контакт ---- */
.dates-box, .contact-box {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dates-box input, .contact-box input {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  width: 100%;
}
.dates-box input:focus, .contact-box input:focus {
  outline: none;
  border-color: var(--cta);
}

.fine {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---- интерлюдия «строим подборку» ---- */
.plan-bar {
  margin: 30px auto 0;
  max-width: 320px;
  height: 8px;
  background: #ece5df;
  border-radius: 4px;
  overflow: hidden;
}
.plan-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cta), var(--brand));
  border-radius: 4px;
  transition: width 0.3s linear;
}

.error {
  position: fixed;
  left: 50%; bottom: 120px;
  transform: translateX(-50%);
  background: #fff;
  color: #d23c5a;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 20;
  max-width: 92vw;
  width: max-content;
  text-align: center;
}

/* ---- фиксированный низ: CTA ---- */
.bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px 12px;
  background: linear-gradient(180deg, rgba(253, 246, 241, 0), var(--bg) 40%);
}
.cta {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-transform: lowercase;
  color: #fff;
  background: var(--cta);
  border: 0;
  border-radius: 14px;
  padding: 17px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(13, 110, 249, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.cta:hover { transform: translateY(-1px); }
.cta:disabled { opacity: 0.55; box-shadow: none; cursor: default; }

.bottom__links {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: #b9b3ad;
}
.bottom__links a { color: inherit; text-decoration: none; }
.bottom__links a:hover { color: var(--muted); }

/* календарь ядра — в тон дизайна */
.sr-cal__field { background: var(--card); border: 2px solid var(--card-border); border-radius: 12px; padding: 16px 18px; font-size: 16px; }
.sr-cal__field:hover { border-color: var(--cta); }

@media (min-width: 700px) {
  .screen__title { font-size: 28px; }
}

/* ---- мобильный компакт: каждый экран влезает в 360×640 без прокрутки ---- */
@media (max-width: 480px) {
  .top { padding: 10px 16px 4px; }
  .logo { font-size: 17px; }
  .back { left: 10px; top: 8px; width: 32px; height: 32px; font-size: 16px; }
  .progress { max-width: 240px; margin-top: 8px; }
  .progress__label { margin-top: 7px; font-size: 10px; letter-spacing: 1.5px; }

  .stage { padding: 14px 16px 100px; }
  .screen__title { font-size: 18px; line-height: 1.3; }
  .screen__quote { margin-top: 10px; font-size: 13px; }
  .screen__hint { margin-top: 6px; font-size: 12px; }

  .proof { margin-top: 18px; gap: 10px; }
  .proof__item { padding: 12px 10px; }
  .proof__item b { font-size: 18px; }

  .options { margin-top: 14px; gap: 8px; }
  .option { padding: 11px 14px; font-size: 14px; gap: 10px; }
  .option__emoji { font-size: 18px; min-width: 22px; }

  .options--countries { gap: 8px; }
  .options--countries .option { padding: 10px 8px; font-size: 13px; gap: 6px; }
  .options--countries .option__emoji { font-size: 16px; min-width: 18px; }

  .options--regions { gap: 7px; }
  .options--regions .option { padding: 8px 12px; font-size: 13px; }
  .options--regions .option__emoji { font-size: 14px; min-width: 16px; }

  .dates-box, .contact-box { margin-top: 14px; gap: 10px; }
  /* 16px на инпутах — чтобы iOS не зумил при фокусе */
  .dates-box input, .contact-box input { padding: 12px 14px; font-size: 16px; }
  .sr-cal__field { padding: 12px 14px; }
  .fine { margin-top: 10px; font-size: 11px; }
  .plan-bar { margin-top: 20px; }

  .bottom { padding: 10px 16px 8px; }
  .cta { padding: 13px; font-size: 15px; }
  .bottom__links { margin-top: 6px; font-size: 10px; }
  .error { bottom: 96px; }
}
