/* ==========================================================================
   White page · age gate — base styles
   ========================================================================== */

:root {
  --bg: #041836;
  --card-border: rgba(17, 19, 24, 0.06);
  --ink: #111318;
  --ink-soft: rgba(17, 19, 24, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(17, 19, 24, 0.18);
  --text: #eaf2ff;
  --muted: #9db6e6;
  --accent: #0b2f7a;
  --accent-2: #1d5bd6;
  --ok: #1c5c34;
  --warn: #8a5200;
  --radius: 24px;
  --shadow: 0 26px 60px rgba(2, 12, 36, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- background ---------------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(37, 106, 232, 0.55), transparent 62%),
    radial-gradient(900px 520px at 85% 110%, rgba(12, 52, 132, 0.8), transparent 65%),
    linear-gradient(180deg, #06204c 0%, #041634 55%, #030f28 100%);
}

.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  transform: translateZ(0);
  will-change: transform;
  animation: drift 18s var(--ease) infinite alternate;
}

.bg__blob--a {
  width: 46vmax;
  height: 46vmax;
  top: -16vmax;
  left: -12vmax;
  background: radial-gradient(circle, rgba(29, 91, 214, 0.6), transparent 65%);
}

.bg__blob--b {
  width: 40vmax;
  height: 40vmax;
  bottom: -18vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(56, 148, 255, 0.38), transparent 65%);
  animation-delay: -8s;
}

.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: 64px 64px;
  mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}

/* --- layout -------------------------------------------------------------- */

.page {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.card {
  position: relative;
  width: 100%;
  padding: clamp(24px, 5.5vw, 40px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(29, 91, 214, 0.6), rgba(29, 91, 214, 0.2), transparent);
}

/* --- views --------------------------------------------------------------- */

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: rise 0.45s var(--ease) both;
}

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

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d5bd6;
}

.eyebrow--warn { color: #b45309; }
.eyebrow--ok   { color: #15803d; }

.title {
  margin: 0 0 12px;
  font-size: clamp(22px, 5.4vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

.text {
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* без описания заголовку гейта нужен отступ до кнопок */
#view-gate .title {
  margin-bottom: 24px;
}

/* --- buttons ------------------------------------------------------------- */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 640;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2f74e8, #1d5bd6 55%, #1548ad);
  box-shadow: 0 12px 26px rgba(29, 91, 214, 0.32);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(29, 91, 214, 0.42);
}

.btn--ghost {
  color: #22283a;
  background: rgba(17, 19, 24, 0.03);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: rgba(17, 19, 24, 0.07);
  border-color: rgba(17, 19, 24, 0.32);
}

.btn:active {
  transform: translateY(0) scale(0.995);
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid #1d5bd6;
  outline-offset: 3px;
}

/* --- legal / hints ------------------------------------------------------- */

.legal {
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(17, 19, 24, 0.6);
}

.legal a {
  color: #1d5bd6;
  text-decoration: underline;
  text-decoration-color: rgba(29, 91, 214, 0.35);
  text-underline-offset: 2px;
}

.legal a:hover {
  color: #0b2f7a;
}

.hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(17, 19, 24, 0.45);
}

/* --- redirect progress --------------------------------------------------- */

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 0 20px;
  border-radius: 50%;
  border: 2px solid rgba(17, 19, 24, 0.12);
  border-top-color: #1d5bd6;
  border-right-color: #2f74e8;
  animation: spin 0.9s linear infinite;
}

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

.progress {
  position: relative;
  height: 5px;
  margin: 0 0 22px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.08);
  overflow: hidden;
}

.progress__bar {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d5bd6, #2f74e8);
  transition: width 0.25s linear;
}

/* --- footer -------------------------------------------------------------- */

.foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #c9d8f7;
}

.foot__sep {
  opacity: 0.6;
}

/* --- noscript ------------------------------------------------------------ */

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px 18px;
  font-size: 13px;
  color: #111318;
  background: #ffffff;
  border-radius: 12px;
  z-index: 10;
}

/* --- CTA: композитное кольцо + блик (без анимации box-shadow) ------------- */

.cta {
  position: relative;
  border-radius: 14px;
}

#btn-confirm {
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(29, 91, 214, 0.5);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: cta-ring 3.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

#btn-confirm::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -35%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg) translateX(-160%);
  animation: cta-shine 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  will-change: transform;
}

#btn-confirm > span {
  position: relative;
  z-index: 1;
}

#btn-confirm:active {
  transform: scale(0.985);
}

@keyframes cta-ring {
  0%   { opacity: 0.5; transform: scale(1); }
  60%  { opacity: 0;   transform: scale(1.16); }
  100% { opacity: 0;   transform: scale(1.16); }
}

@keyframes cta-shine {
  0%,
  58%  { transform: skewX(-18deg) translateX(-160%); }
  86%,
  100% { transform: skewX(-18deg) translateX(520%); }
}

/* --- responsive & motion ------------------------------------------------- */

@media (max-width: 768px) {
  /* на мобильных тяжёлые blur-анимации фона выключаем — это главный источник лагов */
  .bg__blob {
    animation: none;
    filter: blur(48px);
  }
}

@media (max-width: 420px) {
  .card { padding: 22px 18px; }
  .btn { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
