/* Home page: star field, hero + intro, game blocks, about, delight features. */

/* ---------- Star field (fixed behind the whole page) ---------- */
.starfield {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, #0a1740 0%, transparent 60%),
    radial-gradient(80% 60% at 85% 100%, rgb(192 1 251 / 0.08), transparent 70%),
    var(--bg);
}
main, .footer { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  padding: 88px var(--gutter) 1.5rem;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.hero__content {
  align-self: center; justify-self: center;
  display: grid; justify-items: center; text-align: center;
  gap: 1.1rem;
}
.hero__mark { width: clamp(150px, 24vw, 280px); margin-bottom: 0.4rem; }
.zmark { width: 100%; height: auto; overflow: visible; }
.hero__title { margin: 0; }
.hero__wordmark { width: clamp(230px, 38vw, 480px); height: auto; }
.hero__tagline {
  margin-top: 1.2rem;
  font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em;
}
.hero__sub { color: var(--text-2); max-width: 44ch; text-wrap: balance; }

.hero__foot { display: grid; justify-items: center; gap: 0.9rem; }
.hero__hint { display: flex; align-items: center; gap: 0.7rem; opacity: 0.8; }
.hero__hint .hint-touch { display: none; }
.touch .hero__hint .hint-touch { display: inline; }
.touch .hero__hint .hint-desktop { display: none; }
.hero__scroll {
  display: grid; place-items: center; width: 44px; height: 44px; color: var(--cyan);
  animation: bob 2.4s var(--ease) infinite;
}
.hero__scroll svg { width: 18px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Intro (first visit; html.intro set by boot.js) ---------- */
.intro .zm-cyan  { animation: zm-in-cyan 1100ms var(--ease) both; }
.intro .zm-mag   { animation: zm-in-mag 1100ms var(--ease) both; }
.intro .zm-fill  { animation: zm-in-fill 700ms var(--ease) both; transform-origin: 50% 50%; transform-box: fill-box; }
.intro .zm-star  { animation: zm-star 900ms steps(1) 900ms both; }
.intro .hero__wordmark { animation: rise 600ms var(--ease) 1150ms both; }
.intro .hero__tagline  { animation: rise 600ms var(--ease) 1350ms both; }
.intro .hero__sub      { animation: rise 600ms var(--ease) 1450ms both; }
.intro .hero__foot     { animation: fade 800ms var(--ease) 1800ms both; }
.intro .nav            { animation: fade 800ms var(--ease) 1600ms both; }

@keyframes zm-in-cyan {
  0%   { transform: translate(-90px, -40px); opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: translate(6px, 3px); }
  100% { transform: translate(0, 0); }
}
@keyframes zm-in-mag {
  0%   { transform: translate(90px, 40px); opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: translate(-6px, -3px); }
  100% { transform: translate(0, 0); }
}
@keyframes zm-in-fill {
  0%   { opacity: 0; transform: scale(0.92) skewX(-8deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes zm-star {
  0% { opacity: 0; } 15% { opacity: 1; } 30% { opacity: 0.1; } 45% { opacity: 1; } 60% { opacity: 0.3; } 75%, 100% { opacity: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Idle twinkle on the logo star, always on (subtle) */
.zm-star { transform-box: fill-box; transform-origin: center; }
html:not(.intro) .zm-star, .intro-done .zm-star { animation: twinkle 5s ease-in-out 2s infinite; }
@keyframes twinkle { 0%, 88%, 100% { opacity: 1; } 92% { opacity: 0.35; } 95% { opacity: 1; } 97% { opacity: 0.6; } }

/* Warp state: hero content recedes slightly */
.hero__content { transition: transform 600ms var(--ease), filter 600ms var(--ease); }
.warping .hero__content { transform: scale(0.97); filter: drop-shadow(-4px 0 0 rgb(0 245 251 / 0.6)) drop-shadow(4px 0 0 rgb(192 1 251 / 0.6)); }

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 12vw, 9rem) 0; }
.section__head { display: grid; gap: 1rem; max-width: 40rem; margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.section__head h2 { font-size: var(--fs-h2); }
.section__lead { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.5; }

/* Diagonal Z-cut band behind the games section */
.games { position: relative; }
.games::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(6 15 45 / 0) 0%, rgb(6 15 45 / 0.75) 12%, rgb(6 15 45 / 0.75) 88%, rgb(6 15 45 / 0) 100%);
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

/* ---------- Quick-jump row (one card per game) ---------- */
.games__jump { margin: calc(-1 * clamp(1rem, 3vw, 2.5rem)) 0 clamp(4rem, 9vw, 6.5rem); }
.jump { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; padding: 0; margin: 0; list-style: none; }
.jump__link {
  display: flex; align-items: center; gap: 0.85rem; height: 100%;
  padding: 0.7rem 1rem 0.7rem 0.7rem; border-radius: 14px;
  border: 1px solid var(--line); background: rgb(247 249 255 / 0.03);
  color: var(--text); text-decoration: none;
  transition: transform var(--fast) var(--ease), border-color var(--fast), background var(--fast);
}
.jump__link:hover, .jump__link:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.jump__icon {
  width: 44px; height: 44px; border-radius: 11px; flex: none; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-strong), 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.jump__text { display: grid; gap: 0.3rem; min-width: 0; }
.jump__text strong { font-weight: 650; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump__text small { display: flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: 0.66rem; }
.jump__text .status-dot { width: 6px; height: 6px; }
.jump__link:hover strong { animation: glitch-text 260ms steps(2) 1; }

/* ---------- Game block ---------- */
.games__list { display: grid; gap: clamp(5rem, 12vw, 9rem); }
.game {
  --accent: var(--cyan);
  display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .game { grid-template-columns: 1.15fr 1fr; }
  .game--portrait { grid-template-columns: 0.8fr 1fr; }
  .game-group:nth-child(even) .game__media { order: 2; }
}
.game__media { position: relative; display: grid; place-items: center; }
.game__media::before {  /* product-accent glow: the game's own color, only here */
  content: ""; position: absolute; inset: 10% 5%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent);
  filter: blur(30px);
}

/* Device frame (CSS-drawn phone) */
.device {
  position: relative; width: 100%;
  padding: 12px; border-radius: 30px;
  background: linear-gradient(145deg, #1a2447, #0a1128 55%, #121b3b);
  box-shadow:
    inset 0 0 0 1px rgb(247 249 255 / 0.12),
    inset 0 0 0 5px #050b1f,
    0 30px 60px -20px rgb(0 0 0 / 0.7);
  transition: transform var(--med) var(--ease);
}
.device--landscape { max-width: 640px; }
.device--portrait  { max-width: 300px; padding: 11px; border-radius: 40px; }
.device::after {   /* camera dot */
  content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: #1f2a52; box-shadow: inset 0 0 0 1px rgb(247 249 255 / 0.08);
}
.device--landscape::after { left: 5px; top: 50%; transform: translateY(-50%); width: 5px; height: 5px; }
.device--portrait::after  { top: 20px; left: 50%; transform: translateX(-50%); z-index: 3; width: 9px; height: 9px; background: #02040c; }
.device__screen {
  position: relative; overflow: hidden; background: #000;
  border-radius: 18px;
}
.device--landscape .device__screen { aspect-ratio: 16 / 9; }
.device--portrait  .device__screen { aspect-ratio: 9 / 16; border-radius: 30px; }
.device__screen img, .device__screen video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.device__screen .slide { opacity: 0; transition: opacity 900ms var(--ease); }
.device__screen .slide.is-active { opacity: 1; }
.device__screen .pixelated { image-rendering: pixelated; }

/* Video-mode switcher (Space Garbage Puppy): instant swap behind a quick
   CRT channel-switch blank, keycaps below the device. */
.device__screen .mode-img { opacity: 0; }
.device__screen .mode-img.is-active { opacity: 1; }
.device__screen--modes::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background:
    linear-gradient(180deg, transparent calc(50% - 1px), rgb(247 249 255 / 0.85) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    #000;
}
.device__screen--modes.is-switching::after { animation: channel 240ms steps(5) 1; }
@keyframes channel { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }

.modes { display: grid; justify-items: center; gap: 0.75rem; width: 100%; max-width: 640px; margin-top: 1.4rem; }
.modes__keys { display: flex; justify-content: center; gap: 0.5rem; width: 100%; }
/* Seven world keys (Arc Enemies): one tight row, wrapping 4 + 3 on phones */
.modes__keys--many { flex-wrap: wrap; gap: 0.4rem; }
.modes__keys--many .modekey { flex: 1 1 0; max-width: 92px; padding-inline: 0.4rem; gap: 0.4rem; letter-spacing: 0.1em; }
@media (max-width: 560px) { .modes__keys--many .modekey { flex: 0 1 calc(25% - 0.3rem); max-width: none; } }
.modekey {
  --mode: var(--cyan);
  flex: 0 1 96px; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.6rem;
  font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-2);
  background: linear-gradient(180deg, #111b3f, var(--surface));
  border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 3px 0 #040919, inset 0 1px 0 rgb(247 249 255 / 0.06);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), color var(--fast), border-color var(--fast);
}
.modekey:hover { color: var(--text); }
.modekey { text-transform: uppercase; }
.modekey:active, .modekey.is-on {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #040919, inset 0 1px 0 rgb(247 249 255 / 0.04);
}
.modekey.is-on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--mode) 55%, transparent);
  box-shadow: 0 1px 0 #040919, 0 6px 22px -10px var(--mode);
}
.modekey__led { width: 5px; height: 5px; flex: none; background: var(--line-strong); transition: background var(--fast), box-shadow var(--fast); }
.modekey.is-on .modekey__led { background: var(--mode); box-shadow: 0 0 8px var(--mode); }
.modes__cap { color: var(--text-2); }

.game__retro {
  max-width: 46ch; padding-left: 1rem;
  color: var(--text-2); line-height: 1.6;
  border-left: 2px solid;   /* the four modes, top to bottom */
  border-image: linear-gradient(180deg, #ffd24a 0 25%, #6f7dff 25% 50%, #ff55ff 50% 75%, #4bff6e 75%) 1;
}
.game__worlds { border-image: linear-gradient(180deg, #5fe86a 0 25%, #b9c6e0 25% 50%, #ff7a3d 50% 75%, #ff3ec8 75%) 1; }  /* Earth, Moon, Mars, Cyber */
.game__retro strong { display: block; margin-bottom: 0.25rem; color: var(--text); font-weight: 650; }

.egg { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-3); letter-spacing: 0.02em; }
.egg__star { color: var(--accent); }

.game__info { display: grid; gap: 1.25rem; align-content: start; }
.game__id { display: flex; align-items: center; gap: 1rem; }
.game__icon {
  width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px var(--line-strong), 0 10px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--surface-2);
}
.game__name { font-size: var(--fs-h3); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
.game__endorse { margin-top: 0.35rem; }
.game__endorse .accent { color: var(--accent); }
.game__pitch { color: var(--text-2); font-size: 1.1rem; line-height: 1.6; max-width: 46ch; }
.game__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.game__tags li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgb(247 249 255 / 0.03);
  font-size: 0.85rem; color: var(--text);
}
.game__tags .px-star { color: var(--accent); }
.game__status { display: flex; align-items: center; gap: 0.6rem; }
.status-dot {
  width: 8px; height: 8px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s steps(2) infinite;
}
.status--live .status-dot { background: #3dff9a; box-shadow: 0 0 10px #3dff9a; animation: none; }
/* In development: a hollow dot that blinks slower, one step behind "coming soon" */
.status--in-development .status-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); animation-duration: 3.2s; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* Store buttons */
.game__stores { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.25rem; }
.store {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-width: 190px; padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong);
  transition: transform var(--fast) var(--ease), border-color var(--fast);
}
.store svg { width: 24px; height: 24px; flex: none; }
.store__text { display: grid; line-height: 1.15; }
.store__text small { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.store__text strong { font-size: 1.05rem; font-weight: 700; }
a.store:hover { transform: translateY(-2px); border-color: transparent; }
a.store::before {  /* signature gradient border, only on hover */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--fast);
}
a.store:hover::before, a.store:focus-visible::before { opacity: 1; }
.store.is-disabled { cursor: not-allowed; border-style: dashed; border-color: var(--line-strong); }
.store.is-disabled svg { filter: grayscale(1); opacity: 0.45; }
.store.is-disabled strong { color: var(--text-2); }
.store.is-disabled small { color: var(--text-3); }

.game__legal { font-size: var(--fs-small); color: var(--text-3); }
.game__legal a { color: var(--text-2); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.game__legal a:hover { color: var(--cyan); }

.noscript-games { display: grid; gap: 1rem; color: var(--text-2); }

/* ---------- Chromatic hover glitch ---------- */
.glitch-text:hover, .glitch-text:focus-visible { animation: glitch-text 260ms steps(2) 1; }
@keyframes glitch-text {
  0%   { text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta); transform: translateX(1px); }
  50%  { text-shadow: 2px 0 var(--cyan), -2px 0 var(--magenta); transform: translateX(-1px); }
  100% { text-shadow: none; transform: none; }
}
.game:hover .device, .game:focus-within .device { animation: glitch-box 280ms steps(2) 1; }
@keyframes glitch-box {
  0%   { filter: drop-shadow(-4px 0 0 rgb(0 245 251 / 0.8)) drop-shadow(4px 0 0 rgb(192 1 251 / 0.8)); transform: translate(2px, -1px); }
  50%  { filter: drop-shadow(4px 0 0 rgb(0 245 251 / 0.8)) drop-shadow(-4px 0 0 rgb(192 1 251 / 0.8)); transform: translate(-2px, 1px); }
  100% { filter: none; transform: none; }
}
a.store:hover .store__text strong { animation: glitch-text 260ms steps(2) 1; }

/* ---------- Game extras: the Lounge + premium helmet (Cats and Bots) ---------- */
.extras { display: grid; gap: clamp(1.25rem, 3vw, 2rem); margin-top: clamp(3rem, 7vw, 5rem); }
.lounge, .premium {
  position: relative; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgb(11 22 56 / 0.85), rgb(6 15 45 / 0.85));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8);
  overflow: hidden;
}

/* Panorama of the whole room, slowly panning */
.pano { position: relative; }
.pano__frame { position: relative; aspect-ratio: 21 / 8; overflow: hidden; background: #0b1024; }
.pano__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 0% 60%;
  opacity: 0; transition: opacity 700ms var(--ease);
  animation: pan 38s ease-in-out infinite alternate;
}
.pano__img.is-active { opacity: 1; }
@keyframes pan { from { object-position: 0% 60%; } to { object-position: 100% 60%; } }
@media (max-width: 700px) { .pano__frame { aspect-ratio: 16 / 9; } }
.pano__frame::after {  /* soft fade into the card */
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(transparent, rgb(8 17 46 / 0.95));
  pointer-events: none;
}
.pano__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.75rem);
}
.pano__bar .hud { color: var(--text); }
.pano__bar .accent { color: var(--accent); }
.pano__toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgb(2 8 23 / 0.7); border: 1px solid var(--line-strong); backdrop-filter: blur(6px); }
.pano__btn {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.pano__btn[aria-pressed="true"] { background: var(--starlight); color: var(--midnight); }

.lounge__body {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .lounge__body { grid-template-columns: auto 1fr; } }
.lounge__phone { display: grid; justify-items: center; gap: 0.8rem; }
.device--small { width: 210px; max-width: 210px; padding: 9px; border-radius: 32px; }
.device--small .device__screen { border-radius: 24px; }
.device--small::after { top: 16px; width: 7px; height: 7px; }
.lounge__cap { font-size: 0.62rem; }
.lounge__cap::before { content: "● "; color: var(--accent); animation: pulse 1.2s steps(2) infinite; }
.lounge__text { display: grid; gap: 1.1rem; align-content: start; }
.lounge__title, .premium__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.1; }
.lounge__copy, .premium__copy { color: var(--text-2); font-size: 1.05rem; line-height: 1.6; max-width: 52ch; text-wrap: pretty; }

