@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

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

:root {
  --bg: #0b0914;
  --panel: #151120;
  --purple: #5b2a8f;
  --mag: #ff107a;
  --translucidmag: #ff107c7a;
  --cyan: #00f0ff;
  --text: #f0ebff;
  --muted: #a496c0;
  --display: "Bebas Neue", sans-serif;
  --body: "Montserrat", sans-serif;
  --g-int: 0;
}

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #030108; border-left: 1px solid rgba(91, 42, 143, 0.3); }
::-webkit-scrollbar-thumb { background: var(--mag); border-radius: 6px; border: 3px solid #030108; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

html { scrollbar-width: thin; scrollbar-color: var(--mag) #030108; }
::selection { background-color: var(--translucidmag); color: #ffffff; text-shadow: none; }
::-moz-selection { background-color: var(--translucidmag); color: #ffffff; text-shadow: none; }

body.gameboy-mode {
  --bg: #1a0f0f;
  --panel: #2d1616;
  --purple: #8f2a2a;
  --mag: #ff3e10;
  --cyan: #ffb700;
  --text: #ffe0b3;
  --muted: #c09696;
  --display: "Press Start 2P", monospace;
  --body: "Press Start 2P", monospace;
}
body.gameboy-mode .retro-img,
body.gameboy-mode .label-media img,
body.gameboy-mode .organic-img img { filter: sepia(1) hue-rotate(60deg) saturate(3) brightness(0.9) contrast(1.2) !important; }
body.gameboy-mode::before,
body.gameboy-mode::after { display: none; }
body.gameboy-mode .section-title { font-size: clamp(1.5rem, 4vw, 3rem); line-height: 1.4; text-shadow: 4px 4px 0px var(--mag); }
body.gameboy-mode .sub-title { font-size: clamp(1rem, 2vw, 1.5rem); line-height: 1.4; letter-spacing: -1px; text-shadow: 2px 2px 0px var(--cyan); }
body.gameboy-mode p { font-size: 0.8rem; line-height: 2; }
body.gameboy-mode .hero-title { font-size: clamp(2rem, 8vw, 6rem); text-shadow: 5px 5px 0px var(--mag); }

body {
  background-color: #030108;
  background-image: radial-gradient(circle at 50% -20%, #12082b 0%, transparent 60%), linear-gradient(to bottom, #030108 0%, #080314 70%, #1a052b 100%);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  min-height: 100vh;
}
body::before, body::after {
  content: ""; position: fixed; width: 100vw; height: 100vw; border-radius: 50%; z-index: -2; pointer-events: none; will-change: transform;
}
body::before {
  top: -30%; left: -30%; background: radial-gradient(circle, rgba(255, 16, 122, 0.08) 0%, rgba(91, 42, 143, 0.05) 30%, rgba(0, 0, 0, 0) 70%);
}
body::after {
  bottom: -30%; right: -30%; background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(0, 150, 255, 0.03) 40%, rgba(0, 0, 0, 0) 70%);
}
body.enable-scroll { overflow-y: auto !important; }

a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (pointer: fine) {
  body, a, button, input, textarea, .expandable, .skip-btn, .cartridge { cursor: none !important; }
  .cursor-dot { width: 8px; height: 8px; background-color: var(--cyan); position: fixed; top: -4px; left: -4px; border-radius: 50%; z-index: 9999999; pointer-events: none; }
  .cursor-outline { width: 40px; height: 40px; border: 1.5px solid var(--mag); position: fixed; top: -20px; left: -20px; border-radius: 50%; z-index: 9999998; pointer-events: none; }
}
@media (pointer: coarse) { .cursor-dot, .cursor-outline { display: none !important; } }

.crt-overlay {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.25;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 2px, 3px 100%;
}
@media (min-width: 768px) { .crt-overlay { animation: flicker 0.2s infinite; } }
.noise, .vignette { position: fixed; inset: 0; pointer-events: none; z-index: 9997; }
.noise { opacity: calc(0.04 + (var(--g-int) * 0.015)); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; transition: opacity 0.1s; will-change: opacity, transform; }
.vignette { box-shadow: inset 0 0 250px rgba(0, 0, 0, 0.95); }

.intro-sequence { width: 100%; height: 100vh; overflow: hidden; position: relative; }
.crt-container, .scroll-preloader, .about { position: absolute; inset: 0; height: 100vh; width: 100%; }
.crt-container { z-index: 20; transform-origin: center center; background: transparent; display: flex; align-items: center; justify-content: center; flex-direction: column; }

.vice-city-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/1390566.png"); /* Ajusta si es .png o .jpg */
  background-size: cover;
  background-position: center; 
  overflow: hidden;
}

/* El Grid en el suelo animado */
.vice-city-bg::before {
  content: "";
  position: absolute;
  bottom: 0;
  /* Lo hacemos el doble de ancho para que al tumbarlo no se vean los bordes cortados */
  left: -50%;
  width: 200%;
  height: 50vh; 
  
  /* Un haz de luz cyan */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 240, 255, 0) 45%,
    rgba(0, 240, 255, 0.5) 50%,
    rgba(0, 240, 255, 0) 55%,
    transparent 100%
  );
  background-size: 100% 200%;
  
  /* LA MAGIA: Tumbamos el plano de luz para que encaje con el suelo de la foto */
  transform-origin: bottom center;
  transform: perspective(500px) rotateX(75deg);
  
  animation: light-sweep 2s linear infinite;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: color-dodge; 

  /* Máscara para que la luz nazca suavemente desde el horizonte */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 80%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 80%);
}

