/* Экспериментальный лендинг AUTOLAB CRM: тёмный, с движением. Свои цвета — не зависит от style.css панели. */
:root {
  --bg: #04060c; --bg2: #0a0f1c; --line: rgba(120, 150, 255, .14); --text: #eef1f8; --muted: #8d96ab;
  --blue: #0a3fb8; --blue2: #2f6bff; --cyan: #5ad1ff; --red: #ff5a6a;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:has(body.x) { overflow-x: clip; }
body.x { margin: 0; background: var(--bg); color: var(--text); overflow-x: clip;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* фоновые слои (.x-layer) описаны в fx.css; здесь — только подсветка за курсором */
.x-glow { background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 20%), rgba(47, 107, 255, .16), transparent 60%),
                      radial-gradient(900px circle at 10% 110%, rgba(10, 63, 184, .25), transparent 60%); }

/* навигация */
.x-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(4, 6, 12, .55); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.x-logo { font-weight: 800; letter-spacing: .05em; font-size: 18px; }
.x-logo span, .x-foot span span { color: var(--blue2); }
.x-nav nav { display: flex; gap: 28px; color: var(--muted); font-size: 14px; }
.x-nav nav a:hover { color: var(--text); }
.x-nav-cta { display: flex; gap: 8px; align-items: center; }
.x-lang { display: flex; padding: 3px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); }
.x-lang a { padding: 5px 9px; border-radius: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
.x-lang a.on { background: var(--blue2); color: #fff; }
.x-lang a:not(.on):hover { color: var(--text); }

/* кнопки */
.x-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
  padding: 15px 26px; border-radius: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--blue2), var(--blue)); box-shadow: 0 10px 40px rgba(47, 107, 255, .35);
  transition: transform .25s var(--ease), box-shadow .25s; }
.x-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(47, 107, 255, .5); }
.x-btn.sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; box-shadow: none; }
.x-btn.ghost { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .14); box-shadow: none; }
.x-btn.shine::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg);
  animation: shine 3.2s infinite; }
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* первый экран */
.x-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center;
  min-height: calc(100vh - 64px); padding: 48px clamp(16px, 4vw, 48px) 80px; max-width: 1400px; margin: 0 auto; }
.x-kicker { display: inline-block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
  padding: 7px 14px; border: 1px solid rgba(90, 209, 255, .35); border-radius: 999px; background: rgba(90, 209, 255, .06); }
.x-title { font-size: clamp(34px, 3.9vw, 56px); line-height: 1.03; letter-spacing: -.03em; margin: 22px 0 10px; font-weight: 800; }
.x-title .w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(4deg); filter: blur(8px);
  animation: wordIn .8s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + .15s); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: none; } }
