/* ==========================================================================
   RED DEVIL STUDIOS — game studio site
   ========================================================================== */

:root {
  --black: #050505;
  --ink: #0a0a0a;
  --red: #e10600;
  --hot: #ff2a1f;
  --ember: #ff7862;
  --silver: #c9c9c9;
  --bone: #f4eee8;
  --muted: rgba(244, 238, 232, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --font-display: "Archivo", sans-serif;
  --font-hud: "Chakra Petch", monospace;
  --font-body: "Space Grotesk", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    var(--black);
  background-size: 64px 64px;
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.no-cursor,
body.no-cursor a,
body.no-cursor button { cursor: none; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(225, 6, 0, 0.22), transparent 46%),
    radial-gradient(ellipse at 85% 110%, rgba(225, 6, 0, 0.1), transparent 40%);
}

::selection { background: var(--red); color: white; }

main, .header, .footer { position: relative; z-index: 2; }

/* ==========================================================================
   BOOT SCREEN
   ========================================================================== */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #030303;
  transition: opacity 600ms ease, visibility 600ms;
}

.boot.hidden { opacity: 0; visibility: hidden; }

.boot__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 4px);
  opacity: 0.5;
}

.boot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 2rem;
  width: min(30rem, 92vw);
  text-align: center;
}

.boot__logo {
  width: min(19rem, 70vw);
  filter: drop-shadow(0 0 42px rgba(225, 6, 0, 0.4));
  animation: bootPulse 2.2s ease-in-out infinite;
}

.boot__bar {
  width: 100%;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.boot__bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--hot));
  box-shadow: 0 0 14px rgba(255, 42, 31, 0.7);
  transition: width 120ms linear;
}

.boot__status {
  min-height: 1.2em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}

.boot__langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.boot__langs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-snap);
}

.boot__langs button:hover {
  opacity: 1;
  border-color: rgba(255, 42, 31, 0.55);
  background: rgba(225, 6, 0, 0.1);
  transform: translateY(-2px);
}

.boot__langs button.active {
  opacity: 1;
  border-color: var(--hot);
  background: rgba(225, 6, 0, 0.16);
  box-shadow: 0 0 12px rgba(255, 42, 31, 0.35);
}

.boot__langs .lang__flag svg { width: 24px; display: block; outline: 1px solid rgba(255, 255, 255, 0.2); }

.boot__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.boot__actions.ready { opacity: 1; transform: none; pointer-events: auto; }

.boot__hint {
  color: rgba(255, 42, 31, 0.55);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  animation: blink 1.6s steps(2) infinite;
}

@keyframes bootPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 30px rgba(225, 6, 0, 0.3)); }
  50% { transform: scale(1.025); filter: drop-shadow(0 0 55px rgba(225, 6, 0, 0.55)); }
}

@keyframes blink { 50% { opacity: 0.2; } }

/* ==========================================================================
   FX LAYERS
   ========================================================================== */

#fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, 0.9) 3px 4px);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.5) 100%);
}

/* custom cursor */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.cursor.on { opacity: 1; }

.cursor__dot {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 10px rgba(255, 42, 31, 0.9);
}

.cursor__ring {
  position: absolute;
  left: -17px;
  top: -17px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 42, 31, 0.65);
  border-radius: 50%;
  transition: transform 220ms var(--ease-snap), border-color 220ms ease, background 220ms ease;
}

.cursor.hot .cursor__ring {
  transform: scale(1.7);
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(225, 6, 0, 0.12);
}

/* XP scroll bar */
.xpbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 60;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.xpbar__fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--hot), #ffb199);
  box-shadow: 0 0 12px rgba(255, 42, 31, 0.8);
}

/* screen shake */
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(3px, 4px); }
}

body.shake main, body.shake .header { animation: shake 320ms linear; }

/* devil mode (konami)
   Nota: nunca aplicar `filter` al body — crea un containing block y rompe
   todos los position:fixed (cursor, HUD, consola). Se usa backdrop-filter
   sobre la capa de viñeta en su lugar. */
body.devil-mode .vignette { backdrop-filter: saturate(1.4) contrast(1.1); }
body.devil-mode #fx { opacity: 1; }
body.devil-mode::before {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(225, 6, 0, 0.5), transparent 55%),
    radial-gradient(ellipse at 85% 110%, rgba(225, 6, 0, 0.3), transparent 45%);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 400ms var(--ease-out), background 300ms ease;
}

.header.hidden { transform: translateY(-100%); }
.header.solid { background: rgba(3, 3, 3, 0.85); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
}

.header__brand img {
  height: 3.1rem;
  width: auto;
  display: block;
  transition: transform 300ms var(--ease-snap), filter 300ms ease;
}

