/* ===== «Живая витрина»: настоящие экраны CRM в рамке ноутбука и телефона ===== */

/* ---------- ноутбук ---------- */
.laptop { position: relative; transform-style: preserve-3d; will-change: transform; transition: transform .25s cubic-bezier(.2,.8,.2,1);
  transform: perspective(1400px) rotateX(calc(var(--tilt, 0) * 22deg)) rotateY(calc(var(--tilt, 0) * -22deg + var(--my, 0) * 1deg)) scale(calc(1 - var(--tilt, 0) * .14)); }
.laptop__screen { position: relative; aspect-ratio: 16 / 10; padding: 1.3%; border-radius: 14px; background: #1a2134; border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 60px 100px -40px #000, 0 0 90px -20px rgba(198,255,61,.28); overflow: hidden; }
.laptop__view { position: relative; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; background: #0b0f1a; }
.laptop__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.04); transition: opacity .55s, transform .9s cubic-bezier(.2,.8,.2,1); }
.laptop__view img.is-active { opacity: 1; transform: none; }
/* блик по стеклу */
.laptop__screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.13) 50%, transparent 58%); transform: translateX(-110%); animation: scrGlare 5s ease-in-out infinite; }
@keyframes scrGlare { 55%, 100% { transform: translateX(110%); } }
.laptop__base { height: 12px; margin: 0 -4%; border-radius: 0 0 16px 16px; background: linear-gradient(#2b3554, #131929); box-shadow: 0 30px 40px -20px #000; }
.laptop__base::after { content: ""; display: block; width: 16%; height: 4px; margin: 0 auto; border-radius: 0 0 6px 6px; background: rgba(0,0,0,.35); }

/* ---------- телефон рядом с ноутбуком ---------- */
.phone { position: absolute; right: -6%; bottom: -10%; width: 17%; aspect-ratio: 390 / 844; padding: 1%; border-radius: 13% / 6%; background: #1a2134; border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 34px 60px -20px #000; transform: translateZ(60px); animation: phoneBob 5s ease-in-out infinite; z-index: 2; }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 11% / 5%; }
@keyframes phoneBob { 50% { transform: translateZ(60px) translateY(-12px); } }

/* ---------- первый экран ---------- */
.hero-device { position: relative; width: 100%; max-width: 640px; margin-left: auto; padding: 0 3% 8% 0; }
.hero-device__badge { position: absolute; left: -4%; top: -7%; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: rgba(17,23,37,.9); border: 1px solid rgba(198,255,61,.4); backdrop-filter: blur(8px); box-shadow: 0 20px 40px -20px #000; animation: phoneBob 6s ease-in-out infinite reverse; }
.hero-device__badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

/* ---------- закреплённая витрина ---------- */
.showcase { position: relative; z-index: 1; height: calc(var(--steps, 6) * 62vh + 100vh); background: var(--bg); }
.showcase__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.showcase__sticky::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 420px at 78% 50%, rgba(139,108,255,.2), transparent 70%), radial-gradient(520px 340px at 12% 80%, rgba(198,255,61,.1), transparent 70%); }
.showcase__in { position: relative; display: grid; grid-template-columns: .72fr 1.28fr; gap: 48px; align-items: center; width: min(1280px, 100% - 32px); margin-inline: auto; }
.showcase__title { font-family: var(--font-head); font-size: clamp(1.3rem, 2.2vw, 1.9rem); line-height: 1.15; margin: 0 0 26px; }
.showcase__caps { position: relative; min-height: 210px; }
.showcase__cap { position: absolute; inset: 0 0 auto; opacity: 0; transform: translateY(18px); transition: opacity .45s, transform .45s; pointer-events: none; }
.showcase__cap.is-active { opacity: 1; transform: none; pointer-events: auto; }
.showcase__cap small { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lime-ink, #1a2400); background: var(--lime); }
.showcase__cap small.is-dsg { background: var(--cyan); }
.showcase__cap h3 { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.12; margin: 14px 0 10px; }
.showcase__cap p { color: var(--muted); font-size: 1.02rem; margin: 0; max-width: 30em; }
.showcase__bar { display: flex; gap: 6px; margin-top: 26px; }
.showcase__bar i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .3s; }
.showcase__bar i.is-done { background: var(--lime); box-shadow: 0 0 10px rgba(198,255,61,.6); }
.showcase__device { position: relative; padding: 0 3% 6% 0; }

/* ---------- скриншот в блоке продукта ---------- */
.shotframe { position: relative; border-radius: 16px; padding: 8px; background: #1a2134; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 40px 80px -40px #000, 0 0 70px -24px rgba(198,255,61,.3); overflow: hidden; }
.shotframe img { display: block; width: 100%; height: auto; border-radius: 10px; }
.shotframe::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.12) 50%, transparent 58%); transform: translateX(-110%); animation: scrGlare 6s ease-in-out infinite; }

@media (max-width: 1024px) {
  .hero-device { margin: 26px auto 0; max-width: 560px; }
  .hero-device__badge { left: 0; }
}
@media (max-width: 900px) {
  .showcase { height: calc(var(--steps, 6) * 55vh + 100vh); }
  .showcase__in { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .showcase__device { order: -1; padding: 0 4% 9% 0; }
  .showcase__title { font-size: 1.15rem; margin-bottom: 12px; }
  .showcase__caps { min-height: 190px; }
  .showcase__cap h3 { font-size: 1.3rem; margin: 10px 0 6px; }
  .showcase__cap p { font-size: .93rem; }
  .showcase__bar { margin-top: 14px; }
  .laptop { transform: perspective(1400px) rotateX(calc(var(--tilt, 0) * 14deg)) rotateY(calc(var(--tilt, 0) * -12deg)) scale(calc(1 - var(--tilt, 0) * .08)); }
}
@media (prefers-reduced-motion: reduce) {
  .laptop { transform: none; transition: none; }
  .phone, .hero-device__badge, .laptop__screen::after, .shotframe::after { animation: none; }
  .laptop__view img { transition: none; transform: none; }
}