/* El viñeteado (opcional, oscurece un poco los bordes para dar rollo cine) */
.vice-city-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(3, 1, 8, 0.6) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Animación del haz viajando hacia ti */
@keyframes light-sweep {
  0% { background-position: 0 -10%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { background-position: 0 110%; opacity: 0; }
}

.hero { z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; width: 100%; height: 100%; }
.hero-content { position: relative; text-align: center; transform: skewX(-8deg); }
.glitch-wrapper { position: relative; display: inline-block; }
.hero-title { font-family: var(--display); font-size: clamp(4.5rem, 18vw, 15rem); letter-spacing: 5px; text-transform: uppercase; margin: 0; line-height: 0.9; }
.base-layer { position: relative; z-index: 1; color: var(--text); opacity: calc(1 - (var(--g-int) / 5)); transform: translateX(calc(var(--g-int) * 0.2px)); pointer-events: none; text-shadow: 0 0 30px rgba(255, 16, 122, 0.4); }
.glitch-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: calc(var(--g-int) / 5); pointer-events: none; mix-blend-mode: normal; }
.white-layer { color: var(--text); z-index: 4; animation: slice-main-1 0.15s infinite steps(1) alternate-reverse; }
.white-layer-2 { color: var(--text); z-index: 4; animation: slice-main-2 0.2s infinite steps(1) alternate-reverse; }
.cyan-layer { color: var(--cyan); z-index: 3; mix-blend-mode: screen; text-shadow: 0 0 25px var(--cyan), 0 0 50px var(--cyan); animation: slice-c 0.25s infinite steps(1) alternate-reverse; }
.mag-layer { color: var(--mag); z-index: 2; mix-blend-mode: screen; text-shadow: 0 0 25px var(--mag), 0 0 50px var(--mag); animation: slice-m 0.3s infinite steps(1) alternate-reverse; }

@keyframes slice-main-1 { 0% { clip-path: inset(0 0 60% 0); transform: translate(calc(var(--g-int) * 2.5px), 0) skewX(calc(var(--g-int) * 0.5deg)); } 25% { clip-path: inset(20% 0 40% 0); transform: translate(calc(var(--g-int) * -3px), 0); } 50% { clip-path: inset(50% 0 10% 0); transform: translate(calc(var(--g-int) * 4px), 0) skewX(calc(var(--g-int) * -1deg)); } 75% { clip-path: inset(10% 0 50% 0); transform: translate(calc(var(--g-int) * -2px), 0); } 100% { clip-path: inset(30% 0 20% 0); transform: translate(calc(var(--g-int) * 3px), 0) skewX(calc(var(--g-int) * 1deg)); } }
@keyframes slice-main-2 { 0% { clip-path: inset(40% 0 0 0); transform: translate(calc(var(--g-int) * -2.5px), 0) skewX(calc(var(--g-int) * -0.5deg)); } 25% { clip-path: inset(60% 0 20% 0); transform: translate(calc(var(--g-int) * 3.5px), 0); } 50% { clip-path: inset(10% 0 50% 0); transform: translate(calc(var(--g-int) * -4px), 0) skewX(calc(var(--g-int) * 1deg)); } 75% { clip-path: inset(50% 0 10% 0); transform: translate(calc(var(--g-int) * 2px), 0); } 100% { clip-path: inset(20% 0 30% 0); transform: translate(calc(var(--g-int) * -3px), 0) skewX(calc(var(--g-int) * -1deg)); } }
@keyframes slice-c { 0% { clip-path: inset(20% 0 70% 0); transform: translate(calc(var(--g-int) * 4px), 0); } 33% { clip-path: inset(80% 0 10% 0); transform: translate(calc(var(--g-int) * -4px), 0); } 66% { clip-path: inset(40% 0 40% 0); transform: translate(calc(var(--g-int) * 5px), 0); } 100% { clip-path: inset(10% 0 80% 0); transform: translate(calc(var(--g-int) * -3px), 0); } }
@keyframes slice-m { 0% { clip-path: inset(70% 0 20% 0); transform: translate(calc(var(--g-int) * -4px), 0); } 33% { clip-path: inset(10% 0 80% 0); transform: translate(calc(var(--g-int) * 4px), 0); } 66% { clip-path: inset(50% 0 30% 0); transform: translate(calc(var(--g-int) * -5px), 0); } 100% { clip-path: inset(80% 0 10% 0); transform: translate(calc(var(--g-int) * 3px), 0); } }

