/* ═══════════════════════════════════════════════════════════════
   NexusLux — styles.css
   Experiencia cinematográfica vertical 9:16
   Vanilla CSS puro — sin dependencias externas
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --black:        #000000;
  --night:        #020508;
  --deep-blue:    #040d17;
  --gold:         #c9a84c;
  --gold-dim:     rgba(201, 168, 76, 0.18);
  --gold-glow:    rgba(201, 168, 76, 0.06);
  --white-dim:    rgba(255, 255, 255, 0.82);
  --white-faint:  rgba(255, 255, 255, 0.45);
  --overlay-veil: rgba(0, 0, 0, 0.52);

  /* Tipografía */
  --font-base: 'Georgia', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Escenario */
  --stage-max-h: 100dvh;
  --stage-aspect: 9 / 16;

  /* Tiempos */
  --transition-fast:   150ms ease;
  --transition-scene:  400ms ease;
  --transition-appear: 600ms ease;
}

/* ── Reset base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin:  0;
  padding: 0;
}

html {
  height: 100%;
  background: var(--black);
  overscroll-behavior: none;
}

body {
  height: 100%;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white-dim);
  font-family: var(--font-base);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Fondo cinematográfico (persistente) ───────────────────── */
#cinematic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    var(--deep-blue) 0%,
    var(--night)     40%,
    var(--black)     100%
  );
  pointer-events: none;
}

#grain-canvas,
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    transparent 45%,
    rgba(0,0,0,0.65) 100%
  );
  pointer-events: none;
}

#ambient-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(25, 45, 80, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* ── Escenario 9:16 ────────────────────────────────────────── */
#stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El contenedor interno mantiene 9:16 en escritorio */
#stage::before {
  content: '';
  display: block;
}

/* ── Capa de vídeo ─────────────────────────────────────────── */
#video-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#video-layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  /* Siempre opacity:1 cuando está visible — no transición de entrada */
  opacity: 1;
  display: none;          /* oculto por defecto con display (no opacity) */
  pointer-events: none;
  z-index: 1;
  /* Suprimir controles nativos */
  -webkit-media-controls: none;
}

#video-layer video::-webkit-media-controls,
#video-layer video::-webkit-media-controls-enclosure,
#video-layer video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
}

/* Vídeo activo: visible, debajo en el stack */
#video-layer video.active {
  display: block;
  z-index: 2;
  opacity: 1;
}

/* Vídeo saliendo: visible por encima, se desvanece */
#video-layer video.fading-out {
  display: block;
  z-index: 3;
  opacity: 1;
  transition: opacity 350ms ease;
}

#video-layer video.fading-out.fade-done {
  opacity: 0;
}

/* ── Transición de escena ──────────────────────────────────── */
#scene-transition {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

#scene-transition.fading {
  opacity: 1;
  pointer-events: all;
}

/* ── Vistas ────────────────────────────────────────────────── */
.view {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-appear);
}

.view.visible {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   LANDING — Vista /
   ════════════════════════════════════════════════════════════ */
#view-home {
  align-items: flex-start;
  justify-content: center;
}

.home-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 24px) 32px env(safe-area-inset-bottom, 32px);
  gap: 0;
}

/* Logo */
.home-logo {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 24px);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeInDown 0.9s ease 0.3s forwards;
}

.logo-img {
  height: 32px;
  width: auto;
  max-width: 200px;
  display: block;
  opacity: 0.8;
  filter: brightness(0.95);
}

.logo-fallback {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--gold);
  opacity: 0.72;
  text-align: center;
  display: block;
}

/* Grieta de luz */
.crack-light {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 25%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(201, 168, 76, 0.35) 30%,
    rgba(255, 255, 240, 0.55) 50%,
    rgba(201, 168, 76, 0.35) 70%,
    transparent 100%
  );
  filter: blur(0.5px);
  opacity: 0;
  animation: crackAppear 2s ease 1s forwards;
}

