/* Tipografía Archivo, alojada en la propia web (sin llamadas a Google).
   Licencia SIL Open Font License: ver fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  /* Colores sacados del logo */
  --negro: #000000;
  --ambar: #FA9701;
  --rojo: #D82A04;
  --blanco: #FFFFFF;

  --bg: #FFFFFF;
  --surface: #F1F1F1;
  --text: #000000;
  --text-soft: #4A4A4A;
  --line: #000000;

  --font: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --max: 72rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #161616; --surface: #222222; --text: #FFFFFF; --text-soft: #BDBDBD; --line: #FFFFFF;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161616; --surface: #222222; --text: #FFFFFF; --text-soft: #BDBDBD; --line: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ambar); color: var(--negro); padding: .6rem 1rem; font-weight: 700; }
.skip:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.5rem;
  background: var(--ambar); color: var(--negro);
  font-weight: 800; font-stretch: 110%; font-size: 1.05rem; text-decoration: none;
  border: 2px solid var(--ambar);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--blanco); border-color: var(--blanco); }
.btn--big { min-height: 3.75rem; padding: 1rem 2.4rem; font-size: 1.3rem; }
.btn--ghost { background: transparent; color: var(--blanco); border-color: var(--blanco); }
.btn--ghost:hover { background: var(--blanco); color: var(--negro); }
.btn--dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--dark:hover { background: var(--rojo); border-color: var(--rojo); color: var(--blanco); }