.hero-subtitle { font-family: var(--display); font-size: clamp(0.9rem, 2vw, 1.2rem); letter-spacing: 6px; color: var(--cyan); margin-top: 5px; text-transform: uppercase; font-weight: 700; text-shadow: 2px 2px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000, 0px 10px 20px rgba(0, 0, 0, 0.9); }
.scroll-hint { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 0.75rem; letter-spacing: 3px; color: var(--text); font-weight: 600; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9); }
.mouse-icon { width: 22px; height: 36px; border: 2px solid var(--purple); border-radius: 12px; position: relative; }
.mouse-wheel { width: 2px; height: 6px; background: var(--mag); position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scrollWheel 1.5s infinite; }
@keyframes scrollWheel { 0% { top: 6px; opacity: 1; } 100% { top: 18px; opacity: 0; } }

.bsod-screen { position: absolute; inset: 0; z-index: 25; background-color: #490085; color: #ffffff; font-family: "Courier New", Courier, monospace; display: flex; flex-direction: column; justify-content: center; padding: 10%; opacity: 0; visibility: hidden; }
.bsod-content { max-width: 800px; }
.bsod-title { font-size: 6rem; margin-bottom: 30px; font-weight: normal; }
.bsod-content p { font-size: 1.2rem; line-height: 1.5; margin-bottom: 10px; }
.scroll-preloader { z-index: 9999 !important; background: #010002; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; position: fixed; inset: 0; }
.preloader-content { text-align: center; width: 360px; }
.preloader-logo { font-family: var(--display); font-size: 2rem; letter-spacing: 6px; margin-bottom: 20px; color: var(--mag); animation: pulseText 1s infinite alternate; }
.progress-track { width: 100%; height: 2px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--purple); box-shadow: 0 0 15px var(--purple); }
@keyframes pulseText { 0% { opacity: 0.5; } 100% { opacity: 1; text-shadow: 0 0 10px var(--purple); } }

.side-nav { position: fixed; left: 40px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 5px; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
.side-nav.is-visible { opacity: 1; pointer-events: auto; }
.nav-item { display: flex; align-items: center; justify-content: flex-end; gap: 15px; padding: 12px 0; cursor: none !important; text-decoration: none; flex-direction: row-reverse; }
.nav-text { font-family: var(--display); font-size: 1rem; letter-spacing: 2px; color: var(--muted); opacity: 0.4; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); transform-origin: left center; }
.nav-dot { width: 10px; height: 10px; border: 2px solid var(--muted); border-radius: 50%; background: transparent; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); flex-shrink: 0; }
.nav-item:hover .nav-text, .nav-item.active .nav-text { opacity: 1; color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); transform: scale(1.3); }
.nav-item:hover .nav-dot, .nav-item.active .nav-dot { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 15px var(--cyan); transform: scale(1.6); }

@media (max-width: 1024px) {
  .side-nav { display: flex !important; left: 50%; top: 10px; bottom: auto; z-index: 99999; transform: translateX(-50%); flex-direction: row; justify-content: space-between; width: 92%; max-width: 450px; background: rgba(11, 9, 20, 0.95); backdrop-filter: blur(12px); padding: 12px 20px; border-radius: 25px; border: 1px solid rgba(0, 240, 255, 0.3); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9); }
  .nav-item { padding: 5px; flex-direction: column-reverse; justify-content: center; gap: 8px; }
  .nav-text { display: block; font-size: 0.65rem; letter-spacing: 1px; opacity: 0.5; transform-origin: center center; }
  .nav-item:hover .nav-text, .nav-item.active .nav-text { opacity: 1; color: var(--cyan); text-shadow: 0 0 8px rgba(0, 240, 255, 0.5); transform: scale(1.1); }
  .nav-item:hover .nav-dot, .nav-item.active .nav-dot { transform: scale(1.3); }
}
body.lightbox-open .side-nav { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }

.about { z-index: 10; display: flex; align-items: center; justify-content: center; background: transparent; opacity: 0; visibility: hidden; pointer-events: none; }
.retro-bg-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.retro-img { position: absolute; mix-blend-mode: screen; animation: floatObj 8s ease-in-out infinite; object-fit: contain; pointer-events: none; will-change: transform, opacity; }
#gengar-easter-egg { pointer-events: auto; cursor: none; z-index: 20; touch-action: manipulation; }
.gameboy { width: 220px; height: auto; top: 10%; left: 2%; transform: rotate(-30deg); }
.n64 { width: 200px; height: auto; bottom: 8%; right: 5%; transform: rotate(10deg); animation-delay: -2s; }
.ps2 { width: 350px; height: auto; top: 25%; right: 8%; transform: rotate(-5deg); animation-delay: -4s; }
.gengar { width: 300px; height: auto; bottom: 15%; left: 0%; opacity: 0.15; filter: drop-shadow(0 0 60px var(--mag)); transform: rotate(5deg); animation-delay: -6s; }
@keyframes floatObj { 0%, 100% { transform: translateY(0) rotate(inherit); } 50% { transform: translateY(-20px) rotate(inherit); } }

