/* Палитра бренда VEAN: белый, красный, чёрный.
   Значения сверены с боевым main.min.css сайта (13.08.2026):
   #fff — 67 упоминаний, #ce0b0b — 33, #9e0808 — тёмно-красный для наведения. */
:root {
  --red:      #ce0b0b;
  --red-dk:   #9e0808;
  --red-tint: rgba(206, 11, 11, 0.06);
  --red-line: rgba(206, 11, 11, 0.28);

  --bg:       #ffffff;
  --paper:    #fafaf9;   /* карточки вариантов — чуть теплее фона */
  --paper-h:  #f3f2f1;   /* наведение */
  --border:   #e6e4e2;
  --muted:    #b8b4b0;
  --text:     #0f0f0f;
  --dim:      #6f6b67;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  position: relative;
  overflow-x: hidden;
}

/* Атмосфера вместо плоской заливки: еле различимый красный отсвет сверху
   справа. На белом фоне яркое пятно выглядело бы дёшево, поэтому альфа
   низкая — это подложка, а не украшение. */
body::before {
  content: '';
  position: fixed;
  top: -25%;
  right: -12%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(206,11,11,0.055) 0%, rgba(206,11,11,0.02) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -12%;
  left: -6%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(15,15,15,0.035) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 72px;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  /* Обязательно вместе с opacity: прозрачность создаёт свой контекст
     наложения, из-за чего z-index выпадающего списка языков действовал только
     ВНУТРИ шапки, а сама шапка рисовалась под содержимым формы (она идёт
     раньше в разметке). В результате пункты cs, de, en, lv перекрывались
     заголовком h1 и клик по ним не срабатывал. */
  position: relative;
  z-index: 5;
}

/* В самом SVG заливка белая — на белом фоне логотип был бы невидим.
   brightness(0) кладёт его в чистый чёрный, как на основном сайте. */
.logo img {
  height: 28px;
  width: auto;
  filter: brightness(0);
}

.season-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red-line);
  padding: 6px 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Переключатель языка. Язык подставляется автоматически по стране лида,
   это лишь возможность исправить — поэтому приглушённый, не спорит с бейджем.
   В закрытом виде только код языка (UK, PL): 11 названий целиком не влезали
   в шапку на узком экране. */
.lang { position: relative; }

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 22px 6px 10px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  /* стрелка вшита data-URI, чтобы не тянуть внешний файл */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%236f6b67' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--text);
  border-color: var(--muted);
  outline: none;
}

/* right: 0 — список растёт ВЛЕВО от кнопки, поэтому за правый край страницы
   выйти не может, как выходил нативный попап. */
.lang-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 10;
  min-width: 150px;
  /* Все языки должны быть видны без прокрутки: их всего 11, а скрытый на macOS
     скроллбар не давал понять, что под краем есть ещё пункты — было видно 7 из
     11, остальные выбрать было нельзя. Ограничение остаётся только на случай
     низкого окна. */
  max-height: min(78vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  background-color: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15,15,15,0.12);
}

/* Полосу прокрутки показываем всегда: системная на macOS скрыта до момента
   скролла, и о существовании нижних пунктов узнать было неоткуда. */
.lang-list { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.lang-list::-webkit-scrollbar { width: 6px; }
.lang-list::-webkit-scrollbar-track { background: transparent; }
.lang-list::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }
.lang-list::-webkit-scrollbar-thumb:hover { background: var(--dim); }

.lang-list li {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--dim);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-list li:hover { color: var(--text); background-color: var(--paper-h); }
.lang-list li[aria-selected="true"] { color: var(--red); }

.hero { margin-bottom: 64px; }

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 8vw, 62px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.2s forwards;
}

/* Класс приходит из i18n.json, одинаково во всех 11 переводах. */
h1 .accent { color: var(--red); font-style: italic; }

.subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.8;
  max-width: 380px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.3s forwards;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--red) 0%, transparent 60%);
  margin: 48px 0;
  opacity: 0.4;
  animation: fadeIn 0.8s ease 0.35s forwards;
}

.question {
  margin-bottom: 52px;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}
.question:nth-of-type(1) { animation-delay: 0.4s; }
.question:nth-of-type(2) { animation-delay: 0.52s; }
.question:nth-of-type(3) { animation-delay: 0.64s; }

.q-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

.q-num {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: var(--red);
  opacity: 0.8;
  font-style: italic;
}

.q-label {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.options.col-3 { grid-template-columns: 1fr 1fr 1fr; }

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.option:hover { border-color: var(--muted); background: var(--paper-h); }
.option.selected { border-color: var(--red); background: var(--red-tint); }
.option input[type="radio"] { display: none; }

.dot {
  width: 14px;
  height: 14px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}

.dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.option.selected .dot { border-color: var(--red); }
.option.selected .dot::after { opacity: 1; transform: scale(1); }

.option span {
  font-size: 13px;
  font-weight: 300;
  color: var(--dim);
  transition: color 0.2s;
  line-height: 1.3;
}
.option.selected span,
.option:hover span { color: var(--text); }

.submit-wrap {
  padding-top: 8px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.76s forwards;
}

button[type="submit"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 36px;
  background: var(--red);
  color: #ffffff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, gap 0.2s;
  overflow: hidden;
}

button[type="submit"]:hover { background: var(--red-dk); gap: 20px; }
button[type="submit"]:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
button[type="submit"]:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; gap: 14px; }

.arrow { font-size: 18px; }

.error-msg {
  display: none;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--red);
  margin-top: 14px;
  text-transform: uppercase;
}
.error-msg.visible { display: block; }

.success-inner { padding: 16px 0; }
.success-ornament {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  color: var(--red);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 24px;
  font-style: italic;
}
.success h2 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}
.success h2 em { color: var(--red); font-style: italic; }
.success p {
  font-size: 14px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.7;
}

.state-msg {
  text-align: center;
  font-size: 14px;
  color: var(--dim);
  padding: 60px 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .options { grid-template-columns: 1fr; }
  .options.col-3 { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .header { margin-bottom: 48px; }

  /* Пальцем в 43 и 27 пикселей попадать неудобно — доводим до 44,
     общепринятого минимума для касания. Замерено на вьюпорте 360px. */
  .option   { min-height: 46px; }
  .lang-btn { padding-top: 10px; padding-bottom: 10px; }
  .lang-list li { padding-top: 12px; padding-bottom: 12px; }
}