.header__brand:hover img {
  transform: scale(1.06) rotate(-1.5deg);
  filter: drop-shadow(0 0 14px rgba(255, 42, 31, 0.6));
}

.header__nav {
  display: none;
  align-items: center;
  gap: 1.9rem;
}

@media (min-width: 880px) { .header__nav { display: flex; } }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-hud);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-link__num { color: rgba(255, 42, 31, 0.7); font-size: 0.6rem; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}

.nav-link:hover, .nav-link.active { color: white; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.header__controls { display: flex; align-items: center; gap: 0.55rem; }

/* acceso a la división de empresas (Red Devil Consulting) */
.division-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.4rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-hud);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.division-link:hover {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.12);
  color: white;
}

.division-link__dot { width: 6px; height: 6px; background: var(--silver); }
.division-link:hover .division-link__dot { background: var(--hot); }
.division-link__arrow { color: var(--hot); }

@media (max-width: 400px) {
  .division-link { padding: 0 0.6rem; letter-spacing: 0.08em; }
  .division-link__dot { display: none; }
  .sound__label { display: none; }
}

/* language selector */
.lang { position: relative; }

.lang__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.lang__btn:hover {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.12);
}

.lang__flag { display: inline-flex; }

.lang__flag svg {
  display: block;
  width: 22px;
  height: auto;
  outline: 1px solid rgba(255, 255, 255, 0.25);
}

.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  z-index: 70;
  min-width: 10.5rem;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid rgba(255, 42, 31, 0.4);
  background: rgba(4, 4, 4, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

.lang__menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-hud);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.lang__menu button:hover { background: rgba(225, 6, 0, 0.14); color: white; }
.lang__menu button.active { color: var(--hot); }
.lang__menu .lang__flag svg { width: 20px; }

/* sound toggle */
.sound {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-hud);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.sound:hover, .sound[data-on="true"] {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.12);
  color: white;
}

.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.sound__bars i { width: 3px; height: 30%; background: var(--hot); transition: height 200ms ease; }
.sound__bars i:nth-child(2) { height: 70%; }
.sound__bars i:nth-child(3) { height: 100%; }
.sound__bars i:nth-child(4) { height: 50%; }

.sound[data-on="true"] .sound__bars i { animation: soundBars 640ms ease-in-out infinite alternate; }
.sound[data-on="true"] .sound__bars i:nth-child(2) { animation-delay: 100ms; }
.sound[data-on="true"] .sound__bars i:nth-child(3) { animation-delay: 200ms; }
.sound[data-on="true"] .sound__bars i:nth-child(4) { animation-delay: 300ms; }

@keyframes soundBars { from { transform: scaleY(0.4); } to { transform: scaleY(1.15); } }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  clip-path: polygon(0.7rem 0, 100% 0, 100% calc(100% - 0.7rem), calc(100% - 0.7rem) 100%, 0 100%, 0 0.7rem);
  transition: transform 200ms var(--ease-snap), box-shadow 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn__label { position: relative; z-index: 1; }

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 500ms ease;
}

.btn:hover::before { transform: translateX(110%); }

.btn--primary {
  background: var(--red);
  border-color: rgba(255, 120, 98, 0.6);
  color: white;
  box-shadow: 0 10px 40px rgba(225, 6, 0, 0.35);
}

.btn--primary:hover {
  background: var(--hot);
  box-shadow: 0 14px 55px rgba(255, 42, 31, 0.5);
  transform: translateY(-2px);
}

.btn--primary:active { transform: translateY(1px) scale(0.98); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.btn--ghost:hover {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.1);
  color: white;
  transform: translateY(-2px);
}

.btn--ghost:active { transform: translateY(1px) scale(0.98); }

.btn--big { min-height: 3.6rem; padding: 0 2rem; font-size: 0.92rem; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 8rem 1.25rem 4.5rem;
  overflow: hidden;
}

.hero__mark {
  position: absolute;
  right: -12vw;
  top: 8rem;
  width: min(68rem, 95vw);
  opacity: 0.32;
  filter: saturate(1.3) drop-shadow(0 0 60px rgba(225, 6, 0, 0.35));
  pointer-events: none;
}

.hero__mark img { width: 100%; animation: markFloat 7s ease-in-out infinite; }

@keyframes markFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-18px) rotate(0.5deg); }
}

.hero__inner {
  position: relative;
  max-width: 82rem;
  width: 100%;
  margin: 0 auto;
}

.hero__kicker { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.hud-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.75rem;
  border: 1px solid rgba(255, 42, 31, 0.55);
  color: var(--hot);
  font-family: var(--font-hud);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  clip-path: polygon(0.4rem 0, 100% 0, 100% calc(100% - 0.4rem), calc(100% - 0.4rem) 100%, 0 100%, 0 0.4rem);
}

