/* ==========================================================================
   DISEÑO CUÁNTICO BASA — HOJA DE ESTILOS PRINCIPAL (VERSIÓN SIN SCROLL)
   ========================================================================== */

:root {
  /* Paleta BASA — derivada del logo */
  --color-bg: #000308;
  --color-primary: #4fc3f7;      /* azul claro del logo */
  --color-secondary: #7c4dff;    /* violeta del núcleo */
  --color-accent: #b388ff;       /* violeta claro */
  --color-white: #e8f4fd;
  --color-white-dim: rgba(232, 244, 253, 0.6);

  /* Tipografía */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transiciones */
  --transition-fade: 600ms ease;
  --transition-slow: 1200ms ease;
}

/* ==========================================================================
   ESTILOS GENERALES Y LAYOUT BASE
   ========================================================================== */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-body);
}

#video-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7; /* El video no debe aplastar los elementos encima */
  transition: opacity 400ms ease;
}

#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fade);
}

#transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#transition-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.level {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fade);
}

.level.active {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   NIVEL 0: HOME
   ========================================================================== */

#logo-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

#logo-basa {
  width: clamp(200px, 30vw, 400px);
  filter: drop-shadow(0 0 30px rgba(79, 195, 247, 0.6));
  animation: float 4s ease-in-out infinite;
  transition: transform 0.3s ease, filter 0.3s ease;
}

#logo-container:hover #logo-basa {
  transform: scale(1.05);
  filter: drop-shadow(0 0 50px rgba(79, 195, 247, 0.9));
}

#logo-pulse-ring {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  border: 1px solid rgba(79, 195, 247, 0.3);
  pointer-events: none;
  animation: pulse-ring 3s ease-out infinite;
}

#logo-hint {
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.3em;
  color: var(--color-white-dim);
  animation: blink 2.5s ease-in-out infinite;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   NIVEL 1: HUB DE PRODUCTOS
   ========================================================================== */

#hub-container {
  position: relative;
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
}

.product-node {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Posicionamiento orbital trigonométrico ampliado */
  transform: translate(-50%, -50%)
             translate(
               calc(cos(var(--angle)) * 260px),
               calc(sin(var(--angle)) * 260px)
             );
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: none;
  border: none;
  color: inherit;
  outline: none;
}

.product-node:hover {
  transform: translate(-50%, -50%)
             translate(
               calc(cos(var(--angle)) * 260px),
               calc(sin(var(--angle)) * 260px)
             )
             scale(1.15);
}

.node-orbit {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(79, 195, 247, 0.4);
  animation: spin 8s linear infinite;
  pointer-events: none;
}

.node-icon-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.7));
}

.node-label {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.15em;
  color: var(--color-white);
  text-transform: uppercase;
  background: rgba(0, 3, 8, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(79, 195, 247, 0.25);
  padding: 6px 16px;
  border-radius: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* ==========================================================================
   NIVEL 2: DETALLE DE PRODUCTO
   ========================================================================== */

#product-content {
  max-width: min(680px, 90vw);
  text-align: center;
  animation: fadeUp 0.8s ease forwards;
  background: rgba(0, 3, 8, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(79, 195, 247, 0.18);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
              0 0 50px rgba(79, 195, 247, 0.05);
}

#product-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 18px;
}

#product-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(79, 195, 247, 0.4);
}

#product-description {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 300;
  color: #f1f8fe;
  line-height: 1.8;
  margin-bottom: 40px;
}

.btn-cta {
  display: inline-block;
  padding: 14px 40px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-primary);
  border: none;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

.btn-cta:hover {
  background: var(--color-accent);
  box-shadow: 0 0 30px rgba(124, 77, 255, 0.6);
}

.btn-back {
  position: absolute;
  top: 40px;
  left: 40px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-white);
  background: rgba(0, 3, 8, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(79, 195, 247, 0.3);
  padding: 10px 28px;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 20;
}

.btn-back:hover {
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.4);
  background: rgba(79, 195, 247, 0.15);
}

/* ==========================================================================
   KEYFRAMES / ANIMACIONES
   ========================================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* prefers-reduced-motion: desactivar animaciones float y pulse */
@media (prefers-reduced-motion: reduce) {
  #logo-basa,
  #logo-pulse-ring,
  #logo-hint,
  .node-orbit,
  #product-content {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   DISEÑO RESPONSIVE (MÓVIL)
   ========================================================================== */

@media (max-width: 768px) {
  .product-node {
    /* Mover órbita móvil a 160px debido a nodos más grandes */
    transform: translate(-50%, -50%)
               translate(
                 calc(cos(var(--angle)) * 160px),
                 calc(sin(var(--angle)) * 160px)
               );
  }
  
  .product-node:hover {
    transform: translate(-50%, -50%)
               translate(
                 calc(cos(var(--angle)) * 160px),
                 calc(sin(var(--angle)) * 160px)
               )
               scale(1.08);
  }

  .node-orbit {
    width: 90px;
    height: 90px;
  }

  .node-icon-img {
    width: 60px;
    height: 60px;
  }

  .node-label {
    font-size: 10px;
    padding: 4px 10px;
    margin-top: 10px;
  }
  
  #logo-basa {
    width: 60vw;
  }
  
  #product-content {
    padding: 32px 20px;
  }
}

/* ==========================================================================
   TRANSICIÓN VERTICAL DE DESLIZAMIENTO (HOME <-> CLIENTES <-> SIM PROMO)
   ========================================================================== */

