/* ==========================================================================
   CE Grau Castelló — hoja de estilos
   Capas: 1 Tokens · 2 Fuentes · 3 Reset · 4 Base · 5 Utilidades ·
          6 Header/Nav · 7 Hero · 8 Cifras · 9 El club · 10 Equipos ·
          11 Galería · 12 Patrocinadores · 13 Únete · 14 Contacto ·
          15 Footer · 16 Lightbox · 17 Accesibilidad y movimiento
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  /* Marca (derivada del escudo y la equipación) */
  --verde-noche: #042f2e;
  --verde-bosque: #14532d;
  --verde-medio: #166534;
  --verde-vivo: #15803d;
  --lima: #a3e635;
  --naranja-balon: #e8a33d;
  --rojo-senyera: #da1e28;
  --amarillo-senyera: #ffd23f;

  /* Neutros */
  --blanco: #ffffff;
  --fondo: #fdfdfb;
  --fondo-suave: #f0f5ee;
  --texto: #2b3830;
  --texto-suave: #5c6b61;
  --linea: #dde5dc;

  /* Sistema */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --seccion-pad: clamp(3.5rem, 9vw, 6.5rem);
  --radius: 14px;
  --sombra-card: 0 10px 30px -12px rgba(4, 47, 46, 0.25);
  --transicion: 200ms ease;
  --header-alto: 76px;
}

/* 2. Fuentes ------------------------------------------------------------ */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* 3. Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; }
/* Las imágenes en flujo conservan su proporción aunque el ancho se reduzca */
img { height: auto; }
input, button, textarea, select { font: inherit; }
ul[class] { list-style: none; padding: 0; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.05; overflow-wrap: break-word; }
button { cursor: pointer; border: 0; background: none; color: inherit; }

/* 4. Base --------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--texto);
  background: var(--fondo);
}
a { color: var(--verde-vivo); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--verde-bosque); }
h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--verde-noche);
}
::selection { background: var(--lima); color: var(--verde-noche); }

/* 5. Utilidades ---------------------------------------------------------- */
.container { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 100;
  padding: 0.6em 1.2em; background: var(--verde-noche); color: var(--blanco);
  font-weight: 600; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; color: var(--blanco); }

.section { padding-block: var(--seccion-pad); scroll-margin-top: var(--header-alto); }
#contenido { scroll-margin-top: var(--header-alto); }
.section--gris { background: var(--fondo-suave); }
.section--oscura { background: linear-gradient(168deg, var(--verde-medio), var(--verde-bosque) 55%, var(--verde-noche)); }
.section--noche { background: var(--verde-noche); }

.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section__title { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: 0.015em; }
.section__title::after {
  content: ""; display: block; width: 76px; height: 5px; margin: 0.6rem auto 0;
  background: linear-gradient(90deg, var(--rojo-senyera) 0 50%, var(--amarillo-senyera) 50% 100%);
}
.section__nota { margin-top: 0.9rem; color: var(--texto-suave); }
.section--oscura .section__title, .section--noche .section__title { color: var(--blanco); }
.section--oscura .section__nota, .section--noche .section__nota { color: rgba(255, 255, 255, 0.75); }

/* Chips (etiquetas inclinadas estilo equipación) */
.chip {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.09em;
  padding: 0.3em 0.95em; margin-bottom: 0.9rem;
  background: var(--verde-bosque); color: var(--blanco);
  transform: skewX(-10deg);
}
.chip--senyera {
  background: var(--amarillo-senyera); color: var(--verde-noche);
  box-shadow: -8px 0 0 var(--rojo-senyera);
}
.chip--lima { background: var(--lima); color: var(--verde-noche); }

