/* RandomSet.RU — design system */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f7f5ff;
  --surface: #ffffff;
  --surface-2: #faf9ff;
  --text: #15131c;
  --text-2: #3d3849;
  --muted: #6d6680;
  --line: rgba(30, 22, 54, .10);
  --line-strong: rgba(30, 22, 54, .18);
  --accent: #6b4fe0;
  --accent-hover: #5b3fd0;
  --accent-soft: #efeaff;
  --accent-ink: #4a32b0;
  --shadow-sm: 0 2px 8px rgba(38, 26, 74, .05);
  --shadow: 0 12px 32px rgba(38, 26, 74, .08);
  --shadow-lg: 0 30px 70px rgba(38, 26, 74, .14);
  --glow: rgba(107, 79, 224, .16);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --max: 1140px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0b13;
  --bg-soft: #14111d;
  --surface: #17141f;
  --surface-2: #1c1827;
  --text: #f5f3fa;
  --text-2: #d5d0e0;
  --muted: #9b93ac;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #a98bff;
  --accent-hover: #b89dff;
  --accent-soft: rgba(169, 139, 255, .14);
  --accent-ink: #c8b4ff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
  --glow: rgba(169, 139, 255, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
p { margin: 0; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 68px; display: flex; align-items: center; gap: 20px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 17px;
}
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; font-size: 14.5px; color: var(--muted);
}
.nav-links a {
  text-decoration: none; padding: 8px 12px; border-radius: 10px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }

.language-picker { position: relative; flex: none; }
.language-trigger {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.language-trigger::-webkit-details-marker { display: none; }
.language-trigger::marker { display: none; content: ""; }
.language-flag {
  width: 20px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .13);
}
.language-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .16s ease;
}
.language-picker[open] .language-chevron { transform: rotate(180deg); }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 152px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 35px rgba(20, 20, 35, .18);
}
.language-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
}
.language-option:hover { color: var(--text); background: var(--bg-soft); }
.language-option.is-active { color: var(--text); background: var(--accent-soft); }
.language-check { margin-left: auto; visibility: hidden; color: var(--accent); font-weight: 800; }
.language-option.is-active .language-check { visibility: visible; }

.theme-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--muted);
  cursor: pointer; transition: color .15s, border-color .15s;
}

.prevailing-notice {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 14px;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 13px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary {
  background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px var(--glow);
}
:root[data-theme="dark"] .btn-primary { color: #1a1226; }
.btn-primary:hover { background: var(--accent-hover); }

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(50% 55% at 15% 20%, var(--glow), transparent 70%),
    radial-gradient(45% 50% at 85% 5%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 13.5px; font-weight: 700;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 6.2vw, 68px);
  letter-spacing: -.045em;
  max-width: 13ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead {
  margin-top: 20px; max-width: 46ch;
  font-size: clamp(16.5px, 1.6vw, 19px); color: var(--muted);
}
.hero-lead b { color: var(--text-2); font-weight: 650; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.pill svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* store badges */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 13px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); text-decoration: none;
  cursor: default; position: relative;
}
.store svg { width: 22px; height: 22px; flex: none; color: var(--text-2); }
.store span { display: block; font-size: 10.5px; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; }
.store b { display: block; font-size: 15px; line-height: 1.25; color: var(--text); letter-spacing: -.01em; }
.stores-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* ---------- слайдер со скриншотами ---------- */
.demo-wrap { display: grid; justify-items: center; gap: 18px; width: 100%; }
.phone {
  width: 300px; max-width: 100%;
  border-radius: 44px; padding: 11px;
  background: linear-gradient(160deg, #3a3646, #17151d 45%, #2c2836);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, .3);
  position: relative;
}
.phone-screen {
  aspect-ratio: 660 / 1290;
  border-radius: 34px; overflow: hidden;
  background: #fff; position: relative;
}
.notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 25px; border-radius: 999px; background: #111018; z-index: 5;
  pointer-events: none;
}

.slides {
  display: flex; height: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides picture { display: block; min-width: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.slides img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }

.slider-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; max-width: 320px;
}
.slider-nav {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted);
  cursor: pointer; transition: color .15s, border-color .15s, opacity .15s;
}
.slider-nav:hover { color: var(--text); border-color: var(--line-strong); }
.slider-nav svg { width: 16px; height: 16px; }
.slide-label {
  flex: 1; text-align: center; font-size: 14.5px; font-weight: 650;
  color: var(--text-2); letter-spacing: -.01em;
}
.dots { display: flex; justify-content: center; gap: 7px; }
.dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line-strong); cursor: pointer;
  transition: background .18s, transform .18s, width .18s;
}
.dots button[aria-current="true"] { background: var(--accent); width: 20px; border-radius: 999px; }

