/* Квиз ITALICA Elastic — светлая тема в фирстиле бренда.
   Палитра и типографика сняты со style.css боевого italicapaint.ru 21.08.2026,
   чтобы страница читалась продолжением сайта, а не отдельной посадочной.
   Ширины: до 900px одна колонка, дальше две. */

@font-face {
  font-family: "Jost";
  src: url("fonts/Jost-Regular.ttf") format("truetype");
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/Jost-SemiBold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --bg: #F5F3F0;
  --panel: #FFFFFF;
  --panel-2: #FBFAF8;
  --dark: #1C1A18;
  --line: #E4E0DB;
  --text: #1C1A18;
  --muted: #7A7470;
  --gold: #A8673A;
  --gold-light: #C4895A;
  --gold-pale: #EDE3D8;
  --ok: #4E7C5A;
  --r: 16px;
  --pill: 50px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 901px) {
  .wrap {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: start;
    padding: 28px 24px 48px;
    gap: 22px;
  }
}

/* ─────────── панели ─────────── */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 901px) {
  .panel { padding: 32px; }
  .panel--main { min-height: 640px; display: flex; flex-direction: column; }
}

/* ─────────── шапка с логотипом ─────────── */

.top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.top__logo { height: 34px; width: auto; flex: 0 0 auto; }

.top a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.top .dot { color: var(--gold); flex: 0 0 auto; }
.top span { min-width: 0; }

/* ─────────── типографика ─────────── */

h1 {
  font-size: clamp(25px, 3.9vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 14px;
}

h1 u { text-decoration-color: var(--gold-light); text-underline-offset: 5px; }
.sand { color: var(--dark); }
.gold { color: var(--gold); }

.lead { color: var(--muted); margin: 0 0 20px; font-size: 17px; }
.lead b { color: var(--text); font-weight: 600; }

.step-no {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--pill);
  margin-bottom: 14px;
}

.q { font-weight: 600; font-size: 19px; margin: 22px 0 12px; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ─────────── визуал шага ─────────── */

.shot-step {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.shot-step img {
  width: 100%;
  height: clamp(150px, 26vw, 230px);
  object-fit: cover;
}

.shot-step figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(180deg, rgba(28,26,24,0) 0%, rgba(28,26,24,.82) 70%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

/* плитки-факты вместо сплошного текста */
.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }

.facts li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
}

.facts .mk { color: var(--gold); flex: 0 0 auto; font-weight: 700; }

/* ─────────── варианты ответа ─────────── */

.opts { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .opts { grid-template-columns: 1fr 1fr; } }
.opts--wide { grid-template-columns: 1fr; }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.opt:hover { border-color: var(--gold-light); transform: translateY(-1px); }

.opt .box {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: 0 0 auto;
  position: relative;
  transition: border-color .18s;
}

.opt[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-pale); }
.opt[aria-pressed="true"] .box { border-color: var(--gold); }
.opt[aria-pressed="true"] .box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

/* ─────────── кнопки ─────────── */

.cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: 0;
  border-radius: var(--pill);
  padding: 16px 26px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

.cta:hover:not(:disabled) { background: #96593090; background: #965930; transform: translateY(-1px); }
.cta:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.cta .arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.22);
}

/* ─────────── цены ─────────── */

.price-rows { display: grid; gap: 10px; }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.price-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.price-row .val { font-weight: 600; white-space: nowrap; color: var(--text); }
.price-row--accent { border-color: var(--gold-light); background: var(--gold-pale); }
.price-row--accent .val { color: var(--gold); font-size: 19px; }

/* ─────────── каталог оттенков ─────────── */

.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; }

.sw {
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(28,26,24,.12);
  flex: 0 0 auto;
}

/* ─────────── подарки ─────────── */

.gifts { display: grid; gap: 10px; margin: 4px 0 0; }

.gift {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 13px 15px;
}

.gift b { display: block; font-weight: 600; margin-bottom: 2px; }
.gift small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.gift .ic { color: var(--gold); flex: 0 0 auto; margin-top: 2px; }

/* ─────────── каналы связи ─────────── */

.channels { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
@media (min-width: 560px) { .channels { grid-template-columns: repeat(3, 1fr); } }

.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  cursor: pointer;
  transition: border-color .18s, transform .18s;
  font-size: 15px;
  font-weight: 500;
}