.hud-chip--dim { border-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.55); }

.hero__title {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12.5vw, 11.5rem);
  font-weight: 900;
  line-height: 0.84;
  text-transform: uppercase;
  color: white;
}

.hero__line { display: block; }

.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 42, 31, 0.9);
  text-shadow: 0 0 34px rgba(225, 6, 0, 0.35);
}

.hero__sub {
  max-width: 44rem;
  margin-top: 1.8rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.65;
  color: var(--muted);
}

.hero__sub strong { color: white; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero__hud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 3.4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 760px) { .hero__hud { grid-template-columns: repeat(4, 1fr); } }

.hud-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.2rem 1.3rem;
  background: rgba(5, 5, 5, 0.82);
  transition: background 250ms ease;
}

.hud-stat:hover { background: rgba(225, 6, 0, 0.1); }

.hud-stat__value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  color: white;
}

.hud-stat__value b { font-weight: 900; color: var(--hot); }

.hud-stat__key {
  font-family: var(--font-hud);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.hero__scroll {
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-hud);
  font-size: 0.58rem;
  letter-spacing: 0.35em;
}

.hero__scroll i {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, var(--hot), transparent);
  animation: scrollPulse 1.6s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  60% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* glitch */
.glitch { position: relative; }

.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

body.fx-on .glitch::before, body.fx-on .glitch::after { animation: glitchFlash 6s steps(1) infinite; }

body.fx-on .glitch::before {
  color: #00e5ff;
  animation-name: glitchA;
  animation-duration: 5.5s;
}

body.fx-on .glitch::after {
  color: var(--hot);
  animation-name: glitchB;
  animation-duration: 7s;
}

@keyframes glitchA {
  0%, 93.9%, 96.1%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.7; transform: translate(-6px, 2px); clip-path: inset(12% 0 60% 0); }
  95% { opacity: 0.7; transform: translate(4px, -2px); clip-path: inset(55% 0 20% 0); }
  96% { opacity: 0.7; transform: translate(-3px, 1px); clip-path: inset(30% 0 42% 0); }
}

@keyframes glitchB {
  0%, 91.9%, 94.1%, 100% { opacity: 0; transform: none; clip-path: none; }
  92% { opacity: 0.75; transform: translate(5px, -3px); clip-path: inset(65% 0 8% 0); }
  93% { opacity: 0.75; transform: translate(-5px, 3px); clip-path: inset(8% 0 70% 0); }
  94% { opacity: 0.75; transform: translate(3px, 1px); clip-path: inset(40% 0 33% 0); }
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #0a0a0a;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  padding: 1.05rem 0;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.78);
  transition: color 200ms ease;
}

.marquee__track span:hover { color: var(--hot); }
.marquee__track i { color: rgba(255, 42, 31, 0.65); font-style: normal; font-size: 0.9rem; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section { position: relative; padding: 6.5rem 1.25rem; }
.section--alt { background: linear-gradient(180deg, rgba(225, 6, 0, 0.05), transparent 30%), #070707; }
.section__inner { max-width: 82rem; margin: 0 auto; }
.section__head { max-width: 54rem; margin-bottom: 3.6rem; }

.quest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--hot);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.quest-tag--side { color: var(--silver); }
.quest-tag--side .quest-tag__dot { background: var(--silver); box-shadow: 0 0 10px rgba(201, 201, 201, 0.8); }

.quest-tag__dot {
  width: 8px;
  height: 8px;
  background: var(--hot);
  box-shadow: 0 0 10px rgba(255, 42, 31, 0.9);
  animation: dotPulse 1.4s ease-in-out infinite;
}

@keyframes dotPulse { 50% { opacity: 0.35; } }

.section__title {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 0.94;
  text-transform: uppercase;
  color: white;
}

.section__lead {
  margin-top: 1.4rem;
  max-width: 42rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ==========================================================================
   FEATURED — Don't Press It
   El azul de la nave del juego entra sólo aquí, para que el juego destacado
   se sienta como su propio mundo dentro del marco del estudio.
   ========================================================================== */

.featured {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 18% 35%, rgba(58, 168, 255, 0.14), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(225, 6, 0, 0.12), transparent 50%),
    #060609;
}

.featured__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.4rem;
}

.featured__live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(61, 220, 132, 0.5);
  background: rgba(61, 220, 132, 0.08);
  color: #3ddc84;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.featured__live i {
  width: 7px;
  height: 7px;
  background: #3ddc84;
  box-shadow: 0 0 10px #3ddc84;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.featured__grid { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 1000px) { .featured__grid { grid-template-columns: 1.25fr 1fr; gap: 3.2rem; } }