.about-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 80px; align-items: center; max-width: 1200px; margin: 0 auto; z-index: 5; pointer-events: auto; }
.about-visual { position: relative; width: 100%; max-width: 450px; margin: 0 auto; aspect-ratio: 1 / 1; filter: grayscale(10%) contrast(120%); }
.about-visual img { width: 100%; height: 100%; object-fit: cover; padding: 10px; }
.tech-border { position: absolute; width: 40px; height: 40px; border: 2px solid var(--cyan); z-index: 2; }
.top-left { top: -10px; left: -10px; border-right: none; border-bottom: none; }
.bottom-right { bottom: -10px; right: -10px; border-left: none; border-top: none; }

.section-title { font-family: var(--display); font-size: clamp(3rem, 8vw, 5.5rem); color: #ffffff86; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 20px; font-weight: 700; line-height: 0.9; text-shadow: 0 0 5px #ffffff86, 0 0 10px var(--cyan); }
.section-subtitle { font-family: var(--display); font-size: clamp(3rem, 8vw, 5.5rem); color: var(--mag); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 20px; font-weight: 700; text-shadow: 0 0 20px rgba(255, 255, 255, 0.15); line-height: 0.9; }
.sub-title { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); color: #ffffff86; margin-bottom: 25px; font-weight: 700; letter-spacing: 1px; line-height: 1; text-shadow: 0 0 3px #ffffff86, 0 0 8px var(--mag); }
.eyebrow { font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 6px; color: var(--cyan); display: block; margin-bottom: 5px; font-weight: 700; }
.section-head.center { text-align: center; margin-bottom: 60px; }
.about-copy p, .organic-text p, .contact-info p, .fullscreen-content p { font-size: 1.15rem; line-height: 1.8; color: var(--text); opacity: 0.9; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }

.tech-stack { margin-top: 35px; }
.tech-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; }
.tech-item { background: rgba(0, 240, 255, 0.05); border: 1px solid var(--cyan); color: var(--cyan); padding: 8px 16px; font-family: var(--display); font-size: 1.1rem; letter-spacing: 2px; border-radius: 4px; box-shadow: 0 0 10px rgba(0, 240, 255, 0.15); text-shadow: 0 0 5px rgba(0, 240, 255, 0.5); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); cursor: none !important; }
.tech-item:hover { background: var(--cyan); color: #000; box-shadow: 0 0 20px rgba(0, 240, 255, 0.6); text-shadow: none; transform: translateY(-3px); }

.story { padding: 0; }
.story-pin { position: relative; width: 100vw; height: 100vh; background: transparent; overflow: hidden; }
.story-track { position: relative; }
.organic-track { display: flex; height: 100vh; width: max-content; align-items: center; gap: 8vw; padding: 0 10vw; }
.gallery-block { display: flex; flex-direction: column; justify-content: center; height: 100vh; }
.organic-text, .organic-img { z-index: 1; }
.organic-text { width: 25vw; }
.align-bottom { justify-content: flex-end; padding-bottom: 15vh; }
.organic-img { position: relative; }
.lil-img { width: 25vw; }
.medium-img { width: 35vw; }
.large-img { width: 50vw; }
.organic-img img { border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); width: 100%; }

.cursor-zoom { overflow: hidden; border-radius: 8px; border: 1px solid transparent; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6); }
.cursor-zoom img { transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease; filter: grayscale(15%) brightness(0.9); }
.cursor-zoom:hover { border-color: rgba(255, 16, 122, 0.5); box-shadow: 0 0 25px rgba(255, 16, 122, 0.2); transform: translateY(-5px); }
.cursor-zoom:hover img { transform: scale(1.05); filter: grayscale(0%) brightness(1.05); }

.gallery-progress-container { position: absolute; bottom: 30px; left: 10%; width: 80%; height: 4px; background: rgba(3, 1, 8, 0.6); border: 1px solid rgba(0, 240, 255, 0.2); border-radius: 10px; z-index: 20; backdrop-filter: blur(4px); }
.gallery-progress-bar { height: 100%; width: 0%; background: var(--translucidmag); border-radius: 10px; position: relative; box-shadow: 0 0 10px var(--translucidmag), 0 0 20px rgba(255, 16, 122, 0.6); }
.gallery-progress-bar::after { content: ""; position: absolute; right: 0; top: 50%; transform: translate(50%, -50%); width: 14px; height: 14px; background: var(--purple); border-radius: 50%; box-shadow: 0 0 10px var(--mag), 0 0 20px var(--mag), 0 0 40px var(--mag); }

