/* ---------- Шрифты (локально) ---------- */
/* Pixelify Sans: в оригинале нет кириллических «О», «П», «І», а «С/с» почти замкнуты —
   в этом файле они подставлены из латинских/греческих глифов того же шрифта */
@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* VT323 не содержит кириллицы: русские буквы берутся из Pixelify Sans по цепочке font-family */
@font-face {
  font-family: "VT323";
  src: url("assets/fonts/vt323-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  --bg: #111;
  --violet-deep: #1c1433;
  --panel: #1b1b20;
  --ink: #f4f4f0;
  --muted: #b4b0c4;
  --lime: #B8F36B;
  --violet: #7A3FE0;
  --coin: #ffd23f;
  --heart: #ff4d6d;
  --black: #000;
  --lcd-ink: #2A3616;
  --line: 3px;
  --f-head: "Pixelify Sans", "JetBrains Mono", monospace;
  --f-small: "VT323", "Pixelify Sans", monospace;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 1200px;
  --k: 3;                 /* масштаб спрайтов */
  --press: 120ms;         /* микро-анимации: коротко и ступенчато */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--f-mono);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }

.px {
  width: calc(var(--w) * var(--k) * 1px);
  height: calc(var(--h) * var(--k) * 1px);
  max-width: none;
  image-rendering: pixelated;
}
svg { image-rendering: pixelated; }

