/* ==========================================================
   I Compete Natural Spain — estilos
   Estilo limpio: fondo blanco, texto negro, imágenes enteras.
   Para cambiar colores, toca solo las variables de :root.
   ========================================================== */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --fondo: #ffffff;
  --fondo-alt: #f4f4f4;      /* secciones alternas y pie */
  --texto: #121212;
  --texto-suave: #5c5c5c;
  --borde: #e3e3e3;
  --boton: #121212;          /* fondo de botones */
  --boton-texto: #ffffff;
  --barra: #121212;          /* barra superior de avisos */
  --barra-texto: #ffffff;

  --fuente: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ancho: 1200px;
  --margen: clamp(1rem, 4vw, 2.5rem);
  --radio: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Imágenes: SIEMPRE enteras, nunca recortadas */
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.contenedor { width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; }

.saltar { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--texto); color: var(--fondo); padding: .6rem 1rem; }
.saltar:focus { left: 1rem; top: 1rem; }

/* ---------- Barra superior ---------- */
.aviso {
  margin: 0;
  background: var(--barra); color: var(--barra-texto);
  font-size: .88rem; text-align: center;
  padding: .5rem var(--margen);
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: var(--fondo);
  border-bottom: 1px solid var(--borde);
}
.cabecera .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.logo img { height: 56px; width: auto; }

.menu-boton {
  display: none;
  background: none; border: 1px solid var(--borde); color: var(--texto);
  font: 600 .95rem var(--fuente); padding: .5rem .9rem; border-radius: var(--radio); cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a {
  display: block; padding: .5rem .8rem; border-radius: var(--radio);
  text-decoration: none; font-weight: 600; font-size: .98rem; color: var(--texto);
}
.nav a:hover { background: var(--fondo-alt); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; }

@media (max-width: 800px) {
  .menu-boton { display: inline-block; }
  .logo img { height: 46px; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--fondo); border-bottom: 1px solid var(--borde);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; padding: .5rem var(--margen) 1rem; }
  .nav a { padding: .85rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--borde); border-radius: 0; }
  .nav li:last-child a { border-bottom: 0; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.5rem;
  font: 600 1rem var(--fuente); text-decoration: none; text-align: center;
  background: var(--boton); color: var(--boton-texto);
  border: 2px solid var(--boton); border-radius: var(--radio);
  cursor: pointer; transition: opacity .15s;
}
.boton:hover { opacity: .85; }
.boton--borde { background: transparent; color: var(--texto); }
.boton--borde:hover { background: var(--fondo-alt); opacity: 1; }
.boton[aria-disabled="true"], .boton:disabled { background: transparent; color: var(--texto-suave); border-color: var(--borde); cursor: not-allowed; opacity: 1; }
.botones { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.seccion--alt { background: var(--fondo-alt); }
.centrado { text-align: center; }
.centrado .botones { justify-content: center; }

/* Portada: título + banners a ancho completo */
.portada { padding-top: clamp(2rem, 5vw, 3.5rem); }
.portada h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); text-align: center; letter-spacing: -.02em;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.banner {
  width: 100%;
  max-height: 85vh;          /* nunca más alto que la pantalla… */
  object-fit: contain;       /* …y sin recortar */
  margin-inline: auto;
  border-radius: var(--radio);
}
.banner + .banner { margin-top: clamp(1rem, 2.5vw, 1.5rem); }
picture { display: block; }

/* Móvil: la imagen de portada ocupa todo el ancho de la pantalla */
@media (max-width: 600px) {
  .portada { padding-top: 1.5rem; }
  .portada h1 { margin-bottom: 1.25rem; }
  .portada .banner {
    width: 100vw; max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    max-height: none;
    border-radius: 0;
  }
}

/* Imagen + texto */
.bloque {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
}
.bloque img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--radio); }
.bloque--invertido > :first-child { order: 2; }
.bloque p { color: var(--texto-suave); max-width: 55ch; }
@media (max-width: 800px) {
  .bloque { grid-template-columns: minmax(0, 1fr); }
  .bloque--invertido > :first-child { order: 0; }
}