.lightbox { position: fixed; inset: 0; background: rgba(11, 9, 20, 0.4); backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); z-index: 9995; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; opacity: 0; pointer-events: none; transition: opacity 0.4s ease, backdrop-filter 0.4s ease; }
.lightbox.active { opacity: 1; pointer-events: all; backdrop-filter: blur(15px); }
.lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; transform: scale(0.8) translateY(20px); opacity: 0; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); border-radius: 4px; border: 1px solid var(--purple); box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), 0 0 50px rgba(255, 16, 122, 0.1); }
.lightbox.active img { transform: scale(1) translateY(0); opacity: 1; }
.lightbox-close { color: var(--cyan); font-family: var(--display); font-size: 1.1rem; letter-spacing: 3px; background: rgba(11, 9, 20, 0.6); border: 1px solid var(--cyan); padding: 8px 16px; border-radius: 4px; cursor: none !important; opacity: 0; transform: translateY(-10px); transition: all 0.4s ease 0.2s; }
.lightbox.active .lightbox-close { opacity: 1; transform: translateY(0); }
.lightbox-close:hover { background: rgba(0, 240, 255, 0.15); box-shadow: 0 0 15px rgba(0, 240, 255, 0.4); }

body.lightbox-open, body.no-scroll { overflow: hidden !important; }

@keyframes vhs-glitch-anim { 0% { filter: hue-rotate(0deg) contrast(120%); transform: scale(0.8) skewX(0deg); } 20% { filter: hue-rotate(-50deg) contrast(200%) drop-shadow(10px 0 0 rgba(255, 16, 122, 0.8)); transform: scale(0.85) skewX(-15deg) translateX(15px); } 40% { filter: hue-rotate(50deg) contrast(200%) drop-shadow(-10px 0 0 rgba(0, 240, 255, 0.8)); transform: scale(0.9) skewX(15deg) translateX(-15px); } 60% { filter: hue-rotate(0deg) invert(20%); transform: scale(0.95) skewX(-5deg); } 80% { filter: hue-rotate(0deg) contrast(150%); transform: scale(0.98) skewX(5deg); } 100% { filter: none; transform: scale(1) translateY(0); } }
.lightbox-vhs-glitch { animation: vhs-glitch-anim 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards !important; }

.showcase { padding: 150px 5%; }
.gb-info::before { content: ""; position: absolute; top: 50%; left: 50%; width: 130%; height: 200%; transform: translate(-50%, -45%); background-image: url("images/fondo_cartuchos.avif"); background-size: contain; background-position: center; background-repeat: no-repeat; opacity: 0.7; z-index: 0; pointer-events: none; }
.gb-info h3 { font-family: var(--display); font-size: clamp(1rem, 1.5vw, 1.2rem); margin-bottom: 6px; color: var(--cyan); text-transform: uppercase; font-weight: 900; text-shadow: 0 2px 5px #000; }
.gb-info p { font-size: clamp(0.75rem, 1.2vw, 0.9rem); line-height: 1.4; color: #fff; text-shadow: 0 2px 5px #000; }
.gb-info h3, .gb-info p { position: relative; z-index: 1; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9); }
.status-badge { position: absolute; top: 5px; right: 5px; z-index: 10; background: #000; border: 1px solid var(--mag); color: var(--mag); padding: 2px 5px; font-family: var(--display); font-size: 1rem; letter-spacing: 1px; border-radius: 2px; font-weight: bold; flex-shrink: 0; }
.disabled-cartridge { filter: grayscale(100%) brightness(0.6); pointer-events: none; }
.active-cartridge { z-index: 1; cursor: none !important; }
.active-cartridge:hover { z-index: 10; }
.active-cartridge:hover .gb-cover { transform: scale(1.08); }
.active-cartridge:hover .gb-cover.jaime-fix { filter: invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)); }

