/* Главная amagi.social: тёмная фирменная тема (brand/README.md), 3D-телефон, анимации прокрутки.
   CSP сайта: style-src 'self' — никаких inline-стилей, динамика только через CSSOM из landing.js.
   Раскладка: ≥1100px — «сцена» с одним летающим телефоном; <1100px — телефон внутри каждой главы (.mphone). */
:root {
  --bg: #01070f;
  --navy: #04376d;
  --primary: #1f5fae;
  --blue: #3d8bff;
  --sky: #7fb0ea;
  --ice: #dceaf3;
  --text: #f2f6ff;
  --muted: #9fb2cf;
  --dim: #6d83a5;
  --line: rgba(150, 185, 255, 0.13);
  --glass-2: rgba(14, 36, 74, 0.8);
  --red: #ff3d63;
  --gold: #f4cf7c;
  --gold-2: #c99a3a;
  --green: #36e39a;
  --radius: 24px;
  --sec: clamp(64px, 8vw, 112px);
  --gutter: clamp(22px, 5vw, 32px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Thai", "PingFang SC", "Hiragino Sans", "Malgun Gothic", Arial, sans-serif;
  color-scheme: dark;
}

html.landing { scroll-behavior: smooth; background: var(--bg); scroll-padding-top: 76px; overflow-x: clip; }
html.landing body {
  margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: clip; text-rendering: optimizeLegibility;
}
.landing a { color: inherit; }
.landing img { max-width: 100%; }
.landing h1, .landing h2, .landing h3 { letter-spacing: -0.035em; line-height: 1.05; margin: 0; font-weight: 800; }
.landing p { margin: 0; }
:where(.landing) :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 14px; border-radius: 10px; transform: translateY(-300%); }
.skip:focus { transform: none; }
.landing :focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }

/* ---------- Фон ---------- */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.sky.on { opacity: 1; }
.aurora { position: fixed; inset: -20vmax; z-index: 0; pointer-events: none; filter: blur(80px) saturate(1.2); opacity: 0.8; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: 10%; top: 0; background: radial-gradient(circle, rgba(31, 95, 174, 0.55), transparent 62%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 50vmax; height: 50vmax; right: 5%; top: 25%; background: radial-gradient(circle, rgba(80, 60, 220, 0.32), transparent 62%); animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 46vmax; height: 46vmax; left: 30%; bottom: 0; background: radial-gradient(circle, rgba(201, 154, 58, 0.14), transparent 62%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-14vmax, -6vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(8vmax, -12vmax) scale(1.2); } }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .topbar, .foot { position: relative; z-index: 2; }

/* ---------- Стекло с тонкой градиентной рамкой ---------- */
.glass {
  position: relative; border-radius: var(--radius); border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(14, 34, 70, 0.72), rgba(6, 16, 36, 0.72)) padding-box,
    linear-gradient(140deg, rgba(255, 255, 255, 0.22), rgba(127, 176, 234, 0.06) 40%, rgba(244, 207, 124, 0.22)) border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- Шапка ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.topbar.scrolled { background: rgba(2, 8, 20, 0.66); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-color: var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); box-sizing: content-box; height: 72px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.logo img { height: 30px; width: auto; display: block; }
.topnav { display: flex; gap: 2px; margin: 0 auto; }
.topnav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.topnav a:hover, .topnav a.on { color: var(--text); background: rgba(127, 176, 234, 0.1); }
.topbar-end { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.langpick { position: relative; }
.langpick summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); }
.langpick summary::-webkit-details-marker { display: none; }
.langpick summary .i { width: 18px; height: 18px; }
.langpick-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 8px; border-radius: 18px;
  background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.langpick-menu a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.langpick-menu a:hover, .langpick-menu a[aria-current] { background: rgba(127, 176, 234, 0.16); }
