:root {
  --graphite: #1B1A18;
  --moss:     #2E3B30;
  --copper:   #B07A47;
  --bg:       #F3EFE6;   /* ivory */
  --bg-soft:  #F6F3EE;   /* light */
  --surface:  #E4DDCE;   /* porcelain */
  --header-h: 136px;

  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-base: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--graphite);
  background: var(--bg);
  padding-top: var(--header-h);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--graphite); }

/* Шапка и футер — в общем файле nav.css */

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}
.btn:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn--primary { background: var(--copper); color: #fff; border: 1px solid var(--copper); }
.btn--primary:not([disabled]):hover { background: #9c6a3b; border-color: #9c6a3b; }
.btn--secondary { background: transparent; color: var(--moss); border: 1px solid var(--copper); font-weight: 500; }
.btn--secondary:not([disabled]):hover { background: rgba(176,122,71,0.10); }

/* ================= БЛОК 1. HERO ================= */
.quiz-hero { background: var(--bg-soft); padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 80px); }
.quiz-hero__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.quiz-hero__title {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; font-weight: 600;
}
.quiz-hero__sub {
  margin: 0 0 28px; max-width: 540px;
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: rgba(27,26,24,0.82);
}
.quiz-hero__cta { padding: 0 34px; }
.quiz-hero__micro { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: rgba(27,26,24,0.6); }

.quiz-hero__visual {
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 1.5vw, 18px);
  background: linear-gradient(160deg, #FFFFFF 0%, var(--surface) 100%);
  border: 1px solid rgba(176,122,71,0.2);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 44px);
  min-height: 320px;
}
.quiz-hero__visual img { height: clamp(180px, 22vw, 280px); width: auto; object-fit: contain;
  filter: drop-shadow(0 18px 16px rgba(40,30,20,0.18)); }
.quiz-hero__visual img:nth-child(1) { height: clamp(150px, 18vw, 230px); }
.quiz-hero__visual img:nth-child(3) { height: clamp(168px, 21vw, 262px); }
.quiz-hero__visual img:nth-child(4) { height: clamp(158px, 19vw, 240px); }

/* ================= БЛОК 2. СИСТЕМА УХОДА ================= */
.quiz-system { background: var(--bg); padding: clamp(56px, 8vw, 96px) clamp(24px, 5vw, 80px); }
.quiz-system__inner { max-width: 1280px; margin: 0 auto; }
.quiz-system__head { max-width: 920px; margin-bottom: clamp(28px, 4vw, 44px); }
.quiz-system__title { margin: 0 0 14px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; font-weight: 600; }
.quiz-system__text { margin: 0; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; color: rgba(27,26,24,0.8); }
.qs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.qs__stage {
  background: #fff; border: 1px solid rgba(176,122,71,0.2); border-radius: 16px;
  padding: 26px 22px;
}
.qs__phase { font-family: var(--font-base); font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); }
.qs__product { margin: 8px 0 8px; font-size: 24px; font-weight: 600; }
.qs__role { margin: 0; font-family: var(--font-base); font-size: 14px; line-height: 1.5; color: rgba(27,26,24,0.72); }
.qs__base {
  margin: 24px 0 8px;
  background: rgba(228,221,206,0.55); border-top: 1px solid rgba(176,122,71,0.35);
  border-radius: 14px; padding: 18px 22px;
  font-family: var(--font-base); font-size: clamp(15px, 1.4vw, 17px); font-weight: 600; color: var(--moss);
}
.qs__base-note { margin: 0; max-width: 820px; font-size: 14px; line-height: 1.55; color: rgba(27,26,24,0.7); }