/* Evento: cartel a la izquierda, datos a la derecha (también en móvil) */
.evento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    "cartel ."
    "cartel texto"
    "cartel botones"
    "cartel .";
  column-gap: clamp(1.5rem, 5vw, 4rem);
}
.evento-cartel { grid-area: cartel; width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--radio); align-self: center; }
.evento-texto { grid-area: texto; }
.evento-botones { grid-area: botones; }
.evento h2 { text-transform: uppercase; }
.evento .fecha { font-size: 1.2rem; }
.evento .clasificatorio { font-weight: 700; font-size: 1.15rem; }

/* Cuenta atrás */
.cuenta {
  display: flex; gap: .75rem; margin: 0 0 1.75rem; padding: 0;
  font-variant-numeric: tabular-nums;
}
.cuenta div {
  display: flex; flex-direction: column; align-items: center;
  min-width: 76px; padding: .6rem .5rem;
  background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio);
}
.cuenta dt { order: 2; font-size: .8rem; color: var(--texto-suave); }
.cuenta dd { order: 1; margin: 0; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.cuenta-fin { font-weight: 600; }

@media (max-width: 800px) {
  .evento-grid {
    grid-template-rows: auto auto;
    grid-template-areas:
      "cartel texto"
      "botones botones";
    column-gap: 1rem;
    row-gap: 1.25rem;
  }
  .evento-texto { align-self: center; }
  .evento h2 { font-size: clamp(1.25rem, 5.6vw, 1.9rem); margin-bottom: .4em; }
  .evento .fecha { font-size: clamp(.82rem, 3.6vw, 1rem); line-height: 1.4; margin-bottom: .6em; }
  .evento .clasificatorio { font-size: clamp(.8rem, 3.4vw, 1rem); line-height: 1.3; margin-bottom: .8em; }
  .cuenta { gap: .3rem; margin-bottom: 0; }
  .cuenta div { min-width: 0; flex: 1; padding: .35rem .15rem; }
  .cuenta dd { font-size: clamp(1rem, 4.6vw, 1.4rem); }
  .cuenta dt { font-size: .68rem; }
  .evento-botones .boton { flex: 1 1 100%; }
}

/* Sponsors */
.sponsors {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
}
.sponsors li { width: min(280px, 100%); }
.sponsors img { width: 100%; max-height: 320px; object-fit: contain; margin-inline: auto; border-radius: var(--radio); }
.sponsors a:hover img { opacity: .85; }

/* ---------- Páginas interiores ---------- */
.cabeza-pagina { padding: clamp(2rem, 5vw, 3.5rem) 0 0; }
.cabeza-pagina h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); margin: 0; }
.cabeza-pagina + .seccion { padding-top: 1.5rem; }
.intro { color: var(--texto-suave); max-width: 60ch; margin-bottom: 2rem; }

/* Tienda */
.productos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem;
}
.producto { display: flex; flex-direction: column; }
.producto img { width: 100%; border-radius: var(--radio); margin-bottom: 1rem; background: var(--fondo-alt); }
.producto h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.producto .detalle { color: var(--texto-suave); margin-bottom: .5rem; }
.producto .precio { font-size: 1.15rem; margin: 0 0 1rem; }
.producto .boton { margin-top: auto; }
.vacio { color: var(--texto-suave); }

/* Formulario */
.formulario { display: grid; gap: 1.1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .35rem; }
.campo input, .campo textarea {
  width: 100%; padding: .8rem .9rem; font: inherit; color: var(--texto);
  background: var(--fondo); border: 1px solid #bdbdbd; border-radius: var(--radio);
}
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--texto); outline-offset: 0; border-color: var(--texto); }
.campo textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--texto); }
.trampa { display: none; }
.estado { min-height: 1.6em; font-weight: 600; margin: 0; }
.estado.ok { color: #1e7b34; }
.estado.error { color: #b3261e; }
.contacto { align-items: start; }

/* Textos legales */
.legal { max-width: 72ch; }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal ul { padding-left: 1.2rem; }

/* ---------- Pie ---------- */
.pie { background: var(--fondo-alt); border-top: 1px solid var(--borde); padding: 2.25rem 0; font-size: .92rem; color: var(--texto-suave); }
.pie .contenedor { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; }
.pie ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.pie a { color: var(--texto); }
.pie p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boton { transition: none; }
}
