/* ============================================================
   ISRC.BY · Форма бета-теста — кастомный CSS (без фреймворков)
   Mobile-first. Тёмная футуристичная музыкальная тема.
   ============================================================ */

:root {
  --bg:        #05060a;
  --panel:     rgba(15, 17, 26, 0.72);
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text:      #f4f6fb;
  --muted:     #8a8f9d;
  --accent:    #007aff;          /* синий верификации */
  --accent-2:  #5e7bff;
  --violet:    #8b5cf6;
  --cyan:      #33d6ff;
  --danger:    #ff3b30;
  --ok:        #30d158;
  --radius:    18px;
  --font-d:    "Unbounded", "Manrope", system-ui, sans-serif;
  --font-b:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out:  cubic-bezier(0.22, 0.9, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 122, 255, 0.35); color: #fff; }

button { font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------------- Атмосферный фон ---------------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; pointer-events: none;
}
.bg-orb--blue {
  width: 60vw; height: 60vw; max-width: 560px; max-height: 560px;
  top: -18%; right: -14%;
  background: radial-gradient(circle at 30% 30%, rgba(0,122,255,0.55), rgba(0,122,255,0) 70%);
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.bg-orb--violet {
  width: 55vw; height: 55vw; max-width: 520px; max-height: 520px;
  bottom: -22%; left: -16%;
  background: radial-gradient(circle at 60% 40%, rgba(139,92,246,0.45), rgba(139,92,246,0) 70%);
  animation: orbFloat 18s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 6%, 0) scale(1.08); }
}

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}

/* Эквалайзер в самом низу фона */
.bg-eq {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 130px; display: flex; align-items: flex-end;
  gap: 3vw; padding: 0 4vw;
  opacity: 0.5; pointer-events: none;
  mask-image: linear-gradient(to top, #000, transparent);
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
}
.bg-eq span {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(0,122,255,0.35), rgba(51,214,255,0.06));
  animation: eqBounce 1.6s ease-in-out infinite;
  height: 26%;
}
.bg-eq span:nth-child(3n+1) { animation-duration: 1.15s; }
.bg-eq span:nth-child(3n+2) { animation-duration: 1.7s; animation-delay: 0.25s; }
.bg-eq span:nth-child(4n)   { animation-duration: 2.1s; animation-delay: 0.4s; }
.bg-eq span:nth-child(5n)   { animation-delay: 0.6s; }
@keyframes eqBounce {
  0%, 100% { height: 14%; }
  35%      { height: 62%; }
  70%      { height: 30%; }
}

/* ---------------- Каркас страницы ---------------- */
.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 18px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------------- Бренд ---------------- */
.brand { text-align: center; margin-bottom: 22px; }
.brand-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-weight: 900;
  font-size: 23px; letter-spacing: 0.06em;
}
.brand-bars { width: 30px; height: 30px; }
.brand-word em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand-tag {
  margin-top: 7px; font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}

/* ---------------- Карточка ---------------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px 20px 26px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.06);
}
.card::before {
  content: ""; position: absolute; inset: 0 10% auto 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(51,214,255,0.6), transparent);
}

/* ---------------- Прогресс ---------------- */
.progress { margin-bottom: 22px; }
.progress-info {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 9px;
}
.progress-step {
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.progress-name { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.progress-track {
  height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 14px rgba(0, 122, 255, 0.75);
  transition: width 0.6s var(--ease-out);
}

/* ---------------- Вьюпорт шагов (fade-slide) ---------------- */
.steps-viewport {
  overflow: hidden;
  transition: height 0.45s var(--ease-out);
}
.steps-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}
.step {
  flex: 0 0 100%;
  min-width: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}
.step.current {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
  pointer-events: auto;
}

.step-title {
  font-family: var(--font-d); font-weight: 700;
  font-size: 24px; line-height: 1.15; letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.step-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; max-width: 46ch; }

/* ---------------- FOMO-счётчик ---------------- */
.fomo-wrap { margin-bottom: 20px; }
.fomo-counter-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: system-ui, -apple-system, sans-serif;
}
.fomo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: fomoPulse 1.5s infinite;
  flex-shrink: 0;
}
.fomo-text { color: #8a8a8f; font-size: 13px; }
.fomo-number {
  color: var(--accent);            /* Синий цвет верификации */
  font-size: 18px;
  font-weight: 700;
  min-width: 35px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fomo-badge {
  background: var(--danger);       /* Красный пульсирующий индикатор */
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  animation: fomoPulse 1.5s infinite;
}
@keyframes fomoPulse {
  0%   { opacity: 0.6; }
  50%  { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ---------------- Карточки ролей ---------------- */
.roles { display: grid; gap: 10px; }

.role-card {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 14px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.25s ease,
              background 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}
.role-card:active { transform: translateY(0) scale(0.995); }
.role-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.role-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #c9d2e4;
  transition: all 0.25s ease;
}
.role-icon svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.role-text { min-width: 0; }
.role-text b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: 0.01em; }
.role-text span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.role-check {
  margin-left: auto; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: grid; place-items: center;
  color: transparent;
  transition: all 0.25s ease;
}
.role-check svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

/* Активное состояние (Active state) */
.role-card.active {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(0,122,255,0.16), rgba(94,123,255,0.05));
  box-shadow: 0 0 0 1px var(--accent), 0 16px 44px -16px rgba(0, 122, 255, 0.55);
  transform: translateY(-2px);
}
.role-card.active .role-icon {
  color: #fff;
  background: rgba(0, 122, 255, 0.22);
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 18px rgba(0, 122, 255, 0.35);
}
.role-card.active .role-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------------- Кнопки ---------------- */
.actions { margin-top: 18px; }

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 16px 22px;
  border: 0; border-radius: 16px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #0a84ff 0%, #5a54e8 100%);
  box-shadow: 0 14px 34px -12px rgba(0, 122, 255, 0.65), inset 0 1px 0 rgba(255,255,255,0.22);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px -14px rgba(0, 122, 255, 0.8), inset 0 1px 0 rgba(255,255,255,0.25);
  filter: brightness(1.06);
}
.btn-primary:active:not(:disabled) { transform: scale(0.985); }
.btn-primary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }

