/* ============================================================
   SCOUTING · Página de scouting y ojeamiento
   Prefijos: scout-*
   Reutiliza los tokens "ink" de styles.css y la estructura de entrenamientos.css
   ============================================================ */

/* --- Fondo con brillo azul que acompaña la página --- */

#scouting {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#scouting::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 30rem at 85% 8%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(36rem 28rem at 5% 55%, rgba(59, 130, 246, 0.1), transparent 70%);
  pointer-events: none;
}

/* --- Etiqueta pequeña sobre los títulos --- */

.scout-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-accent);
}

.scout-eyebrow::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: currentColor;
}

/* --- Lista de atributos: entra uno por uno --- */

.sedes-row.is-inview .sede {
  animation: scout-slide-in 0.6s var(--ease-out) both;
}

.sedes-row.is-inview .sede:nth-child(1) { animation-delay: 0.15s; }
.sedes-row.is-inview .sede:nth-child(2) { animation-delay: 0.25s; }
.sedes-row.is-inview .sede:nth-child(3) { animation-delay: 0.35s; }
.sedes-row.is-inview .sede:nth-child(4) { animation-delay: 0.45s; }
.sedes-row.is-inview .sede:nth-child(5) { animation-delay: 0.55s; }
.sedes-row.is-inview .sede:nth-child(6) { animation-delay: 0.65s; }
.sedes-row.is-inview .sede:nth-child(7) { animation-delay: 0.75s; }
.sedes-row.is-inview .sede:nth-child(8) { animation-delay: 0.85s; }

.sede {
  transition: padding-left 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.sede:hover {
  padding-left: 0.5rem;
  color: var(--ink-accent);
}

@keyframes scout-slide-in {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Visor: video panorámico con estética de cámara de scouting --- */

.scout-lens {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #0b1220;
  border: 1px solid var(--ink-line);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(59, 130, 246, 0.08),
    0 0 60px -10px var(--color-accent-glow);
}

/* El video no se puede pausar ni activar el sonido: no recibe clics */
.scout-lens video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.08);
  transition: transform 1.6s var(--ease-out);
}

.scout-lens.is-inview video {
  transform: scale(1);
}

/* Degradado inferior para el texto */
.scout-lens::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(4, 12, 23, 0.85) 0%, rgba(4, 12, 23, 0) 45%),
    linear-gradient(to bottom, rgba(4, 12, 23, 0.55) 0%, rgba(4, 12, 23, 0) 25%);
  pointer-events: none;
}

/* Esquinas del visor */
.scout-lens__corner {
  position: absolute;
  z-index: 2;
  width: clamp(1.5rem, 4vw, 2.75rem);
  height: clamp(1.5rem, 4vw, 2.75rem);
  border: 2px solid rgba(242, 244, 239, 0.85);
  pointer-events: none;
  transition: transform 0.9s var(--ease-out) 0.3s;
}

.scout-lens__corner--tl { top: 1rem; left: 1rem; border-right: 0; border-bottom: 0; transform: translate(-8px, -8px); }
.scout-lens__corner--tr { top: 1rem; right: 1rem; border-left: 0; border-bottom: 0; transform: translate(8px, -8px); }
.scout-lens__corner--bl { bottom: 1rem; left: 1rem; border-right: 0; border-top: 0; transform: translate(-8px, 8px); }
.scout-lens__corner--br { bottom: 1rem; right: 1rem; border-left: 0; border-top: 0; transform: translate(8px, 8px); }

.scout-lens.is-inview .scout-lens__corner {
  transform: translate(0, 0);
}

/* Retícula central */
.scout-lens__reticle {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(3rem, 8vw, 5rem);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 244, 239, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: scout-reticle 3.2s ease-in-out infinite;
}

.scout-lens__reticle::before,
.scout-lens__reticle::after {
  content: '';
  position: absolute;
  background: rgba(242, 244, 239, 0.45);
}

.scout-lens__reticle::before {
  top: 50%;
  left: -35%;
  right: -35%;
  height: 1px;
}

