/* estadisticafutbol.es · colores de marca: negro #111111, amarillo #FAC20A, naranja #EB6116, rojo #D81221 */
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/img/fuentes/nunito-latin.woff2) format("woff2");
}
:root {
  --negro: #111111; --negro-2: #1c1c1c; --amarillo: #fac20a; --naranja: #eb6116; --rojo: #d81221;
  --texto: #1d1d1d; --suave: #5b5b5b; --fondo: #f6f5f1; --blanco: #ffffff; --borde: #e3e1da;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 18px;
  line-height: 1.6; color: var(--texto); background: var(--fondo); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--amarillo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--naranja); }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.envuelve { width: min(1120px, 100% - 32px); margin-inline: auto; }
.amarillo { color: var(--amarillo); }

/* Cabecera */
.cabecera { background: var(--negro); color: var(--blanco); border-bottom: 4px solid var(--amarillo); }
.cabecera a:hover { color: var(--amarillo); }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.logo img { width: 260px; }
.menu { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: 16px; }
.menu a { text-decoration: none; white-space: nowrap; }
.menu a[aria-current] { color: var(--amarillo); }
.menu-movil { display: none; position: relative; }
.menu-movil summary { list-style: none; cursor: pointer; font-weight: 800; border: 2px solid var(--amarillo);
  border-radius: 999px; padding: 6px 16px; }
