.hero { position: relative; margin-top: 8px; }

/* The scene is sized in whole "art pixels" (--u) so the pixel art stays crisp. JS snaps --s to the device pixel grid. */
.hero__scene {
  --s: 2.2; --u: calc(var(--s) * 1px); --focus: 0.7; --sw: 390; --sh: 121;
  position: relative; height: calc(var(--sh) * var(--u)); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
}
.scene { position: absolute; top: 0; left: calc((100% - var(--sw) * var(--u)) * var(--focus)); width: calc(var(--sw) * var(--u)); height: calc(var(--sh) * var(--u)); }
.scene__bg { width: 100%; height: 100%; image-rendering: pixelated; max-width: none; }

.sp, .fx { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); }
.sp { width: calc(var(--w) * var(--u)); }
img.sp { height: auto; image-rendering: pixelated; max-width: none; }
.sp img { width: 100%; height: auto; image-rendering: pixelated; max-width: none; }
.sp--bot { }
.sp__blink { position: absolute; inset: 0; opacity: 0; }

/* ---- ambient motion (all discrete pixel steps) ---- */
.sp--ghost { animation: ghost-float 4.2s steps(1, end) infinite; }
@keyframes ghost-float {
  0%, 100% { transform: translateY(0); } 20% { transform: translateY(calc(-1 * var(--u))); } 40% { transform: translateY(calc(-2 * var(--u))); }
  60% { transform: translateY(calc(-2 * var(--u))); } 80% { transform: translateY(calc(-1 * var(--u))); }
}
.sp__blink { animation: bot-blink 5.5s steps(1, end) infinite; }
@keyframes bot-blink { 0%, 90%, 96%, 100% { opacity: 0; } 91%, 95% { opacity: 1; } }

.fx { pointer-events: none; }
.fx--scan { width: calc(var(--w) * var(--u)); height: calc(var(--u) * 1); background: rgba(185, 245, 189, 0.3); animation: scan 3.2s steps(20, end) infinite; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(calc(var(--h) * var(--u))); } }
@keyframes blink { 50% { opacity: 0; } }
.fx--arrow { width: calc(5 * var(--u)); height: calc(6 * var(--u)); background: #1d3a2e; animation: blink-on 1.2s steps(1, end) infinite; }
@keyframes blink-on { 0%, 55% { opacity: 0; } 56%, 100% { opacity: 1; } }
.fx--glow { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); border-radius: 50%; mix-blend-mode: screen; opacity: 0.18; animation: glow 4s ease-in-out infinite; }
.fx--cab { background: radial-gradient(closest-side, #79e9a4, transparent); }
.fx--lampglow { background: radial-gradient(closest-side, #ffcf7a, transparent); animation-duration: 5.5s; }
@keyframes glow { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.3; } }
.fx--z { font-family: var(--font-mono); font-weight: 700; font-size: calc(5 * var(--u)); line-height: 1; color: #b9f5bd; opacity: 0; animation: zzz 3.2s steps(1, end) infinite; }
.fx--z2 { animation-delay: 1.1s; }
@keyframes zzz { 0%, 100% { opacity: 0; } 20%, 60% { opacity: 0.9; } }
.fx--glint { width: calc(var(--u) * 1); height: calc(var(--u) * 1); background: var(--glint, #b9f5bd); box-shadow: 0 calc(-1 * var(--u)) 0 var(--glint, #b9f5bd), 0 var(--u) 0 var(--glint, #b9f5bd), calc(-1 * var(--u)) 0 0 var(--glint, #b9f5bd), var(--u) 0 0 var(--glint, #b9f5bd); opacity: 0; animation: twinkle 3.8s steps(1, end) infinite var(--d, 0s); }
.fx--peach { --glint: #f8d9c2; } .fx--lav { --glint: #c9c1f5; }
@keyframes twinkle { 0%, 100% { opacity: 0; } 8%, 16% { opacity: 1; transform: scale(1); } 24% { opacity: 0.6; transform: scale(0.99); } 30% { opacity: 0; } }

/* ---- hero copy ---- */
.hero__copy { position: relative; margin-top: -14px; padding: 0 var(--gutter); text-align: center; }
.hero__title { font-size: clamp(2.35rem, 11.4vw, 5.4rem); line-height: 0.98; letter-spacing: -0.05em; font-weight: 820; text-wrap: balance; }
.hero__title span { color: var(--mint); text-shadow: 0 0 38px rgba(121, 233, 164, 0.28); }
.hero__sub { margin: 16px auto 0; max-width: 36ch; color: var(--text-2); font-size: clamp(1rem, 4.2vw, 1.2rem); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px auto 28px; max-width: 520px; }
.hero__actions .btn { flex: 1 1 auto; padding: 0 16px; font-size: 0.95rem; }
.hero__buy { flex: 1 1 100%; }

@media (min-width: 720px) {
  .hero__scene { --focus: 0.5; -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%); mask-image: linear-gradient(to bottom, #000 88%, transparent 100%); }
  .hero__copy { margin-top: -28px; }
  .hero__actions { margin: 28px auto 36px; flex-wrap: nowrap; }
  .hero__actions .btn { flex: 0 0 auto; }
  .hero__buy { flex: 0 0 auto; }
}
@media (min-width: 1100px) {
  .hero__scene {
    -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, #000 88%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    mask-composite: intersect;
  }
}