.channel:hover { border-color: var(--gold-light); transform: translateY(-1px); }
.channel[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
  background: var(--gold-pale);
}
.channel[aria-pressed="true"]::after {
  content: '';
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/10px no-repeat;
}
.channel { position: relative; }
.channel .ic {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.channel--tg .ic { background: #2AABEE; }
.channel--wa .ic { background: #25D366; }
.channel--call .ic { background: var(--gold); }

/* ─────────── поля ─────────── */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

.field input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
  transition: border-color .18s;
}

.field input:focus { outline: none; border-color: var(--gold); }
.field input.err { border-color: #C0392B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─────────── прогресс ─────────── */

.bar { height: 4px; background: var(--line); border-radius: 4px; margin-bottom: 18px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); transition: width .35s; }

/* ─────────── правая колонка ─────────── */

.panel--side { background: var(--dark); color: #F5F3F0; border-color: transparent; }
.side-title { font-size: 19px; font-weight: 600; margin: 0 0 14px; color: #fff; }

.chips { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }

.chips li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
}

.chips .tick { color: var(--gold-light); flex: 0 0 auto; margin-top: 2px; }

.shot { border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.shot img { width: 100%; height: 210px; object-fit: cover; }

.rating { display: flex; align-items: center; gap: 14px; }
.rating .num { font-size: 44px; font-weight: 600; color: var(--gold-light); line-height: 1; }
.rating .cap { font-size: 14px; color: rgba(245,243,240,.72); line-height: 1.35; }

/* ─────────── финал ─────────── */

.center { text-align: center; }
.center .lead { max-width: 520px; }

.done-ic {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(78,124,90,.12);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 28px;
  color: var(--muted);
  font-size: 14px;
}

footer a { color: var(--gold); }
.spacer { flex: 1; }

/* Мобильная сборка: боковая панель — это «продающий» блок, на узком экране он
   уезжает под квиз и растягивает каждый шаг почти вдвое. Показываем её только
   на первом экране и на финале (телу ставится класс из quiz.js). */
@media (max-width: 900px) {
  body.mid .panel--side { display: none; }
  .wrap { padding-bottom: 24px; }
}

/* Тап-таргет телефона в шапке: на телефоне это кнопка звонка, 22px мало. */
.top a { display: inline-flex; align-items: center; min-height: 44px; }

/* Телефон: три канала в один ряд — иначе третья плитка висит сиротой. */
@media (max-width: 559px) {
  .channels { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .channel { padding: 12px 4px; font-size: 13px; gap: 6px; }
  .channel .ic { width: 34px; height: 34px; border-radius: 9px; }
  .channel .ic svg { width: 18px; height: 18px; }
  .channel[aria-pressed="true"]::after { top: 5px; right: 5px; width: 14px; height: 14px; }
  .footer a, .foot a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Подарки на телефоне: заголовок и пояснение в столбик, иначе оба текста
   жмутся в узкие колонки и рвутся по слогам. */
@media (max-width: 559px) {
  .gift { flex-direction: column; gap: 4px; }
  .gift b { font-size: 16px; }
  .gift small { font-size: 14px; }
}

/* Цена на первом экране — человек кликнул «узнать цены», цифра должна быть сразу */
.price {
  margin: 18px 0 14px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.price__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 5px 0; font-size: 16px;
}
.price__row span { color: var(--text-muted); }
.price__row b { font-size: 19px; white-space: nowrap; }
.price__ex {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border);
  font-size: 14px; line-height: 1.45; color: var(--text-muted);
}
.price__ex b { color: var(--text); }
.cta-note {
  margin: 9px 0 4px; text-align: center;
  font-size: 13px; color: var(--text-muted);
}

/* Первый экран на телефоне: кнопка обязана быть видна вместе с ценой.
   Замер 23.08: до правки кнопка уходила на 827 px при экране 844. */
@media (max-width: 560px) {
  .top__addr { display: none; }              /* адрес есть в подвале */
  #step > .shot-step:first-child { margin: 0 0 12px; }
  #step > .shot-step:first-child img { height: 128px; object-fit: cover; }
  #step > .shot-step:first-child figcaption { font-size: 12px; padding: 6px 10px; }
  h1 { font-size: 25px; line-height: 1.22; }
  .lead { font-size: 15px; margin: 10px 0 0; }
  .price { margin: 12px 0 10px; padding: 12px 14px; }
  .price__row { font-size: 15px; padding: 4px 0; }
  .price__row b { font-size: 18px; }
}

/* Ссылки в подвале: тач-таргет 44 px (правило Apple HIG / WCAG 2.5.8).
   Замер 23.08: «на главную» была 69×20. */
footer a, .top a { display: inline-flex; align-items: center; min-height: 44px; }