.contact { padding: 150px 5%; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; max-width: 1200px; margin: 0 auto; align-items: start; }
.direct-email { color: var(--muted); font-size: 1.15rem; line-height: 1.6; margin-bottom: 30px; }
.direct-email:hover { color: var(--mag); }
.social-links { display: flex; gap: 15px; margin-top: 30px; }
.social-btn { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: rgba(5, 2, 8, 0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; color: var(--muted); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.social-btn svg { width: 22px; height: 22px; fill: currentColor; transition: transform 0.3s ease; }
.social-btn:hover { transform: translateY(-5px); }
.social-btn:hover svg { transform: scale(1.15); }
.social-btn.insta:hover { color: var(--mag); border-color: var(--mag); box-shadow: 0 5px 20px rgba(255, 16, 122, 0.3); }
.social-btn.twitch:hover { color: #9146ff; border-color: #9146ff; box-shadow: 0 5px 20px rgba(145, 70, 255, 0.3); }
.social-btn.linkedin:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 5px 20px rgba(0, 240, 255, 0.3); }

.brutal-form { display: flex; flex-direction: column; gap: 25px; }
.input-group input, .input-group textarea { width: 100%; background: rgba(5, 2, 8, 0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 20px; color: var(--text); font-family: var(--display); font-size: 1.1rem; transition: 0.2s; caret-color: var(--cyan); }
.visually-hidden { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.input-error { border-color: var(--mag) !important; box-shadow: 0 0 15px rgba(255, 16, 122, 0.5) !important; animation: form-shake 0.4s ease-in-out; }
@keyframes form-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-6px); } }
@keyframes neon-pulse { 0% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); border-color: rgba(0, 240, 255, 0.5); } 50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.6); border-color: rgba(0, 240, 255, 1); } 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); border-color: rgba(0, 240, 255, 0.5); } }
.input-group input:focus, .input-group textarea:focus { outline: none; background: rgba(11, 9, 20, 0.8); animation: neon-pulse 1.5s infinite alternate; }
.brutal-form button { padding: 20px; background: transparent; color: var(--cyan); border: 2px solid var(--cyan); border-radius: 8px; font-family: var(--display); font-size: 1.2rem; letter-spacing: 2px; font-weight: bold; transition: 0.3s; margin-top: 10px; cursor: none !important; text-shadow: 0 0 8px rgba(0, 240, 255, 0.5); box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2), 0 0 15px rgba(0, 240, 255, 0.3); }
.brutal-form button:hover { background: var(--cyan); box-shadow: 0 0 25px rgba(0, 240, 255, 0.6); color: #000; text-shadow: none; }

.skip-btn { position: fixed; bottom: 40px; right: 40px; z-index: 999998; background: rgba(21, 17, 32, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(0, 240, 255, 0.3); color: var(--text); padding: 12px 24px; font-family: var(--display); font-size: 1.2rem; letter-spacing: 3px; border-radius: 4px; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: auto; cursor: none !important; }
.skip-btn:hover { background: rgba(0, 240, 255, 0.15); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 20px rgba(0, 240, 255, 0.2); transform: translateX(-5px); }
.skip-btn:focus-visible { outline: 3px dashed var(--mag); outline-offset: 8px; background: rgba(0, 240, 255, 0.2); box-shadow: 0 0 25px var(--cyan); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .gb-cartridge:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }

@media (max-width: 1440px), (max-height: 800px) {
  .fullscreen-content { width: 48vw; }
  .section-title { font-size: clamp(2.5rem, 5vw, 4rem); }
  .sub-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
  .about-copy p, .organic-text p, .fullscreen-content p { font-size: 1rem; line-height: 1.6; margin-bottom: 20px; }
}

@media (max-width: 1200px) {
  .intro-sequence { height: auto !important; min-height: 100vh; display: flex; flex-direction: column; }
  .crt-container { position: relative !important; height: 100vh; }
  .about { position: relative !important; height: auto !important; min-height: 100vh; padding: 100px 8% 50px 8% !important; }
  .about-layout { grid-template-columns: 1fr; gap: 40px !important; }
  .about-visual { width: 100% !important; max-width: 320px !important; margin: 0 auto 30px auto !important; padding: 15px !important; aspect-ratio: auto !important; }
  .about-visual img { object-fit: contain !important; height: auto !important; padding: 0 !important; }
  .tech-border { width: 30px; height: 30px; }
  .story-pin { height: auto !important; width: 100% !important; overflow: visible !important; }
  .story-track { width: 100% !important; height: auto !important; display: block !important; padding: 0 !important; }
  .organic-track { display: block !important; height: auto !important; width: 100% !important; padding: 60px 8% !important; gap: 0 !important; }
  .gallery-block { display: block !important; width: 100% !important; height: auto !important; padding: 0 !important; margin: 0 auto 35px auto !important; border: none !important; }
  .organic-text, .organic-img, .lil-img, .medium-img, .large-img { width: 100% !important; max-width: 550px !important; margin: 0 auto 25px auto !important; display: block !important; }
  .cursor-zoom { width: 100% !important; display: block !important; padding: 0 !important; margin-top: 10px; }
  .cursor-zoom img { width: 100% !important; height: auto !important; display: block !important; }
  .accordion-block, .fullscreen-block { display: block !important; width: 100% !important; max-width: 550px !important; height: auto !important; margin: 30px auto !important; padding: 0 !important; }
  .accordion-panel { width: 100% !important; height: 220px !important; margin-bottom: 15px !important; }
  .fullscreen-content { width: 100% !important; padding: 0 !important; }
  .gallery-progress-container { position: sticky; bottom: 25px; z-index: 100; }
  .scroll-hint { position: absolute !important; bottom: 90px !important; left: 50% !important; transform: translateX(-50%) !important; width: 90% !important; max-width: 450px; text-align: center; margin-top: 0 !important; font-size: 0.7rem !important; letter-spacing: 1.5px !important; }
}

.site-footer { background-color: #030108; border-top: 1px solid rgba(255, 16, 122, 0.15); padding: 30px 5%; position: relative; z-index: 10; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9); }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer p { color: var(--muted); font-family: var(--body); font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; margin: 0; opacity: 0.8; }
.heart-icon { display: inline-block; font-size: 1.1rem; margin: 0 2px; filter: drop-shadow(0 0 8px rgba(145, 70, 255, 0.6)); animation: pulse-heart 1.5s infinite ease-in-out; }
.footer-link { color: var(--cyan); font-family: var(--display); font-size: 1.1rem; letter-spacing: 1px; text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); text-shadow: 0 0 5px rgba(0, 240, 255, 0.3); display: inline-block; cursor: none !important; }
.footer-link:hover { color: #fff; text-shadow: 0 0 10px var(--cyan), 0 0 25px var(--cyan); transform: translateY(-1px); }
@keyframes pulse-heart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(145, 70, 255, 0.9)) brightness(1.1); } }

