/* «Вау»-слой главной: заставка, кино при прокрутке, свечение, зерно, бегущая строка, портреты роботов */

/* зерно плёнки поверх всего */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
/* свет за курсором */
.spot { position: fixed; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 1; left: 0; top: 0;
  background: radial-gradient(circle, rgba(79,224,220,.13), rgba(79,224,220,0) 65%); transform: translate(-50%, -50%); transition: opacity .3s; }
main, footer { position: relative; z-index: 2; }

/* заставка: глаз Атласа открывается */
.splash { position: fixed; inset: 0; z-index: 60; background: #030506; display: grid; place-items: center; transition: opacity .8s .2s, visibility 0s 1s; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash .eye { width: 140px; height: 4px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 30px 8px rgba(79,224,220,.6), 0 0 120px 30px rgba(79,224,220,.25); animation: eye 1.4s cubic-bezier(.2,.7,.2,1) forwards; }
.splash .boot { position: absolute; bottom: 14vh; font: 600 13px/1 var(--font); letter-spacing: .3em; color: var(--accent); opacity: .8; }
@keyframes eye { 0% { width: 0; height: 2px; } 45% { width: 160px; height: 2px; } 70% { width: 160px; height: 22px; border-radius: 40px; } 100% { width: 90px; height: 90px; border-radius: 50%; } }

/* заголовок светится */
.hero h1 { text-shadow: 0 0 40px rgba(79,224,220,.25); }
.glow { color: var(--accent); text-shadow: 0 0 24px rgba(79,224,220,.55); }

/* бегущая строка задач */
.marquee { overflow: hidden; padding: 26px 0; background: var(--ground-2); margin-top: clamp(96px, 12vw, 160px); }
.marquee .track { display: flex; gap: 48px; width: max-content; animation: run 38s linear infinite; }
.marquee span { font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; color: var(--ink-2); }
.marquee span b { color: var(--accent); font-weight: 800; }
@keyframes run { to { transform: translateX(-50%); } }

/* кино при прокрутке */
.kino { position: relative; height: 420vh; padding: 0; margin-top: clamp(96px, 12vw, 160px); }
.kino .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.kino canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.kino .shade { position: absolute; inset: 0; background: rgba(5,8,10,.35); }
.kino .hud { position: absolute; inset: 22px; pointer-events: none; }
.kino .hud i { position: absolute; width: 38px; height: 38px; border-color: rgba(79,224,220,.7); border-style: solid; border-width: 0; }
.kino .hud i:nth-child(1) { top: 70px; left: 0; border-top-width: 2px; border-left-width: 2px; }
.kino .hud i:nth-child(2) { top: 70px; right: 0; border-top-width: 2px; border-right-width: 2px; }
.kino .hud i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.kino .hud i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.kino .hud .rec { position: absolute; top: 74px; left: 54px; font: 700 13px var(--font); letter-spacing: .2em; color: var(--accent); }
.kino .hud .bar { position: absolute; left: 54px; right: 54px; bottom: 16px; height: 3px; background: rgba(238,244,244,.15); border-radius: 3px; }
.kino .hud .bar b { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; box-shadow: 0 0 12px var(--accent); }
.kino .caps { position: absolute; left: var(--pad); right: var(--pad); bottom: 14vh; }
.kino .cap { position: absolute; bottom: 0; left: 0; max-width: 18ch; font-size: clamp(36px, 5.4vw, 84px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .5s; }
.kino .cap.on { opacity: 1; transform: none; }
.kino .cap small { display: block; font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-top: 14px; max-width: 40ch; line-height: 1.45; }

/* портреты роботов */
.cast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 40px; }
.face { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ground-2); aspect-ratio: 3/4.2; transform-style: preserve-3d; transition: transform .25s, box-shadow .25s; }
.face img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.face:hover { box-shadow: 0 0 0 1.5px var(--accent), 0 0 40px rgba(79,224,220,.35); }
.face:hover img { transform: scale(1.06); }
.face figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 18px; background: linear-gradient(to top, rgba(5,8,10,.95), rgba(5,8,10,0)); }
.face b { display: block; font-size: 24px; letter-spacing: -0.02em; }
.face span { color: var(--ink-2); font-size: 15px; }

/* чат Атласа печатается */
.chat .msg { opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s; }
.chat .msg.show { opacity: 1; transform: none; }
.typing { display: inline-flex; gap: 5px; padding: 14px 18px; background: var(--ground-3); border-radius: 18px; width: max-content; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); background: var(--accent); } }

/* свечение карточек и кнопок */
.bot, .plan, .lvl { transition: background .25s, box-shadow .25s, transform .25s; }
.bot:hover, .lvl:hover { background: var(--ground-3); box-shadow: inset 0 0 0 1.5px rgba(79,224,220,.35); }
.plan:hover { transform: translateY(-4px); box-shadow: 0 0 0 1.5px rgba(79,224,220,.4), 0 12px 40px rgba(79,224,220,.12); }
.btn-main { box-shadow: 0 0 0 rgba(79,224,220,0); }
.btn-main:hover { box-shadow: 0 0 30px rgba(79,224,220,.45); }
.atlas .pics .a { box-shadow: 0 0 60px rgba(79,224,220,.18); }
.two .big { text-shadow: 0 0 40px rgba(79,224,220,.25); }

@media (max-width: 800px) {
  .cast { grid-template-columns: repeat(2, 1fr); }
  .cast .face:last-child { grid-column: span 2; aspect-ratio: 16/10; }
  .kino { height: 340vh; }
  .spot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee .track { animation: none; } .splash { display: none; }
  .chat .msg { opacity: 1; transform: none; }
}
