/* =============================================
   ONE Human-Tech | Test de Eneagrama
   Paleta oficial del evento
   ============================================= */

:root {
  --c1: #FEFEFE;
  --c2: #F23A7A;
  --c3: #FBBE00;
  --c4: #E78522;
  --c5: #2AB0C9;
  --c6: #414D71;

  --font-main: 'Nunito', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 40px rgba(65, 77, 113, 0.18);
  --shadow-card: 0 20px 60px rgba(65, 77, 113, 0.22);
}

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

body {
  font-family: var(--font-main);
  background: #f0f2f9;
  color: var(--c6);
  overflow-x: hidden;
}

/* ===== SECTIONS ===== */
.section {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.section.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
}

/* =============================================
   FONDO MEJORADO — MESH GRADIENT ANIMADO
   ============================================= */

/* Capa base: gradiente de malla suave */
.section::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(242, 58, 122, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 85% 80%, rgba(42, 176, 201, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(251, 190, 0, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 70% 40% at 90% 10%, rgba(231, 133, 34, 0.1) 0%, transparent 50%),
    linear-gradient(150deg, #f0f2f9 0%, #e8ecf8 40%, #eef0fa 100%);
  pointer-events: none;
}

/* Textura grain sutil */
.section::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.028;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ===== BACKGROUND BLOBS — más suaves y animados ===== */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  animation: blobPulse 12s ease-in-out infinite;
}

.blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--c2), transparent 70%);
  top: -140px; right: -120px;
  animation-delay: 0s;
  animation-duration: 14s;
  opacity: 0.18;
}

.blob-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--c3), transparent 70%);
  bottom: -100px; left: -80px;
  animation-delay: -4s;
  animation-duration: 16s;
  opacity: 0.15;
}

.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--c5), transparent 70%);
  top: 35%; left: 5%;
  animation-delay: -8s;
  animation-duration: 18s;
  opacity: 0.12;
}

.blob-4 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--c4), transparent 70%);
  top: -100px; left: -80px;
  animation-delay: -2s;
  animation-duration: 15s;
  opacity: 0.14;
}

.blob-5 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, var(--c5), transparent 70%);
  bottom: -80px; right: -60px;
  animation-delay: -6s;
  animation-duration: 17s;
  opacity: 0.13;
}

/* Blob extra flotante en el centro */
.blob::after {
  content: '';
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: inherit;
  filter: blur(40px);
  opacity: 0.4;
  animation: blobPulse 8s ease-in-out infinite reverse;
}

@keyframes blobPulse {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.06);
  }
  50% {
    transform: translate(-15px, 20px) scale(0.94);
  }
  75% {
    transform: translate(25px, 15px) scale(1.04);
  }
}

/* ===== LANDING ===== */
.logo-container {
  animation: floatAnim 3s ease-in-out infinite;
}

.logo-main {
  width: clamp(180px, 40vw, 280px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(242, 58, 122, 0.25));
}

.icon-ring {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--c3), 0 8px 32px rgba(242, 58, 122, 0.2);
  animation: spinSlow 12s linear infinite;
}

.icon-deco {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.hero-title {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15;
  color: var(--c6);
  letter-spacing: -1px;
}

.highlight-text {
  background: linear-gradient(90deg, var(--c2), var(--c4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c6);
  opacity: 0.85;
}

.hero-desc {
  font-size: 1rem;
  color: var(--c6);
  opacity: 0.65;
  line-height: 1.6;
}

/* ===== BOTÓN PRIMARIO ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--c2), var(--c4));
  color: white;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 16px 44px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(242, 58, 122, 0.38);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px rgba(242, 58, 122, 0.45);
}

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

.pulse-btn {
  animation: pulseBtn 2.4s ease-in-out infinite;
}

.btn-secondary {
  background: white;
  color: var(--c6);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border: 2.5px solid var(--c5);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--c5);
  color: white;
  transform: translateY(-2px);
}

/* ===== TAGS ===== */
.tag {
  background: white;
  color: var(--c6);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  border: 2px solid rgba(65, 77, 113, 0.12);
  box-shadow: 0 2px 8px rgba(65,77,113,0.08);
}

.logo-bottom {
  height: 28px;
  object-fit: contain;
}

/* ===== TEST CARD ===== */
.test-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.6) inset;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.test-logo { height: 32px; object-fit: contain; }

.progress-info {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c2);
  background: rgba(242, 58, 122, 0.08);
  padding: 4px 14px;
  border-radius: 50px;
}

.progress-bar-bg {
  background: rgba(65,77,113,0.1);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c2), var(--c3));
  border-radius: 50px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c5);
}

.question-text {
  font-weight: 800;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  line-height: 1.4;
  color: var(--c6);
}

/* ===== OPCIONES ===== */
.option-btn {
  background: rgba(247, 248, 252, 0.8);
  border: 2.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c6);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--c5);
  background: rgba(42, 176, 201, 0.07);
  transform: translateX(4px);
}

.option-btn.selected {
  border-color: var(--c2);
  background: rgba(242, 58, 122, 0.07);
  color: var(--c2);
  font-weight: 700;
}