@media (max-width: 768px) { .footer-container { flex-direction: column; text-align: center; gap: 12px; } }

@media (max-width: 1024px) {
  body::before, body::after { width: 150vw; height: 150vw; }
  body::before { top: -10%; left: -40%; background: radial-gradient(circle, rgba(91, 42, 143, 0.35) 0%, rgba(91, 42, 143, 0) 65%); }
  body::after { bottom: -10%; right: -40%; background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, rgba(0, 240, 255, 0) 65%); }
  .skip-btn { bottom: 30px; right: 20px; font-size: 1rem; padding: 10px 18px; }
  .contact-layout { grid-template-columns: 1fr; }
  body.no-scroll { overflow: hidden !important; touch-action: none; }
  .retro-bg-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; z-index: -1; }
  .retro-img { display: block; position: absolute; mix-blend-mode: screen; z-index: 0; }
  .gameboy { width: 100px; top: 2%; left: -15px; transform: rotate(-20deg); }
  .ps2 { width: 130px; top: 32%; right: -20px; transform: rotate(15deg); }
  .gengar { width: 160px; bottom: 28%; left: -25px; transform: rotate(10deg); filter: drop-shadow(0 0 40px var(--mag)); }
  .n64 { width: 130px; bottom: 3%; right: -15px; transform: rotate(-15deg); }
  .cartridges-container { grid-template-columns: 1fr; max-width: 350px; margin: 0 auto; gap: 6vh; padding: 5vh 0 8vh 0; }
  .gb-cartridge { transform: scale(0.85) !important; opacity: 0.6 !important; filter: grayscale(80%) brightness(0.7) !important; transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
  .gb-cartridge:not(.disabled-cartridge).mobile-focus { transform: scale(1.05) !important; opacity: 1 !important; filter: grayscale(0%) brightness(1.1) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 25px var(--purple)) !important; z-index: 10; }
  .gb-cartridge.disabled-cartridge.mobile-focus { transform: scale(1.1) !important; opacity: 0.6 !important; filter: grayscale(100%) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8)) !important; z-index: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .crt-overlay { animation: none !important; }
  .glitch-layer { animation: none !important; display: none !important; }
  .bsod-content { animation: none !important; opacity: 1 !important; }
  .preloader-logo { animation: none !important; }
}