/* Collection strip */
.collect { grid-column: 1 / -1; display: grid; gap: 0.7rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.collect .accent { color: var(--accent); }
.collect__strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.35rem; max-width: 640px; margin: 0; padding: 0; list-style: none; }
.breed { position: relative; aspect-ratio: 1; }
@media (max-width: 640px) { .collect__strip { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.breed img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 150ms, transform 200ms var(--ease); }
.breed__happy { opacity: 0; }
.breed:hover .breed__idle { opacity: 0; }
.breed:hover .breed__happy { opacity: 1; }
.breed:hover img { transform: translateY(-4px) rotate(-4deg); }
.breed.is-locked img { filter: brightness(0) saturate(0); opacity: 0.55; }
.breed.is-locked:hover img { transform: none; }
.breed__q {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-pixel); font-size: 11px; color: var(--text-3);
}
.collect__note { font-size: var(--fs-small); color: var(--text-3); }
.collect__note .c2 { color: var(--accent); }
.collect__note .c3 {
  background: linear-gradient(90deg, #e9eef9, #9fb0d6, #ffffff, #b8c4e0);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700;
}

/* Premium card */
.premium {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  grid-template-columns: 1fr;
  border-color: rgb(192 1 251 / 0.28);
  box-shadow: inset 0 1px 0 rgb(192 1 251 / 0.25), 0 30px 60px -30px rgb(0 0 0 / 0.8);
}
@media (min-width: 820px) { .premium { grid-template-columns: auto 1fr; } }
.premium::before {  /* faint orbit ring behind the helmet */
  content: ""; position: absolute; width: 420px; height: 420px; left: -80px; top: 50%; transform: translateY(-50%);
  border-radius: 50%; border: 1px solid rgb(0 245 251 / 0.12);
  box-shadow: 0 0 0 40px rgb(192 1 251 / 0.03);
  pointer-events: none;
}
.premium__stage { position: relative; display: grid; justify-items: center; gap: 0.6rem; }
.helmet { position: relative; width: 220px; height: 220px; }
.helmet__faces { position: absolute; inset: -12.5%; }          /* faces are 1.25x the helmet, as in the game */
.pface {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: scale(0.94);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.pface.is-active { opacity: 1; transform: none; }
.pface--sil, .pface--you { clip-path: circle(30% at 50% 50%); display: grid; place-items: center; }
.pface--sil .sil { width: 60%; height: 60%; margin-top: 6%; opacity: 0.9; }
.pface--you span {
  font-family: var(--font-pixel); font-size: 20px; color: var(--starlight);
  text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta);
}
.pface--you { background: radial-gradient(circle at 50% 50%, rgb(113 69 245 / 0.35), transparent 32%); }
.helmet__glass { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.helmet__glint {
  position: absolute; inset: 0; pointer-events: none;
  clip-path: circle(34% at 50% 47%);
  background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 0.55) 48%, rgb(255 255 255 / 0.1) 55%, transparent 62%);
  background-size: 250% 100%; background-position: 120% 0; opacity: 0;
}
.helmet.is-glinting .helmet__glint { animation: glint 700ms var(--ease); }
@keyframes glint { 0% { background-position: 120% 0; opacity: 1; } 100% { background-position: -30% 0; opacity: 1; } }
.premium__who { min-height: 1.2em; color: var(--text); }
.premium__text { display: grid; gap: 1rem; align-content: start; }
.premium__label { color: var(--magenta); display: flex; align-items: center; gap: 0.6rem; }
.premium__dot { width: 8px; height: 8px; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); animation: pulse 1.6s steps(2) infinite; }
.premium__title {
  background: linear-gradient(90deg, var(--starlight) 55%, #c9b8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.premium__note { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-small); color: var(--text-2); }
.premium__note .px-star { color: var(--cyan); }

@media (prefers-reduced-motion: reduce) {
  .pano__img { animation: none; object-position: 50% 60%; }
  .breed:hover img { transform: none; }
}
.crt .lounge__title, .crt .premium__title, .crt .pano__btn, .crt .modekey { font-family: var(--font-pixel); letter-spacing: 0; }
.crt .lounge__title, .crt .premium__title { font-size: clamp(0.95rem, 0.8rem + 0.8vw, 1.3rem); line-height: 1.5; }

/* ---------- About ---------- */
.about { position: relative; text-align: center; }
.orbit { position: absolute; top: clamp(1rem, 4vw, 3rem); left: 0; right: 0; height: 160px; pointer-events: none; }
.orbit svg { width: 100%; height: 100%; }
.about__inner { display: grid; justify-items: center; gap: 1.25rem; max-width: 46rem; }
.about h2 { font-size: var(--fs-h2); }
.about__year {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about__body { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.6; }
.about__press { color: var(--text); margin-top: 0.5rem; }
.blink { color: var(--cyan); animation: pulse 1.1s steps(2) infinite; }

/* ---------- Konami egg: the race ---------- */
.race { position: fixed; left: 0; right: 0; bottom: 0; height: 180px; z-index: 90; pointer-events: none; overflow: hidden; }
.racer { position: absolute; bottom: 18px; left: 0; will-change: transform; }
.racer--puppy {
  width: 168px; height: 168px;
  background: url("/assets/egg/puppy-walk.png") 0 0 / 672px 168px no-repeat;
  image-rendering: pixelated;
  animation: run-frames 360ms steps(4) infinite;
}
@keyframes run-frames { to { background-position: -672px 0; } }
.racer--cat { width: 96px; height: 106px; bottom: 26px; }
.racer--cat img { width: 100%; height: 100%; animation: hop 420ms var(--ease) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-38px) rotate(8deg); } }
.race__flag {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-pixel); font-size: 14px; color: var(--starlight);
  text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta);
  animation: pulse 400ms steps(2) infinite;
}