.x-title em { font-style: normal; background: linear-gradient(90deg, var(--cyan), var(--blue2), #a98bff, var(--cyan));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite; }
.x-question { font-size: clamp(30px, 3.4vw, 50px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  background: linear-gradient(90deg, var(--cyan), var(--blue2), #a98bff, var(--cyan)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite; }
@keyframes flow { to { background-position: 300% 0; } }
.x-lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 18px 0; }
.x-counter { display: inline-block; padding: 18px 22px; border-radius: 18px; margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(47, 107, 255, .14), rgba(47, 107, 255, .03)); border: 1px solid rgba(47, 107, 255, .35); }
.x-counter-label { color: var(--muted); font-size: 13px; }
.x-counter-value { font-size: clamp(38px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(47, 107, 255, .6); }
.x-counter-sub { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
/* приборная панель: спидометр прибыли и одометр рядом */
.x-cluster { display: flex; align-items: center; gap: 22px; margin: 6px 0 26px; }
.x-cluster .gauge { width: 200px; flex: none; }
.x-cluster-read { min-width: 0; }
.x-odo-row { display: flex; align-items: center; gap: 10px; }
.x-odo-cur { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--cyan); text-shadow: 0 0 24px rgba(90, 209, 255, .5); }
.x-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 3D-сцена справа */
.x-stage { position: relative; perspective: 1400px; height: min(620px, 70vh); }
.x-stage > * { transition: transform .5s var(--ease); }
.x-window { position: absolute; top: 4%; left: 0; width: 92%; border-radius: 16px; overflow: hidden; background: #0d1220;
  border: 1px solid rgba(120, 150, 255, .25); box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03);
  transform: rotateY(-16deg) rotateX(8deg) translateZ(0); animation: floatA 8s ease-in-out infinite; }
.x-phone { position: absolute; right: 0; bottom: 0; width: 34%; border-radius: 30px; border: 7px solid #0b0e16;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 60px rgba(47, 107, 255, .25);
  transform: rotateY(-12deg) rotateX(6deg) translateZ(80px); animation: floatB 7s ease-in-out infinite; }
@keyframes floatA { 50% { translate: 0 -12px; } }
@keyframes floatB { 50% { translate: 0 10px; } }
.x-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #0a0d16; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.x-bar i { width: 10px; height: 10px; border-radius: 50%; background: #262c3a; }
.x-bar i:first-child { background: #ff5f57; } .x-bar i:nth-child(2) { background: #febc2e; } .x-bar i:nth-child(3) { background: #28c840; }
.x-bar span { color: #6b7488; font-size: 12px; margin-left: 10px; }

/* вылетающие уведомления */
.x-toasts { position: absolute; left: -6%; top: 52%; width: min(340px, 70%); display: flex; flex-direction: column; gap: 10px;
  transform: translateZ(140px); pointer-events: none; }
.x-toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 14px;
  background: rgba(16, 22, 38, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(120, 150, 255, .28); box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  animation: toastIn .7s var(--ease) both; }
.x-toast.out { animation: toastOut .5s var(--ease) forwards; }
.x-toast .ic { font-size: 22px; line-height: 1; }
.x-toast b { display: block; font-size: 13px; color: var(--cyan); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-80px) scale(.85) rotate(-4deg); filter: blur(6px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-30px) scale(.9); filter: blur(4px); } }

/* бегущая строка */
.x-marquee { overflow: hidden; border-block: 1px solid var(--line); background: rgba(10, 15, 28, .6); padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.x-marquee > div { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.x-marquee span { font-size: 20px; font-weight: 700; color: #4b5570; white-space: nowrap; }
.x-marquee span:nth-child(3n+1) { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* секции */
.x-section { max-width: 1240px; margin: 0 auto; padding: 110px clamp(16px, 4vw, 48px); }
.x-h2 { font-size: clamp(30px, 4vw, 52px); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 18px; }
.x-sub { color: var(--muted); margin: 0 0 40px; }

/* появление при прокрутке */
[data-reveal] { opacity: 0; transform: translateY(40px); filter: blur(6px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s), filter .9s var(--ease) var(--d, 0s); }
[data-reveal].from-left { transform: translateX(-80px) rotate(-3deg); }
[data-reveal].from-right { transform: translateX(80px) rotate(3deg); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* метки на первом экране */
.x-kickers { display: flex; gap: 8px; flex-wrap: wrap; }
.x-kicker.tg { color: #fff; border-color: rgba(42, 171, 238, .6); background: linear-gradient(135deg, rgba(42, 171, 238, .35), rgba(42, 171, 238, .12));
  display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: .02em; font-weight: 700; }
.x-kicker.tg svg { width: 16px; height: 16px; }

/* Telegram */
.x-tg-head { display: flex; gap: 26px; align-items: center; margin-bottom: 40px; }
.x-tg-logo { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(160deg, #37bbfe, #1d93d2); box-shadow: 0 0 0 10px rgba(42, 171, 238, .12), 0 0 80px rgba(42, 171, 238, .55);
  animation: tgPulse 3s ease-in-out infinite; }
.x-tg-logo svg { width: 52px; height: 52px; margin-left: -4px; }
@keyframes tgPulse { 50% { box-shadow: 0 0 0 18px rgba(42, 171, 238, .06), 0 0 110px rgba(42, 171, 238, .7); } }
.x-tg-lead { color: var(--muted); font-size: 18px; max-width: 760px; margin: 0; }
.x-tg-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.x-tg-role { padding: 24px; border-radius: 22px; background: linear-gradient(180deg, rgba(42, 171, 238, .12), rgba(42, 171, 238, .02));
  border: 1px solid rgba(42, 171, 238, .3); transition: transform .4s var(--ease), box-shadow .4s; }
.x-tg-role:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(42, 171, 238, .2); }
.x-tg-role-h { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.x-tg-role-h span { font-size: 26px; }
.x-tg ul { margin: 0; padding: 0; list-style: none; }
.x-tg li { position: relative; padding: 7px 0 7px 26px; color: #c9d1e3; font-size: 15px; }
.x-tg-role li::before, .x-vs-col.us li::before { content: "✓"; position: absolute; left: 0; color: #2aabee; font-weight: 800; }
.x-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.x-vs-col { padding: 26px; border-radius: 22px; }
.x-vs-col h3 { margin: 0 0 12px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.x-vs-col h3 svg { width: 22px; height: 22px; }
.x-vs-col.them { background: rgba(255, 255, 255, .02); border: 1px dashed rgba(255, 255, 255, .15); }
.x-vs-col.them h3, .x-vs-col.them li { color: #7c8499; }
.x-vs-col.them li::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.x-vs-col.us { background: linear-gradient(135deg, rgba(42, 171, 238, .22), rgba(47, 107, 255, .14)); border: 1px solid rgba(42, 171, 238, .5);
  box-shadow: 0 30px 80px rgba(42, 171, 238, .18); }
.x-vs-col.us li { color: #fff; }

/* боли */
.x-pains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.x-pain { padding: 26px 22px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 90, 106, .1), rgba(255, 90, 106, .02));
  border: 1px solid rgba(255, 90, 106, .25); transition: transform .4s var(--ease), box-shadow .4s, border-color .4s; }
.x-pain:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: 0 24px 60px rgba(255, 90, 106, .18); border-color: rgba(255, 90, 106, .55); }
.x-pain b { font-size: 34px; }
.x-pain h3 { margin: 14px 0 8px; font-size: 19px; }
.x-pain p { margin: 0; color: var(--muted); font-size: 15px; }

/* история одной машины: шаги слева, телефон справа «прилипает» */
.x-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 60px; max-width: 1240px; margin: 0 auto;
  padding: 60px clamp(16px, 4vw, 48px) 40px; }
.x-story-title { grid-column: 1 / -1; margin-bottom: 0; }
.x-story-steps { grid-column: 1; grid-row: 2; }
.x-story-phone { grid-column: 2; grid-row: 2; }
.x-step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s; }
.x-step.on { opacity: 1; }
.x-step span { font-size: 15px; font-weight: 800; color: var(--blue2); letter-spacing: .1em; }
.x-step h3 { font-size: clamp(26px, 3vw, 40px); margin: 8px 0 12px; letter-spacing: -.02em; }
.x-step p { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0; }
.x-story-phone { position: relative; }
.x-device { position: sticky; top: 14vh; height: 72vh; max-height: 640px; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #1a2030, #07090f); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 50px 120px rgba(0, 0, 0, .6), 0 0 80px rgba(47, 107, 255, .2); overflow: hidden; }
.x-device-head { display: flex; flex-direction: column; align-items: center; padding: 12px 0 10px; background: #17212b;
  border-radius: 30px 30px 0 0; }
.x-device-head span { color: #7f91a4; font-size: 12px; }
.x-screen { position: absolute; left: 12px; right: 12px; top: 64px; bottom: 12px; padding: 16px; background: #0e1621;
  border-radius: 0 0 30px 30px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end;
  opacity: 0; transform: translateY(30px) scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.x-screen.on { opacity: 1; transform: none; }
.x-screen.on > * { animation: bubble .55s var(--ease) both; }
.x-screen.on > *:nth-child(2) { animation-delay: .25s; } .x-screen.on > *:nth-child(3) { animation-delay: .5s; }
@keyframes bubble { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.x-msg { background: #182533; padding: 11px 13px; border-radius: 16px 16px 16px 5px; font-size: 15px; max-width: 92%; }
.x-msg.out { align-self: flex-end; background: #2b5278; border-radius: 16px 16px 5px 16px; }
.x-msg.sys { background: rgba(47, 107, 255, .16); border: 1px solid rgba(47, 107, 255, .35); font-size: 14px; }
.x-kb, .x-kb span { text-align: center; font-size: 14px; background: #22303f; border-radius: 10px; padding: 9px; }
.x-kb.two { display: flex; gap: 8px; background: none; padding: 0; } .x-kb.two span { flex: 1; }
.x-photo { height: 130px; border-radius: 12px; margin-bottom: 8px; position: relative;
  background: linear-gradient(135deg, #e9edf2 0%, #c9d1db 45%, #f8fafc 55%, #aab4c0 100%); }
.x-photo::after { content: ""; position: absolute; left: 60%; top: 40%; width: 22px; height: 14px; border-radius: 45%;
  background: #5d6672; box-shadow: 0 0 0 4px rgba(255, 70, 70, .75); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 70, 70, .2); } }
.x-stars { display: flex; gap: 6px; } .x-stars span { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: #182533; font-size: 14px; }
.x-stars .on { background: var(--blue2); flex: 1.6; }

/* экраны */
.x-flat { border-radius: 18px; overflow: hidden; border: 1px solid rgba(120, 150, 255, .25); background: #0d1220;
  box-shadow: 0 60px 140px rgba(0, 0, 0, .6), 0 0 100px rgba(47, 107, 255, .15);
  transform: perspective(1600px) rotateX(calc(28deg * (1 - var(--p, 0)))) scale(calc(.86 + .14 * var(--p, 0)));
  transform-origin: 50% 100%; will-change: transform; }
.x-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.x-pair figure { margin: 0; }
.x-pair img { border-radius: 16px; border: 1px solid rgba(120, 150, 255, .2); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.x-pair figcaption { color: var(--muted); margin-top: 14px; } .x-pair b { color: var(--text); }

/* цифры */
.x-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1240px; margin: 0 auto;
  padding: 20px clamp(16px, 4vw, 48px); gap: 16px; }
.x-stats > div { padding: 26px; border-radius: 20px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); text-align: center; }
.x-stats b { display: block; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff, #8fb0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x-stats span { color: var(--muted); }

/* цена — карточка с переливающейся рамкой */
.x-price { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
  padding: 44px; border-radius: 28px; background: #080c18; isolation: isolate; }
.x-price::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 30px;
  background: conic-gradient(from var(--ang, 0deg), var(--blue2), var(--cyan), #a98bff, var(--blue), var(--blue2));
  animation: spin 6s linear infinite; }
.x-price::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 28px; background: #080c18; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }
.x-price-val { font-size: clamp(34px, 4vw, 52px); font-weight: 800; color: var(--cyan); }
.x-price p { color: var(--muted); max-width: 520px; }
.x-contacts { color: var(--muted); font-size: 14px; margin-top: 12px; text-align: center; } .x-contacts a { color: var(--cyan); }

.x-foot { display: flex; justify-content: space-between; gap: 16px; padding: 28px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* телефон и планшет */
@media (max-width: 960px) {
  .x-nav nav { display: none; }
  .x-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 32px; }
  .x-stage { height: 520px; }
  .x-toasts { left: 0; top: auto; bottom: 4%; }
  .x-pains, .x-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-tg-roles, .x-vs { grid-template-columns: minmax(0, 1fr); }
  .x-tg-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .x-tg-logo { width: 72px; height: 72px; } .x-tg-logo svg { width: 40px; height: 40px; }
  /* На телефоне: телефон «прилипает» сверху, шаги прокручиваются под ним. */
  .x-story { display: block; }
  .x-story-phone { position: sticky; top: 62px; height: 330px; z-index: 2; margin-bottom: 10px; }
  .x-device { position: relative; top: 0; height: 330px; border-radius: 30px; }
  .x-screen { top: 58px; }
  .x-story-steps .x-h2 { margin-top: 10px; }
  .x-step { min-height: 52vh; justify-content: flex-start; padding-top: 24px; }
  .x-step p { font-size: 16px; }
  [data-reveal].from-left, [data-reveal].from-right { transform: translateY(40px); }
  .x-pair { grid-template-columns: minmax(0, 1fr); }
  .x-price { padding: 28px; }
}
@media (max-width: 560px) {
  .x-nav-cta .x-btn { display: none; }  /* «Попробовать» — большой кнопкой под заголовком */
  .x-nav { gap: 8px; }
  .x-logo { font-size: 16px; white-space: nowrap; }
  .x-lang a { padding: 5px 7px; font-size: 12px; }
  .x-stage { height: 430px; }
  .x-window { width: 100%; }
  .x-phone { width: 40%; }
  .x-pains { grid-template-columns: minmax(0, 1fr); }
  .x-cluster { flex-direction: column; text-align: center; gap: 10px; }
  .x-cluster .gauge { width: 220px; }
  .x-odo-row { justify-content: center; }
  .x-btn { width: 100%; }
  .x-nav .x-btn { width: auto; }
}

/* кто просил меньше движения — без анимаций */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .x-title .w, .x-screen { opacity: 1 !important; transform: none !important; filter: none !important; }
  .x-flat { transform: none; }
}