.bs-feature { background: radial-gradient(ellipse at 80% 30%, rgba(255, 200, 40, 0.12), transparent 55%), radial-gradient(ellipse at 10% 100%, rgba(225, 6, 0, 0.12), transparent 50%), #060609; }
.bs-feature__status { border-color: rgba(255, 200, 40, 0.5); background: rgba(255, 200, 40, 0.08); color: #ffc828; }
.bs-feature__status i { background: #ffc828; box-shadow: 0 0 10px #ffc828; }
.bs-feature__media {
  margin: 0;
  border: 1px solid rgba(255, 42, 31, 0.4);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(255, 200, 40, 0.1);
}
.bs-feature__media img { display: block; width: 100%; height: auto; aspect-ratio: 1024 / 500; object-fit: contain; }
.bs-feature__title { font-family: var(--font-hud); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; text-transform: uppercase; color: white; }

.featured__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 42, 31, 0.4);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(58, 168, 255, 0.12);
}

/* esquinas HUD */
.featured__screen::before,
.featured__screen::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--hot);
  pointer-events: none;
}
.featured__screen::before { top: 0.5rem; left: 0.5rem; border-right: 0; border-bottom: 0; }
.featured__screen::after { right: 0.5rem; bottom: 0.5rem; border-left: 0; border-top: 0; }

.featured__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 260ms ease;
}

.featured__screen img.is-fading { opacity: 0; }

.featured__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.featured__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #000;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-snap);
}

.featured__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 180ms ease;
}

.featured__thumb:hover { transform: translateY(-2px); }
.featured__thumb:hover img,
.featured__thumb[aria-pressed="true"] img { opacity: 1; }
.featured__thumb[aria-pressed="true"] { border-color: var(--hot); box-shadow: 0 0 18px rgba(255, 42, 31, 0.45); }
.featured__thumb:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }

/* autoplay: la barra de la miniatura activa ES el temporizador — al terminar
   su animación (animationend) se pasa a la siguiente; pausarla pausa todo */
.featured__thumbs.is-auto .featured__thumb[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: var(--hot);
  box-shadow: 0 0 8px var(--hot);
  animation: featProgress 5s linear forwards;
}

.featured__thumbs.is-paused .featured__thumb::after { animation-play-state: paused; }

@keyframes featProgress { from { width: 0; } to { width: 100%; } }

.featured__title img {
  display: block;
  width: min(24rem, 82%);
  height: auto;
  margin-left: -0.3rem;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6));
}

.featured__kicker {
  margin-top: 1rem;
  color: var(--hot);
  font-family: var(--font-hud);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.featured__pitch {
  margin-top: 1rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.featured__pitch strong { color: white; }

.featured__list { display: grid; gap: 0.55rem; margin-top: 1.2rem; list-style: none; }

.featured__list li {
  position: relative;
  padding-left: 1.4rem;
  color: rgba(244, 238, 232, 0.85);
  font-size: 0.98rem;
  line-height: 1.5;
}

.featured__list li::before { content: "▸"; position: absolute; left: 0; color: var(--hot); }

.featured__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 560px) { .featured__stats { grid-template-columns: repeat(4, 1fr); } }

.featured__stats .hud-stat { padding: 0.9rem 1rem; }
.featured__stats .hud-stat__value { font-size: 1.9rem; }

.featured__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ==========================================================================
   CARDS (tilt)
   ========================================================================== */

.card-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .card-grid--wide { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .card-grid--wide { grid-template-columns: repeat(4, 1fr); } }

.side-portal { display: flex; justify-content: center; margin-top: 2.6rem; }

.card, .party {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 17rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.card:hover, .party:hover {
  border-color: rgba(255, 42, 31, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(225, 6, 0, 0.12);
}

.card__glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 120, 98, 0.16), transparent 55%);
  transition: opacity 250ms ease;
}

.card:hover .card__glare, .party:hover .card__glare { opacity: 1; }

.card__num, .party__class {
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--hot);
}

.card--side .card__num { color: var(--silver); }

.card__title, .party__title {
  margin-top: auto;
  padding-top: 2.6rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  color: white;
}

.card__body, .party__body {
  margin-top: 0.85rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
  list-style: none;
}

.card__tags li {
  padding: 0.22rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ==========================================================================
   WORK LIST
   ========================================================================== */

.work-list { border-top: 1px solid var(--line); }

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.4rem minmax(11rem, 0.65fr) 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: 1.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 250ms ease, padding-left 250ms var(--ease-out);
  overflow: hidden;
}

.work-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--hot);
  transform: scaleY(0);
  transition: transform 250ms var(--ease-out);
}