.menu-movil summary::-webkit-details-marker { display: none; }
.menu-movil nav { position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; background: var(--negro-2);
  border: 1px solid #333; border-radius: 12px; padding: 8px; display: grid; min-width: 240px; }
.menu-movil nav a { padding: 10px 12px; text-decoration: none; font-weight: 700; border-radius: 8px; }
.menu-movil nav a[aria-current] { color: var(--amarillo); }

/* Botones */
.btn { display: inline-block; background: var(--amarillo); color: var(--negro); font-weight: 800; text-decoration: none;
  border: 2px solid var(--amarillo); border-radius: 999px; padding: 12px 24px; font-size: 17px; font-family: inherit;
  cursor: pointer; line-height: 1.2; }
.btn:hover { background: #ffd53d; color: var(--negro); }
.btn-hueco { background: transparent; color: inherit; border-color: currentColor; }
.btn-hueco:hover { background: transparent; color: var(--amarillo); }
.btn-menu { padding: 8px 18px; font-size: 15px; }
.menu .btn-menu:hover { color: var(--negro); }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Bandas de título */
h1, h2, h3 { line-height: 1.2; font-weight: 900; }
h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 16px; letter-spacing: -0.5px; }
.banda { padding-block: 40px 48px; }
.banda h1 { max-width: 20ch; }
.entrada { font-size: 20px; color: #d6d6d6; max-width: 60ch; margin: 0; }
.eyebrow { color: var(--amarillo); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; margin: 0 0 12px; }
.heroe { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding-block: 48px 64px; }
.heroe-img { border-radius: 16px; max-height: 460px; width: auto; justify-self: center; box-shadow: 0 20px 50px rgba(0,0,0,.5); }

/* Contenido */
main { padding-block: 48px 64px; }
.articulo { max-width: 780px; background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; padding: 40px; }
.articulo h2 { font-size: 28px; margin: 40px 0 12px; }
.articulo h2:first-child { margin-top: 0; }
.articulo img { border-radius: 10px; margin: 32px 0; width: 100%; }
.articulo li { margin-bottom: 6px; }
.articulo li::marker { color: var(--naranja); }
.llamada { background: var(--negro); color: var(--blanco); border-radius: 14px; padding: 28px; margin-top: 40px; }
.llamada h2 { margin-top: 0; font-size: 24px; }
.llamada p { color: #d6d6d6; }
.nota { font-size: 15px; color: var(--suave); }

/* Portada */
.bloques { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bloque, .seguir { background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; padding: 32px; }
.bloque h2, .seguir h2 { margin-top: 0; font-size: 28px; }
.bloque:first-child { border-top: 6px solid var(--amarillo); }
.bloque:last-child { border-top: 6px solid var(--rojo); }
.ligas { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 24px; }
.liga { background: var(--negro); color: var(--blanco); border-radius: 16px; overflow: hidden; text-decoration: none; }
.liga span { display: block; padding: 16px 20px; font-weight: 800; font-size: 19px; }
.liga:hover span { color: var(--amarillo); }
.seguir .btn-hueco { color: var(--negro); }
.seguir .btn-hueco:hover { color: var(--naranja); }

/* Formulario */
.formulario { background: var(--fondo); border: 1px solid var(--borde); border-radius: 14px; padding: 24px; }
.campo label { display: block; font-weight: 700; margin-bottom: 4px; }
.campo input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid #cfccc3; border-radius: 10px; background: var(--blanco); }
.campo input:focus { border-color: var(--negro); outline: none; }
.casilla { display: flex; gap: 10px; align-items: flex-start; }
.casilla input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--negro); }
.oculto { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */
.pie { background: var(--negro); color: #bdbdbd; padding-block: 32px; font-size: 15px; }
.pie .aviso { color: var(--blanco); font-weight: 800; margin-top: 0; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--amarillo); }

@media (max-width: 1100px) {
  .menu { display: none; }
  .menu-movil { display: block; }
}
@media (max-width: 900px) {
  .heroe, .bloques, .ligas { grid-template-columns: 1fr; }
  .heroe { gap: 32px; padding-block: 32px 48px; }
  .heroe-img { max-height: 380px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .logo img { width: 190px; }
  .articulo { padding: 24px 20px; border-radius: 12px; }
  .bloque, .seguir { padding: 24px 20px; }
  .articulo h2 { font-size: 24px; }
  .entrada { font-size: 18px; }
}

/* Blog */
.lista-blog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.tarjeta-blog { background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tarjeta-blog:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); color: inherit; }
.tarjeta-blog img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; width: 100%; }
.tarjeta-blog div { padding: 16px 20px 20px; }
.tarjeta-blog h2 { font-size: 20px; margin: 6px 0 8px; }
.tarjeta-blog p { margin: 0; color: var(--suave); font-size: 16px; }
.fecha { font-size: 14px; font-weight: 700; color: var(--naranja); }
.laminas { display: grid; gap: 16px; margin-top: 24px; }
.laminas img, .articulo .laminas img { margin: 0; border-radius: 12px; }
.reel { width: 100%; max-width: 420px; display: block; margin: 24px auto; border-radius: 14px; background: #000; aspect-ratio: 9 / 16; }
.volver { margin-top: 32px; font-weight: 700; }

/* Gráficos con barras de verdad */
.grafico { background: var(--negro); color: var(--blanco); border-radius: 14px; padding: 24px; margin: 32px 0; }
.grafico figcaption { font-weight: 900; font-size: 22px; line-height: 1.2; margin-bottom: 24px; }
.grafico .eyebrow { display: block; font-size: 12px; margin-bottom: 6px; }
.columnas { display: flex; align-items: flex-end; gap: 10px; height: 240px; }
.columnas div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.columnas i { display: block; width: 100%; height: calc(var(--v) * 5.6%); background: #8c8c8c; border-radius: 8px 8px 0 0; transform-origin: bottom; }
.columnas .top i { background: var(--amarillo); }
.columnas b { font-size: 15px; margin-bottom: 6px; white-space: nowrap; }
.columnas span { font-weight: 900; font-size: 20px; margin-top: 8px; }

/* Portada: barras que suben y bajan y una pelota que cruza */
.pista { position: relative; height: 96px; width: min(1120px, 100% - 32px); margin: -24px auto 0; overflow: hidden; }
.barras { display: flex; align-items: flex-end; gap: 8px; height: 100%; opacity: .9; }
.barras i { flex: 1; height: 100%; background: var(--amarillo); border-radius: 6px 6px 0 0; transform-origin: bottom; transform: scaleY(.35); }
.barras i:nth-child(3n) { background: var(--naranja); }
.barras i:nth-child(4n) { background: #3a3a3a; }
.barras i:nth-child(7n) { background: var(--rojo); }
.pelota { position: absolute; bottom: 2px; left: -60px; width: 48px; height: 48px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.5)); }

@media (prefers-reduced-motion: no-preference) {
  .barras i { animation: sube 1.8s ease-in-out infinite alternate; }
  .barras i:nth-child(2n) { animation-duration: 2.3s; animation-delay: -.6s; }
  .barras i:nth-child(3n) { animation-duration: 1.5s; animation-delay: -1.1s; }
  .barras i:nth-child(5n) { animation-duration: 2.7s; animation-delay: -.3s; }
  .pelota { animation: rueda 6s linear infinite, bota .5s ease-in infinite alternate; }
  @keyframes sube { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
  @keyframes rueda { from { left: -60px; rotate: 0deg; } to { left: 100%; rotate: 1080deg; } }
  @keyframes bota { from { bottom: 2px; } to { bottom: 44px; } }
  .columnas i { animation: crece 1.4s cubic-bezier(.2, .8, .2, 1) both; }
  .columnas div:nth-child(2) i { animation-delay: .1s; } .columnas div:nth-child(3) i { animation-delay: .2s; }
  .columnas div:nth-child(4) i { animation-delay: .3s; } .columnas div:nth-child(5) i { animation-delay: .4s; }
  .columnas div:nth-child(6) i { animation-delay: .5s; }
  @keyframes crece { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes aparece { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
  .heroe > div { animation: aparece .8s ease-out both; }
  .heroe-img { animation: aparece .8s .2s ease-out both; }
  /* Al bajar por la página: las barras crecen al entrar (y bajan al salir) y los bloques aparecen */
  @supports (animation-timeline: view()) {
    .columnas i { animation: crece linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; animation-delay: 0s; }
    .bloque, .liga, .seguir, .tarjeta-blog, .articulo img, .llamada, .laminas img {
      animation: aparece linear both; animation-timeline: view(); animation-range: entry 0% cover 20%; }
  }
}
