@import url(../css/fonts.css);

:root {
  --kia-navy: #0b1830;
  --kia-navy-deep: #071022;
  --kia-black: #0a0a0a;
  --kia-white: #ffffff;
  --kia-ink: #12141a;
  --kia-muted: #5b6472;
  --kia-line: rgba(255, 255, 255, 0.14);
  --container: 1180px;
  --font-display: 'KiaB', sans-serif;
  --font-body: 'KiaL', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

.kia-lol-landing {
  /* Antes usábamos un hack de width:100vw + márgenes negativos para
     "sangrar" hasta los bordes del viewport sin tocar el <body> del
     país (por si este bloque se pegaba directo dentro de su HTML).
     Ahora que se incrusta como <iframe> real, este documento tiene su
     propio <html>/<body>: basta con width:100% y sin tocar vw/vh, que
     dentro de un iframe pueden medir contra el ancho/alto equivocado
     (viewport del navegador, no el tamaño real del iframe) y causar
     recortes o zoom inesperado. */
  width: 100%;
  font-family: var(--font-body);
  color: var(--kia-ink);
  background: var(--kia-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.kia-lol-landing img { max-width: 100%; display: block; }

.kia-lol-landing .container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.kia-lol-landing h1,
.kia-lol-landing h2,
.kia-lol-landing h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  margin-bottom: 16px;
}

.kia-lol-landing p { margin: 0; }

/* ---------- Hero (2 slides con transición) ---------- */
.kll-hero {
  position: relative;
  min-height: 860px;
  background: var(--kia-navy-deep);
  overflow: hidden;
}

.kll-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  /* Reserva 116px arriba para el menú del país (que se superpone sobre
     el hero). El fondo (.kll-hero__media, position:absolute inset:0)
     sigue llegando hasta el borde superior real de cada slide: solo el
     contenido centrado se corre hacia abajo, porque el padding-top aquí
     reduce el área de centrado del flex, no el tamaño de la imagen. */
  padding-top: 116px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.1s ease;
}

.kll-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.kll-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kll-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 62%, rgba(4, 8, 18, 0.7) 0%, rgba(4, 8, 18, 0) 70%),
    linear-gradient(180deg, rgba(6, 12, 26, 0.45) 0%, rgba(6, 12, 26, 0.25) 40%, rgba(6, 12, 26, 0.8) 100%);
}

.kll-hero__scrim--dark {
  background:
    radial-gradient(ellipse 60% 55% at 50% 55%, rgba(2, 4, 10, 0.22) 0%, rgba(2, 4, 10, 0) 70%),
    linear-gradient(180deg, rgba(2, 4, 10, 0.12) 0%, rgba(2, 4, 10, 0.05) 40%, rgba(2, 4, 10, 0.32) 100%);
}

.kll-hero__slide[data-hero-slide="2"] {
  /* Alinea el contenido hacia abajo (no centrado verticalmente) para
     que el título/texto no queden montados sobre los autos del fondo. */
  align-items: flex-end;
  padding-top: 116px;
}

.kll-hero__slide[data-hero-slide="2"] .kll-hero__content {
  padding-bottom: 88px;
}

.kll-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 96px 0 72px;
  text-align: center;
}

.kll-hero__title {
  color: var(--kia-white);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  /* max-width: 620px; */
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.kll-hero__content .kll-hero__subtitle {
  display: block;
  width: 100%;
  color: var(--kia-white);
  opacity: 0.85;
  font-size: 1.05rem;
  text-align: center;
  max-width: 620px;
  margin: 20px auto 48px;
}

.kll-hero__slide[data-hero-slide="2"] .kll-btn {
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .kll-hero__slide {
    transition: none;
  }
}

/* ---------- Sponsor ---------- */
.kll-sponsor {
  background: var(--kia-white);
  padding: 96px 0;
  text-align: center;
}

.kll-sponsor .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kll-sponsor__logo {
  width: 180px;
  margin: 0 auto 32px;
}

.kll-sponsor__title {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 640px;
  margin: 0 auto 56px;
  font-weight: 600;
}

.kll-sponsor__leagues {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 56px;
  margin-top: 56px;
}

.kll-sponsor__leagues img { height: 72px; width: auto; }

.kll-sponsor__divider {
  width: 1px;
  height: 56px;
  background: var(--kia-line);
  background: #d8dbe2;
}

.kll-sponsor__text {
  max-width: 620px;
  margin: 0 auto;
  color: var(--kia-muted);
  font-size: 1.05rem;
}

/* ---------- Split sections ---------- */
.kll-split {
  padding: 88px 0;
}

.kll-split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.kll-split__media img {
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.kll-split__title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 20px;
}

.kll-split__text {
  color: inherit;
  opacity: 0.85;
  font-size: 1.02rem;
  max-width: 460px;
}

.kll-split--dark {
  background: var(--kia-navy-deep);
  color: var(--kia-white);
}

.kll-split--dark .kll-split__text { color: var(--kia-white); }

.kll-split--light {
  background: var(--kia-white);
  color: var(--kia-ink);
}

.kll-split--light .kll-split__media { order: 2; }
.kll-split--light .kll-split__copy { order: 1; }
.kll-split--light .kll-split__text { color: var(--kia-muted); }

/* ---------- Runes to Road ---------- */
.kll-runes {
  position: relative;
  background: var(--kia-black);
  color: var(--kia-white);
  text-align: center;
  overflow: hidden;
}

.kll-runes__media {
  position: relative;
  width: 100%;
}

.kll-runes__bg {
  width: 100%;
  display: block;
}

.kll-runes__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 24px 0;
}