.work-row:hover { background: rgba(225, 6, 0, 0.06); padding-left: 1.6rem; }
.work-row:hover::before { transform: scaleY(1); }

.work-row__num { font-family: var(--font-hud); font-size: 0.8rem; font-weight: 700; color: rgba(255, 42, 31, 0.8); }

.work-row__name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: white;
}

.work-row__desc { max-width: 34rem; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

.work-row__cta {
  justify-self: end;
  padding: 0.65rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-hud);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  white-space: nowrap;
  text-decoration: none;
  clip-path: polygon(0.45rem 0, 100% 0, 100% calc(100% - 0.45rem), calc(100% - 0.45rem) 100%, 0 100%, 0 0.45rem);
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 200ms var(--ease-snap);
}

.work-row:hover .work-row__cta {
  border-color: rgba(255, 42, 31, 0.7);
  background: rgba(225, 6, 0, 0.14);
  color: white;
}

a.work-row__cta:hover {
  border-color: var(--hot);
  background: rgba(225, 6, 0, 0.28);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(225, 6, 0, 0.3);
}

a.work-row__cta:active { transform: translateY(1px) scale(0.97); }

@media (max-width: 820px) {
  .work-row { grid-template-columns: 2.4rem 1fr; }
  .work-row__desc { grid-column: 2 / -1; }

  /* el badge (JUGAR/IRL/B2B) sale del sistema de columnas: fila propia,
     alineado con el texto */
  .work-row__cta {
    grid-column: 2 / -1;
    justify-self: start;
    margin-top: 0.35rem;
  }
}

/* ==========================================================================
   REPLAYS (videos)
   ========================================================================== */

.replay-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .replay-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .replay-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.replay {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms var(--ease-out);
}

.replay:hover {
  border-color: rgba(255, 42, 31, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(225, 6, 0, 0.12);
  transform: translateY(-3px);
}

.replay__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* con un intruso encima, la zona del video queda inerte: solo se le puede
   disparar al intruso */
.replay__media.imp-blocked,
.replay__media.imp-blocked * { pointer-events: none !important; }

.replay__media iframe,
.replay__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.replay__info { padding: 1.1rem 1.3rem 1.3rem; }

.replay__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  color: white;
}

.replay__desc {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.replay__badge {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 1;
  padding: 0.25rem 0.65rem;
  background: rgba(4, 4, 4, 0.85);
  border: 1px solid rgba(255, 42, 31, 0.5);
  color: var(--hot);
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  pointer-events: none;
}

/* ==========================================================================
   PARTY
   ========================================================================== */

.party-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .party-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .party-grid { grid-template-columns: repeat(4, 1fr); } }

.party { min-height: 15rem; }
.party__title { padding-top: 2rem; font-size: 1.4rem; }

.party__stat {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.party__stat span {
  font-family: var(--font-hud);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
}

.party__bar {
  flex: 1;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px;
}

.party__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--hot));
  box-shadow: 0 0 8px rgba(255, 42, 31, 0.7);
  transition: width 1100ms var(--ease-out) 250ms;
}

.party.visible .party__bar i { width: var(--v); }

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact { padding-bottom: 8rem; }

.contact__box {
  position: relative;
  padding: 4rem 2rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(225, 6, 0, 0.14), transparent 60%),
    rgba(6, 6, 6, 0.85);
  text-align: center;
  clip-path: polygon(2rem 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%, 0 2rem);
}

.contact__box .quest-tag { justify-content: center; }

.contact__title {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 0 60px rgba(225, 6, 0, 0.45);
}

.contact__lead {
  max-width: 34rem;
  margin: 1.4rem auto 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--muted);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.contact__hint {
  margin-top: 2.6rem;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 1.25rem;
  background: #040404;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 82rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-hud);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer__mid { color: rgba(255, 42, 31, 0.6); }

.footer__link { color: inherit; text-decoration: none; transition: color 180ms ease; }
.footer__link:hover { color: var(--hot); }
.footer__mid .footer__link { color: rgba(255, 42, 31, 0.6); }
.footer__mid .footer__link:hover { color: var(--hot); }

.work-list--next { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.work-row__kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(255, 42, 31, 0.8);
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

/* ==========================================================================
   ACHIEVEMENT TOAST
   ========================================================================== */

.achievement {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid rgba(255, 42, 31, 0.5);
  background: rgba(4, 4, 4, 0.94);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(225, 6, 0, 0.2);
  transform: translate(-50%, 140%);
  transition: transform 450ms var(--ease-snap);
  clip-path: polygon(0.6rem 0, 100% 0, 100% calc(100% - 0.6rem), calc(100% - 0.6rem) 100%, 0 100%, 0 0.6rem);
}

.achievement.show { transform: translate(-50%, 0); }

.achievement__icon { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.6)); }