/* Botones */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.7em 1.6em;
  border-radius: 6px;
  transform: skewX(-6deg);
  transition: transform var(--transicion), box-shadow var(--transicion), background-color var(--transicion);
}
.btn:hover { transform: skewX(-6deg) translateY(-2px); box-shadow: 0 10px 22px -10px rgba(4, 47, 46, 0.5); }
.btn--naranja { background: var(--naranja-balon); color: var(--verde-noche); }
.btn--naranja:hover { background: #f0b355; color: var(--verde-noche); }
.btn--verde { background: var(--verde-vivo); color: var(--blanco); }
.btn--verde:hover { background: var(--verde-medio); color: var(--blanco); }
.btn--fantasma { background: rgba(4, 47, 46, 0.25); color: var(--blanco); border: 2px solid rgba(255, 255, 255, 0.85); }
.btn--fantasma:hover { background: rgba(255, 255, 255, 0.12); color: var(--blanco); }
.btn--sm { font-size: 1rem; padding: 0.5em 1.2em; }

/* 6. Header / Nav --------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
  transition: box-shadow var(--transicion);
}
.header.header--scrolled { box-shadow: 0 6px 24px -12px rgba(4, 47, 46, 0.35); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-alto);
}
.header__brand {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none;
}
.header__name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--verde-noche); white-space: nowrap;
}
.header__name em { font-style: normal; color: var(--verde-vivo); }

.nav__list { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.nav__link {
  display: inline-block; padding: 0.5em 0.8em;
  font-weight: 600; font-size: 0.95rem;
  color: var(--texto); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav__link:hover { color: var(--verde-bosque); }
.nav__link[aria-current="true"] {
  color: var(--verde-bosque);
  border-image: linear-gradient(90deg, var(--rojo-senyera) 0 50%, var(--amarillo-senyera) 50% 100%) 1;
  border-bottom: 3px solid;
}
.nav__cta-item { margin-left: 0.5rem; }

/* Hamburguesa: oculta sin JS y en escritorio */
.header__toggle { display: none; }

@media (max-width: 899px) {
  /* Sin JS el menú queda en flujo: el header no puede ser sticky ni desbordar */
  html:not(.js) .header { position: static; }
  html:not(.js) .header__inner { flex-wrap: wrap; padding-block: 0.6rem; }
  html:not(.js) .section { scroll-margin-top: 0; }

  html.js .header__toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 8px;
  }
  .header__toggle-bar,
  .header__toggle-bar::before,
  .header__toggle-bar::after {
    display: block; width: 24px; height: 2.5px;
    background: var(--verde-noche); border-radius: 2px;
    transition: transform var(--transicion), opacity var(--transicion);
  }
  .header__toggle-bar { position: relative; }
  .header__toggle-bar::before, .header__toggle-bar::after { content: ""; position: absolute; left: 0; }
  .header__toggle-bar::before { top: -7px; }
  .header__toggle-bar::after { top: 7px; }
  .header__toggle[aria-expanded="true"] .header__toggle-bar { transform: rotate(45deg); }
  .header__toggle[aria-expanded="true"] .header__toggle-bar::before { transform: rotate(-90deg) translateX(-7px); }
  .header__toggle[aria-expanded="true"] .header__toggle-bar::after { opacity: 0; }

  html.js .nav {
    position: fixed; inset: var(--header-alto) 0 auto 0; z-index: 49;
    max-height: calc(100vh - var(--header-alto));
    max-height: calc(100dvh - var(--header-alto));
    overflow-y: auto;
    background: var(--blanco);
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 20px 40px -20px rgba(4, 47, 46, 0.4);
    transform: translateY(-115%);
    visibility: hidden;
    transition: transform 260ms ease, visibility 0s linear 260ms;
  }
  html.js .nav.nav--abierta {
    transform: translateY(0);
    visibility: visible;
    transition: transform 260ms ease;
  }
  html.js .nav__list {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
  }
  html.js .nav__link { display: block; padding: 0.85em 0.5em; font-size: 1.05rem; border-bottom: 1px solid var(--linea); }
  html.js .nav__link[aria-current="true"] { border-image: none; border-bottom: 1px solid var(--linea); color: var(--verde-vivo); }
  html.js .nav__cta-item { margin: 1rem 0 0; }
  html.js .nav__cta-item .btn { display: block; text-align: center; }
}