/* ---------- sections ---------- */
.section { padding: clamp(52px, 7vw, 92px) 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.04em; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); }

.modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mode {
  padding: 22px 20px 24px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mode:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.mode-icon {
  width: 44px; height: 44px; border-radius: 14px; margin-bottom: 26px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.mode-icon svg { width: 22px; height: 22px; }
.mode h3 { font-size: 18px; }
.mode p { margin-top: 8px; font-size: 14px; color: var(--muted); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card {
  padding: 26px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
}
.info-card h3 { font-size: 19px; }
.info-card p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* legal list */
.legal-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.legal-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.legal-card:hover { border-color: var(--accent); transform: translateX(2px); }
.legal-card strong { display: block; font-size: 15.5px; font-weight: 650; }
.legal-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.legal-card .arrow { color: var(--accent); font-weight: 700; }

.cta {
  margin-top: 26px; padding: clamp(26px, 4vw, 40px); border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 68%, #2b1c66));
  color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
}
.cta h3 { font-size: clamp(21px, 2.6vw, 27px); }
.cta p { margin-top: 8px; color: rgba(255, 255, 255, .82); max-width: 52ch; }
.cta .btn { background: #fff; color: #2a1c66; border-color: transparent; }

/* ---------- inner pages ---------- */
.page { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page-shell { width: min(100% - 40px, 800px); margin-inline: auto; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.page-title { font-size: clamp(32px, 5vw, 50px); letter-spacing: -.04em; }
.page-lead { margin-top: 16px; color: var(--muted); font-size: 17.5px; }
.prose { margin-top: 34px; }
.prose h2 { margin-top: 38px; font-size: 21px; letter-spacing: -.02em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); font-size: 16px; }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { margin: 12px 0 0; padding-left: 22px; }
.prose li { margin-top: 7px; }
.prose a { color: var(--accent); }
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em; padding: 2px 6px; border-radius: 6px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2);
  overflow-wrap: anywhere;
}
.note {
  margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  background: var(--accent-soft); color: var(--accent-ink); font-size: 14.5px;
}
.note strong { font-weight: 750; }
.meta { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.contact-lines { display: grid; gap: 12px; margin-top: 30px; }
.contact-line {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
}
.contact-line .ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.contact-line .ico svg { width: 18px; height: 18px; }
.contact-line small { display: block; color: var(--muted); font-size: 13px; }
.contact-line a { color: var(--accent); font-weight: 650; text-decoration: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(34px, 5vw, 52px) 0 40px; background: var(--bg-soft); }
.footer-legal {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.footer-legal h2 { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.footer-legal-list {
  margin: 20px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px;
}
.footer-legal-list a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  transition: color .15s;
}
.footer-legal-list a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 24px;
  align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--muted);
}
.footer-bottom .studio { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer-bottom .studio:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero h1, .hero-lead { margin-inline: auto; }
  .pills, .stores { justify-content: center; }
  .stores-note { text-align: center; }
  .modes { grid-template-columns: repeat(3, 1fr); }
  .modes .mode:nth-child(4) { grid-column: 1 / 2; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-grid .info-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav { gap: 12px; }
  .nav-links { font-size: 13.5px; }
  .nav-links a { padding: 7px 9px; }
  .nav-links a:not(.always) { display: none; }
  .modes { grid-template-columns: 1fr 1fr; }
  .modes .mode:nth-child(4) { grid-column: auto; }
  .modes .mode:last-child { grid-column: 1 / -1; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid .info-card:last-child { grid-column: auto; }
  .legal-list { grid-template-columns: 1fr; }
  .footer-legal-list { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .language-trigger { padding-inline: 8px; }
  .nav-links a.wide { display: none; }
}
@media (max-width: 420px) {
  .nav { gap: 6px; }
  .nav-links a { padding-inline: 6px; }
  .modes { grid-template-columns: 1fr; }
  .modes .mode:last-child { grid-column: auto; }
  .phone { width: 100%; max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