.crack-light::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 1px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 250, 200, 0.4) 0%,
    transparent 100%
  );
}

/* Titular */
.home-headline {
  font-family: var(--font-sans);
  font-size: clamp(15px, 4.2vw, 22px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.55;
  text-align: center;
  color: var(--white-dim);
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: fadeInUp 1s ease 0.7s forwards;
  margin-bottom: 28px;
}

/* Subtexto */
.home-subtext {
  font-family: var(--font-base);
  font-size: clamp(11px, 2.8vw, 14px);
  font-style: italic;
  line-height: 1.9;
  text-align: center;
  color: var(--white-faint);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeInUp 1s ease 1.1s forwards;
  margin-bottom: 44px;
}

/* Botón principal */
.btn-enter {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--font-sans);
  font-size: clamp(11px, 2.6vw, 13px);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--white-dim);
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.38);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.15s ease;
  outline: none;
}

.btn-enter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(201, 168, 76, 0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-enter:hover {
  border-color: rgba(201, 168, 76, 0.7);
  color: #fff;
  box-shadow:
    0 0 20px rgba(201, 168, 76, 0.12),
    inset 0 0 20px rgba(201, 168, 76, 0.04);
}

.btn-enter:hover::before {
  opacity: 1;
}

.btn-enter:focus-visible {
  border-color: rgba(201, 168, 76, 0.9);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.4);
  outline: none;
}

.btn-enter:active {
  transform: scale(0.98);
}

/* Returning user */
.returning-user-wrap {
  margin-top: 28px;
  opacity: 0;
  animation: fadeInUp 1s ease 2s forwards;
}

.returning-user-text {
  font-family: var(--font-base);
  font-size: clamp(10px, 2.2vw, 12px);
  color: rgba(255,255,255,0.28);
  letter-spacing: 1px;
  text-align: center;
  cursor: default;
  text-decoration: none;
}

.returning-user-link {
  font-family: var(--font-base);
  font-size: clamp(10px, 2.2vw, 12px);
  color: rgba(255,255,255,0.32);
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  transition: color 0.3s ease;
}

.returning-user-link:hover {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
}

.returning-user-link:focus-visible {
  outline: 1px solid rgba(201, 168, 76, 0.5);
  outline-offset: 4px;
}

/* ════════════════════════════════════════════════════════════
   OVERLAY DE ESCENAS (ruptura, confirmaciones)
   ════════════════════════════════════════════════════════════ */
.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.0);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.scene-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 40px 28px;
  text-align: center;
  /* Velo sutil detrás del texto */
  background: radial-gradient(
    ellipse 90% 70% at 50% 50%,
    rgba(0,0,0,0.45) 0%,
    transparent 100%
  );
}

.overlay-message {
  font-family: var(--font-sans);
  font-size: clamp(13px, 3.5vw, 18px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 0 30px rgba(0,0,0,0.9);
}

/* Botón escena */
.btn-scene {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-sans);
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--white-dim);
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.32);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.15s ease;
  outline: none;
}

.btn-scene:hover {
  border-color: rgba(201, 168, 76, 0.65);
  color: #fff;
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.1);
}

.btn-scene:focus-visible {
  border-color: rgba(201, 168, 76, 0.85);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.4);
}

.btn-scene:active {
  transform: scale(0.97);
}

/* ════════════════════════════════════════════════════════════
   DIAL DE FRECUENCIA — /frecuencia
   ════════════════════════════════════════════════════════════ */
.frequency-ui {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transition: opacity var(--transition-appear);
  /* Velo oscuro sutil detrás de toda la UI de sintonización */
  background: radial-gradient(
    ellipse 110% 160% at 50% 80%,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 100%
  );
  padding: 24px 16px 20px;
}

.frequency-ui.visible {
  opacity: 1;
}

.frequency-label {
  font-family: var(--font-sans);
  font-size: clamp(10px, 2.6vw, 13px);
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  text-transform: uppercase;
}