/* 7. Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex; align-items: center;
  background: var(--verde-noche);
  overflow: hidden;
}
.hero__media, .hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(4, 47, 46, 0.93) 8%, rgba(4, 47, 46, 0.72) 45%, rgba(4, 47, 46, 0.3) 100%),
    linear-gradient(to top, rgba(4, 47, 46, 0.85), transparent 40%);
}
.hero__content { position: relative; z-index: 2; padding-block: clamp(5rem, 14vh, 8rem); }
.hero__title {
  font-size: clamp(3.1rem, 9.5vw, 6.2rem);
  font-weight: 800; letter-spacing: 0.01em;
  color: var(--blanco);
  display: flex; flex-direction: column;
  margin-bottom: 1.2rem;
}
.hero__line { display: block; }
.hero__line--destacada { color: var(--naranja-balon); }
.hero__sub {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

/* Entrada orquestada del hero */
@keyframes hero-sube {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .chip, .hero__line, .hero__sub, .hero__actions {
  animation: hero-sube 640ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero .chip { animation-delay: 60ms; }
.hero__line:nth-child(1) { animation-delay: 140ms; }
.hero__line:nth-child(2) { animation-delay: 230ms; }
.hero__line:nth-child(3) { animation-delay: 320ms; }
.hero__sub { animation-delay: 430ms; }
.hero__actions { animation-delay: 520ms; }

/* 8. Cifras (banda diagonal bajo el hero) --------------------------------- */
.cifras {
  position: relative;
  background: var(--verde-bosque);
  margin-top: -3.5vw;
  clip-path: polygon(0 3.5vw, 100% 0, 100% 100%, 0 100%);
  padding-top: 3.5vw;
}
.cifras__list {
  display: flex; flex-wrap: wrap; justify-content: space-around;
  gap: 1.5rem; padding-block: 1.9rem;
}
.cifras__item { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; }
.cifras__item dd {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(2.3rem, 4.5vw, 3.2rem);
  line-height: 1; color: var(--lima);
}
.cifras__item dt {
  font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.35rem;
}

/* 9. El club --------------------------------------------------------------- */
.club__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 900px) { .club__grid { grid-template-columns: 1.1fr 1fr; } }

.club__lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 600; line-height: 1.25;
  text-transform: uppercase;
  color: var(--verde-bosque);
  margin-bottom: 1.1rem;
}
.club__texto p + p { margin-top: 1rem; }
.club__texto { color: var(--texto); }

.club__foto { position: relative; }
.club__foto img { border-radius: var(--radius); box-shadow: var(--sombra-card); }
.club__foto figcaption {
  margin-top: 0.7rem; font-size: 0.9rem; color: var(--texto-suave);
  border-left: 4px solid var(--naranja-balon); padding-left: 0.75rem;
}