.wrap { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 80;
  background: var(--lime); color: #111; padding: 8px 12px; font-size: 14px;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 3px dashed var(--lime); outline-offset: 4px; }
.sec--lime :focus-visible { outline-color: #111; }

/* ---------- Типографика ---------- */
.hero__title, .h2, .h3, .logo, .plan__name, .btn, .tag, .level, .bubble, .hud, .press__hint, .step__t {
  font-family: var(--f-head);
}
.hero__title { font-size: clamp(32px, 9vw, 92px); font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.hero__title > span { display: inline-block; }
.hero__line { margin-right: .2em; }
.h2 {
  font-size: clamp(30px, 5vw, 64px); font-weight: 700; line-height: 1.15;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
}
.h3 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; margin: 0 0 24px; padding: 0; }
.lead { font-size: clamp(16px, 1.45vw, 20px); line-height: 1.6; max-width: 34em; margin: 24px 0 36px; }

/* плашки в заголовках */
.plate {
  padding: .02em .22em .08em;
  border: var(--line) solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
  line-height: 1.05;
}
.plate--lime { background: var(--lime); color: #111; }
.plate--violet { background: var(--violet); color: #fff; }
.hero__title .plate { margin: .06em .12em .06em 0; }

/* «уровни» */
.level {
  display: inline-block;
  margin-bottom: 18px;
  padding: 3px 10px 4px;
  font-size: 15px; font-weight: 700; letter-spacing: .12em;
  color: var(--lime);
  border: var(--line) solid var(--lime);
  box-shadow: 4px 4px 0 var(--shadow);
}
.level--dark { color: #111; border-color: #111; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 40px; }
.sec-head .level { flex-basis: 100%; width: max-content; flex-grow: 0; margin-bottom: 0; }
.sec-head .h2 { margin: 0; }

/* наклонные наклейки */
.tag {
  --r: 0deg;
  position: absolute; z-index: 6;
  display: inline-block;
  padding: 8px 14px 9px;
  font-size: clamp(16px, 1.8vw, 26px); font-weight: 700; letter-spacing: .04em; line-height: 1;
  border: var(--line) solid var(--black);
  box-shadow: 5px 5px 0 var(--black);
  transform: rotate(var(--r));
  white-space: nowrap;
}
.tag--tilt-l { --r: -6deg; }
.tag--tilt-r { --r: 5deg; }
.tag--coin { background: var(--coin); color: #111; }
.tag--lime { background: var(--lime); color: #111; }
.tag--violet { background: var(--violet); color: #fff; }

/* пиксельные уголки на рамках и карточках */
.pxcorners { position: relative; }
.pxcorners::before {
  content: ""; position: absolute; inset: -10px; z-index: 2; pointer-events: none;
  background:
    url("assets/img/corner-tl.svg") left top / 12px 12px no-repeat,
    url("assets/img/corner-tr.svg") right top / 12px 12px no-repeat,
    url("assets/img/corner-bl.svg") left bottom / 12px 12px no-repeat,
    url("assets/img/corner-br.svg") right bottom / 12px 12px no-repeat;
  image-rendering: pixelated;
}

/* ---------- Кнопки ---------- */
.btn {
  --sh: 6px;
  display: inline-block;
  font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; text-decoration: none;
  padding: 12px 20px;
  border: var(--line) solid var(--black);
  box-shadow: var(--sh) var(--sh) 0 var(--shadow);
  cursor: pointer;
  transition: transform var(--press) steps(2, jump-end), box-shadow var(--press) steps(2, jump-end);
}
.btn--lime { background: var(--lime); color: #111; }
.btn--violet { background: var(--violet); color: #fff; }
.btn--ghost { background: var(--ink); color: #111; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--shadow); }
}
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--shadow); transition-duration: 60ms; }
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.press { display: inline-grid; justify-items: center; gap: 12px; }
.press__hint {
  min-height: 1em;
  font-size: 14px; letter-spacing: .2em; color: var(--lime);
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- HUD: шкала жизни ---------- */
.hud {
  position: fixed; z-index: 40; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  background: #111; border: var(--line) solid #000; box-shadow: 4px 4px 0 var(--violet);
}
.hud__label { color: var(--lime); font-size: 15px; font-weight: 700; line-height: 1; }
.hud__hearts { display: flex; gap: 3px; }
.hud__hearts i, .hearts-row i {
  display: block; width: 14px; height: 14px;
  background: url("assets/img/heart-empty.svg") 0 0 / 100% 100%;
  image-rendering: pixelated;
}
.hud__hearts i.is-full, .hearts-row i {
  background-image: url("assets/img/heart.svg");
  animation: pulse 1.8s steps(1) infinite;
  animation-delay: calc(var(--i, 0) * 150ms);
}
.hearts-row { display: inline-flex; gap: 8px; }
.hearts-row i { width: 28px; height: 28px; }
.hearts-row i:nth-child(2) { --i: 1; }
.hearts-row i:nth-child(3) { --i: 2; }

/* ---------- Шапка ---------- */
.header { position: relative; z-index: 5; background: var(--bg); }
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 58px; padding-bottom: 6px; flex-wrap: wrap; }
.logo { font-size: 26px; font-weight: 700; text-decoration: none; color: var(--lime); }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; }
.nav a { text-decoration: none; padding: 4px 2px; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--lime); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; } }

/* ---------- Секции: стык рваным пиксельным краем ---------- */
.sec { position: relative; background: var(--sec-bg); padding: 104px 0 112px; }
.sec--dark { --sec-bg: var(--bg); --shadow: var(--violet); }
.sec--violet { --sec-bg: var(--violet-deep); --shadow: #07040f; }
.sec--lime { --sec-bg: var(--lime); --shadow: #111; color: #111; }
.sec::before {
  content: ""; position: absolute; left: 0; right: 0; top: -47px; height: 48px; z-index: 3;
  background: url("assets/img/edge-dark.svg") 0 0 / 960px 48px repeat-x;
  pointer-events: none;
}
.sec--violet::before { background-image: url("assets/img/edge-violet.svg"); }
.sec--lime::before { background-image: url("assets/img/edge-lime.svg"); }
.hero::before { content: none; }
.sec > .wrap { z-index: 4; }

.float-deco { position: absolute; z-index: 1; pointer-events: none; }
.edge-sprite { position: absolute; z-index: 7; }

/* ---------- LEVEL 1 ---------- */
.hero { padding-top: 32px; padding-bottom: 128px; overflow: clip; overflow-clip-margin: 60px; }
.hero__dots {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("assets/img/dot.svg") 0 0 / 40px 40px;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 62% 45%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 65% at 62% 45%, #000 25%, transparent 78%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: center; }
.hero__art { position: relative; justify-self: center; display: grid; justify-items: center; gap: 30px; padding: 48px 30px 0; --k: 3; }
.hero__tag1 { left: -4px; top: 4px; }
.avatar-box {
  --a: 5;
  background: var(--violet);
  border: var(--line) solid #000;
  box-shadow: 10px 10px 0 var(--lime);
  padding: 8px 8px 0;
  line-height: 0;
}
.avatar { width: calc(48px * var(--a)); height: calc(48px * var(--a)); display: block; }
.deco { position: absolute; z-index: 3; }
.deco--joystick { right: -8px; top: 26px; }
.deco--cart { right: -6px; top: 56%; }
.deco--coin1 { left: 4px; top: 40%; }
.deco--coin2 { --k: 2; right: 38%; bottom: 64px; }
.deco--heart { --k: 3; left: 18%; bottom: 52px; }
.bubble {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  max-width: 340px;
  padding: 10px 14px;
  background: var(--ink); color: #111;
  border: var(--line) solid var(--black);
  box-shadow: 5px 5px 0 var(--violet);
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.25;
}
.bubble::after { /* хвостик реплики */
  content: ""; position: absolute; left: 50%; top: -15px; width: 12px; height: 12px;
  background: var(--ink); border: var(--line) solid #000; border-right: 0; border-bottom: 0;
  transform: rotate(45deg);
}
.bubble .px { flex: none; }

/* ---------- LEVEL 2 ---------- */
.brief__tag { right: 9%; top: -30px; }
.brief__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; justify-items: center; }
.brief__text { justify-self: stretch; }
.phone { --k: 5; }
.phone__body {
  position: relative;
  width: calc(32px * var(--k)); height: calc(60px * var(--k));
  transform-origin: 50% 90%;
  animation: sway 3.2s ease-in-out infinite;
  filter: drop-shadow(10px 10px 0 #07040f);
}
.phone__img { position: absolute; inset: 0; }
.lcd {
  position: absolute;
  left: calc(100% * 6 / 32); top: calc(100% * 9 / 60);
  width: calc(100% * 20 / 32); height: calc(100% * 19 / 60);
  padding: calc(var(--k) * 1px) calc(var(--k) * 1.2px);
  color: var(--lcd-ink);
  font-family: var(--f-small);
  font-size: calc(var(--k) * 3.4px);
  line-height: 1.1;
  overflow: hidden; overflow-wrap: anywhere;
}
.lcd__cursor {
  display: inline-block; width: .5em; height: .9em; margin-left: 1px;
  background: var(--lcd-ink); vertical-align: -.1em;
  animation: blink 1s steps(1) infinite;
}
.lcd__line { display: block; }

/* ---------- LEVEL 3 ---------- */
.works__tag { left: 14%; top: -26px; }
.works__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px 48px; margin-bottom: 56px; }
.monitor { display: grid; justify-items: center; }
.monitor__screen {
  width: 100%;
  background: #2a2a2e;
  border: 4px solid #000;
  padding: 16px 16px 30px;
  box-shadow: 10px 10px 0 var(--violet);
  transition: box-shadow 180ms steps(3, jump-end);
}
.monitor--b .monitor__screen { box-shadow: 10px 10px 0 var(--lime); }
.monitor__screen::after { /* индикатор питания */
  content: ""; position: absolute; right: 18px; bottom: 10px; width: 8px; height: 8px; background: #4a4a52;
  transition: background-color 180ms steps(2, jump-end);
}
.crt { position: relative; overflow: hidden; border: 3px solid #000; background: #000; }
.crt img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; image-rendering: auto; }
.crt::before, .crt::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.crt::before { /* scanlines + виньетка */
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .35) 100%);
}
.crt::after { /* свечение экрана при наведении */
  z-index: 2;
  background: radial-gradient(ellipse at 50% 40%, rgba(184, 243, 107, .22), transparent 70%);
  opacity: 0;
  transition: opacity 200ms steps(3, jump-end);
}
@media (hover: hover) and (pointer: fine) {
  .monitor:hover .crt::after { opacity: 1; }
  .monitor:hover .monitor__screen { box-shadow: 10px 10px 0 var(--violet), 0 0 0 4px var(--lime); }
  .monitor--b:hover .monitor__screen { box-shadow: 10px 10px 0 var(--lime), 0 0 0 4px var(--violet); }
  .monitor:hover .monitor__screen::after { background: var(--lime); }
}
.monitor__stand { width: 18%; height: 28px; background: #44444c; border: 4px solid #000; border-top: 0; position: relative; }
.monitor__stand::after { content: ""; position: absolute; left: -60%; right: -60%; top: 100%; height: 16px; background: #55555e; border: 4px solid #000; }
.monitor figcaption { margin-top: 40px; font-size: 15px; text-align: center; max-width: 34em; color: var(--ink); }

/* ---------- LEVEL 4 ---------- */
.prices__tag { right: 14%; top: -28px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; margin-bottom: 72px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.plan {
  display: grid; gap: 8px; align-content: start;
  padding: 24px 22px 26px;
  background: var(--panel);
  border: var(--line) solid #000;
  box-shadow: 8px 8px 0 var(--shadow);
  cursor: pointer;
  transition: transform var(--press) steps(2, jump-end), box-shadow var(--press) steps(2, jump-end);
}
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(input:focus-visible) { outline: 3px dashed var(--lime); outline-offset: 12px; }
.plan:has(input:checked) { box-shadow: 8px 8px 0 var(--lime); }
.plan:active { transform: translate(4px, 4px); box-shadow: 4px 4px 0 var(--shadow); }
.plan__icon { --k: 3; margin-bottom: 6px; }
.plan__name { font-size: clamp(21px, 2vw, 26px); font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.plan__price { font-size: clamp(24px, 2.2vw, 30px); color: var(--lime); }
.plan__time { font-size: 14px; color: var(--muted); }
.plan__list { font-size: 15px; line-height: 1.55; }
.plan--hot { background: var(--lime); color: #111; }
.plan--hot .plan__price { color: var(--violet); }
.plan--hot .plan__time { color: #3c4d24; }
.plan--hot:has(input:checked) { box-shadow: 8px 8px 0 var(--violet); }

.calc__box {
  display: grid; gap: 32px;
  background: var(--panel);
  border: var(--line) solid #000;
  box-shadow: 8px 8px 0 var(--violet);
  padding: 26px 20px;
}
.addons { display: grid; gap: 4px; }
.addons legend { margin-bottom: 12px; }
.addon {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  font-size: 15px; cursor: pointer;
  padding: 10px 0;
}
.addon + .addon { background: repeating-linear-gradient(90deg, #3a3a44 0 6px, transparent 6px 12px) 0 0 / 100% 3px no-repeat; }
label.addon { justify-content: flex-start; }
.addon b { color: var(--lime); white-space: nowrap; }
.addon input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 26px; height: 26px; margin: 0;
  border: var(--line) solid var(--ink); background: var(--bg);
  cursor: pointer;
  transition: background-color 90ms steps(2, jump-end), transform 90ms steps(2, jump-end);
}
.addon input[type="checkbox"]:checked { background: var(--lime); border-color: var(--lime); box-shadow: inset 0 0 0 4px var(--bg); }
.addon input[type="checkbox"]:active { transform: scale(.85); }
.addon input[type="checkbox"]:focus-visible { outline: 3px dashed var(--lime); outline-offset: 3px; }
.stepper { display: inline-flex; align-items: center; border: var(--line) solid var(--ink); flex: none; }
.stepper__btn {
  width: 38px; height: 38px; border: 0; background: var(--violet); color: #fff;
  font-family: var(--f-head); font-size: 22px; cursor: pointer; line-height: 1;
  transition: transform 80ms steps(2, jump-end);
}
.stepper__btn:active { transform: translateY(3px); }
.total { position: relative; display: grid; gap: 14px; align-content: start; }
.total__screen {
  padding: 16px 16px 14px;
  background: #0d0d10; border: var(--line) solid #000;
  box-shadow: inset 0 0 0 3px #26262c;
}
.total__screen.flash { animation: flash 240ms steps(2, jump-none); }
.total__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 18px; }
.total__row strong { font-size: clamp(30px, 3.6vw, 46px); color: var(--lime); font-variant-numeric: tabular-nums; }
.total__row--sub strong { font-size: 24px; color: var(--ink); }
.total__coin { --k: 5; justify-self: end; margin-top: 4px; }
.note { font-size: 13px; color: var(--muted); padding-left: 14px; border-left: 4px solid var(--violet); }

.steps { position: relative; list-style: none; padding: 0; display: grid; gap: 22px; }
.step {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center;
  background: var(--panel); border: var(--line) solid #000; box-shadow: 6px 6px 0 var(--shadow); padding: 14px 16px;
}
.step__n {
  grid-row: span 2; width: 44px; height: 44px; display: grid; place-content: center;
  background: var(--violet); border: var(--line) solid #000; font-weight: 700; font-size: 22px;
}
.step__t { font-size: 22px; font-weight: 700; }
.step__s { font-size: 13px; color: var(--lime); }
.step--goal { background: var(--lime); color: #111; }
.step--goal .step__s { color: #3c4d24; }
.step__flag { position: absolute; right: 16px; top: -22px; }

/* ---------- LEVEL 5 ---------- */
.contacts { padding-bottom: 120px; }
.contacts .sec-head { justify-content: flex-start; }
.cbtns { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 16px; justify-items: center; }
.cbtn-item { display: grid; justify-items: center; --b: 96px; min-width: 0; }
.cbtn {
  width: var(--b); height: var(--b);
  display: grid; place-content: center;
  border: 4px solid #000;
  box-shadow: inset -6px -6px 0 rgba(0, 0, 0, .25), inset 6px 6px 0 rgba(255, 255, 255, .3);
  cursor: pointer; padding: 0;
  animation: float var(--dur, 2s) steps(4, jump-none) infinite alternate;
}
.cbtn .px { --k: 4; transition: transform var(--press) steps(2, jump-end); }
@media (hover: hover) and (pointer: fine) { .cbtn:hover .px { transform: translateY(-4px); } }
.cbtn:active .px { transform: translateY(3px); }
.cbtn--dark { background: #111; }
.cbtn--dark .px { filter: invert(1); }
.cbtn--violet { background: var(--violet); }
.cbtn--white { background: var(--ink); }
.cbtn__shadow {
  width: calc(var(--b) * .8); height: 10px; margin-top: 18px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 8px, rgba(0,0,0,.35) 8px 16px);
  animation: shadow var(--dur, 2s) steps(4, jump-none) infinite alternate;
}
.cbtn__cap { margin-top: 14px; font-size: 14px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }

/* ---------- Футер ---------- */
.footer { padding: 72px 0 48px; }
.footer__inner { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 15px; }
.footer a { color: var(--lime); }

/* ---------- Монетка: покадровое вращение ---------- */
.coin {
  --k: 3;
  display: inline-block; flex: none;
  width: calc(14px * var(--k)); height: calc(14px * var(--k));
  background: url("assets/img/coin-spin.svg") 0 0 / calc(84px * var(--k)) 100% no-repeat;
  image-rendering: pixelated;
  animation: spin 900ms steps(6) infinite;
}

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 16px);
  width: max-content; max-width: calc(100% - 32px);
  background: var(--lime); color: #111;
  border: var(--line) solid #000; box-shadow: 5px 5px 0 var(--violet);
  padding: 12px 16px; font-family: var(--f-head); font-size: 18px; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 160ms steps(2, jump-end), transform 160ms steps(2, jump-end);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Искры от клика ---------- */
.spark { position: fixed; z-index: 90; width: 6px; height: 6px; pointer-events: none; }

/* ---------- «Рассыпающиеся пиксели» при появлении ----------
   Блок виден всегда; поверх на 3 кадра кладётся маска цвета фона секции. */
.reveal { position: relative; }
.reveal[data-px]::after {
  content: ""; position: absolute; inset: -4px; z-index: 5; pointer-events: none;
  background: var(--sec-bg);
  -webkit-mask: url("assets/img/dissolve-0.svg") 0 0 / 96px 96px repeat;
  mask: url("assets/img/dissolve-0.svg") 0 0 / 96px 96px repeat;
}
.reveal[data-px="1"]::after { -webkit-mask-image: url("assets/img/dissolve-1.svg"); mask-image: url("assets/img/dissolve-1.svg"); }
.reveal[data-px="2"]::after { -webkit-mask-image: url("assets/img/dissolve-2.svg"); mask-image: url("assets/img/dissolve-2.svg"); }

/* ---------- Наведение на наклейки и спрайты ---------- */
@media (hover: hover) and (pointer: fine) {
  .tag:hover, .wobble:hover, .bubble:hover { animation: wobble 280ms steps(4, jump-none); }
}

/* ---------- Keyframes ---------- */
@keyframes spin { to { background-position: calc(-84px * var(--k)) 0; } }
@keyframes pulse { 0% { transform: scale(1.25); } 12% { transform: scale(1); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-16px); } }
@keyframes shadow { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.6); opacity: .55; } }
@keyframes wobble {
  0%, 100% { transform: rotate(var(--r, 0deg)); }
  33% { transform: rotate(calc(var(--r, 0deg) - 4deg)); }
  66% { transform: rotate(calc(var(--r, 0deg) + 4deg)); }
}
@keyframes flash { 50% { background-color: #2c3d17; box-shadow: inset 0 0 0 3px var(--lime); } }

/* ---------- Адаптив ---------- */
@media (min-width: 480px) {
  .cbtn-item { --b: 112px; }
}
@media (min-width: 768px) {
  .header__bar { padding-top: 18px; padding-bottom: 10px; }
  .nav { font-size: 15px; gap: 24px; }
  .hero__art { --k: 4; }
  .hero__title { font-size: clamp(32px, 6.4vw, 92px); }
  .avatar-box { --a: 6; }
  .phone { --k: 6; }
  .brief__grid { grid-template-columns: auto minmax(0, 1fr); gap: 72px; }
  .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor--b { margin-top: 64px; }
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .plan--hot { transform: translateY(-14px); }
  .plan--hot:active { transform: translate(4px, -10px); }
  .calc__box { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: 34px; gap: 44px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .steps::before { /* пунктир «карты уровня» между этапами */
    content: ""; position: absolute; left: 4%; right: 4%; top: 50%; height: 8px; z-index: 0;
    background: repeating-linear-gradient(90deg, var(--lime) 0 8px, transparent 8px 24px);
  }
  .step { position: relative; z-index: 1; grid-template-columns: 1fr; row-gap: 10px; align-items: start; }
  .step:nth-child(even) { transform: translateY(18px); }
  .step__n { grid-row: auto; }
  .cbtns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .hero { padding-top: 56px; }
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; }
  .hero__title { font-size: min(5.2vw, 92px); }
  .hero__art { --k: 5; }
  .avatar-box { --a: 7; }
  .cbtn-item { --b: 136px; }
  .cbtn .px { --k: 5; }
}
@media (min-width: 1800px) {
  :root { --wrap: 1640px; }
  body { font-size: 19px; }
  .lead { font-size: 24px; }
  .plan__list, .addon { font-size: 18px; }
  .hero__art { --k: 6; }
  .avatar-box { --a: 9; }
  .hero__title { font-size: min(4.6vw, 128px); }
  .phone { --k: 8; }
  .cbtn-item { --b: 168px; }
  .cbtn .px { --k: 6; }
  .monitor figcaption, .cbtn__cap, .note, .footer__inner { font-size: 18px; }
}
/* на телефоне — только лёгкое: без парения кнопок с тенью и без пульса HUD */
@media (max-width: 767px) {
  .cbtn, .cbtn__shadow { animation-duration: calc(var(--dur, 2s) * 1.5); }
  .hud__hearts i.is-full { animation: none; }
  .hud__hearts i { width: 12px; height: 12px; }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .phone__body { transform: none; }
  .reveal[data-px]::after { content: none; }
}

/* ---------- круг 1: правки ---------- */
.sec-head { display: grid; justify-items: start; gap: 18px; }
.sec-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.stepper output { min-width: 44px; text-align: center; font-size: 20px; font-weight: 700; }
.step__flag { top: -40px; }
.bubble::after { left: 44px; }
.deco--heart { left: auto; right: 6px; bottom: auto; top: 0; }
.brief__text { position: relative; padding-bottom: 8px; }
.brief__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.brief__tag2 { position: relative; display: inline-block; margin-top: 40px; }
@media (min-width: 1100px) {
  .phone { --k: 7; }
  .brief__tag2 { position: absolute; right: 0; top: 4px; margin: 0; }
}
.hero { overflow: visible; }
@media (max-width: 767px) {
  .hero__art { padding: 48px 14px 0; }
  .deco--joystick { right: -4px; }
  .deco--cart { right: -4px; }
  .avatar-box { --a: 5; }
}
@media (max-width: 359px) { .avatar-box { --a: 4; } }

/* ---------- круг 2: правки ---------- */
.level { font-family: var(--f-mono); font-size: 14px; }
.bubble::after { content: none; }
.total__coin { position: absolute; right: -22px; top: -30px; margin: 0; z-index: 3; }
.step__t { line-height: 1.15; }
@media (max-width: 767px) {
  .step__flag { top: 10px; right: 14px; }
  .hero .float-deco:nth-of-type(1) { display: none; }
}

/* ---------- Карточки работ ---------- */
.works__grid { counter-reset: none; }
.work { text-decoration: none; color: inherit; cursor: pointer; }
.work .monitor__screen { display: block; position: relative; }
.work .crt { display: block; aspect-ratio: 16 / 10; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; image-rendering: auto; }
.crt .shot { aspect-ratio: auto; }
.shot--b { clip-path: inset(0 100% 0 0); transition: clip-path 240ms steps(6, jump-end); }
@media (hover: hover) and (pointer: fine) {
  .work:hover .shot--b, .work:focus-visible .shot--b { clip-path: inset(0 0 0 0); }
  .work:hover .work__open { background: var(--lime); color: #111; }
  .work:hover .work__phone { transform: translate(-4px, -4px) rotate(-2deg); }
}
.work:focus-visible { outline: 3px dashed var(--lime); outline-offset: 10px; }
.work__phone {
  position: absolute; z-index: 3; right: -14px; bottom: -26px;
  width: 17%; min-width: 58px; height: auto;
  border: 4px solid #000; background: #000;
  box-shadow: 5px 5px 0 var(--violet);
  transition: transform 160ms steps(3, jump-end);
}
.work__open {
  position: absolute; z-index: 3; left: 16px; bottom: 6px;
  font-family: var(--f-head); font-size: 14px; font-weight: 700; letter-spacing: .06em; line-height: 1;
  color: var(--lime); background: #111; border: 2px solid var(--lime); padding: 3px 8px;
  transition: background-color 120ms steps(2, jump-end), color 120ms steps(2, jump-end);
}
.work .monitor__stand { display: block; }
.work__title { display: block; margin-top: 38px; font-family: var(--f-head); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; text-align: center; }
.work__line { display: block; margin-top: 8px; font-size: 15px; text-align: center; max-width: 36em; color: var(--muted); }
.work__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.work__tags span {
  font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; color: #111; background: var(--lime); border: 2px solid #000; box-shadow: 3px 3px 0 var(--violet);
}
.work__tags span:nth-child(2) { background: var(--coin); }
.work__tags span:nth-child(3) { background: var(--ink); }
.works__sub { margin: 8px 0 32px; }
.works__grid--reels { margin-bottom: 56px; }
@media (min-width: 768px) {
  .works__grid > .work:nth-child(even) { margin-top: 64px; }
  .works__grid--reels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
  .works__grid--reels > .work:nth-child(even) { margin-top: 40px; }
  .works__grid--reels .work__phone { width: 22%; }
}
@media (prefers-reduced-motion: reduce) {
  .shot--b { display: none; }
}

/* ---------- Карточки работ: круг 1 ---------- */
.work__title { font-family: var(--f-mono); letter-spacing: -.01em; }
.work__phone { right: 22px; bottom: 30px; width: 13%; min-width: 44px; box-shadow: 4px 4px 0 var(--lime); }
.works__grid--reels .work__phone { width: 18%; }
@media (min-width: 768px) {
  .works__grid:not(.works__grid--reels) > .work:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 24px); margin-top: 0; }
}
