:root {
  --night-950: #07090d;
  --night-900: #0b0e14;
  --night-800: #10141d;
  --night-700: #171c28;

  --red-300: #ff9b9b;
  --red-400: #ff5c5c;
  --red-500: #ef3030;
  --red-600: #cf1f1f;

  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;

  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--night-950);
  color: #f4f6fb;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

/* ---------- Фоновое фото + затемнение ---------- */

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--night-950);
  background-image:
    linear-gradient(180deg, rgba(12, 6, 8, 0.58), rgba(12, 6, 8, 0.84)),
    radial-gradient(120% 90% at 50% 42%, rgba(12, 6, 8, 0.12), rgba(12, 6, 8, 0.74)),
    url("bg-mx.webp");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
}

/* ---------- Свечения и сетка ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
}

.glow-top {
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 520px;
  background: rgba(239, 68, 68, 0.1);
  filter: blur(130px);
}

.glow-bottom-left {
  bottom: -224px;
  left: -160px;
  width: 460px;
  height: 460px;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(120px);
}

.glow-right {
  top: 33%;
  right: -160px;
  width: 420px;
  height: 420px;
  background: rgba(207, 31, 31, 0.09);
  filter: blur(110px);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 130, 130, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 130, 130, 0.11) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent);
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
}

/* ---------- Каркас страницы ---------- */

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.lang-switch {
  min-width: 48px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: rgba(12, 8, 12, 0.55);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  border-color: var(--red-400);
  background: rgba(239, 48, 48, 0.18);
}

.lang-switch:focus-visible {
  outline: 2px solid var(--red-300);
  outline-offset: 3px;
}

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

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-300);
}

.brand-icon svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
}

.brand-name .accent {
  color: var(--red-400);
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.footer {
  padding-bottom: 24px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.25);
}

/* ---------- Главный экран ---------- */

.step {
  display: none;
  width: 100%;
  justify-content: center;
}

.step.active {
  display: flex;
}

.step.anim-up.active {
  animation: stepIn 0.45s var(--ease-out-soft) both;
}

.step-inner {
  width: 100%;
  max-width: 576px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%) skewX(-18deg);
  }
  100% {
    transform: translateX(240%) skewX(-18deg);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- Шаг 1: щит ---------- */

.shield-wrap {
  position: relative;
  margin-bottom: 36px;
}

.shield-glow {
  position: absolute;
  inset: -32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.22);
  filter: blur(40px);
  animation: glowPulse 2.4s ease-in-out infinite;
}

.shield-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(239, 68, 68, 0.35);
  animation: spin 14s linear infinite;
}

.shield-circle {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.2), var(--night-800));
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.28);
  color: var(--red-300);
}

.shield-circle svg {
  width: 36px;
  height: 36px;
}

.shield-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red-400), var(--red-600));
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
  color: #fff;
}

.shield-badge svg {
  width: 16px;
  height: 16px;
}

/* ---------- Общие элементы ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
}

.pill svg {
  width: 14px;
  height: 14px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red {
  background: var(--red-400);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}

.title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.2vw, 2.3rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.subtitle {
  margin: 20px 0 0;
  max-width: 448px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.45);
}

.text-red-gradient {
  background: linear-gradient(100deg, #ffe4e4 0%, #ff8f8f 34%, #d32f2f 62%, #ffb3b3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Кнопки ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 100%;
  max-width: 384px;
  margin-top: 40px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  cursor: wait;
}

.btn:focus-visible {
  outline: 2px solid rgba(255, 92, 92, 0.65);
  outline-offset: 2px;
}

.btn-red {
  background: linear-gradient(180deg, var(--red-300), var(--red-500), var(--red-600));
  color: #fff;
  text-shadow: 0 1px 2px rgba(120, 10, 10, 0.4);
  box-shadow:
    0 10px 40px -8px rgba(239, 68, 68, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-red:hover:not(:disabled) {
  box-shadow:
    0 18px 55px -8px rgba(239, 68, 68, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-content svg {
  width: 20px;
  height: 20px;
}

.btn-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0;
  transform: translateX(-120%) skewX(-18deg);
  transition: opacity 0.3s;
}

.btn:hover:not(:disabled) .btn-shimmer {
  opacity: 1;
  animation: shimmer 2.8s linear infinite;
}

/* ---------- Шаг 1: гарантии ---------- */

.assure {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 20px;
  row-gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.35);
}

.assure span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assure svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

/* ---------- Адаптив ---------- */

@media (min-width: 640px) {
  .topbar { padding: 20px 40px; }
  .subtitle { font-size: 15px; }
}
