/* ================================================================ tela de liga */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #030305;
  display: grid;
  place-items: center;
  transition: opacity 0.4s steps(4), clip-path 0.5s steps(8);
  clip-path: inset(0 0 0 0);
}
.boot.out { opacity: 0; clip-path: inset(50% 0 50% 0); }
.boot pre { margin: 0; width: min(640px, 90vw); font: 400 clamp(13px, 1.6vw, 16px)/1.7 var(--bc-f-mono); color: #b9f7ff; text-shadow: 0 0 8px #05f5ff88; white-space: pre-wrap; }
.boot pre i { font-style: normal; color: var(--bc-faisca); }
.boot pre em { font-style: normal; color: var(--bc-rosa); }
.boot pre b { color: var(--bc-osso); }
.boot pre .cur { display: inline-block; width: 0.6em; height: 1em; background: var(--bc-faisca); vertical-align: -0.15em; animation: blink 0.8s steps(1) infinite; }

/* ================================================================ capa */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.hero-in { position: relative; z-index: 2; padding: 120px 0 140px; pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.hero h1 { font-size: clamp(48px, 7.4vw, 112px); line-height: 0.95; margin-bottom: 30px; text-shadow: 0 4px 30px rgba(7, 7, 11, 0.9); }
.hero .lead { max-width: 40ch; text-shadow: 0 2px 16px var(--bc-void); }
.hero .btn-row { margin-top: 34px; }
.rot { position: relative; display: inline-block; color: var(--bc-faisca); min-width: 2ch; }
.rot.glitch { animation: glitch 0.32s steps(2) 1; }
@keyframes glitch {
  0% { text-shadow: 4px 0 var(--bc-rosa), -4px 0 var(--bc-faisca); transform: translateX(3px); }
  50% { text-shadow: -6px 0 var(--bc-rosa), 6px 0 var(--bc-lima); transform: translateX(-4px) skewX(-8deg); clip-path: inset(10% 0 30% 0); }
  100% { text-shadow: none; transform: none; clip-path: none; }
}
.hero .bc-faisca { margin-left: 0.06em; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 1.6em var(--bc-faisca); } }
.hud {
  position: absolute;
  right: 24px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  gap: 22px;
  font: 400 13px/1 var(--bc-f-pixel);
  letter-spacing: 0.08em;
  color: var(--bc-nevoa);
}
.hud b { color: var(--bc-osso); font-weight: 400; }
.hud span:first-child b { color: var(--bc-lima); animation: blink 1.2s steps(1) infinite; }
.hint { position: absolute; z-index: 2; margin: 0; font: 400 13px/1 var(--bc-f-pixel); letter-spacing: 0.06em; color: var(--bc-nevoa); opacity: 0; transition: opacity 0.6s; pointer-events: none; }
.hint.on { opacity: 0.8; }
.scroll { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 2; display: grid; justify-items: center; gap: 8px; font: 400 13px/1 var(--bc-f-pixel); letter-spacing: 0.12em; color: var(--bc-nevoa); text-decoration: none; }
.scroll i { width: 12px; height: 12px; border-right: 4px solid var(--bc-faisca); border-bottom: 4px solid var(--bc-faisca); rotate: 45deg; animation: bob 1.4s steps(3) infinite; }
@keyframes bob { 50% { translate: 0 6px; } }
@media (max-width: 1100px) {
  .hud { display: none; }
  .hero-in { padding-top: 40vh; padding-bottom: 110px; }
}

/* ================================================================ jogos: cartuchos */
.games { overflow: hidden; }
.games::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at var(--sx, 50%) 60%, color-mix(in srgb, var(--sel, transparent) 18%, transparent), transparent 70%); transition: background 0.6s; pointer-events: none; }
.games-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 80px; }
@media (max-width: 900px) { .games-head { grid-template-columns: 1fr; } }
.carts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 1000px) { .carts { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.slot { display: grid; gap: 30px; align-content: start; }
.cart { display: block; perspective: 900px; text-decoration: none; color: inherit; --rx: 0deg; --ry: 0deg; }
.cart-body {
  position: relative;
  aspect-ratio: 0.86;
  background: linear-gradient(160deg, var(--shell-hi), var(--shell) 55%);
  padding: 46px 22px 0;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.25s steps(3);
  /* contorno de cartucho: canto chanfrado em cima a direita, entalhes nas laterais */
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 62%, calc(100% - 10px) 62%, calc(100% - 10px) 70%, 100% 70%, 100% 100%, 0 100%, 0 70%, 10px 70%, 10px 62%, 0 62%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.06), inset 0 -40px 60px rgba(0, 0, 0, 0.35);
}
.cart:hover .cart-body, .cart:focus-visible .cart-body { translate: 0 -12px; }
.cart-top { position: absolute; top: 14px; left: 22px; right: 60px; display: flex; align-items: center; gap: 12px; font: 400 13px/1 var(--bc-f-pixel); letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.45); }
.cart-top i { flex: 1; height: 6px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 10px); }
.cart-label {
  position: relative;
  height: 72%;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.06);
  transform: translateZ(20px);
}
.cart-label > img:first-child { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s; filter: saturate(0.9) brightness(0.8); }
.cart:hover .cart-label > img:first-child { transform: scale(1.08); filter: saturate(1.1) brightness(0.95); }
.cart-logo { position: absolute; left: 50%; bottom: 14%; translate: -50% 0; width: 78%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)); transition: transform 0.3s steps(3); }
.slot-soon .cart-logo { bottom: auto; top: 18%; width: 92%; }
.cart:hover .cart-logo { transform: translateY(-6px) scale(1.04); }
.cart-grip { position: absolute; left: 22px; right: 22px; bottom: 18px; height: 34px; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0 8px, rgba(255, 255, 255, 0.05) 8px 16px); }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.18), transparent 45%); opacity: 0; transition: opacity 0.3s; }
.cart:hover .glare { opacity: 1; }
/* prisma: um feixe de arco-iris atravessando o rotulo */
.cart-prism { position: absolute; inset: 0; background: var(--prisma-espectro); mix-blend-mode: color; opacity: 0; transition: opacity 0.5s; }
.cart:hover .cart-prism { opacity: 0.35; }
/* the rage: chuva no rotulo */
.cart-rain { position: absolute; inset: -20% 0 0; background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(200, 220, 255, 0.16) 22px 23px); animation: rain 0.5s linear infinite; opacity: 0.7; }
@keyframes rain { to { transform: translate(-8px, 40px); } }
/* hero rush: fita EM BREVE */
.tape {
  position: absolute;
  left: -20%;
  right: -20%;
  top: 64%;
  rotate: -8deg;
  padding: 10px 0;
  text-align: center;
  background: repeating-linear-gradient(45deg, var(--g) 0 18px, #1a1408 18px 36px);
  font: 400 15px/1 var(--bc-f-pixel);
  letter-spacing: 0.14em;
  color: var(--bc-osso);
  text-shadow: 0 0 0 #000, 2px 2px 0 #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transform: translateZ(40px);
}
.slot-soon .cart-label > img:first-child { filter: grayscale(0.7) sepia(0.4) brightness(0.55); }
.slot-info h3 { font-size: 40px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.slot-info h3 small { font: 400 13px/1 var(--bc-f-pixel); letter-spacing: 0.08em; padding: 7px 9px; background: var(--g); color: var(--bc-void); }
.slot-info .genre { font: 400 13px/1.4 var(--bc-f-pixel); letter-spacing: 0.06em; color: var(--g); margin: 0 0 12px; }
.slot-info > p:not(.genre) { color: #c4c1cd; margin: 14px 0 24px; }

/* ================================================================ destaque */
.feature .vid video { opacity: 0.85; }

/* ================================================================ estudio */
.manifesto { font: 500 clamp(28px, 4.2vw, 58px)/1.16 var(--bc-f-display); margin: 0 0 100px; max-width: 24ch; }
.manifesto .w { color: #34333f; transition: color 0.25s; }
.manifesto .w.on { color: var(--bc-osso); }
.manifesto .w.spark.on { color: var(--bc-faisca); text-shadow: 0 0 18px #05f5ff66; }
.principles { margin-bottom: 90px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--bc-chumbo); }
.stats div { padding: 34px 20px 0 0; }
.stats b { display: block; font: 700 clamp(40px, 5.4vw, 78px)/1 var(--bc-f-arcade); color: var(--bc-osso); white-space: nowrap; }
.stats span { font: 400 14px/1.4 var(--bc-f-pixel); letter-spacing: 0.06em; color: var(--bc-nevoa); text-transform: uppercase; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* ================================================================ na bancada */
.soon { overflow: hidden; background: #0d0b06; }
.soon-bg { position: absolute; inset: 0; opacity: 0.22; }
.soon-bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.6) blur(2px); }
.soon::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0d0b06 25%, transparent), linear-gradient(0deg, var(--bc-void), transparent 30%); pointer-events: none; }
.soon .wrap { position: relative; z-index: 1; }
.clock { width: min(420px, 80vw); height: auto; margin-inline: auto; filter: drop-shadow(0 0 40px rgba(217, 164, 65, 0.35)); }

/* ================================================================ cobrinha */
.snake-ui { position: fixed; left: 50%; top: 92px; translate: -50% 0; z-index: 60; display: flex; gap: 24px; padding: 12px 18px; background: rgba(7, 7, 11, 0.9); border: 2px solid var(--bc-faisca); font: 400 14px/1 var(--bc-f-pixel); letter-spacing: 0.06em; }
.snake-ui b { color: var(--bc-faisca); font-weight: 400; }
body.snaking .hero-in, body.snaking .hud, body.snaking .scroll { opacity: 0.08; pointer-events: none; transition: opacity 0.3s; }
body.snaking { overflow: hidden; }

/* ================================================================ tela de escolha: P1 em cima do cartucho escolhido */
.slot { position: relative; }
.slot::before {
  content: 'P1';
  position: absolute; left: 50%; top: -48px; z-index: 3; translate: -50% 0;
  padding: 7px 10px 13px; font: 400 14px/1 var(--bc-f-pixel); color: var(--bc-void); background: var(--g);
  opacity: 0; transition: opacity 0.15s steps(2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(50% + 6px) calc(100% - 6px), 50% 100%, calc(50% - 6px) calc(100% - 6px), 0 calc(100% - 6px));
}
.slot.sel::before { opacity: 1; animation: p1 0.8s steps(2) infinite; }
@keyframes p1 { 50% { translate: -50% -5px; } }
.slot.sel .cart-body { translate: 0 -12px; box-shadow: inset 0 0 0 4px var(--g), inset 0 -40px 60px rgba(0, 0, 0, 0.35); }
.slot.sel .cart-label > img:first-child { transform: scale(1.08); filter: saturate(1.1) brightness(0.95); }
.slot.sel .cart-logo { transform: translateY(-6px) scale(1.04); }
.cart:focus-visible { outline: none; }
.keys { margin: 22px 0 0; font: 400 13px/1 var(--bc-f-pixel); color: var(--bc-nevoa); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.keys kbd { font: inherit; color: var(--bc-osso); padding: 6px 8px 5px; background: var(--bc-grafite); box-shadow: 0 3px 0 var(--bc-chumbo); }
.keys kbd.gap { margin-left: 14px; }
@media (hover: none) { .keys { display: none; } }
