/* brain-test.css — усе оформлення експрес-тесту на стан мозку: банер-запрошення
   (.bt-invite) і модалка з питаннями та результатом (.bt-modal / .bt-sheet).
   Файл самодостатній і не залежить від home.css — підключайте його на будь-якій
   сторінці, де стоїть тест (HOME, PEAK, PROTECT, RESTORE), разом із
   brain-test.i18n.js + brain-test.js.

   Кольори треків дублюються тут навмисно, щоб тест не ламався, якщо сторінка
   не тягне home.css. Перефарбування під конкретну програму живе у peak.css /
   protect.css / restore.css (ховер кнопки), а колір результату ставить
   brain-test.js через --band. */
:root {
  --bt-peak: #3b9500; --bt-protect: #ffbf00; --bt-restore: #cc3a2f;
  --bt-protect-text: #b9820a; /* legible amber for PROTECT label text on cream */
}

/* ---- Invite band — full-width strip directly under the hero ---- */
.bt-invite {
  background: linear-gradient(180deg, var(--cream-100), var(--bg-card));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(40px, 6vw, 80px);
}
.bt-invite__inner { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 34px); }
.bt-invite__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.bt-invite__head .hv-h2 { margin: 10px 0 0; }
.bt-invite__lead {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.6; color: var(--ink-500);
  max-width: 62ch; margin: 0;
}
/* continuum spanning the full width, coloured with the PEAK · PROTECT · RESTORE hues */
.bt-invite__viz { display: flex; flex-direction: column; gap: 13px; }
.bt-mini { position: relative; height: 9px; }
.bt-mini__bar {
  position: absolute; inset: 0; border-radius: 5px;
  background: linear-gradient(90deg, var(--bt-peak), var(--bt-protect) 50%, var(--bt-restore));
}
.bt-mini__dot {
  position: absolute; top: 50%; left: 50%;
  width: 17px; height: 17px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--cream-50);
  border: 3px solid var(--gold-700);
}
.bt-mini__labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(11px, 1vw, 13px); letter-spacing: 0.16em;
}
.bt-mini__labels span:nth-child(1) { color: var(--bt-peak); }
.bt-mini__labels span:nth-child(2) { color: var(--bt-protect-text); }
.bt-mini__labels span:nth-child(3) { color: var(--bt-restore); }
@media (max-width: 640px) {
  .bt-invite__head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .bt-invite__head .hv-btn { width: 100%; text-align: center; justify-content: center; }
}

/* ---- Modal ---- */
body.bt-lock { overflow: hidden; }
.bt-modal {
  position: fixed; inset: 0; z-index: 120;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.bt-modal.is-open { display: flex; animation: btFade 0.28s ease; }
@keyframes btFade { from { opacity: 0; } to { opacity: 1; } }
.bt-sheet {
  position: relative;
  background: var(--cream-50);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  padding: clamp(26px, 4vw, 40px);
  box-shadow: 0 30px 90px -28px rgba(43, 33, 23, 0.55);
  animation: btRise 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes btRise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.bt-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  color: var(--ink-500);
  background: transparent; border: 1px solid var(--line-soft);
  border-radius: 50%; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.bt-close:hover { color: var(--gold-700); border-color: var(--gold-500); }
.bt-tag {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 14px; padding-right: 40px;
}
.bt-intro {
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.55;
  color: var(--ink-500); margin-bottom: 20px;
}
.bt-prog {
  height: 4px; border-radius: 2px; background: var(--sand-200);
  overflow: hidden; margin-bottom: 22px;
}
.bt-prog span {
  display: block; height: 100%;
  background: var(--gold-500);
  transition: width 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.bt-qn {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-300); margin-bottom: 9px;
}
.bt-q {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(20px, 2.4vw, 25px); line-height: 1.25;
  color: var(--ink-900); margin-bottom: 20px;
}
.bt-opts { display: flex; flex-direction: column; gap: 10px; }
.bt-opt {
  text-align: left;
  font-family: var(--font-sans); font-size: 15px;
  color: var(--ink-900);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 18px; cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.bt-opt:hover {
  background: var(--cream-100);
  border-color: var(--gold-500);
  transform: translateX(3px);
}

/* ---- Result ---- */
.bt-gauge { position: relative; margin: 6px 0 22px; padding-bottom: 22px; }
.bt-gauge__bar {
  height: 8px; border-radius: 5px;
  background: linear-gradient(90deg, var(--bt-peak), var(--bt-protect) 50%, var(--bt-restore));
}
.bt-gauge__dot {
  position: absolute; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--cream-50);
  border: 3px solid var(--gold-700);
  box-shadow: 0 2px 10px rgba(43, 33, 23, 0.25);
  transition: left 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.bt-gauge__ends {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between;
  font-family: var(--font-sans); font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--ink-300);
}
.bt-band {
  display: inline-block;
  font-family: var(--font-sans); font-weight: 600;
  font-size: 12px; letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.bt-rtitle {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(23px, 2.8vw, 30px); line-height: 1.15;
  color: var(--ink-900); margin-bottom: 12px;
}
.bt-rdesc {
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6;
  color: var(--ink-500); margin-bottom: 24px;
}
.bt-actions { display: flex; flex-direction: column; gap: 10px; }
.bt-actions .hv-btn { width: 100%; text-align: center; justify-content: center; }
.bt-disc {
  font-family: var(--font-sans); font-size: 11.5px; line-height: 1.5;
  color: var(--ink-300); margin-top: 18px;
}

/* Кнопка на екрані результату поводиться як усі кнопки сайту: фірмове золото
   у спокої → на ховері колір смуги, яку набрав відвідувач. --band ставить
   brain-test.js. Селектор навмисно довший за правило треку в
   peak/protect/restore.css, щоб результат перемагав колір сторінки. */
.bt-sheet .hv-btn--primary.bt-cta--band:hover {
  background: var(--band, var(--gold-700));
  border-color: var(--band, var(--gold-700));
  color: var(--cream-50);
}
