/* ============================================================
   Экран голосования
   ============================================================ */

.vote {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(14px, 3vw, 28px) 60px;
}

/* --- Шапка --- */

.vote__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.vote__logo {
  width: 62px;
  flex: none;
  animation: logo-hover 3.4s ease-in-out infinite alternate;
}

@keyframes logo-hover {
  from { transform: translateY(-5px) rotate(-5deg); }
  to   { transform: translateY(5px) rotate(5deg); }
}

.vote__kicker {
  margin: 0 0 8px;
  color: var(--acid-green);
}

.vote__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  /* Жёсткая двухслойная тень — приём из фирменной графики. */
  text-shadow:
    4px 4px 0 var(--purple-space),
    8px 8px 0 var(--black);
}

.vote__peek {
  margin-left: auto;
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid var(--acid-green);
  padding-bottom: 3px;
  transition: color var(--t-fast) linear;
}

.vote__peek:hover { color: var(--acid-green); }

/* В пиксельном шрифте нет стрелки — набираем её основным. */
.vote__peek-arrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  transition: transform var(--t-fast) var(--ease-out);
}

.vote__peek:hover .vote__peek-arrow { transform: translateX(4px); }

/* --- Две колонки вопросов --- */

.vote__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(18px, 3vw, 30px);
}

/* Разделитель между колонками — пунктир в духе макета. */
.vote__columns > .col + .col {
  border-left: 3px dashed var(--dusty-grey);
  padding-left: clamp(18px, 3vw, 34px);
}

.col__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.col__num {
  padding: 6px 8px;
  color: var(--white);
  background: var(--purple-space);
  border: 2px solid var(--black);
  border-radius: 6px;
}

.col__head--und .col__num { background: var(--pure-green); color: var(--black); }

.col__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--black);
}

.col__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--boring-grey);
}

/* --- Сетка карточек --- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 8px 12px;
  font: inherit;
  text-align: center;
  color: var(--black);
  background: var(--fafafa);
  border: 3px solid var(--black);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--black);
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    background-color var(--t-med) linear,
    border-color var(--t-fast) linear;
}

.card__icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform var(--t-med) var(--ease-pop);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  hyphens: auto;
}

/* Галочка выбранного состояния — появляется в углу. */
.card__check {
  position: absolute;
  top: -10px;
  right: -10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  background: var(--acid-green);
  border: 3px solid var(--black);
  border-radius: 50%;
  transform: scale(0);
  transition: transform var(--t-med) var(--ease-pop);
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black);
  background: var(--moon-light);
}

.card:hover .card__icon { transform: translateY(-4px) scale(1.08); }

.card:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--black);
}

/* Выбранная карточка заливается цветом курса и «проваливается». */
.card.is-selected {
  background: var(--c);
  border-color: var(--black);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--black);
}

.card.is-selected .card__check { transform: scale(1); }

.card.is-selected .card__icon {
  transform: scale(1.14);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}

/* Тёмные заливки требуют светлого текста. */
.card.is-selected[data-dark="1"] { color: var(--white); }

/* Короткая тряска, когда один и тот же курс выбран в обеих колонках. */
.card.is-twin { animation: twin-shake 420ms var(--ease-out); }

@keyframes twin-shake {
  0%, 100% { transform: translate(2px, 2px) rotate(0); }
  25%      { transform: translate(2px, 2px) rotate(-3deg); }
  75%      { transform: translate(2px, 2px) rotate(3deg); }
}

/* «Другое» — во всю ширину сетки и горизонтальной раскладкой:
   так карточка читается как отдельный ход, а не как 13-й курс. */
.card--other {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-style: dashed;
}

.card--other .card__icon { width: 30px; height: 30px; }
.card--other .card__title { font-size: 13px; }
.card--other.is-selected { border-style: solid; }

/* --- Поле «Другое» --- */

.other-field {
  position: relative;
  margin-top: 12px;
  animation: field-in var(--t-med) var(--ease-pop);
}

@keyframes field-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.other-field__input {
  width: 100%;
  padding: 13px 66px 13px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--black);
}

.other-field__input::placeholder {
  color: var(--boring-grey);
  font-weight: 500;
}

.other-field__count {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--boring-grey);
  pointer-events: none;
}

/* --- Подвал формы --- */

.vote__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px clamp(18px, 3vw, 30px);
  background: var(--moon-light);
  border-top: 3px solid var(--black);
  border-radius: 0 0 calc(var(--radius) - var(--bd)) calc(var(--radius) - var(--bd));
}

.vote__status {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  color: var(--boring-grey);
}

.vote__status.is-ready { color: var(--purple-space); }
.vote__status.is-error { color: var(--red-magma); }

/* --- Слои эффектов --- */

/* Канвас с частицами: поверх всего, кликов не перехватывает. */
.fx {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

/* Пиксельная «шторка» перехода на арену. */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  pointer-events: none;
  visibility: hidden;
}

.wipe.is-on { visibility: visible; }

.wipe__cell {
  background: var(--deep-purple);
  transform: scale(0);
  will-change: transform;
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 900px) {
  .vote__columns {
    grid-template-columns: 1fr;
  }

  .vote__columns > .col + .col {
    border-left: 0;
    border-top: 3px dashed var(--dusty-grey);
    padding-left: 0;
    padding-top: 24px;
  }
}

@media (max-width: 560px) {
  .vote__head { flex-wrap: wrap; }
  .vote__logo { width: 46px; }
  .vote__peek { margin-left: 0; order: 3; }

  .grid { grid-template-columns: repeat(2, 1fr); }

  .card__icon { width: 36px; height: 36px; }

  /* Кнопка всегда под рукой — липнет к низу экрана. */
  .vote__footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
    box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.25);
  }
}