/* ---------- CRT mode (unlocked by the egg) ---------- */
.crt-overlay { display: none; }
.crt .crt-overlay {
  display: block; position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / 0.28) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 0.65) 100%);
  box-shadow: inset 0 0 120px rgb(0 0 0 / 0.9), inset 0 0 18px rgb(0 245 251 / 0.15);
  border-radius: 28px / 22px;
  animation: crt-flicker 6s steps(1) infinite;
}
@keyframes crt-flicker { 0%, 96%, 100% { opacity: 1; } 97% { opacity: 0.85; } 98% { opacity: 1; } 99% { opacity: 0.9; } }
.crt body { text-shadow: -0.6px 0 rgb(0 245 251 / 0.45), 0.6px 0 rgb(192 1 251 / 0.45); }
.crt h2, .crt .game__name, .crt .hud, .crt .nav__link, .crt .store__text strong, .crt .hero__tagline {
  font-family: var(--font-pixel); letter-spacing: 0; line-height: 1.5;
}
.crt h2 { font-size: clamp(1.2rem, 0.9rem + 1.6vw, 2rem); }
.crt .game__name { font-size: clamp(1rem, 0.9rem + 0.8vw, 1.4rem); }
.crt .hud, .crt .nav__link { font-size: 0.6rem; }
.crt .store__text strong { font-size: 0.75rem; }
.crt .hero__tagline { font-size: clamp(0.8rem, 0.7rem + 0.6vw, 1.05rem); }
.crt main { filter: saturate(1.15) contrast(1.05); }
.crt-exit {
  position: fixed; right: 16px; bottom: 16px; z-index: 95;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0;
  padding: 10px 12px; border-radius: 6px; cursor: pointer;
  background: var(--midnight); color: var(--cyan); border: 2px solid var(--cyan);
  box-shadow: 4px 4px 0 var(--magenta);
}
.crt-exit:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--magenta); }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 96;
  font-family: var(--font-pixel); font-size: 14px; color: var(--starlight);
  padding: 12px 16px; background: var(--midnight); border: 2px solid var(--magenta);
  box-shadow: 4px 4px 0 var(--cyan);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero { cursor: default; }
  .hero__hint { display: none; }
  .game:hover .device, .glitch-text:hover { animation: none; }
  .glitch-text:hover { text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 6px; }
  .game:hover .device { box-shadow: inset 0 0 0 1px var(--cyan), 0 30px 60px -20px rgb(0 0 0 / 0.7); }
  .crt .crt-overlay { animation: none; }
}
