/* RPverse-site — дизайн-токены (Ultra Violet + Soft Lavender) и базовые стили */
:root,
:root[data-theme="light"] {
  --bg: 247 246 251;
  --surface: 255 255 255;
  --subtle: 238 235 246;
  --line: 220 215 234;
  --ink: 26 24 35;
  --ink-2: 85 80 104;
  --ink-3: 136 131 154;
  --accent: 95 75 139;
  --accent-soft: 124 102 173;
  --on-accent: 255 255 255;
  --success: 22 163 74;
  --shadow-sm: 0 2px 10px rgba(26, 24, 35, 0.05);
  --shadow-md: 0 12px 32px rgba(26, 24, 35, 0.08);
}

.dark,
:root[data-theme="dark"] {
  --bg: 20 20 24;
  --surface: 28 28 35;
  --subtle: 38 37 47;
  --line: 55 53 68;
  --ink: 241 240 245;
  --ink-2: 184 180 198;
  --ink-3: 126 121 142;
  --accent: 95 75 139;
  --accent-soft: 176 156 236;
  --on-accent: 255 255 255;
  --success: 74 222 128;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.4);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: rgb(var(--bg));
  color: rgb(var(--ink));
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgb(var(--accent) / 0.28);
}

:focus-visible {
  outline: 2px solid rgb(var(--accent-soft));
  outline-offset: 2px;
  border-radius: 6px;
}

/* Стартовый сплеш-экран (Анимация №2 «Прорисовка») */
#rv-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background-color: rgb(var(--bg));
  color: rgb(var(--ink));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

#rv-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.rv-splash-logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: rgb(var(--accent) / 0.14);
  border: 1px solid rgb(var(--accent) / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--ink));
  box-shadow: 0 8px 28px -6px rgb(var(--accent) / 0.4);
}

.rv-splash-logo svg {
  width: 40px;
  height: 40px;
}

#rv-splash .rv-logo-hex {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: rv-hex-draw 2s ease-in-out infinite;
}

#rv-splash .rv-logo-v {
  animation: rv-v-pulse 2s ease-in-out infinite;
}

#rv-splash .rv-logo-orbit {
  filter: drop-shadow(0 0 4px rgb(var(--accent) / 0.55));
  animation: rv-orbit-glow 2s ease-in-out infinite;
}

@keyframes rv-hex-draw {
  0% { stroke-dashoffset: 160; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -160; }
}