.btn-arrow {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }

.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  padding: 6px 2px;
  border: 0; background: none;
  color: var(--muted);
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease;
}
.btn-back:hover { color: var(--text); }
.btn-back svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.btn-ghost-big {
  width: 100%;
  padding: 15px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14.5px; font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
}
.btn-ghost-big:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.07); }

/* ---------------- Чип выбранной роли ---------------- */
.role-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 12.5px; font-weight: 700;
  color: #cfe3ff;
  background: rgba(0, 122, 255, 0.12);
  border: 1px solid rgba(0, 122, 255, 0.35);
}
.role-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------------- Поля формы ---------------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: #aab2c5;
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.field label i { color: var(--accent); font-style: normal; }
.field label em {
  font-style: normal; font-weight: 600;
  color: var(--muted); font-size: 11px;
  margin-left: 6px; letter-spacing: 0.04em; text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px; font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 86px; }
.field input::placeholder,
.field textarea::placeholder { color: #565f70; font-weight: 400; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 122, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.16);
}
.field.error input,
.field.error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.14);
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* Honeypot — прячем от людей всеми способами */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ---------------- Отправка: лоадер и сообщения ---------------- */
.spinner {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  opacity: 0;
  animation: spin 0.7s linear infinite;
  transition: opacity 0.15s ease;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary.loading { pointer-events: none; }
.btn-primary.loading .btn-label,
.btn-primary.loading .btn-arrow { opacity: 0; }
.btn-primary.loading .spinner { opacity: 1; }

.form-msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13.5px; font-weight: 600;
  color: var(--danger);
  text-align: center;
}
.legal {
  margin-top: 10px;
  font-size: 11px; line-height: 1.6;
  color: #59627a;
  text-align: center;
}

/* ---------------- Экран успеха ---------------- */
.step-success { position: relative; text-align: center; padding: 14px 4px 8px; }

.success-rings span {
  position: absolute; left: 50%; top: 62px;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(48, 209, 88, 0.4);
  transform: translate(-50%, -50%);
  animation: ringPulse 2.4s ease-out infinite;
}
.success-rings span:nth-child(2) { animation-delay: 1.2s; }
@keyframes ringPulse {
  0%   { transform: translate(-50%, -50%) scale(0.55); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.9);  opacity: 0; }
}

.success-badge {
  position: relative;
  width: 96px; height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(48,209,88,0.22), rgba(48,209,88,0.05));
  border: 1px solid rgba(48, 209, 88, 0.45);
  box-shadow: 0 0 44px rgba(48, 209, 88, 0.25);
  display: grid; place-items: center;
}
.success-badge svg { width: 56px; height: 56px; fill: none; }
.ok-circle {
  stroke: var(--ok); stroke-width: 2;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: drawStroke 0.7s var(--ease-out) forwards 0.15s;
}
.ok-check {
  stroke: var(--ok); stroke-width: 3.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: drawStroke 0.45s var(--ease-out) forwards 0.7s;
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

.success-text {
  font-size: 14.5px; color: #b7bdd0;
  line-height: 1.65;
  max-width: 40ch;
  margin: 10px auto 22px;
}
.success-text b {
  color: var(--text);
}

/* ---------------- Подвал ---------------- */
.page-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 11.5px;
  color: #4c5468;
  letter-spacing: 0.05em;
}

/* ---------------- Tablet / Desktop ---------------- */
@media (min-width: 560px) {
  .page { padding: 44px 24px 56px; }
  .card { padding: 32px 30px 34px; border-radius: 30px; }
  .step-title { font-size: 27px; }
  .brand-logo { font-size: 26px; }
  .fomo-text { font-size: 14px; }
}

/* ---------------- Уменьшенная анимация ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