.valores {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.valores__item {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: 0 4px 16px -10px rgba(4, 47, 46, 0.18);
}
.valores__item svg { width: 38px; height: 38px; color: var(--verde-vivo); margin-bottom: 0.8rem; }
.valores__item h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.valores__item p { font-size: 0.93rem; color: var(--texto-suave); }

/* Vídeo con facade (Short vertical, 9:16) */
.video { max-width: min(380px, 100%); margin-inline: auto; }
.video__facade, .video__iframe-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--verde-noche);
  box-shadow: var(--sombra-card);
}
.video__facade img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.85;
}
.video__play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  color: var(--blanco);
  text-decoration: none;
  background: linear-gradient(to top, rgba(4, 47, 46, 0.75), rgba(4, 47, 46, 0.15) 55%);
}
.video__play svg {
  width: 84px; height: 84px; padding: 20px;
  border-radius: 50%;
  background: var(--naranja-balon); color: var(--verde-noche);
  transition: transform var(--transicion);
}
.video__play:hover svg { transform: scale(1.08); }
.video__play span {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.video__iframe-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 10. Equipos (tarjetas-camiseta, elemento firma) --------------------------- */
.equipos__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}
.camiseta {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform var(--transicion), border-color var(--transicion);
}
.camiseta:hover { transform: translateY(-4px); border-color: rgba(163, 230, 53, 0.5); }
/* El rayo diagonal de la equipación */
.camiseta::before {
  content: ""; position: absolute; top: -30%; right: -64px;
  width: 112px; height: 160%;
  transform: rotate(22deg);
  background: linear-gradient(90deg,
    transparent 0 10px,
    var(--amarillo-senyera) 10px 22px,
    transparent 22px 32px,
    var(--rojo-senyera) 32px 40px,
    transparent 40px 50px,
    var(--lima) 50px 55px,
    transparent 55px);
  opacity: 0.85;
  pointer-events: none;
}
.camiseta__dorsal {
  position: absolute; top: 0.4rem; right: 1.1rem;
  font-family: var(--font-display);
  font-weight: 800; font-size: 4.2rem; line-height: 1;
  transform: skewX(-8deg);
  color: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.camiseta h3 {
  color: var(--blanco);
  font-size: 1.45rem; font-weight: 700; letter-spacing: 0.03em;
  margin-bottom: 0.55rem;
  position: relative; z-index: 1; max-width: 85%;
}
.camiseta__edad, .camiseta__horario { position: relative; z-index: 1; }
.camiseta__edad {
  font-size: 0.9rem; font-weight: 600;
  color: var(--lima);
  margin-bottom: 0.15rem;
}
.camiseta__horario { font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); }

.equipos__aviso {
  margin-top: 2rem; text-align: center;
  font-size: 0.95rem; color: rgba(255, 255, 255, 0.78);
}
.equipos__aviso a { color: var(--lima); }
.equipos__aviso a:hover { color: var(--amarillo-senyera); }

/* 11. Galería ---------------------------------------------------------------- */
.galeria__grid { columns: 3 280px; column-gap: 1.1rem; }
.galeria__grid > li { break-inside: avoid; margin-bottom: 1.1rem; }
.galeria__item {
  display: block; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px -10px rgba(4, 47, 46, 0.3);
}
.galeria__item img {
  width: 100%; height: auto;
  transition: transform 300ms ease;
}
.galeria__item:hover img { transform: scale(1.04); }
.galeria__mas { text-align: center; margin-top: 1.8rem; color: var(--texto-suave); }

/* 12. Patrocinadores (carrusel) ----------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 0.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__pista {
  display: flex; align-items: center; gap: 1.25rem;
  width: max-content;
  padding-inline: 0.625rem;
}
html.js .marquee__pista { animation: marquee-desliza 38s linear infinite; }
.marquee:hover .marquee__pista,
.marquee:focus-within .marquee__pista,
.marquee[data-pausado] .marquee__pista { animation-play-state: paused; }
@keyframes marquee-desliza {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* Sin JS o con movimiento reducido: fila desplazable */
html:not(.js) .marquee { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }

.marquee__logo {
  flex: 0 0 auto;
  width: 200px; height: 118px;
  background: var(--blanco);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}
.marquee__logo img { width: 100%; height: 100%; object-fit: contain; }

.marquee__pausa {
  position: absolute; right: 0.9rem; bottom: 0.65rem; z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
}
.marquee__pausa:hover { background: rgba(255, 255, 255, 0.3); }
.marquee__pausa-icono {
  display: block; width: 10px; height: 12px;
  border-inline: 3.5px solid var(--blanco);
}
.marquee__pausa[aria-pressed="true"] .marquee__pausa-icono {
  border: 0;
  width: 0; height: 0;
  border-left: 11px solid var(--blanco);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.patros__instituciones {
  margin-top: 2.2rem; text-align: center;
  color: rgba(255, 255, 255, 0.85);
}
.patros__instituciones strong { color: var(--blanco); }
.patros__unete { margin-top: 0.7rem; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.patros__unete a { color: var(--lima); }
.patros__unete a:hover { color: var(--amarillo-senyera); }

/* 13. Únete (doble CTA) --------------------------------------------------------- */
.unete__grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.cta-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--sombra-card);
}
.cta-card h3 { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.02em; margin-bottom: 0.7rem; }
.cta-card p { margin-bottom: 1.4rem; max-width: 42ch; }
.cta-card__nota { font-size: 0.85rem; margin: 0.9rem 0 0; }

