/* Заметность: движение. Загружается после site.css. */
:root { --section-y: clamp(60px, 8vw, 108px); }
html, body { overflow-x: clip; }

/* ---- заголовок первого экрана: строки выезжают из-под маски ---- */
.line { display: block; overflow: hidden; padding: .04em 0 .12em; margin-bottom: -.08em; }
.line__in { display: inline-block; transform: translateY(115%) rotate(3deg); transform-origin: 0 100%; animation: rise 1s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) forwards; }
@keyframes rise { to { transform: none; } }
.hero .lead { animation: fadeup .9s ease .9s both; }
.hero__actions { animation: fadeup .9s ease 1.05s both; }
.hero__note { animation: fadeup .9s ease 1.2s both; }
.hero__note b { color: var(--ink); }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- телефон: парит и наклоняется за указателем ---- */
.phone-wrap { position: relative; z-index: 2; width: min(78%, 280px); margin-left: auto; animation: float 7s ease-in-out infinite; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
.phone-wrap .phone { width: 100%; margin: 0; }
@keyframes float { 50% { translate: 0 -12px; } }
@media (min-width: 900px) { .phone-wrap { width: 72%; } }

/* ---- плашки-сообщения вокруг телефона ---- */
.chip { position: absolute; z-index: 4; padding: 9px 14px; border-radius: 16px; font-size: .86rem; font-weight: 500; line-height: 1.25; box-shadow: 0 18px 36px -16px rgba(21, 18, 46, .45); opacity: 0; animation: chip 11s ease-in-out infinite; pointer-events: none; white-space: nowrap; }
.chip--a { left: -1%; top: 50%; background: var(--white); border-bottom-left-radius: 4px; animation-delay: 1.4s; }
.chip--b { right: -3%; top: 24%; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; animation-delay: 4s; }
.chip--c { left: 3%; bottom: 20%; background: var(--gold); color: var(--ink); animation-delay: 6.6s; }
@keyframes chip {
  0% { opacity: 0; transform: translateY(14px) scale(.92); }
  5%, 30% { opacity: 1; transform: none; }
  36%, 100% { opacity: 0; transform: translateY(-10px) scale(.98); }
}
@media (min-width: 900px) { .chip { font-size: .95rem; } .chip--a { left: -8%; } .chip--b { right: -12%; } }

/* ---- бегущая лента ---- */
.marquee { overflow: hidden; background: var(--ink); color: var(--paper); padding: 20px 0; transform: rotate(-1.3deg) scale(1.04); margin-block: 14px 10px; }
.marquee__track { display: flex; align-items: center; gap: 32px; width: max-content; animation: marquee 32s linear infinite; font-family: var(--font-head); font-weight: 500; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; white-space: nowrap; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.mq-star { flex: none; width: 22px; height: 22px; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- карточки услуг ---- */
.tilt-card { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.tilt-card:hover { transform: translateY(-8px) rotate(-.5deg); box-shadow: 0 30px 50px -28px rgba(21, 18, 46, .5); }
.offer { min-height: 330px; }
.offer__body { max-width: 100%; }
.offer__line { margin-top: 12px; max-width: 24ch; font-size: 1.15rem; line-height: 1.4; color: var(--muted); }
.offer--dark .offer__line { color: #cfc8f5; }
.offer__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
.offer--light .offer__body { padding-right: 150px; }
.minifilm { position: absolute; top: 26px; right: 26px; width: 118px; aspect-ratio: 360 / 610; border-radius: 22px; overflow: hidden; border: 6px solid var(--ink); background: var(--night); transform: rotate(6deg); box-shadow: 0 26px 40px -18px rgba(21, 18, 46, .6); }
.minifilm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: mf 12s infinite; }
.minifilm img:nth-child(2) { animation-delay: 3s; }
.minifilm img:nth-child(3) { animation-delay: 6s; }
.minifilm img:nth-child(4) { animation-delay: 9s; }
@keyframes mf { 0% { opacity: 0; } 4%, 25% { opacity: 1; } 29%, 100% { opacity: 0; } }
.loopchat { display: grid; gap: 8px; max-width: 300px; min-height: 196px; align-content: start; }
.loopchat .bubble { opacity: 0; animation: lc 10s infinite; }
.loopchat .lc2 { animation-delay: 1.6s; }
.loopchat .lc3 { animation-delay: 3.2s; }
.loopchat .lc4 { animation-delay: 4.8s; }
@keyframes lc { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 6%, 84% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* ---- кинолента: плывёт при прокрутке ---- */
.film { padding-block: var(--section-y); overflow: clip; }
.film__head { display: grid; gap: 16px; margin-bottom: 48px; }
.film__cap { color: var(--muted); max-width: 56ch; }
.film__rail { overflow: hidden; padding-bottom: 40px; }
.film__track { display: flex; gap: 18px; width: max-content; padding-left: var(--gutter); will-change: transform; }
.film__track figure { flex: none; width: clamp(150px, 22vw, 230px); border-radius: 22px; overflow: hidden; background: var(--night); box-shadow: 0 24px 40px -22px rgba(21, 18, 46, .55); }
.film__track figure:nth-child(even) { margin-top: 36px; margin-bottom: -36px; }
.film__track img { width: 100%; height: auto; aspect-ratio: 360 / 610; object-fit: cover; }

/* ---- подсветка за курсором на тёмных блоках ---- */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(560px circle at var(--mx, 72%) var(--my, 24%), rgba(122, 64, 255, .3), transparent 62%); }

/* ---- кнопки тянутся к курсору ---- */
.magnet { transition: transform .22s ease-out, box-shadow .18s ease, background-color .18s ease; will-change: transform; }

/* ---- мелочи ---- */
.final__eye { width: min(300px, 62%); margin: 0 auto 36px; }
.prices__after { margin-top: 24px; }
.hero__chat .tab:focus-visible { outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .chip, .minifilm img, .loopchat .bubble, .phone-wrap, .hero .lead, .hero__actions, .hero__note { animation: none !important; }
  .line__in { animation: none !important; transform: none !important; }
  .chip { display: none; }
  .loopchat .bubble { opacity: 1; }
  .minifilm img:first-child { opacity: 1; }
  .marquee { transform: none; }
}

/* цены: цвет чисел не должен наследовать серый абзаца */
.price p.price__num { color: var(--ink); max-width: none; }
.price p.price__then { color: var(--ink); }
.price--hi p.price__num, .price--hi p.price__then { color: #fff; }