.scout-lens__reticle::after {
  left: 50%;
  top: -35%;
  bottom: -35%;
  width: 1px;
}

@keyframes scout-reticle {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

/* Línea de barrido */
.scout-lens__scan {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.14), transparent);
  pointer-events: none;
  animation: scout-scan 5s linear infinite;
}

@keyframes scout-scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(400%); }
}

/* Indicador REC */
.scout-lens__rec {
  position: absolute;
  z-index: 3;
  top: clamp(1.4rem, 3vw, 2rem);
  left: clamp(2.6rem, 6vw, 4.25rem);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  letter-spacing: 0.28em;
  color: var(--ink-text);
}

.scout-lens__rec::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
  animation: scout-blink 1.2s steps(2, start) infinite;
}

@keyframes scout-blink {
  to { visibility: hidden; }
}

.scout-lens__tag {
  position: absolute;
  z-index: 3;
  top: clamp(1.4rem, 3vw, 2rem);
  right: clamp(2.6rem, 6vw, 4.25rem);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  letter-spacing: 0.28em;
  color: rgba(242, 244, 239, 0.8);
}

/* Texto inferior */
.scout-lens__caption {
  position: absolute;
  z-index: 3;
  left: clamp(1.25rem, 5vw, 3rem);
  right: clamp(1.25rem, 5vw, 3rem);
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  margin: 0;
  pointer-events: none;
}

.scout-lens__title {
  display: block;
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--ink-text);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.scout-lens__sub {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  color: var(--color-cream-soft);
}

@media (max-width: 560px) {
  .scout-lens {
    aspect-ratio: 4 / 5;
  }

  .scout-lens__reticle {
    display: none;
  }
}

/* --- Videos y fotos: entran escalonados --- */

#scouting .videos-grid .video-card:nth-child(2) {
  transition-delay: 0.15s;
}

/* --- Pasos: línea que los une y entrada escalonada --- */

.scout-steps {
  position: relative;
}

.scout-steps::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--ink-accent), rgba(59, 130, 246, 0.15));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out);
}

.scout-steps.is-inview::before {
  transform: scaleX(1);
}

.scout-steps .tema {
  overflow: hidden;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform 0.32s var(--ease-out),
    border-color 0.32s var(--ease-out),
    box-shadow 0.32s var(--ease-out);
}

.scout-steps .tema:nth-child(2) { transition-delay: 0.12s; }
.scout-steps .tema:nth-child(3) { transition-delay: 0.24s; }

/* Número grande de fondo */
.scout-steps .tema::after {
  content: attr(data-num);
  position: absolute;
  right: -0.25rem;
  bottom: -1.5rem;
  font-family: var(--font-hero);
  font-size: clamp(6rem, 10vw, 8rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(59, 130, 246, 0.22);
  pointer-events: none;
  transition: transform 0.5s var(--ease-out), -webkit-text-stroke-color 0.5s var(--ease-out);
}

.scout-steps .tema:hover::after {
  transform: translate(-6px, -6px);
  -webkit-text-stroke-color: rgba(59, 130, 246, 0.5);
}

.scout-steps .tema:hover {
  box-shadow: 0 18px 40px -20px var(--color-accent-glow);
}

.scout-steps .tema__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: var(--ink-accent);
  transition: transform 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
}

.scout-steps .tema:hover .tema__icon {
  transform: scale(1.1) rotate(-8deg);
  background: rgba(59, 130, 246, 0.22);
}

/* --- Llamado final --- */

.scout-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(59, 130, 246, 0.22), transparent 70%),
    #1a212b;
}

.scout-cta__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
  color: var(--ink-text);
  margin: 0 0 1rem;
}

.scout-cta__text {
  max-width: 44ch;
  margin: 0 auto var(--space-7);
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) {
  .scout-lens video,
  .scout-lens__corner {
    transform: none;
    transition: none;
  }

  .scout-lens__scan,
  .scout-lens__reticle {
    animation: none;
  }

  .scout-steps::before {
    transform: none;
  }
}