.achievement__text { display: flex; flex-direction: column; gap: 0.15rem; text-align: left; }

.achievement__text strong {
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hot);
}

.achievement__text span { font-size: 0.9rem; color: white; }

/* ==========================================================================
   REVEAL / UTILITIES
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 800ms ease, transform 800ms var(--ease-out);
}

.reveal.visible { opacity: 1; transform: none; }

.reveal:nth-child(2) { transition-delay: 90ms; }
.reveal:nth-child(3) { transition-delay: 180ms; }
.reveal:nth-child(4) { transition-delay: 270ms; }

/* click burst particle */
.burst {
  position: fixed;
  z-index: 95;
  width: 6px;
  height: 6px;
  pointer-events: none;
  background: var(--hot);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 42, 31, 0.9);
}

/* ==========================================================================
   SHADER + GAME LAYER
   ========================================================================== */

#shader {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
}

#gameLayer {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body.rage #fx { opacity: 1; }
body.rage .header__brand img { filter: drop-shadow(0 0 22px rgba(255, 42, 31, 0.95)) saturate(1.6); }

/* ojos del demonio */
.devil-eye {
  position: absolute;
  width: 3.2%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd9c8 0%, var(--hot) 45%, transparent 75%);
  box-shadow: 0 0 18px rgba(255, 42, 31, 0.9);
  opacity: 0.85;
  transition: translate 120ms ease-out;
  animation: eyeFlicker 4s ease-in-out infinite;
}

.devil-eye--left { left: 29.5%; top: 41%; }
.devil-eye--right { right: 29.5%; top: 41%; }

@keyframes eyeFlicker {
  0%, 100% { opacity: 0.85; }
  92% { opacity: 0.85; }
  94% { opacity: 0.2; }
  96% { opacity: 0.85; }
}

/* texto flotante (+XP, +puntos, combos) */
.float-pts {
  position: fixed;
  z-index: 95;
  pointer-events: none;
  color: white;
  font-family: var(--font-hud);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255, 42, 31, 0.9);
  animation: floatUp 1.05s var(--ease-out) forwards;
}

.float-pts--xp { color: #ffd166; text-shadow: 0 0 12px rgba(255, 200, 0, 0.8); }

.float-pts--combo {
  color: var(--hot);
  font-size: 1.25rem;
  font-weight: 900;
  animation: comboPop 1.05s var(--ease-snap) forwards;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  15% { transform: translateY(-6px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-52px) scale(1); opacity: 0; }
}

@keyframes comboPop {
  0% { transform: translateY(0) scale(0.4) rotate(-8deg); opacity: 0; }
  20% { transform: translateY(-8px) scale(1.3) rotate(3deg); opacity: 1; }
  100% { transform: translateY(-60px) scale(1) rotate(0deg); opacity: 0; }
}

/* ==========================================================================
   PLAYER HUD
   ========================================================================== */

.player-hud {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(4, 4, 4, 0.82);
  backdrop-filter: blur(10px);
  font-family: var(--font-hud);
  clip-path: polygon(0.5rem 0, 100% 0, 100% calc(100% - 0.5rem), calc(100% - 0.5rem) 100%, 0 100%, 0 0.5rem);
}

.player-hud__trophies {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-snap);
}

.player-hud__trophies:hover {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.12);
  transform: scale(1.1) rotate(-4deg);
}

.player-hud__level { display: flex; flex-direction: column; gap: 0.25rem; }

.player-hud__lv {
  color: white;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.player-hud__lv em { color: var(--hot); font-style: normal; }

.player-hud__xpbar {
  display: block;
  width: 6.5rem;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1px;
}

.player-hud__xpbar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffd166, #ff9f1c);
  box-shadow: 0 0 8px rgba(255, 200, 0, 0.7);
  transition: width 500ms var(--ease-out);
}

.player-hud__score {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.player-hud__score b { color: white; }

.player-hud__console {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.32rem 0.55rem;
  color: var(--hot);
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-snap);
}

.player-hud__console i {
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
  animation: blink 1s steps(2) infinite;
}

.player-hud__console:hover {
  border-color: rgba(255, 42, 31, 0.6);
  background: rgba(225, 6, 0, 0.12);
  transform: scale(1.1);
}

/* llama la atención hasta que se descubre la consola */
.player-hud__console.attn {
  animation: consoleAttn 2.4s ease-in-out infinite;
}

@keyframes consoleAttn {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 42, 31, 0); border-color: rgba(255, 255, 255, 0.16); }
  50% { box-shadow: 0 0 14px rgba(255, 42, 31, 0.55); border-color: rgba(255, 42, 31, 0.7); }
}

