/* Лендинг a.studio: чёрная основа, белый раздел процесса, стеклянный знак в первом экране */
:root { color-scheme: dark; }
html, body { background: #000; color: #fff; }
.wrap { padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }
section { position: relative; z-index: 2; }
.label { font-size: 15px; font-weight: 500; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.h2 { font-size: clamp(44px, 7.4vw, 136px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.9; text-wrap: balance; }

/* ---------- HERO ---------- */
.hero { position: relative; height: 250vh; z-index: 2; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; pointer-events: none; }
.stage a { pointer-events: auto; }
/* Затемнение закреплено вместе с холстом: иначе при уходе первого экрана виден его нижний край */
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 26%, transparent 52%, rgba(0,0,0,.92) 80%, #000 100%); }
.hero .title {
  position: absolute; left: var(--pad); bottom: calc(var(--pad) + 8px);
  font-size: clamp(44px, 6.4vw, 116px); line-height: 0.92; font-weight: 800; letter-spacing: -0.04em;
}
.hero .side { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 14px); width: min(380px, 32vw); font-size: 17px; line-height: 1.45; color: var(--muted); }
.hero .side .cta { margin-top: 24px; color: #fff; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero .side .cta small { font-size: 14px; color: var(--muted); }
.lens-hint, .speedo { padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: rgba(255,255,255,.7) !important; }
.lens-hint { position: absolute; left: var(--pad); top: 15vh; font-size: 14px; }
.lens-hint b { display: block; color: #fff; font-weight: 600; font-size: 15px; }
.speedo { position: absolute; right: var(--pad); top: 15vh; text-align: right; font-size: 14px; color: var(--muted); }
.speedo b { display: block; font-size: 15px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.final {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; opacity: 0;
  font-size: clamp(24px, 2.6vw, 40px); font-weight: 600; letter-spacing: -0.03em; width: min(760px, 88vw); line-height: 1.15;
}

/* ---------- МАНИФЕСТ ---------- */
.manifest { padding-block: 22vh 16vh; display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.manifest p.big { font-size: clamp(28px, 3.9vw, 64px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; max-width: 22ch; }
.manifest .w { opacity: 0.16; transition: none; }
.stats { grid-column: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 12vh; border-top: 1px solid var(--line); padding-top: 22px; }
.stats b { display: block; font-size: clamp(56px, 7vw, 120px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 16px; }

/* ---------- УСЛУГИ ---------- */
.services { padding-block: 10vh 18vh; }
.services-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 6vh; flex-wrap: wrap; }
.services-head p { max-width: 360px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.svc { list-style: none; border-top: 1px solid var(--line); }
.svc li { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.svc a { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr minmax(0, 420px); align-items: center; gap: 24px; padding: 3.2vh 0; transition: color .5s var(--ease), padding .6s var(--ease); }
.svc li::before { content: ''; position: absolute; inset: 0; background: #fff; transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.svc li:hover::before { transform: scaleY(1); }
.svc li:hover a { color: #000; padding-left: 2vw; }
.svc h3 { font-size: clamp(40px, 6.6vw, 120px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.svc p { font-size: 17px; line-height: 1.45; color: var(--muted); transition: color .5s; }
.svc li:hover p { color: rgba(0,0,0,.65); }
.peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: 300px; aspect-ratio: 4/3; pointer-events: none; overflow: hidden; border-radius: 4px;
  opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .35s, transform .5s var(--ease);
}
.peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.peek img.on { opacity: 1; }

/* ---------- РАБОТЫ: горизонтальная лента ---------- */
.work { height: 420vh; }
.work-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.work-head { position: absolute; top: calc(var(--pad) + 70px); left: 0; right: 0; display: flex; justify-content: space-between; align-items: baseline; }
.work-count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track { display: flex; gap: 4vw; padding-left: 38vw; padding-right: 10vw; will-change: transform; width: max-content; align-items: center; }
.intro-card { width: 30vw; position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); }
.intro-card .h2 { font-size: clamp(44px, 6vw, 110px); }
.intro-card p { margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.45; max-width: 300px; }
.case { width: min(58vw, 980px); flex: none; display: grid; gap: 18px; color: #fff; text-decoration: none; }
.case .media { position: relative; overflow: hidden; border-radius: 4px; background: #111; aspect-ratio: 16/9; }
/* Приложение: телефон на тёмной сцене, экран целиком */
.showcase .scene { position: absolute; inset: 0; container-type: size; }
.case .media.showcase { background: radial-gradient(120% 90% at 50% 100%, #262626 0%, #0d0d0d 62%); }
.showcase .ghost-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 30cqw; font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  color: #121212; -webkit-text-stroke: 2px rgba(255,255,255,.16); paint-order: stroke fill; white-space: nowrap; transition: transform 1.2s var(--ease), -webkit-text-stroke-color .8s; }
.showcase .rig { position: absolute; inset: 0; will-change: transform; }
.showcase .glow { position: absolute; left: 50%; top: 58%; width: 40cqw; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(.6);
  background: radial-gradient(closest-side, rgba(255,77,0,.55), transparent); opacity: 0; filter: blur(2cqw); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.showcase .phone { position: absolute; left: 50%; top: 50%; height: 86cqh; aspect-ratio: 750 / 1624; box-sizing: content-box; padding: 1cqh; border-radius: 6.6cqh;
  background: linear-gradient(145deg, #3a3a3a, #111 40%, #222); box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 3cqw 6cqw rgba(0,0,0,.6);
  transform: translate(-50%, -50%) rotate(-5deg); transition: transform 1.1s var(--ease); }
.case .showcase .phone img { position: static; display: block; inset: auto; width: 100%; height: 100%; object-fit: cover; border-radius: 5.8cqh; }
.case:hover .showcase .phone { transform: translate(-50%, -52%) rotate(0deg) scale(1.04); }
.case:hover .showcase .glow { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
.case:hover .showcase .ghost-word { transform: translate(-50%, -50%) scale(1.06); -webkit-text-stroke-color: rgba(255,255,255,.3); }
.case .media img {
  position: absolute; inset: -6% -6%; width: 112%; height: 112%; object-fit: cover; filter: grayscale(1) contrast(1.08);
  transition: filter .8s var(--ease); will-change: transform;
}
.case:hover .media img { filter: grayscale(0); }
/* Длинный скриншот прокручивается внутри карточки при наведении */
.case .media.scrolly img.long { inset: auto; left: 0; top: 0; width: 100%; height: auto; object-fit: initial;
  transition: filter .8s var(--ease), top var(--dur, 7s) cubic-bezier(.45,0,.25,1), transform var(--dur, 7s) cubic-bezier(.45,0,.25,1); }
.case:hover .media.scrolly img.long { top: 100%; transform: translateY(-100%); }
.case .media .veil { position: absolute; inset: 0; background: #000; transform-origin: right; }
.case .row { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.case h3 { font-size: clamp(26px, 2.6vw, 44px); font-weight: 700; letter-spacing: -0.035em; }
.case .tags { font-size: 14px; color: var(--muted); text-align: right; }
.case p { color: var(--muted); font-size: 16px; line-height: 1.45; max-width: 52ch; }
.progress { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) + 60px); height: 1px; background: var(--line); }
.progress i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }

/* ---------- ПРОЦЕСС: белая секция ---------- */
.process { background: #fff; color: #000; --muted: rgba(0,0,0,.56); --line: rgba(0,0,0,.14); padding-block: 16vh; border-radius: 28px 28px 0 0; }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; }
.process-side { position: sticky; top: 16vh; align-self: start; display: grid; gap: 28px; }
.process-side p { max-width: 360px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.steps { position: relative; list-style: none; display: grid; gap: 12vh; padding-left: 40px; }
.steps::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.steps .fill { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: #000; transform-origin: top; transform: scaleY(0); }
.steps li { display: grid; gap: 14px; }
.steps .n { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: clamp(36px, 4.4vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; }
.steps p { color: var(--muted); font-size: 18px; line-height: 1.5; max-width: 44ch; }
.steps .out { font-size: 15px; font-weight: 500; }
.steps .out span { color: var(--muted); font-weight: 400; }

/* ---------- КЛИЕНТЫ ---------- */
.clients { background: #fff; color: #000; --muted: rgba(0,0,0,.56); padding-block: 4vh 18vh; overflow: hidden; }
.clients .label { margin-bottom: 4vh; }
.marquee { display: flex; white-space: nowrap; font-size: clamp(56px, 9vw, 168px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.marquee .inner { display: flex; gap: 0.4em; padding-right: 0.4em; will-change: transform; }
.marquee .inner span { display: inline-flex; align-items: center; gap: 0.4em; }
.marquee .inner span::after { content: ''; width: 0.22em; height: 0.22em; background: currentColor; display: inline-block; transform: rotate(45deg); }
/* Обводка рисуется под заливкой, иначе у вариативного шрифта видны внутренние контуры букв */
.marquee.ghost { color: #fff; -webkit-text-stroke: 3px #000; paint-order: stroke fill; }

/* ---------- КОНТАКТ ---------- */
.contact { padding-block: 18vh 0; overflow: hidden; }
.contact-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6vw; align-items: end; }
.contact .h2 { font-size: clamp(60px, 11vw, 210px); }
.contact-top p { margin-top: 30px; max-width: 460px; color: var(--muted); font-size: 18px; line-height: 1.45; }
.big-btn {
  width: clamp(160px, 16vw, 240px); aspect-ratio: 1; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center;
  font-size: 18px; font-weight: 600; text-align: center; line-height: 1.15; position: relative; overflow: hidden;
}
.big-btn span { position: relative; z-index: 1; transition: color .4s; }
.big-btn::before { content: ''; position: absolute; inset: 0; background: #000; border-radius: 50%; transform: scale(0); transition: transform .6s var(--ease); outline: 1px solid #fff; }
.big-btn:hover::before { transform: scale(1); }
.big-btn:hover span { color: #fff; }
.contact-list { margin-top: 12vh; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; font-size: 16px; line-height: 1.5; }
.contact-list span { display: block; color: var(--muted); font-size: 14px; }
.contact-list a, .contact-list b { font-size: clamp(18px, 1.6vw, 26px); font-weight: 600; letter-spacing: -0.03em; }
.copy-btn { margin-top: 8px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.wordmark { position: relative; margin-top: 10vh; height: 25vw; user-select: none; }
.wordmark div {
  position: absolute; left: 0; right: 0; bottom: 0.02em; text-align: center; white-space: nowrap;
  font-size: 25vw; font-weight: 800; letter-spacing: -0.055em; line-height: 0.8;
}
.wordmark .wm-top { clip-path: polygon(0 0, 100% 0, 100% 34%, 0 74%); }
.wordmark .wm-bottom { clip-path: polygon(0 74%, 100% 34%, 100% 100%, 0 100%); }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 22px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); position: relative; z-index: 2; background: #000; }
.foot button { color: #fff; font-weight: 500; }

/* Мобильное меню */
.lang { display: inline-flex; gap: 4px; font-size: 14px; font-weight: 500; letter-spacing: 0.02em; color: rgba(255,255,255,.5); transition: color .3s; }
.lang b { color: #fff; font-weight: 600; }
.lang span { opacity: .5; }
.lang:hover { color: #fff; }
.menu-btn { display: none; height: 44px; padding: 0 18px; border: 1px solid currentColor; border-radius: 44px; font-weight: 500; }
.menu {
  position: fixed; inset: 0; z-index: 70; background: #fff; color: #000; display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--pad); clip-path: inset(0 0 100% 0); visibility: hidden;
}
.menu a { font-size: 15vw; font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; display: block; overflow: hidden; }
.menu a span { display: block; }
.menu .close { position: absolute; top: var(--pad); right: var(--pad); height: 44px; padding: 0 18px; border: 1px solid #000; border-radius: 44px; color: #000; font-weight: 500; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav .pill { display: none; }
  .hero .title { bottom: auto; top: 14vh; font-size: 46px; }
  .hero .side { left: var(--pad); width: auto; bottom: calc(var(--pad) + 60px); font-size: 15px; }
  .lens-hint, .speedo { display: none; }
  .manifest { grid-template-columns: 1fr; padding-block: 14vh 10vh; }
  .stats { grid-column: 1; grid-template-columns: 1fr; }
  .svc a { grid-template-columns: 1fr; gap: 8px; }
  .peek { display: none; }
  .work { height: auto; }
  .work-pin { position: relative; height: auto; padding-block: 10vh; }
  .work-head { position: static; padding-bottom: 4vh; }
  .intro-card { position: static; transform: none; width: auto; padding-bottom: 6vh; }
  .track { flex-direction: column; padding: 0; width: auto; gap: 8vh; transform: none !important; }
  .case { width: 100%; }
  .case .media.showcase { aspect-ratio: 4/5; }
  .showcase .ghost-word { font-size: 36cqw; }
  .scrim { background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 32%, transparent 48%, transparent 58%, rgba(0,0,0,.92) 80%, #000 100%); }
  .progress { display: none; }
  .process-grid { grid-template-columns: 1fr; }
  .process-side { position: static; }
  .contact-top { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .manifest .w { opacity: 1; }
}