.tools-container { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.tool-cartridge { position: relative; width: 100%; max-width: 320px; aspect-ratio: 900 / 1025; background-image: url("images/cartuchoGB.avif"); background-size: cover; background-position: center; display: block; transform-style: preserve-3d; cursor: none !important; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease; filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.9)) drop-shadow(0 10px 15px rgba(255, 16, 122, 0.25)) drop-shadow(0 -2px 10px rgba(0, 240, 255, 0.15)); }
.tool-cartridge::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, transparent 40%, transparent 60%, rgba(255, 16, 122, 0.08) 100%); mix-blend-mode: overlay; pointer-events: none; z-index: 2; }
.tool-cartridge:hover { transform: translateY(-15px) scale(1.05); filter: drop-shadow(0 35px 35px rgba(0, 0, 0, 0.95)) drop-shadow(0 15px 30px rgba(255, 16, 122, 0.5)) drop-shadow(0 -5px 15px rgba(0, 240, 255, 0.3)); z-index: 10; }
.tool-artwork { position: absolute; top: 27.8%; left: 20%; right: 20.2%; bottom: 12.8%; background: var(--bg); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transform: translateZ(20px); border: 1px solid rgba(255, 255, 255, 0.1); }
.tool-artwork::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0px 8px 15px rgba(0, 0, 0, 0.9); z-index: 5; }
.sticker-glare { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.15) 45%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.15) 55%, transparent 60%); transform: rotate(25deg) translateY(0%); transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; z-index: 4; }
.tool-cartridge:hover .sticker-glare { transform: rotate(25deg) translateY(100%); }
.tool-info { flex-grow: 1; background: linear-gradient(180deg, #1a1a2e, #0b0914); padding: 15px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.tool-info h3 { font-family: var(--display); font-size: clamp(1.2rem, 1.8vw, 1.5rem); color: var(--cyan); margin-bottom: 8px; text-shadow: 2px 2px 0px #000; letter-spacing: 1px; }
.tool-info p { font-size: 0.85rem; line-height: 1.4; color: var(--text); text-shadow: 1px 1px 3px #000; }
.badge { position: absolute; top: 10px; right: 10px; background: rgba(255, 16, 122, 0.2); border: 1px solid var(--mag); color: var(--text); font-family: var(--display); font-size: 0.8rem; padding: 2px 6px; border-radius: 3px; box-shadow: 0 0 10px rgba(255, 16, 122, 0.4); }

.mission-ui-container { display: flex; gap: 40px; max-width: 1200px; margin: 0 auto; align-items: stretch; height: 500px; }
.mission-list { flex: 1; display: flex; flex-direction: column; border-right: 2px solid rgba(255, 16, 122, 0.3); padding-right: 20px; }
.mission-category { font-family: var(--display); color: var(--muted); font-size: 1rem; letter-spacing: 4px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px dashed var(--muted); }
.mission-btn { background: transparent; border: none; text-align: right; font-family: var(--display); font-size: clamp(1.5rem, 2.5vw, 2.5rem); color: var(--text); padding: 15px 20px; margin-bottom: 10px; transition: all 0.2s ease; cursor: none !important; opacity: 0.5; border-right: 4px solid transparent; }
.mission-btn:hover, .mission-btn.active { opacity: 1; color: var(--cyan); background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1)); border-right: 4px solid var(--cyan); text-shadow: 0 0 15px rgba(0, 240, 255, 0.6); transform: translateX(-10px); }

.mission-visor { flex: 2; background: #05020a; border: 1px solid var(--purple); border-radius: 8px; position: relative; display: flex; flex-direction: column; overflow: hidden; box-shadow: inset 0 0 50px rgba(0,0,0,0.9), 0 0 20px rgba(91, 42, 143, 0.4); }
.visor-crt-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%); background-size: 100% 4px; z-index: 5; pointer-events: none; }
.visor-screen { height: 200px !important; flex-shrink: 0; position: relative; background: #000; border-bottom: 2px solid var(--purple); }
.visor-screen img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: filter 0.3s; }
.visor-data { padding: 25px; background: var(--bg); position: relative; z-index: 10; display: flex; flex-direction: column; flex: 1; }
.visor-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 10px; }
.visor-header h3 { font-family: var(--display); font-size: 2rem; color: var(--mag); letter-spacing: 2px; margin: 0; line-height: 1.1; }
.visor-desc { font-size: 1rem; color: var(--text); line-height: 1.5; margin-bottom: 20px; }
.visor-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 15px; min-height: 55px; margin-top: auto; }
.tech-line { font-family: monospace; color: var(--muted); font-size: 0.85rem; }
.launch-btn { background: var(--cyan); color: #000; padding: 8px 16px; font-family: var(--display); letter-spacing: 2px; border-radius: 4px; font-weight: bold; box-shadow: 0 0 15px rgba(0, 240, 255, 0.4); transition: 0.3s; cursor: none !important; }
.launch-btn:hover { background: #fff; box-shadow: 0 0 25px rgba(255, 255, 255, 0.8); }

@keyframes scan-glitch { 0% { opacity: 0; transform: scale(1.05) translateY(10px); } 50% { opacity: 0.5; transform: scale(1) translateY(-2px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.scan-effect { animation: scan-glitch 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

@media (max-width: 1024px) {
  .mission-ui-container { flex-direction: column-reverse; height: auto; width: 100%; max-width: 100vw; gap: 15px; }
  .mission-visor { width: 100%; height: 500px; border-radius: 8px 8px 0 0; }
  .visor-screen { height: 220px; flex-shrink: 0; }
  .visor-data { padding: 20px 15px; }
  .visor-header h3 { font-size: 1.5rem; }
  .mission-list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; white-space: nowrap; justify-content: center; padding: 20px 10px; margin: 0; border-right: none; border-bottom: none; border-top: 2px solid rgba(255, 16, 122, 0.3); scrollbar-width: none; width: 100%; }
  .mission-list::-webkit-scrollbar { display: none; }
  .mission-category { display: none; }
  .mission-btn { scroll-snap-align: center; font-size: 1.1rem; padding: 10px 15px; border-right: none; border-bottom: 4px solid transparent; text-align: center; }
  .mission-btn:hover, .mission-btn.active { border-right: none; border-bottom: 4px solid var(--cyan); transform: translateY(-2px); }
  .tools-container { display: flex; }
}