.cta-card--inscripcion { background: linear-gradient(160deg, var(--verde-medio), var(--verde-noche)); }
.cta-card--inscripcion h3 { color: var(--blanco); }
.cta-card--inscripcion p { color: rgba(255, 255, 255, 0.88); }
.cta-card--inscripcion .cta-card__nota { color: rgba(255, 255, 255, 0.6); }
/* Escudo como marca de agua */
.cta-card--inscripcion::after {
  content: ""; position: absolute; right: -55px; bottom: -70px;
  width: 260px; height: 260px;
  background: url("../assets/escudo/escudo-256.png") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

.cta-card--ropa { background: var(--blanco); border: 1px solid var(--linea); }
.cta-card--ropa p { color: var(--texto); }
.cta-card--ropa .cta-card__nota { color: var(--texto-suave); }

/* 14. Contacto -------------------------------------------------------------------- */
.contacto__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.contacto__item {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  text-align: center;
}
.contacto__item svg { width: 34px; height: 34px; margin: 0 auto 0.8rem; color: var(--verde-vivo); }
.contacto__item h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.contacto__item a { font-weight: 600; overflow-wrap: anywhere; }

/* 15. Footer ------------------------------------------------------------------------ */
.footer { background: var(--verde-noche); color: rgba(255, 255, 255, 0.8); }
.footer__senyera {
  height: 8px;
  background: repeating-linear-gradient(90deg,
    var(--amarillo-senyera) 0 26px,
    var(--rojo-senyera) 26px 40px);
}
.footer__inner {
  display: grid; gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer__copy { grid-column: 1 / -1; }
}
.footer__marca img { margin-bottom: 0.8rem; }
.footer__nombre {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.6rem;
  text-transform: uppercase; color: var(--blanco);
}
.footer__nombre em { font-style: normal; color: var(--lima); }
.footer__lema { font-size: 0.95rem; color: rgba(255, 255, 255, 0.6); }
.footer__nav ul { display: grid; gap: 0.4rem; list-style: none; padding: 0; }
.footer__nav a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer__nav a:hover { color: var(--lima); }
.footer__copy {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.4rem;
  font-size: 0.88rem; color: rgba(255, 255, 255, 0.55);
}

/* 16. Lightbox ------------------------------------------------------------------------- */
.lightbox {
  border: 0; padding: 0;
  background: transparent;
  max-width: 100vw; max-height: 100vh;
  overflow: visible;
  touch-action: pan-y;
}
.lightbox::backdrop { background: rgba(2, 22, 17, 0.93); }
.lightbox__figura { margin: 0; }
.lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 84vh;
  width: auto; height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__cerrar, .lightbox__flecha {
  position: fixed; z-index: 2;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--blanco);
  font-size: 1.7rem; line-height: 1;
  transition: background-color var(--transicion);
}
.lightbox__cerrar:hover, .lightbox__flecha:hover { background: rgba(255, 255, 255, 0.32); }
.lightbox__cerrar { top: 1rem; right: 1rem; }
.lightbox__flecha { top: 50%; transform: translateY(-50%); }
.lightbox__flecha--prev { left: 1rem; }
.lightbox__flecha--next { right: 1rem; }

/* 17. Accesibilidad y movimiento --------------------------------------------------------- */
/* Indicador de foco de dos capas: el anillo oscuro contrasta en fondos claros
   y el naranja en fondos oscuros (WCAG 1.4.11) */
:focus-visible {
  outline: 3px solid var(--naranja-balon);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--verde-noche);
  border-radius: 2px;
}

/* Revelado al hacer scroll (solo con JS activo) */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}
html.js .reveal.revelado { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .marquee__pista { animation: none; }
  html.js .marquee { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .marquee__pausa { display: none; }
}