/* Contenedor del dial */
.frequency-dial {
  position: relative;
  width: 100%;
  height: 72px;
  cursor: grab;
  touch-action: none;
  -webkit-touch-callout: none;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background: rgba(0, 0, 0, 0.6);
  /* Recortar la regla que se desliza */
  overflow: hidden;
}

/* Fila de etiquetas fijas encima del dial (no desliza) */
.dial-fixed-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
  margin-bottom: 6px;
  pointer-events: none;
  user-select: none;
}

.dial-fixed-labels span {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(201, 168, 76, 0.5);
  text-align: center;
}

.dial-fixed-labels span.label-target {
  color: rgba(255, 248, 200, 0.75);
  font-size: 9.5px;
}

.frequency-dial:focus-visible {
  outline: none;
  border-color: rgba(201, 168, 76, 0.6);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.3);
}

.frequency-dial.dragging {
  cursor: grabbing;
}

/* Regla con marcas */
.dial-ruler {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Las marcas son generadas por JS */
.ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  background: rgba(201, 168, 76, 0.25);
  transform: translateX(-50%);
}

.ruler-tick.major {
  background: rgba(201, 168, 76, 0.5);
  height: 22px;
}

.ruler-tick.minor {
  height: 12px;
}

.ruler-tick.highlight {
  background: rgba(255, 248, 200, 0.85);
  height: 32px;
  width: 2px;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.6);
}

/* Labels dentro del dial: posicionados en la parte superior del tick, sin salirse */
.ruler-label {
  position: absolute;
  top: 4px;
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 1px;
  color: rgba(201, 168, 76, 0.0); /* invisibles — los labels fijos los reemplazan */
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.ruler-label.highlight-label {
  color: rgba(255, 248, 200, 0.0);
}

/* Aguja central */
.dial-needle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

.needle-line {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(201, 168, 76, 0.7) 100%
  );
}

.needle-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 100%;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 255, 200, 0.18) 0%,
    transparent 100%
  );
}

/* Display de frecuencia actual */
.dial-freq-display {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(201, 168, 76, 0.65);
  z-index: 6;
  transition: color 0.2s ease;
  pointer-events: none;
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
}

.dial-freq-display.near-target {
  color: rgba(255, 248, 200, 0.95);
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
}

/* Flecha guía de deslizamiento debajo del dial */
.dial-drag-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  opacity: 0.45;
  animation: hintPulse 2.5s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.dial-drag-hint span {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(201, 168, 76, 0.7);
}

.dial-drag-hint .hint-arrow {
  font-size: 16px;
  color: rgba(201, 168, 76, 0.6);
  animation: arrowBounce 1.2s ease-in-out infinite alternate;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.65; }
}

@keyframes arrowBounce {
  from { transform: translateX(-3px); }
  to   { transform: translateX(3px); }
}

/* Confirmación snap 528 Hz */
.freq-snap-confirm {
  text-align: center;
  animation: snapConfirm 0.6s ease forwards;
}

.snap-value {
  font-family: var(--font-sans);
  font-size: clamp(13px, 4vw, 18px);
  font-weight: 700;
  letter-spacing: 5px;
  color: rgba(255, 248, 200, 0.95);
  text-shadow:
    0 0 20px rgba(201, 168, 76, 0.6),
    0 0 40px rgba(201, 168, 76, 0.3);
}

