:root {
  color-scheme: dark;
  --violet: #8c2bff;
  --violet-light: #c48aff;
  --cyan: #35eaff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #02030a;
  overflow: hidden;
}

body {
  font-family: Inter, Montserrat, Arial, sans-serif;
}

button {
  font-family: inherit;
}

.welcome {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #02030a;
}

.background-video {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-mobile {
  display: none;
}

.scene-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(1, 3, 14, 0.10) 0%,
      rgba(2, 3, 14, 0.12) 45%,
      rgba(2, 2, 10, 0.56) 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 25%,
      rgba(0, 0, 8, 0.26) 100%
    );
  pointer-events: none;
}

.welcome-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 1120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3vh 0 5vh;
  animation: appear 1.1s ease-out both;
}

.brand-logo {
  display: block;
  width: min(100%, 1050px);
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(20, 101, 255, 0.22));
}

.tagline {
  margin: clamp(12px, 2.1vh, 25px) 0 0;
  color: #f4f7ff;
  font-size: clamp(10px, 1.2vw, 16px);
  font-weight: 500;
  letter-spacing: clamp(3px, 0.72vw, 8px);
  line-height: 1.7;
  text-shadow: 0 0 12px rgba(45, 205, 255, 0.6);
}

.tagline span {
  color: var(--cyan);
  padding: 0 0.35em;
}

/* Botón para activar la experiencia sonora */
.sound-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  margin-top: clamp(18px, 3vh, 28px);
  padding: 9px 17px;
  border: 1px solid rgba(91, 225, 255, 0.48);
  border-radius: 30px;
  color: rgba(239, 249, 255, 0.95);
  background: rgba(5, 10, 30, 0.58);
  box-shadow:
    0 0 12px rgba(53, 234, 255, 0.12),
    inset 0 0 12px rgba(53, 234, 255, 0.04);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.sound-icon {
  color: var(--cyan);
  font-size: 16px;
  line-height: 1;
}

.sound-button:hover,
.sound-button:focus-visible {
  background: rgba(25, 29, 72, 0.85);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(53, 234, 255, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.sound-button:focus-visible,
.explore-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.sound-button:disabled {
  cursor: default;
  opacity: 0.8;
}

/* Botón principal EXPLORAR */
.explore-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-width: 220px;
  margin-top: clamp(22px, 3.5vh, 38px);
  padding: 17px 31px;
  border: 1px solid rgba(218, 181, 255, 0.95);
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(
    115deg,
    rgba(94, 21, 184, 0.95),
    rgba(137, 39, 255, 0.94) 52%,
    rgba(83, 30, 177, 0.97)
  );
  box-shadow:
    0 0 10px rgba(147, 58, 255, 0.95),
    0 0 27px rgba(123, 35, 255, 0.62),
    inset 0 0 14px rgba(235, 214, 255, 0.19);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4px;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
  animation: buttonPulse 3.2s ease-in-out infinite;
}

.explore-button i {
  font-size: 19px;
  font-style: normal;
  letter-spacing: 0;
  color: #f4e7ff;
}

.explore-button:hover {
  transform: translateY(-2px) scale(1.035);
  filter: brightness(1.18);
  box-shadow:
    0 0 14px #b16bff,
    0 0 38px rgba(151, 61, 255, 0.9),
    inset 0 0 18px rgba(255, 255, 255, 0.25);
}

.explore-button:active {
  transform: scale(0.98);
}

.explore-button:disabled {
  cursor: wait;
  opacity: 0.9;
}

/* Texto inferior */
.bottom-caption {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: max(22px, env(safe-area-inset-bottom));
  text-align: center;
  color: rgba(238, 242, 255, 0.78);
  font-size: 9px;
  letter-spacing: clamp(2px, 0.55vw, 5px);
  text-shadow: 0 0 10px rgba(49, 170, 255, 0.7);
  pointer-events: none;
}

.bottom-caption span {
  color: var(--violet-light);
  margin: 0 0.7em;
}

/* Transición de entrada al universo */
.transition-flare {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at center,
    rgba(171, 89, 255, 0.96) 0%,
    rgba(60, 42, 255, 0.56) 13%,
    rgba(4, 8, 35, 0.92) 57%,
    #02030a 100%
  );
  transform: scale(0.02);
}

.welcome.is-entering .welcome-content {
  animation: enterZoom 1.25s cubic-bezier(0.65, 0, 0.25, 1) forwards;
}

.welcome.is-entering .background-video {
  animation: backgroundZoom 1.25s cubic-bezier(0.65, 0, 0.25, 1) forwards;
}

.welcome.is-entering .transition-flare {
  animation: portal 1.25s ease-in forwards;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(147, 58, 255, 0.82),
      0 0 24px rgba(123, 35, 255, 0.48),
      inset 0 0 14px rgba(235, 214, 255, 0.16);
  }
  50% {
    box-shadow:
      0 0 15px rgba(190, 125, 255, 1),
      0 0 34px rgba(123, 35, 255, 0.78),
      inset 0 0 17px rgba(255, 255, 255, 0.23);
  }
}

@keyframes enterZoom {
  to {
    opacity: 0;
    transform: scale(1.22);
    filter: blur(7px);
  }
}

@keyframes backgroundZoom {
  to {
    transform: scale(1.16);
    filter: brightness(1.5);
  }
}

@keyframes portal {
  0% {
    opacity: 0;
    transform: scale(0.02);
  }
  60% {
    opacity: 0.92;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.8);
  }
}

/* Adaptación para móviles */
@media (max-width: 700px) {
  .video-desktop {
    display: none;
  }

  .video-mobile {
    display: block;
  }

  .background-video {
    object-position: center center;
  }

  .scene-shade {
    background:
      linear-gradient(
        180deg,
        rgba(1, 3, 14, 0.08),
        rgba(2, 3, 14, 0.12) 42%,
        rgba(2, 2, 10, 0.56)
      ),
      radial-gradient(
        ellipse at center,
        transparent 15%,
        rgba(0, 0, 8, 0.25) 100%
      );
  }

  .welcome-content {
    width: 94vw;
    padding: 0 0 4vh;
    transform: translateY(-1.5vh);
  }

  .brand-logo {
    width: 100%;
    max-height: 43vh;
  }

  .tagline {
    max-width: 90vw;
    margin-top: 2vh;
    font-size: clamp(8px, 2.25vw, 11px);
    letter-spacing: clamp(1.6px, 0.55vw, 3px);
  }

  .sound-button {
    max-width: 90vw;
    margin-top: 2.5vh;
    padding: 9px 13px;
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .explore-button {
    min-width: 190px;
    margin-top: 3vh;
    padding: 15px 27px;
    gap: 15px;
    font-size: 12px;
    letter-spacing: 3.5px;
  }

  .bottom-caption {
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 8px;
    letter-spacing: 2px;
  }
}

/* Accesibilidad: reducir animaciones si el visitante lo solicita */
@media (prefers-reduced-motion: reduce) {
  .welcome-content,
  .explore-button {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}