:root {
  --bg: #000;
  --text: #eef3ff;
  --muted: #8f9cc4;
  --surface: rgba(18, 28, 70, 0.45);
  --surface-hover: rgba(28, 46, 120, 0.6);
  --border: rgba(92, 140, 255, 0.28);
  --border-hover: rgba(120, 165, 255, 0.7);
  --accent: #2f6bff;
  --accent-2: #5d95ff;
  --glow: rgba(64, 120, 255, 0.55);
  --radius: 16px;
  --gutter: 16px;
  --col: 440px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Фон: мягкое синее свечение сверху */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(47, 107, 255, 0.28), transparent 70%),
    radial-gradient(40% 30% at 50% 100%, rgba(47, 107, 255, 0.12), transparent 70%),
    var(--bg);
}

.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--col) + var(--gutter) * 2);
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Заголовок */
.hero { text-align: center; margin-bottom: 28px; }

.title {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #b9cfff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px var(--glow));
}

.title-accent {
  background: linear-gradient(180deg, #8fb4ff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Кнопки */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.link:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: 0 0 24px rgba(64, 120, 255, 0.25);
}

.link:active { transform: scale(0.985); }

.link:focus-visible,
.footer__links button:focus-visible,
.modal__close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.link__icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
  color: var(--accent-2);
}

.link__label { flex: 1; min-width: 0; }

.link__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .7;
}

.link--primary {
  background: linear-gradient(135deg, #2f6bff 0%, #1d47d6 100%);
  border-color: rgba(140, 180, 255, 0.55);
  box-shadow: 0 6px 28px rgba(47, 107, 255, 0.35);
}
.link--primary .link__icon { color: #fff; }
.link--primary:hover {
  background: linear-gradient(135deg, #4a7dff 0%, #2552e6 100%);
  box-shadow: 0 8px 34px rgba(47, 107, 255, 0.5);
}

.link--accent {
  border-color: rgba(120, 165, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(93, 149, 255, 0.15), 0 0 18px rgba(64, 120, 255, 0.18);
}

/* Маскот */
.mascot {
  margin: 36px 0 0;
  width: min(92vw, 560px);
  max-width: none;
  align-self: center;
}

.mascot img {
  display: block;
  width: 100%;
  height: auto;
  /* мягко растворяем края квадратной картинки в фоне */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Подвал */
.footer {
  padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 10px;
}

.footer__links button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(143, 156, 196, 0.35);
  text-underline-offset: 3px;
}
.footer__links button:hover { color: var(--text); }

.footer__copy { margin: 0; }

/* Всплывающее уведомление */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100vw - var(--gutter) * 2);
  padding: 12px 18px;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: rgba(10, 18, 48, 0.92);
  color: var(--text);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(64, 120, 255, 0.25);
  transform: translate(-50%, 0);
  animation: toast-in .25s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Модальное окно «Купить» */
.modal {
  width: min(calc(100vw - var(--gutter) * 2), 400px);
  padding: 0;
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  background: #070c22;
  color: var(--text);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(64, 120, 255, 0.25);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal[open] { animation: modal-in .2s ease; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.modal__body { padding: 26px 22px 22px; text-align: center; }
.modal__title { margin: 0 0 10px; font-size: 1.375rem; font-weight: 800; }
.modal__text { margin: 0 0 22px; color: var(--muted); }
.modal__actions { display: flex; flex-direction: column; gap: 10px; }
.modal__cta { justify-content: center; text-align: center; }
.modal__cta .link__label { flex: none; }

.modal__close {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.modal__close:hover { color: var(--text); border-color: var(--border-hover); }

/* Брейкпоинты */
@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .link { min-height: 52px; padding: 12px 14px; font-size: 1rem; gap: 12px; }
}

@media (min-width: 768px) {
  .page { padding-top: 72px; }
  .hero { margin-bottom: 36px; }
  .links { gap: 14px; }
}

@media (min-height: 900px) and (min-width: 768px) {
  .page { padding-top: 96px; }
}

/* Невысокие экраны в горизонтальной ориентации */
@media (max-height: 500px) and (orientation: landscape) {
  .page { padding-top: 24px; }
  .hero { margin-bottom: 18px; }
  .title { font-size: 2.25rem; }
  .mascot { width: min(60vw, 420px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