.btn-glow {
  position: relative; text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 20px; border-radius: 999px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #2f7cf6, #1f5fae 55%, #3a3fd8); box-shadow: 0 8px 30px rgba(47, 124, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(47, 124, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; position: relative; flex: none; }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s; }
.burger i:first-child { top: 17px; }
.burger i:last-child { top: 25px; }
.menu-open .burger i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .burger i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Кнопки магазинов ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; justify-content: flex-start; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: 11px; min-width: 176px; min-height: 58px; padding: 6px 20px 6px 16px; box-sizing: border-box;
  border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(180deg, rgba(22, 26, 36, 0.97), rgba(3, 5, 10, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), box-shadow 0.25s, border-color 0.25s; overflow: hidden;
}
.store::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.7s; }
.store:hover { transform: translateY(-3px); border-color: rgba(244, 207, 124, 0.5); box-shadow: 0 16px 40px rgba(31, 95, 174, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.store:hover::after { transform: translateX(120%); }
.store-logo { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.05; text-align: start; min-width: 0; }
.store small { font-size: 11px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.85; line-height: 1.2; overflow-wrap: anywhere; }
.store b { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.store.is-soon { cursor: default; }
.store.is-soon small { color: var(--gold); opacity: 1; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }

/* ---------- 3D-телефон (общий для сцены и глав) ---------- */
.phone { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.phone > * { position: absolute; }
.slice { inset: 0; border-radius: var(--r); background: linear-gradient(90deg, #22385a, #7690b6 18%, #2b4366 40%, #1a2c48 60%, #7f98bc 84%, #22385a); }
.front, .back { inset: 0; border-radius: var(--r); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front {
  transform: translateZ(calc(var(--d) * 0.5 + 0.5px)); padding: var(--bz); background: #030509;
  box-shadow: inset 0 0 0 1.5px #9ab1d3, inset 0 0 0 3px #101a2b, 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--r) - var(--bz)); overflow: hidden; transform: translateZ(0);
  /* Пока снимок грузится — фирменный фон с логотипом, а не пустой экран. */
  background: url("/assets/bird-white.svg") center 42% / 28% auto no-repeat, radial-gradient(circle at 50% 35%, #1f5fae, #061e40 70%); }
.scr { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity 0.12s; }
.scr.on { opacity: 1; }
.scr-brand { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #1f5fae, #061e40 70%); }
.scr-brand img { width: 30%; height: auto; }
.glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 48%, rgba(255, 255, 255, 0.02) 56%, transparent 66%); background-size: 260% 100%; background-position: var(--glare, 80%) 0; mix-blend-mode: screen; }
.back {
  transform: rotateY(180deg) translateZ(calc(var(--d) * 0.5 + 0.5px)); overflow: hidden;
  background: radial-gradient(120% 70% at 30% 20%, #2c5288, #173563 45%, #0d2245 100%);
  box-shadow: inset 0 0 0 1.5px #9ab1d3, inset 0 0 40px rgba(0, 0, 0, 0.45);
}
.back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.14) 45%, transparent 60%); background-size: 240% 100%; background-position: var(--glare, 80%) 0; }
.plateau { position: absolute; left: 4.5%; right: 4.5%; top: 2.6%; height: 21%; border-radius: calc(var(--r) * 0.82); background: linear-gradient(160deg, #3b6299, #1f3e6d 60%, #18335d); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 6px rgba(0, 0, 0, 0.35); }
.lens { position: absolute; width: 27%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #0b1220 0 26%, #1e2f4f 27% 34%, #050a14 35% 58%, #3e5578 60% 66%, #0d1830 68%); box-shadow: 0 0 0 3px #4a6a9a, 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(120, 170, 255, 0.35); }
.lens.l1 { left: 7%; top: 7%; }
.lens.l2 { left: 7%; top: 53%; }
.lens.l3 { left: 36%; top: 30%; }
.flash { position: absolute; right: 9%; top: 18%; width: 8%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff7e0, #c8b98a 60%, #6d6448); }
.mic-dot { position: absolute; right: 10.5%; top: 64%; width: 4%; aspect-ratio: 1; border-radius: 50%; background: #0a1324; }
.back-logo { position: absolute; left: 50%; top: 52%; width: 22%; height: auto; transform: translate(-50%, -50%); opacity: 0.92; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.back-word { position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; color: rgba(220, 234, 243, 0.55); font-weight: 700; letter-spacing: 0.32em; font-size: calc(var(--w) * 0.04); }
.btn-side { background: linear-gradient(90deg, #4a6388, #8ba3c6, #4a6388); border-radius: 3px; transform: translateZ(0); }
.b-action { left: -3px; top: 17%; height: 5%; width: 4px; }
.b-volup { left: -3px; top: 25%; height: 8.5%; width: 4px; }
.b-voldown { left: -3px; top: 35.5%; height: 8.5%; width: 4px; }
.b-power { right: -3px; top: 27%; height: 12%; width: 4px; }
.b-camera { right: -2px; top: 60%; height: 8%; width: 3px; }
.halo { position: absolute; inset: -40% -70%; background: radial-gradient(closest-side, rgba(47, 124, 246, 0.42), rgba(47, 124, 246, 0.08) 55%, transparent 72%); filter: blur(10px); animation: halo 6s ease-in-out infinite; transform: translateZ(-160px); pointer-events: none; }
@keyframes halo { 50% { opacity: 0.7; transform: translateZ(-160px) scale(1.08); } }

/* Плашки вокруг телефона */
.chips, .chipset { position: absolute; inset: 0; transform-style: preserve-3d; }
.chip {
  position: absolute; display: flex; align-items: center; gap: 11px; padding: 11px 16px 11px 11px; border-radius: 18px; white-space: nowrap;
  background: rgba(14, 34, 70, 0.7); border: 1px solid rgba(150, 190, 255, 0.24); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0; transition: opacity 0.5s, transform 0.7s cubic-bezier(.2, .9, .2, 1);
}
.chip-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #2f7cf6, #1f4fa0); color: #fff; flex: none; box-shadow: 0 6px 16px rgba(47, 124, 246, 0.45); }
.chip-ico .i { width: 21px; height: 21px; }
.chip-txt { display: flex; flex-direction: column; line-height: 1.2; }
.chip-txt b { font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.chip-txt small { font-size: 12.5px; color: var(--muted); }
.tone-red .chip-ico { background: linear-gradient(135deg, #ff5577, #e21f4c); box-shadow: 0 6px 16px rgba(255, 61, 99, 0.5); }
.tone-gold .chip-ico { background: linear-gradient(135deg, #ffe09a, #e2a33a); box-shadow: 0 6px 16px rgba(244, 207, 124, 0.45); color: #3a2500; }
.chip-1 { left: -46%; top: 13%; transform: translateZ(90px) translateX(30px) scale(0.9); }
.chip-2 { right: -52%; top: 44%; transform: translateZ(140px) translateX(-30px) scale(0.9); }
.chip-3 { left: -38%; bottom: 13%; transform: translateZ(60px) translateX(30px) scale(0.9); }
.rig[data-side="right"] .chip-2 { right: auto; left: -60%; }
.rig[data-side="left"] .chip-1 { left: auto; right: -46%; }
.rig[data-side="left"] .chip-3 { left: auto; right: -38%; }
.rig[data-side="left"] .chip-2 { right: -54%; }
.chipset.on .chip { opacity: 1; }
.chipset.on .chip-1 { transform: translateZ(90px) translateY(var(--float1, 0px)); transition-delay: 0.05s; }
.chipset.on .chip-2 { transform: translateZ(140px) translateY(var(--float2, 0px)); transition-delay: 0.15s; }
.chipset.on .chip-3 { transform: translateZ(60px) translateY(var(--float3, 0px)); transition-delay: 0.25s; }

/* ---------- Сцена (компьютер) ---------- */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; z-index: 1; pointer-events: none; perspective: 1800px; perspective-origin: 50% 45%; overflow: hidden; }
.rig {
  --h: min(76vh, 760px); --w: calc(var(--h) * 0.4805); --r: calc(var(--w) * 0.175); --d: calc(var(--w) * 0.1); --bz: calc(var(--w) * 0.03);
  position: absolute; left: 50%; top: 52%; width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  transform-style: preserve-3d; will-change: transform;
}
.rig .slice:nth-child(1) { transform: translateZ(calc(var(--d) * -0.5)); }
.rig .slice:nth-child(2) { transform: translateZ(calc(var(--d) * -0.409)); }
.rig .slice:nth-child(3) { transform: translateZ(calc(var(--d) * -0.318)); }
.rig .slice:nth-child(4) { transform: translateZ(calc(var(--d) * -0.227)); }
.rig .slice:nth-child(5) { transform: translateZ(calc(var(--d) * -0.136)); }
.rig .slice:nth-child(6) { transform: translateZ(calc(var(--d) * -0.045)); }
.rig .slice:nth-child(7) { transform: translateZ(calc(var(--d) * 0.045)); }
.rig .slice:nth-child(8) { transform: translateZ(calc(var(--d) * 0.136)); }
.rig .slice:nth-child(9) { transform: translateZ(calc(var(--d) * 0.227)); }
.rig .slice:nth-child(10) { transform: translateZ(calc(var(--d) * 0.318)); }
.rig .slice:nth-child(11) { transform: translateZ(calc(var(--d) * 0.409)); }
.rig .slice:nth-child(12) { transform: translateZ(calc(var(--d) * 0.49)); }
.floor { position: absolute; left: 10%; right: 10%; bottom: -8%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent); filter: blur(12px); transform: translateZ(-80px) rotateX(80deg); }

/* ---------- Главы ---------- */
.chapter { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.hero { min-height: 100vh; min-height: 100svh; padding-top: 72px; }
.feature { min-height: 112vh; min-height: 112svh; }
.feature:last-child { min-height: 100vh; min-height: 100svh; }
.chapter[data-side="right"] .copy, .chapter[data-side="right"] .hero-copy { grid-column: 1; padding-inline-end: 6%; }
.chapter[data-side="left"] .copy { grid-column: 2; padding-inline-start: 8%; }
.copy { max-width: 540px; }
.mphone { display: none; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); margin-bottom: 16px; display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), transparent); }
.kicker.gold { color: var(--gold); }
.kicker.gold::before { background: linear-gradient(90deg, var(--gold), transparent); }
.copy h2, .sec-head h2, .ai h2, .cta h2 { font-size: clamp(36px, 4.4vw, 66px); background: linear-gradient(180deg, #fff 30%, #b9cff0); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.earn-sec .sec-head h2 { background-image: linear-gradient(180deg, #fff 20%, #f4dfaa 70%, #d9ac52); }
.lead { font-size: clamp(16.5px, 1.3vw, 19.5px); color: var(--muted); margin-top: 18px; line-height: 1.6; }
.ticks { display: grid; gap: 11px; margin-top: 22px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16.5px; }
.ticks .i { width: 24px; height: 24px; padding: 4px; border-radius: 50%; color: var(--green); background: rgba(54, 227, 154, 0.12); box-sizing: border-box; flex: none; }

/* Первый экран */
.hero-copy { max-width: 780px; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ice); background: rgba(31, 95, 174, 0.22); border: 1px solid rgba(127, 176, 234, 0.28); max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: ping 1.8s infinite; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 99, 0.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 61, 99, 0); } }
.hero-title { margin-top: 24px; --hs: clamp(56px, 8.4vw, 138px); font-size: var(--hs); line-height: 0.92; letter-spacing: -0.055em; display: flex; flex-direction: column; }
/* Перелив без шва: градиент начинается и заканчивается одним цветом — при повторе плитки нет резкой границы поперёк букв.
   Отступ справа — последняя буква при отрицательном межбуквенном интервале не обрезается фоном. */
.hero-title .w { display: block; width: fit-content; padding-inline: 0.04em 0.08em; margin-inline: -0.04em; background: linear-gradient(100deg, #ffffff 0%, #cfe0ff 20%, #7fb0ea 36%, #3d8bff 50%, #7fb0ea 64%, #cfe0ff 80%, #ffffff 100%); background-size: 200% 100%; background-repeat: repeat-x; -webkit-background-clip: text; background-clip: text; color: transparent; animation: titleIn 0.9s cubic-bezier(.2, .9, .2, 1) both, sheen 8s linear infinite; padding-bottom: 0.05em; }
/* Языки с очень длинными словами в заголовке: шрифт мельче, чтобы слово помещалось в строку. */
.hero-title.is-long { --hs: clamp(52px, 7.2vw, 118px); }
.hero-title.is-xlong { --hs: clamp(46px, 6.2vw, 100px); }
.hero-title .w2 { animation-delay: 0.12s, 0s; }
.hero-title .w3 { animation-delay: 0.24s, 0s; background-image: linear-gradient(100deg, #7fb0ea 0%, #3d8bff 20%, #8a7dff 36%, #f4cf7c 50%, #8a7dff 64%, #3d8bff 80%, #7fb0ea 100%); }
@keyframes wordIn { from { opacity: 0; transform: translateY(40px); filter: blur(10px); } }
@keyframes titleIn { from { transform: translateY(28px); } }
@keyframes sheen { to { background-position: -200% 0; } }
.hero-lead { margin-top: 24px; font-size: clamp(17px, 1.45vw, 21px); color: var(--muted); max-width: 580px; overflow-wrap: break-word; animation: wordIn 1s 0.35s cubic-bezier(.2, .9, .2, 1) both; }
.hero .stores { animation: wordIn 1s 0.5s cubic-bezier(.2, .9, .2, 1) both; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 14.5px; font-weight: 600; animation: wordIn 1s 0.6s cubic-bezier(.2, .9, .2, 1) both; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .i { width: 18px; height: 18px; color: var(--gold); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--dim); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; transition: opacity 0.4s; }
.scroll-cue.gone { opacity: 0; pointer-events: none; }
.scroll-cue .i { width: 22px; height: 22px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(36px); filter: blur(6px); transition: opacity 0.9s cubic-bezier(.2, .8, .2, 1), transform 0.9s cubic-bezier(.2, .8, .2, 1), filter 0.9s; }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Бегущая строка, цифры ---------- */
.marquee { position: relative; z-index: 2; overflow: hidden; padding: 26px 0; border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(4, 55, 109, 0.25), rgba(31, 95, 174, 0.12), rgba(4, 55, 109, 0.25)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 30px; width: max-content; animation: marquee 52s linear infinite; }
.marquee span { font-size: clamp(26px, 3.6vw, 52px); font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.marquee span:nth-child(4n + 1) { color: transparent; -webkit-text-stroke: 1.4px rgba(160, 195, 255, 0.55); }
.marquee i { width: 12px; height: 12px; flex: none; border-radius: 3px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee { direction: ltr; }
.dots { display: none; }

.wrap-x { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); box-sizing: border-box; }
.sec { padding-top: var(--sec); }
.sec-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: clamp(40px, 5vw, 64px); }
.stat { padding: 26px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(31, 95, 174, 0.16), rgba(8, 24, 52, 0.3)); border: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(38px, 4.2vw, 62px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: linear-gradient(180deg, #fff, #f4cf7c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat { min-width: 0; }
.stat .stat-unit, .stat .stat-word { display: block; margin-top: 6px; font-style: normal; font-size: clamp(18px, 1.8vw, 24px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--gold); overflow-wrap: anywhere; }
.stat b.stat-word { background: none; color: var(--gold); }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-weight: 600; font-size: 15px; overflow-wrap: break-word; }

/* ---------- Арена битв ---------- */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.format { padding: 14px; overflow: hidden; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); }
.format:hover { transform: translateY(-4px); }
.arena { border-radius: 16px; overflow: hidden; background: #050c1c; border: 1px solid rgba(255, 255, 255, 0.06); }
.score { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: rgba(0, 0, 0, 0.35); }
.score b { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; min-width: 52px; }
.s-red { color: #ff8aa1; }
.s-blue { color: #8dbbff; text-align: end; }
.bar { position: relative; flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #2f7cf6, #3d8bff); overflow: hidden; box-shadow: 0 0 14px rgba(61, 139, 255, 0.5); }
.bar-red { position: absolute; inset: 0 auto 0 0; width: 62%; background: linear-gradient(90deg, #ff2e5b, #ff5f7f); box-shadow: 0 0 14px rgba(255, 61, 99, 0.7); transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .bar-red { inset: 0 0 0 auto; }
.tiles { display: grid; gap: 3px; padding: 3px; aspect-ratio: 4 / 3; }
.arena-2 .tiles { grid-template-columns: 1fr 1fr; }
.arena-4 .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.arena-8 .tiles { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; }
.tile-p { position: relative; overflow: hidden; border-radius: 10px; }
.tile-p::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255, 61, 99, 0.75); }
.tile-p.blue::after { box-shadow: inset 0 0 0 2px rgba(61, 139, 255, 0.85); }
.tile-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.format.is-soon .tiles { filter: saturate(0.6) brightness(0.75); }
.format-body { padding: 18px 8px 8px; }
.format-name { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #fff; }
.soon { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; color: #2b1d00; background: linear-gradient(135deg, var(--gold), var(--gold-2)); }
.format h3 { font-size: 22px; margin-top: 6px; }
.format-body > p:last-child { margin-top: 8px; color: var(--muted); font-size: 15.5px; }
.steps-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.steps-line li { position: relative; padding: 18px 16px; border-radius: 18px; background: rgba(10, 26, 54, 0.5); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.steps-line .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: linear-gradient(135deg, #ff5577, #3d8bff); margin-bottom: 6px; }
.steps-line b { font-size: 16px; }
.steps-line small { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Заработок ---------- */
.streams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stream { padding: 26px 24px 24px; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.stream:hover { transform: translateY(-4px); }
.stream-n { position: absolute; inset-inline-end: 20px; top: 16px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: rgba(244, 207, 124, 0.55); font-variant-numeric: tabular-nums; }
.stream-ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #2b1d00; background: linear-gradient(135deg, #ffe7a8, #e2a33a); box-shadow: 0 10px 26px rgba(226, 163, 58, 0.3); margin-bottom: 18px; }
.stream-ico .i { width: 25px; height: 25px; }
.stream h3 { font-size: 20px; }
.stream p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }
.flow { margin-top: 16px; padding: clamp(24px, 3vw, 40px); }
.flow h3 { font-size: clamp(22px, 2.2vw, 30px); }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; position: relative; }
.flow-steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 31px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--gold)); opacity: 0.6; transform-origin: left; transform: scaleX(0); transition: transform 1.4s 0.3s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .flow-steps::before { transform-origin: right; }
.flow.in .flow-steps::before { transform: scaleX(1); }
.flow-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.flow-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #071631; border: 1px solid rgba(244, 207, 124, 0.45); color: var(--gold); box-shadow: 0 0 0 6px rgba(244, 207, 124, 0.06), 0 12px 30px rgba(0, 0, 0, 0.4); margin-bottom: 6px; }
.flow-ico .i { width: 28px; height: 28px; }
.flow-steps b { font-size: 16.5px; }
.flow-steps small { color: var(--muted); font-size: 14px; }
.flow-steps b, .flow-steps small { max-width: 100%; overflow-wrap: anywhere; }
.payouts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.payouts span { color: var(--dim); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin-inline-end: 6px; }
.payouts b { padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 15px; }
.note { margin-top: 16px; font-size: 14px; }
.note a { color: var(--dim); }

/* ---------- Amagi команды ---------- */
.teams-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.points { display: grid; gap: 12px; }
.points li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: rgba(10, 26, 54, 0.45); border: 1px solid var(--line); }
.points .n { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #2f7cf6, #3a3fd8); }
.points b { font-size: 17px; }
.points p { color: var(--muted); font-size: 15.5px; margin-top: 2px; }
.team-card { padding: 28px; }
.team-head { display: flex; align-items: center; gap: 16px; }
.crest { width: 64px; height: 64px; flex: none; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(135deg, #ffe7a8, #c99a3a 55%, #7a5a18); }
.crest img { width: 34px; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }
.team-head b { font-size: 24px; letter-spacing: -0.02em; display: block; }
.team-head small { color: var(--gold); font-weight: 700; }
.team-faces { display: flex; align-items: center; margin: 22px 0 18px; padding-inline-start: 10px; }
.ava { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #0a1a36; margin-inline-start: -10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.team-faces .more { margin-inline-start: 8px; font-size: 14px; font-weight: 800; color: var(--muted); }
.team-progress { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.team-progress .fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--gold)); transition: width 1.6s 0.3s cubic-bezier(.2, .8, .2, 1); }
.team-card.in .team-progress .fill { width: 72%; }
.team-card > small { display: block; margin-top: 8px; font-size: 13.5px; }
.board { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.board p { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.board p .i { width: 20px; height: 20px; color: var(--gold); }
.row { display: grid; grid-template-columns: 22px 1fr 34%; align-items: center; gap: 10px; font-size: 15px; }
.row span { color: var(--dim); font-weight: 800; }
.row b { font-weight: 650; display: flex; align-items: center; gap: 6px; min-width: 0; }
.row b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #2b1d00; background: var(--gold); padding: 2px 7px; border-radius: 99px; flex: none; white-space: nowrap; }
.track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; display: block; }
.track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3d8bff, #7fb0ea); width: 0; transition: width 1.4s 0.5s cubic-bezier(.2, .8, .2, 1); }
.row.me .track i { background: linear-gradient(90deg, #e2a33a, #ffe7a8); }
.team-card.in .w1 { width: 96%; }
.team-card.in .w2 { width: 81%; }
.team-card.in .w3 { width: 64%; }
.team-card.in .w4 { width: 47%; }

/* ---------- Пять приложений в одном ---------- */
.oneapp { padding: clamp(28px, 4vw, 52px); text-align: center; overflow: hidden; }
.oneapp .sec-head { margin-inline: auto; }
.merge { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.apps li { display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); font-weight: 650; font-size: 15px; text-decoration: line-through; text-decoration-color: rgba(255, 61, 99, 0.6); }
.apps .i { width: 20px; height: 20px; }
.merge-arrow { color: var(--gold); display: inline-flex; }
.merge-arrow .i { width: 34px; height: 34px; }
[dir="rtl"] .merge-arrow .i, [dir="rtl"] .link-arrow .i { transform: scaleX(-1); }
.merge-result { display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px 14px 16px; border-radius: 20px; background: linear-gradient(135deg, #2f7cf6, #1f5fae 55%, #3a3fd8); box-shadow: 0 16px 50px rgba(47, 124, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.merge-result img { width: 40px; height: auto; }
.merge-result b { font-size: 28px; letter-spacing: -0.03em; }

/* ---------- Плитки ---------- */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { --mx: 50%; --my: 50%; padding: 26px 24px; overflow: hidden; isolation: isolate; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(61, 139, 255, 0.22), transparent 45%); opacity: 0; transition: opacity 0.3s; }
.tile:hover { transform: translateY(-4px); }
.tile:hover::before { opacity: 1; }
.tile-1, .tile-6, .tile-7, .tile-8 { grid-column: span 2; }
.tile-ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2f7cf6, #3a3fd8); box-shadow: 0 10px 26px rgba(47, 124, 246, 0.4); margin-bottom: 20px; }
.tile-ico .i { width: 25px; height: 25px; }
.tile-2 .tile-ico, .tile-7 .tile-ico { background: linear-gradient(135deg, #ff5577, #b02cff); box-shadow: 0 10px 26px rgba(255, 61, 99, 0.35); }
.tile-4 .tile-ico, .tile-5 .tile-ico { background: linear-gradient(135deg, #ffe7a8, #e2a33a); color: #2b1d00; box-shadow: 0 10px 26px rgba(226, 163, 58, 0.3); }
.tile h3 { font-size: 21px; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* ---------- ИИ ---------- */
.ai-card { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; padding: clamp(28px, 4vw, 52px); border-radius: 32px; background: radial-gradient(120% 140% at 0% 0%, rgba(47, 124, 246, 0.28), rgba(10, 26, 56, 0.6) 55%), rgba(6, 18, 40, 0.6); border: 1px solid rgba(127, 176, 234, 0.22); overflow: hidden; }
.ai-orb { position: relative; width: 280px; height: 280px; margin: 0 auto; display: grid; place-items: center; }
.ai-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(127, 176, 234, 0.35); }
.ai-orb i:nth-child(1) { animation: spin 18s linear infinite; border-top-color: #7fb0ea; border-width: 2px; }
.ai-orb i:nth-child(2) { inset: 34px; animation: spin 12s linear infinite reverse; border-right-color: var(--gold); border-width: 2px; }
.ai-orb i:nth-child(3) { inset: 70px; background: radial-gradient(circle, rgba(61, 139, 255, 0.55), rgba(31, 95, 174, 0.1) 70%); box-shadow: 0 0 80px rgba(61, 139, 255, 0.55); animation: halo2 4s ease-in-out infinite; }
@keyframes halo2 { 50% { opacity: 0.7; transform: scale(1.06); } }
.ai-orb img { position: relative; width: 70px; height: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.ai-items div { padding: 15px 17px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.ai-items b { display: block; font-size: 16px; }
.ai-items span { color: var(--muted); font-size: 15px; }

/* ---------- Блог, вопросы ---------- */
.blog-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.blog-cards:empty { display: none; }
.bcard { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: rgba(10, 28, 58, 0.55); border: 1px solid var(--line); transition: transform 0.35s, border-color 0.3s; }
.bcard:hover { transform: translateY(-4px); border-color: rgba(127, 176, 234, 0.45); }
.bcard-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.bcard-ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #2f7cf6, #0b2450 70%); }
.bcard-ph img { width: 54px; }
.bcard-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bcard time { font-size: 13px; color: var(--sky); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.bcard h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
.bcard p { color: var(--muted); font-size: 15px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; font-weight: 700; text-decoration: none; color: var(--sky); }
.link-arrow .i { width: 20px; height: 20px; transition: transform 0.25s; }
.link-arrow:hover .i { transform: translateX(4px); }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.qa { border-radius: 18px; background: rgba(10, 28, 58, 0.55); border: 1px solid var(--line); transition: border-color 0.3s, background 0.3s; }
.qa[open] { border-color: rgba(127, 176, 234, 0.4); background: rgba(16, 40, 80, 0.6); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { position: relative; width: 22px; height: 22px; flex: none; }
.qa summary i::before, .qa summary i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2px; border-radius: 2px; background: var(--sky); transition: transform 0.3s; }
.qa summary i::after { transform: rotate(90deg); }
.qa[open] summary i::after { transform: rotate(0); }
.qa p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- Призыв ---------- */
.cta { position: relative; z-index: 2; padding: var(--sec) var(--gutter) calc(var(--sec) * 1.1); text-align: center; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; top: 55%; width: 1100px; height: 700px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(47, 124, 246, 0.42), transparent); filter: blur(30px); }
.cta-in { position: relative; max-width: 820px; margin: 0 auto; }
.cta-faces { display: flex; justify-content: center; margin-bottom: 26px; padding-inline-start: 10px; }
.cta-faces .ava { width: 58px; height: 58px; border-width: 3px; animation: bob 4s ease-in-out infinite; }
.cta-faces .ava:nth-child(2n) { animation-delay: -1s; }
.cta-faces .ava:nth-child(3n) { animation-delay: -2s; }
.cta h2 { font-size: clamp(42px, 6.2vw, 92px); }
.cta .stores { justify-content: center; }

/* ---------- Подвал ---------- */
.foot { border-top: 1px solid var(--line); background: rgba(1, 6, 14, 0.75); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; box-sizing: border-box; }
.foot-brand img { height: 38px; width: auto; }
.foot-brand p { margin-top: 12px; color: var(--muted); font-weight: 600; }
.foot-brand .store { min-width: 150px; min-height: 50px; }
.foot-brand .store b { font-size: 17px; }
.foot-col { display: flex; flex-direction: column; gap: 0; }
.foot-col h3 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.foot-col a { display: flex; align-items: center; min-height: 40px; color: var(--muted); text-decoration: none; font-size: 15px; overflow-wrap: anywhere; }
.foot-col a:hover { color: var(--text); }
.foot-langs { max-width: 1240px; margin: 0 auto; padding: 18px var(--gutter); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 6px 16px; border-top: 1px solid var(--line); }
.foot-langs a { color: var(--dim); text-decoration: none; font-size: 13.5px; }
.foot-langs a:hover, .foot-langs a[aria-current] { color: var(--text); }
.foot-lang { max-width: 1240px; margin: 0 auto; padding: 14px var(--gutter); box-sizing: border-box; border-top: 1px solid var(--line); }
.foot-lang-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.foot-lang-btn:hover { color: var(--text); border-color: rgba(127, 176, 234, 0.4); }
.foot-lang-btn .i { width: 18px; height: 18px; }
.foot-bottom { max-width: 1240px; margin: 0 auto; padding: 16px var(--gutter) calc(30px + env(safe-area-inset-bottom)); color: var(--dim); font-size: 14px; box-sizing: border-box; }

/* ======================================================================
   Планшет и телефон (<1100px): телефон внутри каждой главы, без «сцены».
   ====================================================================== */
/* Узкий компьютер: пункты меню компактнее, чтобы длинные переводы помещались в шапку. */
@media (min-width: 1100px) and (max-width: 1359px) {
  .topbar-in { gap: 14px; }
  .topnav a { font-size: 14px; padding: 8px 10px; }
}

@media (max-width: 1099px) {
  .stage, .scroll-cue { display: none; }
  .grain { display: none; }
  .aurora { filter: blur(50px); }
  .topnav { display: none; }
  .burger { display: block; }
  .menu-open .topnav {
    display: flex; flex-direction: column; position: fixed; top: 72px; left: 12px; right: 12px; padding: 10px; border-radius: 20px; gap: 2px;
    background: rgba(4, 14, 32, 0.96); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  }
  .menu-open .topnav a { padding: 14px 16px; font-size: 17px; }

  .chapter, .hero, .feature, .feature:last-child { min-height: 0; }
  .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding-block: clamp(40px, 6vw, 72px); }
  .hero { padding-top: 104px; }
  .chapter[data-side] .copy, .chapter[data-side] .hero-copy { grid-column: auto; padding: 0; }
  .chapter[data-side="left"] .mphone { order: -1; }
  .mphone { display: block; margin: 0; perspective: 1400px; }
  .mrig {
    --h: min(64vh, 560px); --w: calc(var(--h) * 0.4805); --r: calc(var(--w) * 0.175); --d: calc(var(--w) * 0.1); --bz: calc(var(--w) * 0.03);
    position: relative; width: var(--w); height: var(--h); margin: 0 auto; transform-style: preserve-3d;
  }
  .mrig .slice:nth-child(1) { transform: translateZ(calc(var(--d) * -0.5)); }
  .mrig .slice:nth-child(2) { transform: translateZ(calc(var(--d) * -0.357)); }
  .mrig .slice:nth-child(3) { transform: translateZ(calc(var(--d) * -0.214)); }
  .mrig .slice:nth-child(4) { transform: translateZ(calc(var(--d) * -0.071)); }
  .mrig .slice:nth-child(5) { transform: translateZ(calc(var(--d) * 0.071)); }
  .mrig .slice:nth-child(6) { transform: translateZ(calc(var(--d) * 0.214)); }
  .mrig .slice:nth-child(7) { transform: translateZ(calc(var(--d) * 0.357)); }
  .mrig .slice:nth-child(8) { transform: translateZ(calc(var(--d) * 0.49)); }
  .mrig .halo { inset: -20% -50%; }
  .mphone .phone { transform: rotateY(-180deg) rotateX(8deg); transition: transform 1.3s cubic-bezier(.2, .8, .2, 1); }
  .mphone.in .phone { transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 4deg)); }
  .mphone.in.live .phone { transition: transform 0.3s linear; }
  .mphone .chip { transform: translateZ(70px) scale(0.85); }
  .mphone.in .chip { opacity: 1; transform: translateZ(70px); }
  .mphone.in .chip-1 { transition-delay: 0.7s; }
  .mphone.in .chip-2 { transition-delay: 0.85s; }
  .mphone.in .chip-3 { transition-delay: 1s; }
  .mphone .chip-1 { left: -28%; top: 12%; right: auto; }
  .mphone .chip-2 { right: -24%; top: 46%; left: auto; }
  .mphone .chip-3 { left: -22%; bottom: 10%; right: auto; }
  /* Телефоны и планшеты: плоский телефон (один слой) вместо объёмного из 12 слоёв. Объёмные 3D-слои в каждой главе
     переполняли память Safari на iPhone («Возникла проблема на странице», перезагрузка) и ломали горизонтальное
     листание карточек. Поворот, переворот при появлении и наклон при прокрутке остаются. */
  .mrig, .mphone .phone, .mphone .chips, .mphone .chipset { transform-style: flat; }
  .mphone .phone { will-change: auto; }
  .mphone .slice, .mphone .back { display: none; }
  .mphone .front { transform: none; box-shadow: inset 0 0 0 1.5px #9ab1d3, inset 0 0 0 3px #101a2b, 0 0 0 1px rgba(255, 255, 255, 0.05), 0 30px 60px rgba(0, 0, 0, 0.45); }
  .mphone .screen { transform: none; }
  .mphone .halo { filter: none; animation: none; transform: none; }
  /* Угол и прозрачность задаёт прокрутка (landing.js) каждый кадр — без своей анимации, чтобы не отставать от пальца. */
  .mphone .phone, .mphone.in .phone, .mphone.in.live .phone { transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 4deg)); opacity: var(--po, 1); transition: none; }
  .mphone .chip, .mphone.in .chip, .mphone .chipset.on .chip { transform: none; }
  .mphone .chip { scale: 0.85; transition: opacity 0.5s, scale 0.5s; }
  /* Появление блоков на телефонах и планшетах: короче и без размытия (размытие тяжело для мобильной видеокарты). */
  .reveal { filter: none; transform: translateY(18px); transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(.2, .8, .2, 1); }
  .reveal.in { transform: none; }
  .mphone.in .chip { scale: 1; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formats { grid-template-columns: 1fr 1fr; }
  .formats .format:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
  .steps-line { grid-template-columns: repeat(5, minmax(180px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .steps-line::-webkit-scrollbar { display: none; }
  .steps-line li { scroll-snap-align: start; }
  .streams { grid-template-columns: 1fr 1fr; }
  .teams-grid { grid-template-columns: 1fr; }
  .team-card { max-width: 560px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .tile-1, .tile-6 { grid-column: span 2; }
  .tile-7, .tile-8 { grid-column: auto; }
  .ai-card { grid-template-columns: 1fr; gap: 26px; }
  .ai-orb { width: 200px; height: 200px; }
  .ai-orb i:nth-child(2) { inset: 24px; }
  .ai-orb i:nth-child(3) { inset: 50px; }
  .faq-list { grid-template-columns: 1fr; }
  .blog-cards { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: span 2; }
}

/* Телефон (<720px): одна колонка. */
@media (max-width: 719px) {
  html.landing body { font-size: 16.5px; }
  /* Лёгкий фон на телефонах: без размытых анимированных пятен и наложения зерна (тормозят прокрутку). */
  .aurora { filter: none; inset: 0; opacity: 1; background: radial-gradient(120% 60% at 80% 0%, rgba(31, 95, 174, 0.38), transparent 70%), radial-gradient(90% 50% at 0% 45%, rgba(80, 60, 220, 0.18), transparent 70%), radial-gradient(90% 50% at 60% 100%, rgba(201, 154, 58, 0.1), transparent 70%); }
  .aurora i, .grain { display: none; }
  .chip, .topbar.scrolled, .langpick-menu, .menu-open .topnav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chip { background: rgba(12, 30, 64, 0.94); }
  .topbar.scrolled { background: rgba(2, 8, 20, 0.94); }
  .lead { font-size: 17px; line-height: 1.62; }
  .topbar-in { height: 64px; gap: 10px; }
  .menu-open .topnav { top: 64px; }
  .logo img { height: 26px; }
  .btn-glow { padding: 9px 14px; font-size: 14px; }
  .langpick summary span { display: none; }
  .langpick summary { padding: 10px; min-width: 42px; min-height: 42px; }
  .topbar-end { gap: 8px; }
  .langpick-menu { grid-template-columns: repeat(2, 1fr); position: fixed; top: 64px; inset-inline: 12px; width: auto; }

  .chapter { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 34px; }
  .hero { padding-top: calc(92px + env(safe-area-inset-top)); padding-bottom: 10px; text-align: center; }
  .hero-copy { margin: 0 auto; }
  .hero-title { --hs: clamp(52px, 15vw, 84px); align-items: center; margin-top: 18px; }
  .hero-title.is-long { --hs: clamp(38px, 11.5vw, 76px); }
  .hero-title.is-xlong { --hs: clamp(32px, 9.4vw, 66px); }
  .hero-lead { margin-inline: auto; font-size: 16.5px; margin-top: 18px; }
  .hero .stores, .trust { justify-content: center; }
  .chapter[data-side] .mphone { order: 0; }
  .mrig { --h: min(70vh, 470px); }
  .hero .mrig { --h: min(66vh, 480px); }
  .mphone { margin-top: 14px; }
  .mphone .chip { padding: 7px 11px 7px 7px; border-radius: 13px; gap: 8px; }
  .mphone .chip-ico { width: 28px; height: 28px; border-radius: 9px; }
  .mphone .chip-ico .i { width: 16px; height: 16px; }
  .mphone .chip-txt b { font-size: 12.5px; }
  .mphone .chip-txt small { font-size: 10.5px; }
  .mphone .chip-1 { left: -22%; }
  .mphone .chip-2 { right: -24%; }
  .mphone .chip-3 { left: -18%; }
  .copy h2, .sec-head h2, .ai h2 { font-size: clamp(32px, 8.6vw, 44px); }
  .lead { margin-top: 12px; }
  .ticks { margin-top: 16px; gap: 9px; }
  .ticks li { font-size: 15px; }
  .stores { margin-top: 20px; gap: 10px; flex-wrap: wrap; }
  .store { min-width: 0; flex: 1 1 140px; min-height: 52px; padding: 5px 12px 5px 10px; gap: 8px; border-radius: 14px; }
  .store b { font-size: 16px; }
  .store small { font-size: 11px; }
  .store-logo { width: 23px; height: 23px; }
  .trust { font-size: 13.5px; gap: 6px 14px; }
  .marquee { padding: 18px 0; }

  .stats { gap: 10px; }
  .stat { padding: 18px 16px; }
  .formats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .formats::-webkit-scrollbar { display: none; }
  .format, .formats .format:last-child { flex: 0 0 84%; scroll-snap-align: center; display: block; }
  .format-name { font-size: 24px; }
  .streams { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 4px; scrollbar-width: none; }
  .streams::-webkit-scrollbar { display: none; }
  .stream { flex: 0 0 78%; scroll-snap-align: center; }
  /* Карточки в ленте видны сразу (появление по одной сбоку выглядело как недогрузка) + точки-индикатор. */
  .formats > .reveal, .streams > .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
  .dots i { display: block; width: 7px; height: 7px; border-radius: 99px; background: rgba(160, 195, 255, 0.28); transition: width 0.3s, background 0.3s; }
  .dots i.on { width: 22px; background: var(--gold); }
  .flow-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 12px; }
  .flow-steps b, .flow-steps small, .copy h2, .sec-head h2, .lead { overflow-wrap: break-word; }
  .flow-steps::before { display: none; }
  .bento-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 18px 16px; }
  .tile-ico { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 14px; }
  .tile h3 { font-size: 17px; }
  .tile p { font-size: 14px; }
  .ai-items { grid-template-columns: 1fr; }
  .blog-cards { grid-template-columns: 1fr; }
  .qa summary { padding: 17px 18px; font-size: 16px; }
  .qa p { padding: 0 18px 18px; }
  .team-card { padding: 22px 18px; }
  .apps li { padding: 10px 13px; font-size: 14px; }
  .cta-faces .ava { width: 46px; height: 46px; }
  .foot-in { padding-top: 44px; gap: 28px; }
  .foot-brand .stores { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .topbar .btn-glow { display: none; }
  .store { padding: 5px 10px 5px 9px; gap: 7px; }
  .store b { font-size: 15px; }
  .store.is-soon small { letter-spacing: 0.03em; }
  .stat { padding: 16px 13px; }
  .stat b { font-size: 34px; }
  .stat span { font-size: 14px; }
  .team-faces .ava { width: 38px; height: 38px; }
  .row { grid-template-columns: 20px 1fr 28%; gap: 8px; font-size: 14px; }
  .row b { flex-wrap: wrap; row-gap: 3px; }
  .row b span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}

/* Узкие телефоны: кнопки магазинов друг под другом — длинные подписи («Скоро» на 176 языках) не обрезаются. */
@media (max-width: 419px) {
  .stores { flex-wrap: wrap; }
  .store { flex: 1 1 100%; max-width: 340px; justify-content: center; }
  .hero .stores { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html.landing { scroll-behavior: auto; }
  .aurora i, .halo, .marquee-track, .hero-title .w, .ai-orb i, .cta-faces .ava, .scroll-cue .i, .eyebrow .dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .scr { transition: opacity 0.4s; }
  .mphone .phone, .mphone.in .phone { transform: rotateY(-12deg); transition: none; opacity: 1; }
}

/* Заголовок первого экрана по ширине своей колонки: самое длинное слово (класс lN — N букв) всегда помещается целиком,
   на любом экране и в любом языке. Старые браузеры без container queries — размеры выше (is-long / is-xlong). */
@supports (container-type: inline-size) {
  .hero-copy { container-type: inline-size; width: 100%; }
  .hero-title { font-size: min(var(--hs), var(--fit, 100cqi)); }
  .hero-title.l4 { --fit: calc(130cqi / 4); }
  .hero-title.l5 { --fit: calc(130cqi / 5); }
  .hero-title.l6 { --fit: calc(130cqi / 6); }
  .hero-title.l7 { --fit: calc(130cqi / 7); }
  .hero-title.l8 { --fit: calc(130cqi / 8); }
  .hero-title.l9 { --fit: calc(130cqi / 9); }
  .hero-title.l10 { --fit: calc(130cqi / 10); }
  .hero-title.l11 { --fit: calc(130cqi / 11); }
  .hero-title.l12 { --fit: calc(130cqi / 12); }
  .hero-title.l13 { --fit: calc(130cqi / 13); }
  .hero-title.l14 { --fit: calc(130cqi / 14); }
  .hero-title.l15 { --fit: calc(130cqi / 15); }
  .hero-title.l16 { --fit: calc(130cqi / 16); }
  .hero-title.l17 { --fit: calc(130cqi / 17); }
  .hero-title.l18 { --fit: calc(130cqi / 18); }
  .hero-title.l19 { --fit: calc(130cqi / 19); }
  .hero-title.l20 { --fit: calc(130cqi / 20); }
}

/* ======================================================================
   Общие шапка и подвал всех страниц (главная, блог, справка, документы, поддержка, монеты) и две темы:
   тёмно-синяя (по умолчанию) и светлая. Тема — атрибут data-theme у <html> (theme.js до отрисовки, site.js — кнопка).
   ====================================================================== */
.theme-btn {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 999px; cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid var(--line); transition: background 0.2s, border-color 0.2s;
}
.theme-btn:hover { background: rgba(127, 176, 234, 0.12); border-color: rgba(127, 176, 234, 0.35); }
.theme-btn .i { width: 19px; height: 19px; }
.theme-btn .ti-dark, [data-theme="light"] .theme-btn .ti-light { display: none; }
[data-theme="light"] .theme-btn .ti-dark { display: block; }
.btn-coins {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 15px; border-radius: 999px; white-space: nowrap;
  font-weight: 700; font-size: 14.5px; text-decoration: none; color: var(--gold); border: 1px solid rgba(244, 207, 124, 0.45);
  background: rgba(244, 207, 124, 0.08); transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-coins:hover, .btn-coins.on { background: rgba(244, 207, 124, 0.16); border-color: rgba(244, 207, 124, 0.7); transform: translateY(-1px); }
.btn-coins .i { width: 18px; height: 18px; }
.topnav-coins { display: none !important; }
.topnav a[aria-current] { color: var(--text); background: rgba(127, 176, 234, 0.12); }
.topnav-coins .i { width: 18px; height: 18px; margin-inline-end: 8px; vertical-align: -3px; }
.logo { gap: 0; }
.logo-img.on-light, [data-theme="light"] .logo-img.on-dark { display: none; }
[data-theme="light"] .logo-img.on-light { display: block; }
.foot-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.foot-mail { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.foot-mail:hover { color: var(--text); }
.foot-mail .i { width: 18px; height: 18px; }
@media (min-width: 1100px) { .foot-in { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
@media (max-width: 1099px) { .foot-in { grid-template-columns: 1fr 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 719px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 359px) { .foot-in { grid-template-columns: 1fr; } }
@media (min-width: 1100px) and (max-width: 1359px) {
  .btn-coins span { display: none; }
  .btn-coins { padding: 0; width: 42px; justify-content: center; }
}
@media (max-width: 1099px) {
  .menu-open .topnav .topnav-coins { display: flex !important; align-items: center; color: var(--gold); }
  .btn-coins span { display: none; }
  .btn-coins { padding: 0; width: 42px; justify-content: center; }
}
@media (max-width: 719px) {
  .btn-coins, .theme-btn { width: 40px; height: 40px; min-height: 40px; }
  .topbar-end { gap: 6px; }
}
@media (max-width: 420px) {
  .btn-coins { display: none; }
}

/* ---------- Светлая тема ---------- */
[data-theme="light"] {
  --bg: #f4f7fc; --navy: #04376d; --sky: #1f5fae; --ice: #17325c; --text: #0b1730; --muted: #46597a; --dim: #66789a;
  --line: rgba(20, 60, 120, 0.13); --glass-2: rgba(255, 255, 255, 0.92); --gold: #a86f00; --gold-2: #8a5a00;
  color-scheme: light;
}
[data-theme="light"] .grain { display: none; }
[data-theme="light"] .aurora { opacity: 0.55; }
[data-theme="light"] .aurora i { mix-blend-mode: multiply; }
[data-theme="light"] .sky { filter: invert(0.75) hue-rotate(180deg); }
[data-theme="light"] .glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)) padding-box,
    linear-gradient(140deg, rgba(31, 95, 174, 0.22), rgba(127, 176, 234, 0.12) 40%, rgba(201, 154, 58, 0.25)) border-box;
  box-shadow: 0 20px 60px rgba(20, 50, 100, 0.1), inset 0 1px 0 #fff;
}
[data-theme="light"] .topbar.scrolled { background: rgba(255, 255, 255, 0.86); border-color: var(--line); }
[data-theme="light"] .langpick-menu, [data-theme="light"] .menu-open .topnav { background: rgba(255, 255, 255, 0.98); box-shadow: 0 30px 80px rgba(20, 50, 100, 0.18); }
[data-theme="light"] .foot { background: rgba(255, 255, 255, 0.7); }
[data-theme="light"] .copy h2, [data-theme="light"] .sec-head h2, [data-theme="light"] .ai h2, [data-theme="light"] .cta h2 { background: linear-gradient(180deg, #0b1730 30%, #1f5fae); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .hero-title .w { background-image: linear-gradient(100deg, #0b1730 0%, #17325c 20%, #1f5fae 36%, #2f7cf6 50%, #1f5fae 64%, #17325c 80%, #0b1730 100%); }
[data-theme="light"] .hero-title .w3 { background-image: linear-gradient(100deg, #1f5fae 0%, #2f7cf6 20%, #5b4fd8 36%, #b07a12 50%, #5b4fd8 64%, #2f7cf6 80%, #1f5fae 100%); }
[data-theme="light"] .stat b { background: linear-gradient(180deg, #0b1730, #1f5fae); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .eyebrow { color: var(--navy); background: rgba(31, 95, 174, 0.08); border-color: rgba(31, 95, 174, 0.22); }
[data-theme="light"] .chip { background: rgba(255, 255, 255, 0.94); border-color: rgba(31, 95, 174, 0.18); color: var(--text); box-shadow: 0 16px 40px rgba(20, 50, 100, 0.16); }
[data-theme="light"] .steps-line li, [data-theme="light"] .points li, [data-theme="light"] .bcard, [data-theme="light"] .qa { background: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .qa[open] { background: #fff; }
[data-theme="light"] .score { background: rgba(255, 255, 255, 0.9); }
[data-theme="light"] .marquee span:nth-child(4n + 1) { -webkit-text-stroke-color: rgba(31, 95, 174, 0.45); }
[data-theme="light"] .burger i { background: var(--text); }
[data-theme="light"] .skip { background: #0b1730; color: #fff; }
@media (max-width: 719px) {
  [data-theme="light"] .topbar.scrolled { background: rgba(255, 255, 255, 0.96); }
  [data-theme="light"] .chip { background: #fff; }
  [data-theme="light"] .aurora { background: radial-gradient(120% 60% at 80% 0%, rgba(31, 95, 174, 0.14), transparent 70%), radial-gradient(90% 50% at 0% 45%, rgba(80, 60, 220, 0.07), transparent 70%); }
}
/* Кнопки магазинов всегда тёмные (как значки App Store и Google Play) — подписи белые в обеих темах. */
.landing a.store, a.store { color: #fff; }
/* Страницы кроме главной (документы, блог, справка, поддержка, монеты): место под закреплённую шапку, фон темы. */
html:not(.landing) body { padding-top: calc(72px + env(safe-area-inset-top)); background-color: var(--bg); color: var(--text); }
html:not(.landing) .topbar { background: rgba(2, 8, 20, 0.86); border-bottom-color: var(--line); }
[data-theme="light"]:not(.landing) .topbar { background: rgba(255, 255, 255, 0.92); }
html:not(.landing) .foot { margin-top: 64px; }
@media (max-width: 719px) {
  html:not(.landing) body { padding-top: calc(64px + env(safe-area-inset-top)); }
}
/* Светлая тема документов, блога, поддержки и монет (стили site.css и blog.css). */
[data-theme="light"] {
  --surface: rgba(255, 255, 255, 0.86); --surface-solid: #ffffff; --border: rgba(20, 60, 120, 0.16);
  --warn-bg: #fff6e0; --warn-text: #7a4b00; --primary: #1f5fae;
}
[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(31, 95, 174, 0.12), transparent 70%),
    radial-gradient(700px 480px at -10% 20%, rgba(58, 63, 216, 0.06), transparent 70%),
    var(--bg);
}
[data-theme="light"] .doc h1, [data-theme="light"] .blog h1 { background: linear-gradient(180deg, #0b1730 30%, #1f5fae); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .doc th { background: rgba(31, 95, 174, 0.08); }
[data-theme="light"] .draft { border-color: rgba(168, 111, 0, 0.3); }
[data-theme="light"] .prose, [data-theme="light"] .doc { color: #1d2b45; }
[data-theme="light"] .prose h2, [data-theme="light"] .prose h3, [data-theme="light"] .prose strong { color: var(--text); }
[data-theme="light"] .prose pre { background: #f0f4fb; }
[data-theme="light"] .post-card, [data-theme="light"] .card { box-shadow: 0 14px 40px rgba(20, 50, 100, 0.08); }
[data-theme="light"] .post-foot { background: linear-gradient(135deg, rgba(31, 95, 174, 0.1), rgba(255, 255, 255, 0.9)); }
[data-theme="light"] .tags a, [data-theme="light"] .tag { color: var(--navy); background: rgba(31, 95, 174, 0.07); border-color: rgba(31, 95, 174, 0.2); }
/* Форма поддержки */
.support-form { margin: 8px 0 36px; }
.support-form h2 { margin: 0 0 6px; font-size: 26px; }
.support-form form { display: grid; gap: 14px; margin-top: 18px; }
.support-form label { display: grid; gap: 6px; font-weight: 650; font-size: 14.5px; color: var(--text); }
.support-form input, .support-form select, .support-form textarea {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border-radius: 12px; font: inherit; font-weight: 400;
  color: var(--text); background: var(--surface-solid, #0b1f40); border: 1px solid var(--border, var(--line));
}
.support-form textarea { resize: vertical; min-height: 140px; }
.support-form input:focus, .support-form select:focus, .support-form textarea:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.sf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sf-check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; color: var(--muted) !important; }
.sf-check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; }
.sf-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.support-form .btn { justify-self: start; min-width: 160px; }
.sf-status { margin: 0; font-weight: 600; }
.sf-status.ok { color: var(--green, #2bb673); }
.sf-status.bad { color: #ff6b81; }
[data-theme="light"] .sf-status.bad { color: #c0233d; }
@media (max-width: 719px) { .sf-row { grid-template-columns: 1fr; } .support-form .btn { justify-self: stretch; } }
html:not(.landing) { scroll-padding-top: 88px; }

/* Справка: вкладки разделов над текстом */
.help-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 22px; padding-bottom: 4px; scrollbar-width: none; }
.help-tabs::-webkit-scrollbar { display: none; }
.help-tabs a {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  font-size: 14.5px; font-weight: 650; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--surface, transparent);
}
.help-tabs a:hover { color: var(--text); border-color: rgba(127, 176, 234, 0.4); }
.help-tabs a[aria-current] { color: #fff; background: linear-gradient(135deg, #2f7cf6, #1f5fae 60%, #3a3fd8); border-color: transparent; }

/* Все документы (/legal/): карточки в две-три колонки */
.doc-hub { max-width: 1240px; padding-top: 36px; }
.doc-hub h1 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.035em; margin: 0 0 8px; }
.hub-group { margin-top: 36px; }
.hub-group h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin: 0 0 14px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hub-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--surface, rgba(12, 32, 66, 0.55)); border: 1px solid var(--line); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hub-card:hover { transform: translateY(-3px); border-color: rgba(127, 176, 234, 0.45); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25); }
.hub-card b { font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; }
.hub-card span { color: var(--muted); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[data-theme="light"] .hub-card:hover { box-shadow: 0 18px 50px rgba(20, 50, 100, 0.12); }

/* ---------- Справка: меню слева (разделы и оглавление), текст справа ---------- */
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 760px); justify-content: center; gap: 56px; max-width: 1180px; padding-top: 40px; }
.help-side { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; }
.help-side-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.help-nav { display: grid; gap: 4px; }
.help-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; text-decoration: none;
  font-weight: 650; font-size: 15px; color: var(--muted); border: 1px solid transparent; transition: background 0.2s, color 0.2s;
}
.help-nav a:hover { color: var(--text); background: rgba(127, 176, 234, 0.08); }
.help-nav a[aria-current] { color: var(--text); background: linear-gradient(90deg, rgba(47, 124, 246, 0.22), rgba(47, 124, 246, 0.06)); border-color: rgba(127, 176, 234, 0.28); }
.help-toc { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.help-toc summary { list-style: none; cursor: default; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.help-toc summary::-webkit-details-marker { display: none; }
.help-toc nav { display: grid; gap: 2px; border-inline-start: 2px solid var(--line); }
.help-toc nav a { display: block; padding: 7px 12px; margin-inline-start: -2px; border-inline-start: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.help-toc nav a:hover, .help-toc nav a.on { color: var(--text); border-inline-start-color: var(--blue); }
.help-article { min-width: 0; }
.help-article h2 { scroll-margin-top: 96px; }
@media (max-width: 1099px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 24px; }
  .help-side { position: static; max-height: none; overflow: visible; }
  .help-side-title { display: none; }
  .help-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .help-nav::-webkit-scrollbar { display: none; }
  .help-nav a { flex: none; min-height: 40px; border-radius: 999px; border-color: var(--line); white-space: nowrap; }
  .help-nav a[aria-current] { color: #fff; background: linear-gradient(135deg, #2f7cf6, #1f5fae 60%, #3a3fd8); border-color: transparent; }
  .help-toc { margin-top: 12px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 14px; }
  .help-toc summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0; }
  .help-toc summary::after { content: "+"; font-size: 18px; font-weight: 600; letter-spacing: 0; }
  .help-toc[open] summary::after { content: "–"; }
  .help-toc nav { padding-bottom: 10px; }
}

/* ---------- Страница «Заработок в Amagi» (/earn/) ---------- */
.earn-page .earn { padding-top: calc(72px + env(safe-area-inset-top)); }
.earn-hero { padding-top: clamp(48px, 7vw, 96px); text-align: center; max-width: 920px; }
.earn-hero h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.045em; line-height: 1.02; margin-top: 14px;
  background: linear-gradient(180deg, #fff 30%, #f4cf7c); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .earn-hero h1 { background: linear-gradient(180deg, #0b1730 30%, #a86f00); -webkit-background-clip: text; background-clip: text; }
.earn-hero .lead { margin: 18px auto 0; max-width: 680px; }
.earn-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.earn-cta .btn-glow { padding: 14px 26px; font-size: 16px; }
.btn-line { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.btn-line:hover { border-color: rgba(127, 176, 234, 0.5); }
.earn-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(40px, 6vw, 72px); }
.earn-fact { display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; }
.earn-fact-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #2b1d00; background: linear-gradient(135deg, #ffe7a8, #e2a33a); box-shadow: 0 10px 26px rgba(226, 163, 58, 0.3); }
.earn-fact-ico .i { width: 23px; height: 23px; }
.earn-fact b { margin-top: 6px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(180deg, #fff, #f4cf7c); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .earn-fact b { background: linear-gradient(180deg, #0b1730, #a86f00); -webkit-background-clip: text; background-clip: text; }
.earn-fact span:last-child { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.earn-calc { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; padding: clamp(24px, 4vw, 44px); align-items: center; }
.earn-calc h2 { font-size: clamp(28px, 3.4vw, 40px); }
.earn-calc .muted { margin-top: 8px; }
.earn-calc-label { display: block; margin-top: 26px; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.earn-calc input[type="range"] {
  --fill: 10%; width: 100%; margin: 16px 0 10px; height: 8px; border-radius: 99px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(90deg, #3d8bff, #f4cf7c var(--fill), rgba(127, 176, 234, 0.18) var(--fill));
}
.earn-calc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid #f4cf7c; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.earn-calc input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #f4cf7c; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.earn-calc-coins { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.earn-calc-out { display: grid; gap: 14px; padding: 24px; border-radius: 20px; background: rgba(2, 8, 20, 0.35); border: 1px solid var(--line); }
[data-theme="light"] .earn-calc-out { background: rgba(31, 95, 174, 0.05); }
.earn-calc-out div { display: flex; flex-direction: column; gap: 4px; }
.earn-calc-out span { color: var(--muted); font-weight: 650; font-size: 14px; }
.earn-calc-out b { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.earn-calc-usd b { font-size: clamp(40px, 5vw, 56px); color: var(--green); }
[data-theme="light"] .earn-calc-usd b { color: #15924f; }
.earn-calc-note { margin: 0; font-size: 14px; color: var(--green); font-weight: 600; }
.earn-calc-note.low { color: var(--gold); }
.earn-fine { margin-top: 12px; font-size: 13.5px; color: var(--dim); }
.earn-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.earn-team { display: flex; gap: 24px; align-items: flex-start; padding: clamp(24px, 4vw, 40px); }
.earn-team-ico { flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2f7cf6, #3a3fd8); }
.earn-team-ico .i { width: 30px; height: 30px; }
.earn-team h2 { font-size: clamp(24px, 3vw, 34px); }
.earn-team p { margin-top: 10px; color: var(--muted); max-width: 760px; }
.earn-page .cta { margin-top: var(--sec); }
@media (max-width: 1099px) {
  .earn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earn-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earn-calc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .earn-page .earn { padding-top: calc(64px + env(safe-area-inset-top)); }
  .earn-facts { gap: 10px; }
  .earn-fact { padding: 18px 16px; }
  .earn-ways { grid-template-columns: minmax(0, 1fr); }
  .earn-team { flex-direction: column; gap: 16px; }
}
/* Синие кнопки — белый текст в обеих темах (иначе .landing a наследует тёмный цвет светлой темы). */
.landing a.btn-glow, a.btn-glow, .landing a.btn.primary { color: #fff; }

/* ---------- Покупка монет (/topup/): крупные карточки пакетов с кнопкой «Купить» ---------- */
.topup { max-width: 1040px; padding-top: 32px; }
.topup-hero { text-align: center; padding: 28px 0 8px; }
.topup-coin {
  display: block; width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff6d6, #f4cf7c 38%, #c99a3a 70%, #7a5a18);
  box-shadow: 0 18px 50px rgba(226, 163, 58, 0.45), inset 0 -6px 14px rgba(0, 0, 0, 0.25), inset 0 4px 10px rgba(255, 255, 255, 0.6);
  position: relative;
}
.topup-coin::after { content: "A"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 38px/1 var(--font); color: rgba(90, 60, 10, 0.75); }
.topup-hero h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.04em; margin: 0;
  background: linear-gradient(180deg, #fff 30%, #f4cf7c); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .topup-hero h1 { background: linear-gradient(180deg, #0b1730 30%, #a86f00); -webkit-background-clip: text; background-clip: text; }
.topup-hero > p { max-width: 640px; margin: 14px auto 0; font-size: 17px; }
.topup-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.topup-trust li { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.topup-trust li::before { content: "✓"; margin-inline-end: 7px; color: var(--gold); font-weight: 800; }
.topup .card { border-radius: 22px; padding: clamp(20px, 3vw, 30px); margin: 22px 0; }
.topup #step-account { max-width: 640px; margin-inline: auto; transition: box-shadow 0.3s, border-color 0.3s; }
.topup #step-account.attention { border-color: rgba(244, 207, 124, 0.7); box-shadow: 0 0 0 4px rgba(244, 207, 124, 0.18); }
.topup #step-account h2, .topup #step-package h2 { font-size: 20px; }
.topup .found { padding: 10px 12px; border-radius: 14px; background: rgba(54, 227, 154, 0.08); border: 1px solid rgba(54, 227, 154, 0.3); }
.topup h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin: 22px 0 0; }
.topup .packages { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.topup .package {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px 18px; cursor: pointer;
  border-radius: 20px; font: inherit; color: var(--text); text-align: center;
  background: linear-gradient(180deg, rgba(31, 95, 174, 0.18), rgba(8, 24, 52, 0.4)); border: 1px solid var(--line);
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), border-color 0.25s, box-shadow 0.25s;
}
[data-theme="light"] .topup .package { background: linear-gradient(180deg, #ffffff, #f2f6fd); box-shadow: 0 10px 30px rgba(20, 50, 100, 0.08); }
.topup .package:hover, .topup .package:focus-visible { transform: translateY(-4px); border-color: rgba(244, 207, 124, 0.6); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
.topup .package .pk-ico { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff6d6, #f4cf7c 40%, #c99a3a 75%); box-shadow: 0 8px 22px rgba(226, 163, 58, 0.35); }
.topup .package strong { margin-top: 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.topup .package em { color: var(--green); font-style: normal; font-size: 13.5px; font-weight: 700; }
[data-theme="light"] .topup .package em { color: #15924f; }
.topup .package .pk-price { color: var(--muted); font-size: 16px; font-weight: 650; }
.topup .package .pk-buy {
  margin-top: 10px; width: 100%; min-height: 44px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #2f7cf6, #1f5fae 55%, #3a3fd8); box-shadow: 0 8px 22px rgba(47, 124, 246, 0.35);
}
.topup .package.featured { border-color: rgba(244, 207, 124, 0.7); background: linear-gradient(180deg, rgba(244, 207, 124, 0.16), rgba(8, 24, 52, 0.45)); }
[data-theme="light"] .topup .package.featured { background: linear-gradient(180deg, #fff8e6, #ffffff); }
.topup .package.featured .pk-buy { color: #2b1d00; background: linear-gradient(135deg, #ffe7a8, #e2a33a); box-shadow: 0 8px 22px rgba(226, 163, 58, 0.35); }
.topup .package .badge { top: -11px; padding: 3px 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-style: normal; color: #2b1d00; background: linear-gradient(135deg, #ffe7a8, #e2a33a); border-radius: 999px; }
.topup .custom { margin-top: 26px; padding-top: 22px; }
@media (max-width: 719px) {
  .topup .packages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .topup .package { padding: 22px 10px 14px; }
  .topup .package strong { font-size: 20px; }
}
.topup .package .pk-buy { margin-top: auto; }
.topup .package .pk-price { margin-bottom: 12px; }
