/* =========================================================
   JALEO · La casa — landing cinematográfica
   Paleta Liquid Crystal (alineada con la app)
   ========================================================= */
:root {
  --bg:        #000000;
  --surface:   #121212;
  --card:      #1a1a1a;
  --text:      #f5f5f5;
  --text-dim:  #828a92;
  --accent:    #ccff00;   /* verde ácido */
  --accent-2:  #e81e63;   /* rosa */
  --cream:     #fcfaf4;
  --radius:    24px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }          /* scroll fluido, sin imán */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ocultar el scrollbar nativo (lo sustituye .railnav) */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { width: 0; height: 0; display: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ====== SCROLLBAR CUSTOM (pista negra + píldora blanca) ====== */
/* .railnav = píldora grande (fondo, representa toda la página) */
.railnav {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 55;
  height: min(46vh, 380px);
  width: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(4px);
}
/* .railnav__thumb = píldora pequeña blanca que se mueve (mismo ancho) */
.railnav__thumb {
  position: absolute; left: 0; right: 0; top: 0;
  width: 100%; height: 28%;
  border-radius: 999px;
  background: var(--cream);
  /* sin transición: sigue el scroll 1:1 → movimiento fluido */
  will-change: transform;
}
@media (max-width: 560px) {
  .railnav { right: 10px; height: 40vh; }
}

/* ====== HUD ====== */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  pointer-events: none;                 /* la barra no bloquea el scroll... */
}
.hud__brand, .hud__social { pointer-events: auto; }  /* ...pero sí sus enlaces */
.hud__brand { display: inline-flex; }
.hud__iso { height: 30px; width: auto; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.hud__social { display: flex; gap: 6px; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--cream); text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.social-link:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.social-link svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }

/* =========================================================
   MOTOR DE SALAS  (pinned sticky cross-fade)
   Cada .room se queda fija (sticky) mientras pasa su tramo
   de scroll; el JS controla opacity/scale/parallax.
   ========================================================= */
/* #house = STAGE fijo: siempre ocupa el viewport actual (sin importar la
   barra de URL del móvil), no participa en el flujo → no hay reflow ni saltos. */
#house {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden;
}
/* #spacer = único elemento en flujo: su altura (JS) genera el scroll real. */
#spacer { position: relative; z-index: 0; width: 100%; }

.room {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  will-change: opacity, transform;
}

/* capa de imagen (gradiente de fondo = fallback mientras carga / si falta) */
.room-media {
  position: absolute; inset: 0;
  background-color: var(--surface);
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(204,255,0,.10), transparent 60%),
    radial-gradient(120% 90% at 80% 90%, rgba(232,30,99,.14), transparent 55%),
    linear-gradient(160deg, #161616, #050505);
  transform: scale(1.08);          /* el JS anima la escala (push-in) */
  will-change: transform;
}
/* la foto real: rellena la pantalla recortando (cover). El JS replica
   esta misma matemática para clavar los hotspots sobre los objetos. */
.room-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.room-media--outro {
  background-image:
    radial-gradient(90% 70% at 50% 30%, rgba(204,255,0,.10), transparent 60%),
    linear-gradient(180deg, #1a0f18, #050505);
}

/* velo oscuro para legibilidad del texto */
.room-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.65) 100%);
  pointer-events: none;
}
.room-veil--strong { background: rgba(0,0,0,.62); }

/* contenido (títulos, hotspots) — el JS le aplica parallax */
.room-content {
  position: absolute; inset: 0; z-index: 2;
  will-change: transform;
}

/* ====== Etiqueta de sala (esquina inferior) ====== */
.room-tag {
  position: absolute; left: 24px; bottom: 28px;
  max-width: min(80%, 520px);
}
.room-tag__name {
  font-size: clamp(28px, 6vw, 56px); font-weight: 900; line-height: 1;
  margin: 0 0 8px; letter-spacing: -1px;
}
.room-tag__hint { margin: 0; color: var(--text-dim); font-size: 14px; }

/* =========================================================
   HOTSPOTS
   ========================================================= */
/* capa que mapea exactamente a la foto; no se mueve con el parallax.
   pasa los clics salvo en los propios puntos. */