.option-btn.selected .opt-letter {
  background: var(--c2);
  color: white;
}

.opt-letter {
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(65,77,113,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

/* ===== NAV BOTONES ===== */
.btn-nav {
  background: transparent;
  border: 2px solid rgba(65,77,113,0.15);
  border-radius: 50px;
  padding: 10px 22px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c6);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-nav:hover:not(:disabled) {
  border-color: var(--c6);
  background: var(--c6);
  color: white;
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-nav-next:not(:disabled) {
  border-color: var(--c2);
  color: var(--c2);
}

.btn-nav-next:hover:not(:disabled) {
  background: var(--c2);
  color: white;
}

/* ===== DOTS NAV ===== */
.dots-nav {
  display: flex;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(65,77,113,0.15);
  transition: all 0.3s;
}

.dot.active {
  background: var(--c2);
  transform: scale(1.3);
}

.dot.done {
  background: var(--c3);
}

/* ===== RESULTADO ===== */
.result-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 48px 36px 40px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.6) inset;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.confetti-row {
  font-size: 2rem;
  letter-spacing: 8px;
  animation: bounceIn 0.6s ease;
}

.result-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(242, 58, 122, 0.3));
  animation: floatAnim 3s ease-in-out infinite;
}

.result-pre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c5);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
}

.result-eneatipo {
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  background: linear-gradient(135deg, var(--c2), var(--c4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.result-name {
  font-weight: 800;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--c6);
}

.result-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c6);
  opacity: 0.75;
  max-width: 480px;
  margin: 0 auto;
}

/* =============================================
   VIDEO — MEJORADO
   ============================================= */

/* Contenedor exterior con glow animado */
.video-wrapper {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

/* Anillo de glow detrás del video */
.video-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, var(--c2), var(--c3), var(--c5), var(--c4));
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  z-index: 0;
  opacity: 0.85;
  filter: blur(1px);
}

/* Sombra difusa de color */
.video-wrapper::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: calc(var(--radius) + 14px);
  background: linear-gradient(135deg, var(--c2), var(--c3), var(--c5));
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  z-index: -1;
  opacity: 0.3;
  filter: blur(22px);
}

/* Caja interna del video */
.video-inner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c6);
  aspect-ratio: 16/9;
  z-index: 1;
  box-shadow: 0 16px 48px rgba(65,77,113,0.35);
}

.result-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Overlay mejorado */
.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    160deg,
    rgba(65, 77, 113, 0.72) 0%,
    rgba(242, 58, 122, 0.35) 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.3s ease;
  border-radius: var(--radius);
}

.video-overlay:hover {
  background: linear-gradient(
    160deg,
    rgba(65, 77, 113, 0.55) 0%,
    rgba(242, 58, 122, 0.25) 100%
  );
}

.video-overlay.hidden { display: none; }

/* Botón play con anillo pulsante */
.play-btn-big {
  position: relative;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--c2), var(--c4));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow:
    0 0 0 0 rgba(242, 58, 122, 0.5),
    0 10px 32px rgba(242, 58, 122, 0.55);
  margin-bottom: 16px;
  transition: transform 0.2s;
  animation: playPulse 2.2s ease-in-out infinite;
}

.video-overlay:hover .play-btn-big {
  transform: scale(1.12);
  animation: none;
  box-shadow: 0 14px 40px rgba(242, 58, 122, 0.7);
}

/* Etiqueta debajo del play */
.play-hint {
  color: white;
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-main);
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.12);
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}

/* Líneas decorativas en esquinas del video */
.video-inner::before {
  content: '';
  position: absolute;
  top: 10px; left: 10px;
  width: 24px; height: 24px;
  border-top: 2.5px solid rgba(255,255,255,0.5);
  border-left: 2.5px solid rgba(255,255,255,0.5);
  border-radius: 3px 0 0 0;
  z-index: 2;
  pointer-events: none;
}

.video-inner::after {
  content: '';
  position: absolute;
  bottom: 10px; right: 10px;
  width: 24px; height: 24px;
  border-bottom: 2.5px solid rgba(255,255,255,0.5);
  border-right: 2.5px solid rgba(255,255,255,0.5);
  border-radius: 0 0 3px 0;
  z-index: 2;
  pointer-events: none;
}

/* ===== ANIMACIONES ===== */
@keyframes floatAnim {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 8px 28px rgba(242, 58, 122, 0.38); }
  50% { box-shadow: 0 8px 42px rgba(242, 58, 122, 0.6), 0 0 0 8px rgba(242, 58, 122, 0.1); }
}

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes playPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(242, 58, 122, 0.5), 0 10px 32px rgba(242, 58, 122, 0.55);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(242, 58, 122, 0), 0 10px 32px rgba(242, 58, 122, 0.55);
  }
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .test-card { padding: 24px 18px 24px; }
  .result-card { padding: 32px 20px 28px; }
  .btn-primary { font-size: 1rem; padding: 14px 32px; }
  .option-btn { font-size: 0.93rem; padding: 13px 14px; }
  .play-btn-big { width: 64px; height: 64px; font-size: 1.6rem; }
}