.level {
  transition: opacity var(--transition-fade), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

#level-clients {
  transform: translateY(100%);
  opacity: 0;
}
#level-clients.active {
  opacity: 1;
}

#level-sim-promo {
  transform: translateY(200%);
  opacity: 0;
}
#level-sim-promo.active {
  opacity: 1;
}

/* El Home se desplaza hacia arriba y Clientes sube a su lugar */
.level-clients-active #level-home {
  transform: translateY(-100%);
}
.level-clients-active #level-clients {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.level-clients-active #level-sim-promo {
  transform: translateY(100%);
}

/* Clientes se desplaza hacia arriba y el Simulador Promo sube a su lugar */
.level-sim-promo-active #level-home {
  transform: translateY(-200%);
}
.level-sim-promo-active #level-clients {
  transform: translateY(-100%);
}
.level-sim-promo-active #level-sim-promo {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   ESTILOS SECCIÓN PROMO SIMULADOR
   ========================================================================== */

#sim-promo-container {
  max-width: min(1100px, 90vw);
  background: rgba(0, 3, 8, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(79, 195, 247, 0.18);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
              0 0 50px rgba(79, 195, 247, 0.05);
  animation: fadeUp 0.8s ease forwards;
}

.sim-promo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.sim-promo-content {
  text-align: left;
}

.sim-promo-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: 4px;
  padding: 4px 12px;
  background: rgba(79, 195, 247, 0.08);
  margin-bottom: 20px;
}

.sim-promo-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(79, 195, 247, 0.3);
}

.sim-promo-description {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 300;
  color: #f1f8fe;
  line-height: 1.7;
  margin-bottom: 30px;
}

.btn-cta-sim {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(79, 195, 247, 0.25);
}

.btn-cta-sim:hover {
  background: var(--color-accent);
  box-shadow: 0 0 25px rgba(124, 77, 255, 0.5);
  transform: translateY(-2px);
}

.sim-promo-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sim-mockup-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(79, 195, 247, 0.25);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.sim-mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.sim-mockup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 8, 0.65);
  backdrop-filter: blur(1px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.4s ease;
}

.play-icon {
  font-size: 40px;
  color: var(--color-primary);
  text-shadow: 0 0 20px rgba(79, 195, 247, 0.8);
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.play-text {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white);
  font-weight: 500;
}

.sim-mockup-wrapper:hover {
  border-color: var(--color-primary);
  transform: scale(1.03);
  box-shadow: 0 20px 40px rgba(79, 195, 247, 0.15);
}

.sim-mockup-wrapper:hover .sim-mockup-img {
  transform: scale(1.05);
}

.sim-mockup-wrapper:hover .sim-mockup-overlay {
  background: rgba(0, 3, 8, 0.4);
  opacity: 1;
}

.sim-mockup-wrapper:hover .play-icon {
  transform: scale(1.15);
  color: var(--color-accent);
}

/* Ajustes responsivos */
@media (max-width: 992px) {
  .sim-promo-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .sim-promo-content {
    text-align: center;
  }
  #sim-promo-container {
    padding: 32px 24px;
  }
  .sim-mockup-wrapper {
    max-width: 320px;
  }
}

/* ==========================================================================
   ESTILOS DE BOTONES DE SCROLL Y SECCIÓN CLIENTES
   ========================================================================== */

.btn-scroll-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: var(--color-white-dim);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
  z-index: 20;
}

.btn-scroll-arrow.down {
  bottom: 25px;
  animation: bounce-down 2s infinite;
}

.btn-scroll-arrow.up {
  top: 25px;
  animation: bounce-up 2s infinite;
}

.btn-scroll-arrow:hover {
  color: var(--color-primary);
}

.btn-scroll-arrow .arrow-icon {
  font-size: 18px;
  margin-top: 4px;
}

.btn-scroll-arrow.up .arrow-icon {
  margin-top: 0;
  margin-bottom: 4px;
}

@keyframes bounce-down {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

@keyframes bounce-up {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

/* Contenedor del panel de Clientes */
#clients-container {
  max-width: min(850px, 90vw);
  text-align: center;
  animation: fadeUp 0.8s ease forwards;
  background: rgba(0, 3, 8, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(79, 195, 247, 0.18);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
              0 0 50px rgba(79, 195, 247, 0.05);
}

.clients-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 32px;
  text-shadow: 0 0 30px rgba(79, 195, 247, 0.3);
}

.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.client-card {
  background: rgba(0, 3, 8, 0.35);
  border: 1px solid rgba(79, 195, 247, 0.15);
  border-radius: 8px;
  width: 200px;
  height: 110px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.client-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(79, 195, 247, 0.15);
}

.client-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.9) opacity(0.5);
  transition: all 0.4s ease;
}

.client-card:hover .client-logo {
  filter: grayscale(0%) brightness(1) opacity(1) drop-shadow(0 0 8px rgba(79, 195, 247, 0.3));
}

/* Ajustes responsivos para Clientes */
@media (max-width: 768px) {
  .clients-grid {
    gap: 16px;
  }
  .client-card {
    width: 140px;
    height: 85px;
    padding: 12px;
  }
  #clients-container {
    padding: 32px 20px;
  }
  .btn-scroll-arrow.down {
    bottom: 15px;
  }
  .btn-scroll-arrow.up {
    top: 15px;
  }
}