.room-hotspots {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  border: 0; padding: 0; cursor: pointer;
  background: transparent;
  pointer-events: auto;
}
.hotspot__dot {
  position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.hotspot__pulse {
  position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream);
  animation: pulse 2.2s var(--ease) infinite;
}
.hotspot--code .hotspot__dot,
.hotspot--code .hotspot__pulse { background: var(--accent); }
.hotspot--claimed .hotspot__dot { background: var(--text-dim); }
.hotspot--claimed .hotspot__pulse { display: none; }

@keyframes pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(3.2); opacity: 0;  }
  100% { transform: scale(3.2); opacity: 0;  }
}
.hotspot:focus-visible { outline: 2px solid var(--accent); border-radius: 50%; }

/* =========================================================
   HERO / OUTRO
   ========================================================= */
.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 28px; max-width: 760px;
}
.hero-logo { width: clamp(150px, 34vw, 240px); height: auto; margin: 0 0 22px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.hero-title {
  font-size: clamp(34px, 8vw, 80px); font-weight: 900; line-height: .98;
  letter-spacing: -2px; margin: 0 0 18px;
}
.hero-sub {
  font-size: clamp(15px, 2.2vw, 19px); color: var(--text-dim);
  line-height: 1.5; max-width: 460px; margin: 0;
}
.scroll-hint {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 11px; letter-spacing: 3px;
}
.scroll-hint__line {
  width: 1px; height: 38px;
  background: linear-gradient(var(--text-dim), transparent);
  animation: hint 1.8s var(--ease) infinite;
}
@keyframes hint { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1)} 100%{transform:scaleY(0);transform-origin:bottom} }

.outro-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 28px;
}
.outro-iso { width: clamp(64px, 16vw, 96px); height: auto; margin-bottom: 20px; }
.outro-title { font-size: clamp(30px, 7vw, 64px); font-weight: 900; margin: 0 0 10px; letter-spacing: -1px; }
.outro-sub { color: var(--text-dim); margin: 0 0 28px; font-size: 17px; }
.store-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.store-btn {
  min-height: 52px; display: inline-flex; align-items: center; padding: 0 28px;
  border-radius: 999px; background: var(--cream); color: #050505;
  font-weight: 900; text-decoration: none; font-size: 15px;
}
.outro-foot { margin-top: 26px; color: var(--text-dim); font-size: 13px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.modal__card {
  position: relative; width: min(100%, 420px);
  background: var(--card); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius); padding: 30px 26px;
  animation: pop .3s var(--ease);
  text-align: center;
}
@keyframes pop { from { transform: scale(.92) translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal__close {
  position: absolute; top: 12px; right: 14px; width: 36px; height: 36px;
  border: 0; background: transparent; color: var(--text-dim);
  font-size: 26px; line-height: 1; cursor: pointer;
}

/* contenido del modal */
.code-eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--text-dim); margin: 0 0 14px; }
.code-box {
  font-size: clamp(30px, 9vw, 44px); font-weight: 900; letter-spacing: 4px;
  color: var(--accent); margin: 0 0 6px; font-variant-numeric: tabular-nums;
}
.code-status { font-size: 13px; margin: 0 0 22px; color: var(--text-dim); }
.code-status--ok { color: var(--accent); }
.code-status--used { color: var(--accent-2); }
.code-actions { display: flex; flex-direction: column; gap: 10px; }
.btn {
  min-height: 50px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: transparent; color: var(--text); font-weight: 900; font-size: 14px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn--primary { background: var(--cream); color: #050505; border-color: transparent; }
.btn--copied { background: var(--accent); color: #050505; }

.egg-emoji { font-size: 52px; margin-bottom: 10px; }
.egg-text { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.egg-sub { color: var(--text-dim); margin: 0; font-size: 14px; }

.sold-out .code-box { color: var(--text-dim); }

/* =========================================================
   Responsive: en escritorio damos más aire a los textos
   ========================================================= */
@media (min-width: 900px) {
  .room-tag { left: 64px; bottom: 56px; }
  .hero-content, .outro-content { padding-left: 64px; padding-right: 64px; }
  .hero-content { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .room-media { transform: none !important; }
  .hotspot__pulse { animation: none; }
}