@keyframes rv-v-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes rv-orbit-glow {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.rv-splash-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rv-page-shell {
  opacity: 1;
  transition: opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

html.rv-entering .rv-page-shell {
  opacity: 0;
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(var(--surface) / 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(var(--line));
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgb(var(--accent) / 0.16);
  color: rgb(var(--accent-soft));
  border: 1px solid rgb(var(--accent) / 0.28);
}

.rv-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.35s ease;
}

.brand:hover .rv-logo {
  transform: rotate(6deg) scale(1.04);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(var(--ink-2));
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: rgb(var(--ink));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: rgb(var(--accent));
  color: rgb(var(--on-accent));
  box-shadow: 0 4px 16px rgb(var(--accent) / 0.3);
}

.btn-primary:hover {
  background: rgb(110 88 160);
  box-shadow: 0 6px 22px rgb(var(--accent) / 0.42);
}

.btn-secondary {
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  border-color: rgb(var(--line));
}

.btn-secondary:hover {
  background: rgb(var(--subtle));
  border-color: rgb(var(--accent) / 0.45);
}

.btn-ghost {
  background: transparent;
  color: rgb(var(--ink-2));
  border-color: rgb(var(--line));
  padding: 0.5rem 0.7rem;
}

.btn-ghost:hover {
  background: rgb(var(--subtle));
  color: rgb(var(--ink));
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.48rem 0.95rem;
  border-radius: 10px;
}

/* Мобильное меню */
.mobile-drawer {
  display: none;
  border-top: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  padding: 1rem 1.25rem 1.25rem;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-drawer a {
  font-weight: 500;
  color: rgb(var(--ink-2));
  padding: 0.35rem 0;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 4rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 420px;
  background: radial-gradient(ellipse at center, rgb(var(--accent) / 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
}

@media (min-width: 900px) {
  .hero {
    padding: 5.5rem 0 4.5rem;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgb(var(--accent) / 0.14);
  color: rgb(var(--accent-soft));
  border: 1px solid rgb(var(--accent) / 0.3);
  margin-bottom: 1.25rem;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--success));
}

.hero-title {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.hero-title span {
  color: rgb(var(--accent-soft));
}

.hero-subtitle {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  color: rgb(var(--ink-2));
  max-width: 58ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Анимация появления */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  #rv-splash .rv-logo-hex,
  #rv-splash .rv-logo-v,
  #rv-splash .rv-logo-orbit {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Секции */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgb(var(--surface) / 0.45);
  border-top: 1px solid rgb(var(--line));
  border-bottom: 1px solid rgb(var(--line));
}

.section-head {
  max-width: 680px;
  margin-bottom: 2.25rem;
}

.section-kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--accent-soft));
  margin-bottom: 0.4rem;
}

.section-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.section-desc {
  margin: 0;
  color: rgb(var(--ink-2));
  font-size: 1rem;
}

/* Сетка карточек */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .grid-2, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgb(var(--accent) / 0.45);
}

.card-featured {
  border-color: rgb(var(--accent));
  box-shadow: 0 0 0 1px rgb(var(--accent) / 0.35), var(--shadow-md);
  position: relative;
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgb(var(--accent));
  color: rgb(var(--on-accent));
  margin-bottom: 0.75rem;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgb(var(--accent) / 0.14);
  color: rgb(var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: rgb(var(--ink-2));
  font-size: 0.9375rem;
}

/* Табы и подвкладки Verse Shop */
.shop-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.shop-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  background: rgb(var(--subtle));
  border: 1px solid rgb(var(--line));
  border-radius: 14px;
}

.shop-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgb(var(--ink-2));
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-tab.active {
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  box-shadow: var(--shadow-sm);
}

.shop-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tab-soon-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgb(var(--accent) / 0.18);
  color: rgb(var(--accent-soft));
}

.shop-subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shop-subtab {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  color: rgb(var(--ink-2));
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.shop-subtab.active {
  background: rgb(var(--accent));
  border-color: rgb(var(--accent));
  color: rgb(var(--on-accent));
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.85rem 0;
}

.price-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-note {
  font-size: 0.85rem;
  color: rgb(var(--ink-3));
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: rgb(var(--ink-2));
  flex: 1;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.check-list svg {
  width: 17px;
  height: 17px;
  color: rgb(var(--accent-soft));
  flex-shrink: 0;
  margin-top: 2px;
}

/* Блок авторизации Telegram */
.auth-box {
  margin-top: 2.5rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .auth-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.tg-widget-slot {
  min-width: 240px;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgb(var(--accent) / 0.5);
  background: rgb(var(--subtle) / 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: rgb(var(--ink-2));
}

.trust-bar {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: rgb(var(--ink-3));
}

/* Модалка оформления заказа */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.125rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: rgb(var(--ink-2));
}

.input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font-family: inherit;
  font-size: 0.9375rem;
}

.notice-box {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgb(var(--accent) / 0.12);
  border: 1px solid rgb(var(--accent) / 0.3);
  font-size: 0.85rem;
  color: rgb(var(--ink-2));
  margin-bottom: 1rem;
}

.placeholder-tag {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgb(var(--accent) / 0.15);
  color: rgb(var(--accent-soft));
  border: 1px solid rgb(var(--accent) / 0.3);
}

/* Подвал */
.site-footer {
  border-top: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  padding: 2.5rem 0;
  font-size: 0.875rem;
  color: rgb(var(--ink-2));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-title {
  font-weight: 700;
  color: rgb(var(--ink));
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a:hover {
  color: rgb(var(--accent-soft));
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(var(--line));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: rgb(var(--ink-3));
}

/* Степпер количества слотов и профиль пользователя */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem;
  border-radius: 12px;
  background: rgb(var(--subtle));
  border: 1px solid rgb(var(--line));
  margin-bottom: 1.15rem;
  align-self: flex-start;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.qty-btn:hover:not(:disabled) {
  border-color: rgb(var(--accent));
}

.qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qty-value {
  min-width: 68px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  background: rgb(var(--subtle));
  border: 1px solid rgb(var(--accent) / 0.35);
  font-size: 0.875rem;
}