.kll-runes__title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 20px;
}

.kll-runes__text {
  font-size: 1.05rem;
  opacity: 0.85;
}

.kll-runes__cta-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 320px;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.kll-btn {
  display: inline-block;
  background: var(--kia-navy);
  color: var(--kia-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease;
}

.kll-btn:hover { background: #16264a; }

/* ---------- Video trigger (imagen clickeable que abre un modal con video) ---------- */
.kll-video-trigger {
  all: unset;
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.kll-video-trigger img {
  transition: transform 0.4s ease, filter 0.4s ease;
}

.kll-video-trigger:hover img,
.kll-video-trigger:focus-visible img {
  transform: scale(1.03);
  filter: brightness(0.85);
}

.kll-video-trigger__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(11, 24, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kia-white);
  transition: background 0.2s ease, transform 0.2s ease;
}

.kll-video-trigger__play svg { margin-left: 3px; }

.kll-video-trigger:hover .kll-video-trigger__play,
.kll-video-trigger:focus-visible .kll-video-trigger__play {
  background: var(--kia-navy);
  transform: translate(-50%, -50%) scale(1.08);
}

.kll-video-trigger:focus-visible {
  outline: 2px solid var(--kia-white);
  outline-offset: 4px;
}

/* ---------- Modal de video ---------- */
.kll-video-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kll-video-modal[hidden] { display: none; }

.kll-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.9);
}

.kll-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
}

.kll-video-modal__video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #000;
  border-radius: 4px;
}

.kll-video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--kia-white);
  font-size: 1rem;
  cursor: pointer;
}

.kll-video-modal__close:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .kll-split .container {
    grid-template-columns: 1fr;
  }

  .kll-split--light .kll-split__media,
  .kll-split--light .kll-split__copy {
    order: initial;
  }

  .kll-hero {
    min-height: 720px;
  }

  .kll-hero__slide {
    /* En mobile el menú del país suele ser más bajo (o un header
       colapsado); ajusta este valor si tu menú mobile mide distinto. */
    padding-top: 64px;
  }

  .kll-hero__slide[data-hero-slide="2"] {
    padding-top: 64px;
  }

  .kll-hero__slide[data-hero-slide="2"] .kll-hero__content {
    padding-bottom: 48px;
  }

  .kll-sponsor__leagues img { height: 52px; }

  /* Runes to Road: en mobile el título/descripción van arriba en bloque
     (no flotando sobre la imagen) para que no se encimen con los autos.
     La imagen queda debajo, y el botón anclado sobre la parte baja de la imagen. */
  .kll-runes__header {
    position: static;
    max-width: none;
    padding: 48px 20px 28px;
  }

  .kll-runes__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .kll-runes__text {
    font-size: 0.95rem;
  }

  .kll-runes__cta-wrap { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .kll-btn { transition: none; }
}

/* ---------- Scroll reveal ---------- */
.kll-reveal,
.kll-hero-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--kll-reveal-delay, 0s);
  will-change: opacity, transform;
}

.kll-reveal--left { transform: translate(-32px, 0); }
.kll-reveal--right { transform: translate(32px, 0); }

.kll-reveal--d1 { --kll-reveal-delay: 0.12s; }
.kll-reveal--d2 { --kll-reveal-delay: 0.24s; }
.kll-reveal--d3 { --kll-reveal-delay: 0.36s; }

.kll-reveal.is-visible,
.kll-hero-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .kll-reveal,
  .kll-hero-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}