/* ---------- Cabecera ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0,0,0,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--blanco);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { font-weight: 900; font-stretch: 125%; font-size: 1.4rem; text-decoration: none; color: var(--ambar); }
.nav { display: flex; align-items: center; gap: .75rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; align-items: center; }
.nav ul a { text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav ul a:hover { color: var(--ambar); }
.nav .btn { min-height: 2.6rem; padding: .5rem 1.1rem; font-size: 1rem; }
.menu-toggle {
  display: none; position: relative; width: 2.75rem; height: 2.75rem; flex-shrink: 0;
  background: none; border: 0; padding: 0; color: var(--blanco); cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: .5rem; right: .5rem; height: 3px; background: currentColor;
  transition: transform .2s ease, opacity .15s ease;
}
.menu-toggle span:nth-child(1) { top: calc(50% - 9px); }
.menu-toggle span:nth-child(2) { top: calc(50% - 1.5px); }
.menu-toggle span:nth-child(3) { top: calc(50% + 6px); }
.menu-toggle:hover { color: var(--ambar); }
/* Al abrir, las tres líneas se convierten en una X */
.nav.is-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.is-open .menu-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--negro); color: var(--blanco);
  padding-top: calc(4rem + env(safe-area-inset-top, 0px));
  text-align: center; overflow: hidden;
}
.hero__logo {
  width: auto; max-width: 100%; height: auto;
  max-height: min(58svh, 36rem); margin: 0 auto;
  /* Funde los bordes de la imagen con el negro de la página */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  animation: impacto .9s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes impacto {
  from { opacity: 0; transform: scale(1.12); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}
.hero__body { margin-top: clamp(-3rem, -4vw, -1rem); position: relative; padding-bottom: clamp(3rem, 7vw, 4.5rem); }
.hero__kicker { margin: 0 0 .25rem; font-weight: 600; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #D9D9D9; }
.hero__date {
  margin: 0 0 1.75rem; font-weight: 900; font-stretch: 100%;
  font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.25; color: var(--blanco);
}
/* Mayúsculas con tilde: algo de aire para que la Ó no toque la línea de arriba */
.hero__date span, .hero__date time { color: var(--ambar); letter-spacing: .02em; }
/* La fecha nunca se parte: en pantallas estrechas se reduce para caber en una línea */
.hero__date time { display: inline-block; white-space: nowrap; font-size: min(1em, 8.6vw); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* Borde rasgado: toma el color del fondo de la página, también en modo oscuro */
.rasgado { display: block; width: 100%; height: clamp(16px, 2.5vw, 32px); margin-bottom: -1px; fill: var(--bg); }

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
h2 { font-weight: 900; font-stretch: 112%; font-size: clamp(2.2rem, 6vw, 4rem); line-height: .95; letter-spacing: -.01em; margin: 0 0 1rem; }
h3 { font-weight: 800; font-stretch: 110%; font-size: 1.4rem; margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 38rem; margin: 0 0 2.5rem; }

/* La carrera */
.intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.intro .lead { margin-bottom: 1.75rem; }
.facts { margin: 0; border-top: 4px solid var(--line); }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; color: var(--text-soft); }
.facts dd { margin: 0; font-weight: 900; font-stretch: 105%; font-size: clamp(1.35rem, 2.4vw, 1.75rem); text-align: right; }

/* Galería */
.gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.gallery-head .lead { margin-bottom: 0; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.gallery {
  display: grid; gap: .6rem; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(8.5rem, 17vw, 13.5rem); grid-auto-flow: dense;
}
.gallery a { display: block; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.gallery .g-big { grid-column: span 2; grid-row: span 2; }
.gallery .g-tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }

/* Visor de fotos */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; background: transparent; color: var(--blanco);
}
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: .75rem; justify-items: center; padding: 3.5rem 1rem; }
.lightbox img { max-width: min(92vw, 80rem); max-height: 78vh; max-height: 78dvh; width: auto; height: auto; }
.lightbox figcaption { font-weight: 600; text-align: center; max-width: 40rem; color: #E6E6E6; }
.lb-btn {
  position: fixed; background: rgba(0,0,0,.55); color: var(--blanco); border: 0; cursor: pointer;
  width: 3rem; height: 3rem; font-size: 2rem; line-height: 1; display: grid; place-items: center;
}
.lb-btn:hover { background: var(--ambar); color: var(--negro); }
.lb-close { top: calc(.75rem + env(safe-area-inset-top, 0px)); right: .75rem; }
.lb-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .75rem; top: 50%; transform: translateY(-50%); }
.nudge {
  margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  background: var(--negro); color: var(--blanco); padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
  border-left: 8px solid var(--ambar);
}
.nudge p { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 800; font-stretch: 105%; }

/* Álbumes por fotógrafo */
.albums { margin-top: 2.5rem; }
.albums ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
/* El álbum del pódium, destacado */
.albums .album-podio a { background: var(--ambar); border-color: var(--ambar); color: var(--negro); }
.albums .album-podio a:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
@media (max-width: 1100px) { .albums ul { grid-template-columns: repeat(3, 1fr); } }
.albums a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; height: 100%;
  padding: 1.25rem; border: 2px solid var(--line); text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.albums a:hover { background: var(--ambar); border-color: var(--ambar); color: var(--negro); }
.albums strong { font-size: 1.25rem; font-weight: 800; font-stretch: 105%; line-height: 1.2; }
.albums span { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Patrocinadores */
.sponsors { background: var(--surface); }
/* Logos grandes (principales) y logos pequeños debajo */
.lead-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.lead-logo { display: grid; place-items: center; background: var(--blanco); padding: clamp(1.75rem, 4vw, 3rem); min-height: clamp(11rem, 22vw, 15rem); }
.lead-logo img { width: auto; max-width: 100%; height: auto; max-height: clamp(5rem, 10vw, 7.5rem); }
.lead-logo--round img { max-height: clamp(7.5rem, 15vw, 11rem); }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.logos li { width: clamp(9rem, 22%, 14rem); aspect-ratio: 3 / 2; background: var(--blanco); color: #6B6B6B; display: grid; place-items: center; padding: 1rem; }
.logos li > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.logos img { max-width: 88%; max-height: 4.5rem; width: auto; height: auto; }
.logo-ph { font-weight: 700; font-size: .95rem; text-align: center; }
.pitch { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; border-top: 4px solid var(--line); padding-top: 2rem; }
.pitch p { margin: 0; font-size: 1.2rem; font-weight: 600; max-width: 34rem; }

/* Modalidades */
.mods-wrap { margin-top: clamp(3.5rem, 7vw, 5rem); }
.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.mod { border-top: 4px solid var(--line); padding-top: 1.25rem; display: flex; flex-direction: column; }
.mod h4 { font-weight: 900; font-stretch: 110%; font-size: 1.6rem; line-height: 1.1; margin: 0 0 1rem; }
.mod dl { margin: 0 0 1.5rem; flex: 1; }
.mod dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--surface); }
.mod dt { color: var(--text-soft); }
.mod dd { margin: 0; font-weight: 800; text-align: right; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact .lead { margin-bottom: 1.5rem; }
.contact__aside a { font-weight: 700; text-decoration-color: var(--ambar); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; }
.field .opt { font-weight: 400; color: var(--text-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: 0; padding: .75rem .85rem; min-height: 3rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field ::placeholder { color: var(--text-soft); opacity: .85; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ambar); outline-offset: 0; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--ambar); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 700; min-height: 1.5em; }
.form-status.ok { color: #1E8E3E; }
.form-status.err { color: var(--rojo); }

/* Cierre */
.final { background: var(--rojo); color: var(--blanco); }
.final h2 { font-size: clamp(2.6rem, 9vw, 6rem); margin-bottom: 1rem; }
.final p { font-size: 1.25rem; font-weight: 600; margin: 0 0 1.75rem; max-width: 34rem; }
.final .btn { background: var(--negro); color: var(--blanco); border-color: var(--negro); }
.final .btn:hover { background: var(--blanco); color: var(--negro); border-color: var(--blanco); }

/* Pie */
footer { background: var(--negro); color: #D9D9D9; padding: 3rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .95rem; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.foot .brand { font-size: 2rem; display: inline-block; margin-bottom: .5rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ambar); }
.foot h4 { color: var(--blanco); margin: 0 0 .75rem; font-size: 1rem; }
.legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #333; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* Barra fija de inscripción (móvil) */
.stickycta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--negro); color: var(--blanco);
  padding: .75rem var(--pad) calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 3px solid var(--ambar);
  transform: translateY(110%); transition: transform .25s ease;
}
.stickycta.is-visible { transform: translateY(0); }
.stickycta p { margin: 0; font-weight: 700; line-height: 1.2; font-size: .95rem; }
.stickycta p span { display: block; color: var(--ambar); font-weight: 900; }
.stickycta .btn { flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav ul {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--negro); padding: .5rem var(--pad) 1.5rem;
  }
  .nav.is-open ul { display: flex; }
  .nav ul a { display: block; padding: .9rem 0; border-bottom: 1px solid #333; font-size: 1.15rem; }
  .intro { grid-template-columns: 1fr; gap: 2rem; }
  .mods { grid-template-columns: 1fr; gap: 2.5rem; }
  .albums ul { grid-template-columns: 1fr 1fr; }
  .albums li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .contact { grid-template-columns: 1fr; }
  .lead-logos { grid-template-columns: 1fr; }
  .logos li { width: calc(50% - .5rem); }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
  .stickycta { display: flex; }
  footer { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
  .nudge .btn, .pitch .btn, .form .btn, .gallery-actions .btn { width: 100%; }
  .form .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
  .gallery img, .stickycta, .menu-toggle span { transition: none; }
}

/* ---------- Páginas legales ---------- */
.doc { padding: calc(7rem + env(safe-area-inset-top, 0px)) 0 clamp(4rem, 8vw, 6rem); }
.doc .wrap { max-width: 48rem; }
.doc h1 { font-weight: 900; font-stretch: 112%; font-size: clamp(2.4rem, 7vw, 4rem); line-height: .95; margin: 0 0 .75rem; }
.doc .updated { color: var(--text-soft); margin: 0 0 3rem; }
.doc h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); font-stretch: 108%; line-height: 1.15; margin: 2.75rem 0 .9rem; padding-top: 1rem; border-top: 3px solid var(--line); }
.doc p, .doc li { max-width: 42rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: .4rem; }
.doc a { text-decoration-color: var(--ambar); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; }
.doc dt { font-weight: 700; }
.doc dd { margin: 0; }
/* Datos por rellenar: resaltados para que no se escapen */
.pendiente { background: #FFE58A; color: #000; padding: 0 .25em; font-weight: 700; }
.topbar .back { color: var(--blanco); font-weight: 600; text-decoration: none; }
.topbar .back:hover { color: var(--ambar); }
@media (max-width: 520px) {
  .doc dl { grid-template-columns: 1fr; gap: .1rem; }
  .doc dd { margin-bottom: .75rem; }
}