/* ================= БЛОК 3. КВИЗ ================= */
.quiz-section { background: var(--bg-soft); padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 40px) clamp(64px, 9vw, 110px); }
.quiz-card {
  max-width: 820px; margin: 0 auto;
  background: #fff; border: 1px solid rgba(176,122,71,0.18);
  border-radius: 30px; box-shadow: 0 24px 60px rgba(40,30,20,0.07);
  padding: clamp(24px, 4vw, 52px);
}
.quiz-progress { margin-bottom: 26px; }
.quiz-progress__label { display: block; margin-bottom: 10px; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--copper); font-weight: 600; font-family: var(--font-base); }
.quiz-progress__bar { height: 4px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.quiz-progress__fill { height: 100%; width: 14%; background: var(--copper); border-radius: 4px; transition: width .3s ease; }
.quiz-question { margin: 0 0 26px; font-size: clamp(23px, 3vw, 32px); line-height: 1.2; font-weight: 600; }

.quiz-answers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.quiz-option {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 16px 20px;
  background: #fff; border: 1px solid var(--surface); border-radius: 14px;
  font-family: var(--font-base); font-size: 15px; line-height: 1.4; text-align: left;
  color: var(--graphite); cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.quiz-option:hover { border-color: var(--copper); }
.quiz-option__mark { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(27,26,24,0.28); transition: all .18s ease; }
.quiz-option.is-selected { border-color: var(--copper); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--copper); }
.quiz-option.is-selected .quiz-option__mark { border-color: var(--copper);
  background: radial-gradient(circle, var(--copper) 0 6px, #fff 7px 100%); }
.quiz-option:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }

.quiz-hint { margin: 0 0 16px; font-family: var(--font-base); font-size: 14px; color: var(--copper); font-weight: 500; }
.quiz-nav { display: flex; justify-content: space-between; gap: 14px; }

/* ---------- Результат ---------- */
.quiz-result { max-width: 1080px; margin: 0 auto; outline: none; }
.result__eyebrow { margin: 0 0 8px; font-family: var(--font-base); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); font-weight: 600; }
.result__title { margin: 0 0 18px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; font-weight: 600; }
.result__desc { margin: 0 0 8px; max-width: 820px; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; color: rgba(27,26,24,0.84); }
.result__section { margin: 36px 0 16px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; }
.result__boosters-note { margin: 0; max-width: 820px; font-size: 15px; line-height: 1.6; color: rgba(27,26,24,0.78); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-grid--compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.product-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid rgba(176,122,71,0.2); border-radius: 16px; padding: 22px;
}
.product-card__media { height: 150px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 14px; }
.product-card__media img { max-height: 150px; width: auto; object-fit: contain;
  filter: drop-shadow(0 14px 14px rgba(40,30,20,0.16)); }
.product-card__stage { font-family: var(--font-base); font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); margin-bottom: 6px; }
.product-card__title { margin: 0 0 6px; font-family: var(--font-base); font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--graphite); }
.product-card__role { margin: 0 0 10px; font-family: var(--font-base); font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--moss); }
.product-card__text { margin: 0 0 16px; font-family: var(--font-base); font-size: 14px; line-height: 1.55; color: rgba(27,26,24,0.74); flex: 1 0 auto; }
.product-card__btn { margin-top: auto; align-self: flex-start; }

.result__system { margin-top: 8px; }
.result__system-text { margin: 0; max-width: 860px; font-size: 16px; line-height: 1.6; color: rgba(27,26,24,0.8); }
.result__note { margin: 28px 0 0; max-width: 820px; padding: 16px 20px;
  background: rgba(228,221,206,0.5); border-left: 2px solid var(--copper); border-radius: 8px;
  font-family: var(--font-base); font-size: 14px; line-height: 1.55; color: var(--moss); }
.result__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 36px 0 8px; }
.result__restart { margin-top: 10px; background: none; border: none; padding: 6px 0; cursor: pointer;
  font-family: var(--font-base); font-size: 14px; font-weight: 600; color: var(--copper); }
.result__restart:hover { text-decoration: underline; }
.result__disclaimer { margin: 22px 0 0; font-family: var(--font-base); font-size: 13px; line-height: 1.5; color: rgba(27,26,24,0.58); }

/* ================= АДАПТИВ ================= */
@media (max-width: 1000px) {
  :root { --header-h: 84px; }
  .quiz-hero__inner { grid-template-columns: 1fr; }
  .quiz-hero__visual { order: 2; min-height: 240px; }
  .qs__grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .qs__grid { grid-template-columns: 1fr; }
  .product-grid, .product-grid--compact { grid-template-columns: 1fr; }
  .quiz-card { border-radius: 22px; padding: 22px; }
  .quiz-nav .btn { flex: 1; }
  .result__cta .btn { flex: 1 1 100%; }
  .quiz-hero__visual img { height: 150px; }
}

/* Шапка сайта зафиксирована (position:fixed) и перекрывает верх блока при
   scrollIntoView() после прохождения квиза / рестарта — добавляем отступ,
   чтобы браузер сам учитывал высоту шапки при прокрутке к блоку. */
#result,
#quiz-card {
  scroll-margin-top: calc(var(--header-h) + 20px);
}