@keyframes snapConfirm {
  0%   { opacity: 0; transform: scale(0.9) translateY(6px); }
  60%  { opacity: 1; transform: scale(1.02) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   PANTALLA FINAL — /ser-de-luz
   ════════════════════════════════════════════════════════════ */
.final-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
}

.final-content {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.final-eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(9px, 2.2vw, 11px);
  letter-spacing: 5px;
  color: var(--gold);
  opacity: 0.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.final-headline {
  font-family: var(--font-sans);
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.3);
  animation: fadeInUp 0.9s ease 0.5s both;
}

.final-body {
  font-family: var(--font-base);
  font-size: clamp(12px, 3vw, 15px);
  font-style: italic;
  line-height: 1.8;
  color: var(--white-faint);
  letter-spacing: 0.5px;
  animation: fadeInUp 0.9s ease 0.8s both;
}

.btn-final {
  margin-top: 8px;
  animation: fadeInUp 0.9s ease 1.2s both;
  text-decoration: none;
  /* Sobreescribir opacity:0 del btn-enter base */
  opacity: 0;
}

/* ════════════════════════════════════════════════════════════
   DEBUG SIMULATION
   ════════════════════════════════════════════════════════════ */
#debug-simulation {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(201, 168, 76, 0.4);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.debug-scene-info span {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(201, 168, 76, 0.8);
  display: block;
}

/* Capa de simulación de escena */
.debug-scene-bg {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.debug-scene-bg span {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.1);
}

/* ════════════════════════════════════════════════════════════
   ANIMACIONES BASE
   ════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px) translateX(-50%);
  }
  to {
    opacity: 0.75;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes crackAppear {
  0%   { opacity: 0; height: 0; }
  100% { opacity: 1; height: 25%; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Escritorio: forzar formato 9:16 centrado
   ════════════════════════════════════════════════════════════ */
@media (min-aspect-ratio: 9/16) {
  /* En pantallas más anchas que 9:16, el stage se muestra centrado */
  #stage {
    /* El stage cubre toda la pantalla; las vistas quedan centradas */
    background: transparent;
  }

  /* El video-layer y las vistas se restringen a un contenedor 9:16 */
  #video-layer,
  .view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Calcular ancho en función de la altura disponible */
    height: 100dvh;
    width: calc(100dvh * 9 / 16);
    /* No superar el ancho del viewport */
    max-width: 100vw;
  }

  /* Si el ancho calculado supera el viewport, adaptar por ancho */
  @media (max-width: calc(100dvh * 9 / 16)) {
    #video-layer,
    .view {
      width: 100vw;
      height: calc(100vw * 16 / 9);
    }
  }
}

/* ── Móvil: usar 100% disponible ───────────────────────────── */
@media (max-aspect-ratio: 9/16) {
  #video-layer,
  .view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════
   HAPTICS — Efecto visual de respaldo
   Discreto, cinematográfico, nunca indica "vibración no compatible".
   ════════════════════════════════════════════════════════════ */

/* Keyframe: respiración muy ligera de la vignette */
@keyframes hapticBreath {
  0%   { opacity: 0;    transform: scale(1);    }
  40%  { opacity: 1;    transform: scale(1.004); }
  100% { opacity: 0;    transform: scale(1);    }
}

@keyframes hapticBreathDebug {
  0%   { opacity: 0;    transform: scale(1);    }
  35%  { opacity: 1;    transform: scale(1.008); }
  100% { opacity: 0;    transform: scale(1);    }
}

/* Capa de pulso háptico — pseudo-elemento sobre el stage */
#stage.haptic-pulse::after,
#stage.haptic-pulse-debug::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  border-radius: 0;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    transparent 55%,
    rgba(201, 168, 76, 0.06) 100%
  );
  animation: hapticBreath 180ms ease-out forwards;
}

#stage.haptic-pulse-debug::after {
  background: radial-gradient(
    ellipse 75% 75% at 50% 50%,
    transparent 45%,
    rgba(201, 168, 76, 0.12) 100%
  );
  animation: hapticBreathDebug 240ms ease-out forwards;
}

/* Sin efectos de movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  #stage.haptic-pulse::after,
  #stage.haptic-pulse-debug::after {
    animation: none;
    opacity: 0;
  }
}

/* ════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay:    0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  #ambient-light {
    animation: none;
  }

  .home-logo,
  .home-headline,
  .home-subtext,
  .btn-enter,
  .returning-user-wrap {
    opacity: 1;
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════
   UTILIDADES
   ════════════════════════════════════════════════════════════ */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