@media (max-width: 640px) {
  .player-hud { gap: 0.55rem; padding: 0.4rem 0.6rem; }
  .player-hud__score { display: none; }
}

/* ==========================================================================
   TROPHY PANEL
   ========================================================================== */

.trophies {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.trophies__panel {
  width: min(34rem, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 42, 31, 0.4);
  background: rgba(6, 6, 6, 0.97);
  padding: 1.4rem;
  clip-path: polygon(1rem 0, 100% 0, 100% calc(100% - 1rem), calc(100% - 1rem) 100%, 0 100%, 0 1rem);
}

.trophies__head { display: flex; justify-content: space-between; align-items: center; }

.trophies__head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  letter-spacing: 0.06em;
}

.trophies__close {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
  color: white;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.trophies__close:hover { border-color: var(--hot); background: rgba(225, 6, 0, 0.15); }

.trophies__meta {
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.trophies__meta em { color: var(--hot); font-style: normal; }

.trophies__list {
  margin-top: 1rem;
  overflow-y: auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.trophies__list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.trophies__list li.unlocked { border-color: rgba(255, 42, 31, 0.35); }
.trophies__list li.locked { opacity: 0.45; }

.trophies__icon { font-size: 1.3rem; }

.trophies__info { display: flex; flex-direction: column; flex: 1; }

.trophies__info strong {
  color: white;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.trophies__info em {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-style: normal;
}

.trophies__xp {
  color: #ffd166;
  font-family: var(--font-hud);
  font-size: 0.66rem;
  font-weight: 700;
}

.trophies__reset {
  margin-top: 1rem;
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.35rem 0.7rem;
  font-family: var(--font-hud);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.trophies__reset:hover { color: var(--hot); border-color: rgba(255, 42, 31, 0.5); }

/* ==========================================================================
   THEATER MODE
   ========================================================================== */

.theater {
  position: fixed;
  inset: 0;
  z-index: 97;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

body.modal-open { overflow: hidden; }

.theater__stage {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: min(72rem, 100%);
}

.theater__stage video {
  width: 100%;
  max-height: 76vh;
  background: #000;
  border: 1px solid rgba(255, 42, 31, 0.35);
  box-shadow: 0 0 80px rgba(225, 6, 0, 0.18);
}

.theater__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  text-transform: uppercase;
  color: white;
  text-align: center;
}

.theater__close {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.theater__close:hover { border-color: var(--hot); background: rgba(225, 6, 0, 0.2); }

.theater__nav {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0.9rem 1.1rem;
  font-size: 1.3rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-snap);
}

.theater__nav:hover {
  border-color: var(--hot);
  background: rgba(225, 6, 0, 0.18);
  transform: scale(1.08);
}

@media (max-width: 760px) {
  .theater { flex-direction: column; padding: 1rem; }
  .theater__nav { position: absolute; bottom: 1rem; }
  .theater__nav--prev { left: 1rem; }
  .theater__nav--next { right: 1rem; }
}

.replay__expand {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(4, 4, 4, 0.85);
  color: rgba(255, 255, 255, 0.75);
  padding: 0.3rem 0.6rem;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, border-color 180ms ease, color 180ms ease;
}

.replay:hover .replay__expand, .replay__expand:focus-visible { opacity: 1; }
.replay__expand:hover { border-color: var(--hot); color: white; }

@media (pointer: coarse) { .replay__expand { opacity: 1; } }

/* ==========================================================================
   CHEAT CONSOLE
   ========================================================================== */

.console {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 98;
  display: flex;
  flex-direction: column;
  max-height: 42vh;
  border-bottom: 2px solid rgba(255, 42, 31, 0.5);
  background: rgba(3, 3, 3, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  font-family: var(--font-hud);
  animation: consoleDrop 250ms var(--ease-out);
}

@keyframes consoleDrop {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.console__log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  line-height: 1.5;
  min-height: 8rem;
}

.console__log .console__echo { color: rgba(255, 255, 255, 0.45); }
.console__log .console__err { color: var(--hot); }

.console__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem 0.9rem;
}

.console__prompt { color: var(--hot); font-weight: 700; }

.console__input {
  flex: 1;
  border: none;
  background: none;
  color: white;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  outline: none;
  caret-color: var(--hot);
}

/* ==========================================================================
   ATTRACT MODE
   ========================================================================== */

.attract {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background: #020202;
  overflow: hidden;
  animation: attractFlicker 4s steps(1) infinite;
}

/* contenido: recibe el jitter/glitch — el fondo negro nunca se mueve */
.attract__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  animation: crtJitter 5.2s steps(1) infinite;
}

/* banda de refresco que recorre la pantalla, como un CRT filmado */
.attract__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 26vh;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent);
  animation: bandRoll 6.5s linear infinite;
}

/* ráfagas de estática sincronizadas con el jitter */
.attract__noise {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23s)'/%3E%3C/svg%3E");
  animation: noiseBurst 5.2s steps(1) infinite;
}

.attract__crt {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 2px, rgba(0, 0, 0, 0.35) 2px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

.attract__logo {
  width: min(26rem, 78vw);
  filter: drop-shadow(0 0 50px rgba(225, 6, 0, 0.5));
  animation: bootPulse 2.4s ease-in-out infinite;
}

.attract__insert {
  color: var(--hot);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-shadow: 2px 0 rgba(255, 0, 60, 0.45), -2px 0 rgba(0, 229, 255, 0.4);
  animation: blink 1.1s steps(2) infinite;
}

.attract__press {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-shadow: 1px 0 rgba(255, 0, 60, 0.35), -1px 0 rgba(0, 229, 255, 0.3);
}

.attract__scores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
}

.attract__scores b { color: #ffd166; }

/* parpadeo de brillo global — nunca de opacidad, o se ve la página detrás */
@keyframes attractFlicker {
  0%, 100% { filter: brightness(1); }
  71% { filter: brightness(1); }
  71.6% { filter: brightness(0.82); }
  72.2% { filter: brightness(1); }
  97% { filter: brightness(1); }
  97.4% { filter: brightness(0.9); }
  97.8% { filter: brightness(1); }
}

@keyframes bandRoll {
  from { transform: translateY(-30vh); }
  to { transform: translateY(130vh); }
}

/* jitter: salto de vertical-hold a mitad de ciclo + ráfaga glitch con
   aberración cromática RGB al final. steps(1) = cortes de frame secos */
@keyframes crtJitter {
  0%, 44.9% { transform: none; filter: none; }
  45% { transform: translateY(-14px) scaleY(1.05); }
  45.4% { transform: translateY(6px); }
  45.8%, 90.9% { transform: none; filter: none; }
  91% {
    transform: translate(-6px, 2px) skewX(1.6deg);
    filter: drop-shadow(3px 0 rgba(255, 0, 60, 0.65)) drop-shadow(-3px 0 rgba(0, 229, 255, 0.55));
  }
  91.5% {
    transform: translate(5px, -3px) skewX(-1.2deg) scaleY(1.02);
    filter: drop-shadow(-3px 0 rgba(255, 0, 60, 0.65)) drop-shadow(3px 0 rgba(0, 229, 255, 0.55));
  }
  92% {
    transform: translate(-2px, 10px);
    filter: drop-shadow(2px 0 rgba(255, 0, 60, 0.5));
  }
  92.4%, 100% { transform: none; filter: none; }
}

@keyframes noiseBurst {
  0%, 44.9% { opacity: 0; }
  45% { opacity: 0.12; }
  45.6% { opacity: 0; }
  46%, 90.9% { opacity: 0; }
  91% { opacity: 0.22; }
  91.5% { opacity: 0.13; }
  92% { opacity: 0.2; }
  92.4%, 100% { opacity: 0; }
}

/* ==========================================================================
   NAV WIPE
   ========================================================================== */

.wipe {
  position: fixed;
  inset: 0;
  z-index: 94;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background:
    linear-gradient(120deg, #0a0000 0%, #1a0300 50%, #0a0000 100%),
    #050505;
  pointer-events: none;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.wipe.in {
  animation: wipeIn 460ms var(--ease-out) forwards;
  pointer-events: auto;
}

.wipe.out { animation: wipeOut 480ms var(--ease-out) forwards; }

@keyframes wipeIn {
  from { clip-path: polygon(0 0, 0 0, -18% 100%, 0 100%); }
  to { clip-path: polygon(0 0, 118% 0, 100% 100%, 0 100%); }
}

@keyframes wipeOut {
  from { clip-path: polygon(0 0, 118% 0, 100% 100%, 0 100%); }
  to { clip-path: polygon(118% 0, 118% 0, 100% 100%, 100% 100%); }
}

.wipe__logo {
  width: min(13rem, 46vw);
  filter: drop-shadow(0 0 30px rgba(225, 6, 0, 0.5));
}

.wipe__tip {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ==========================================================================
   MEDIA / MOTION
   ========================================================================== */

@media (max-width: 640px) {
  /* banderas del boot: fuerza 4 arriba y 3 abajo (ancho justo para 4 botones) */
  .boot__langs { max-width: 200px; margin-inline: auto; }

  .hero { padding-top: 7rem; }
  .hero__mark { right: -40vw; opacity: 0.2; }
  .btn { width: 100%; }
  .contact__box { padding: 3rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
