/* Baxida Noticias. Mundo: arte concreto brasileño sobre la geometría de la bandera. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --verde: #0C9844;
  --amarillo: #FFC700;
  --cielo: #78ACFE;
  --brote: #79C310;
  --azul: #095DCF;
  --tinta: #0B1B33;
  --tinta-suave: #3A4A63;
  --papel: #FFFFFF;
  --papel-2: #F1F5F2;

  --display: "Jost", "Futura", "Century Gothic", sans-serif;
  --texto: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-18: 1.125rem;
  --t-22: 1.375rem;
  --t-28: clamp(1.5rem, 1.2rem + 1vw, 1.75rem);
  --t-40: clamp(2rem, 1.4rem + 2.4vw, 2.5rem);
  --t-56: clamp(2.5rem, 1.6rem + 3.6vw, 3.5rem);
  --t-88: clamp(3.25rem, 1.5rem + 7vw, 6rem);

  --margen: clamp(1.25rem, 4vw, 4rem);
  --ancho: 76rem;
  --sal: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: var(--t-18);
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--azul); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }
.seccion--azul :focus-visible, .portada :focus-visible { outline-color: var(--amarillo); }

.icono { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--amarillo); color: var(--tinta); padding: 0.75rem 1rem; font-weight: 600;
}
.saltar:focus { top: 1rem; }

/* Rombo: el marcador del sistema */
.rombo {
  display: inline-block; width: 0.7em; height: 0.7em; flex: none;
  background: var(--amarillo); transform: rotate(45deg); margin-right: 0.6em;
}
.rombo--verde { background: var(--verde); }
.rombo--tinta { background: var(--tinta); }
.rombo--azul { background: var(--azul); }
.rombo--brote { background: var(--brote); }

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem var(--margen);
  background: var(--papel);
  border-bottom: 4px solid var(--verde);
}
.marca {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--tinta); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: var(--t-22); letter-spacing: -0.01em;
}
.marca img { width: 40px; height: 40px; }
.barra nav { display: flex; gap: clamp(0.75rem, 2vw, 2rem); }
.barra nav a {
  color: var(--tinta); text-decoration: none; font-weight: 600; font-size: var(--t-16);
  padding: 0.5rem 0; border-bottom: 3px solid transparent;
  transition: border-color 200ms var(--sal);
}
.barra nav a:hover { border-color: var(--amarillo); }
@media (max-width: 40rem) {
  .marca span { display: none; }
  .barra nav a { font-size: var(--t-14); }
}

/* Portada */
.portada {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;
  min-height: min(52rem, calc(100svh - 4rem));
  padding: clamp(2.5rem, 6vw, 5rem) var(--margen);
  background: var(--verde); color: var(--papel);
}
.portada__texto { position: relative; z-index: 2; max-width: 40rem; display: grid; gap: 1.25rem; justify-items: start; }
.portada__linea {
  display: flex; align-items: center;
  font-weight: 600; font-size: var(--t-16); letter-spacing: 0.02em;
}
.portada__marca {
  font-family: var(--display); font-weight: 800; font-size: var(--t-88);
  line-height: 0.92; letter-spacing: -0.03em;
}
.portada__marca span { display: block; color: var(--amarillo); }
.portada__lema { font-family: var(--display); font-weight: 500; font-size: var(--t-28); }

.ultimo {
  margin-top: 1rem; width: 100%; max-width: 34rem;
  background: var(--amarillo); color: var(--tinta);
  padding: 1.5rem 1.5rem 1.6rem; display: grid; gap: 0.75rem; justify-items: start;
}
.ultimo__meta { display: flex; align-items: center; gap: 0.6rem; font-size: var(--t-14); font-weight: 600; }
.vivo { width: 0.65rem; height: 0.65rem; background: var(--verde); transform: rotate(45deg); }
.ultimo__titulo { font-family: var(--display); font-weight: 700; font-size: var(--t-28); line-height: 1.15; }
.enlace-claro {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--papel); font-weight: 600; font-size: var(--t-16);
}

.portada__bandera { position: absolute; inset: 0 0 0 auto; width: 52%; display: grid; place-items: center; pointer-events: none; }
.bandera { width: min(56rem, 120%); height: auto; transform: translateX(10%); overflow: visible; }
.bandera__rombo { fill: var(--amarillo); }
.bandera__esfera { fill: var(--azul); }
.bandera__banda { fill: none; stroke: var(--papel); stroke-width: 46; }
.bandera__texto { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: 0.05em; fill: var(--verde); }
.bandera__estrellas circle { fill: var(--papel); }
.bandera__rombo, .bandera__globo { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .js .bandera__rombo { animation: rombo-entra 1100ms var(--sal) both; }
  .js .bandera__globo { animation: globo-entra 1300ms 120ms var(--sal) both; }
}
@keyframes rombo-entra { from { transform: scale(0.82) rotate(-6deg); } to { transform: none; } }
@keyframes globo-entra { from { transform: scale(0.6); } to { transform: none; } }

@media (max-width: 56rem) {
  .portada { grid-template-columns: 1fr; padding-top: 2rem; padding-bottom: 0; min-height: 0; }
  .portada__bandera { position: relative; inset: auto; width: auto; margin: 2rem calc(var(--margen) * -1) 0; height: 21rem; overflow: hidden; }
  .bandera { width: 30rem; transform: none; }
}

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.25rem;
  font-family: var(--texto); font-weight: 600; font-size: var(--t-16); line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 3px solid transparent; border-radius: 4px;
  transition: transform 180ms var(--sal), background-color 180ms var(--sal), color 180ms var(--sal);
}
.boton:active { transform: translateY(1px); }
.boton--tinta { background: var(--tinta); color: var(--papel); }
.boton--tinta:hover { background: var(--azul); }
.boton--contorno { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.boton--contorno:hover { background: var(--tinta); color: var(--papel); }
.boton--blanco { background: var(--papel); color: var(--azul); }
.boton--blanco:hover { background: var(--amarillo); color: var(--tinta); }
.boton[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Secciones */
.seccion { padding: clamp(4rem, 9vw, 7.5rem) var(--margen); }
.seccion > * { max-width: var(--ancho); margin-inline: auto; }
.seccion__cabeza { display: grid; gap: 0.75rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.titular { font-family: var(--display); font-weight: 800; font-size: var(--t-56); line-height: 1; letter-spacing: -0.025em; }
.subtitular { display: flex; align-items: center; font-family: var(--display); font-weight: 700; font-size: var(--t-28); line-height: 1.2; }
.seccion__bajada { font-size: var(--t-22); color: var(--tinta-suave); max-width: 40ch; line-height: 1.45; }
.seccion--azul { background: var(--azul); color: var(--papel); }
.seccion--azul .seccion__bajada { color: #D9E6FB; }
.cargando, .vacio { font-size: var(--t-18); color: var(--tinta-suave); }
.seccion--azul .cargando, .seccion--azul .vacio { color: #D9E6FB; }
.mas { display: flex; justify-content: center; margin-top: 2.5rem; }
.mas:has(> [hidden]) { display: none; }

/* Reportes */
.reportes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem); }
.nota { grid-column: span 4; display: grid; gap: 0.75rem; align-content: start; padding-top: 1.1rem; border-top: 6px solid var(--verde); position: relative; }
.nota:nth-child(4n+2) { border-top-color: var(--azul); }
.nota:nth-child(4n+3) { border-top-color: var(--amarillo); }
.nota:nth-child(4n+4) { border-top-color: var(--brote); }
.nota__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; font-size: var(--t-14); font-weight: 600; color: var(--tinta-suave); }
.nota__comite { display: inline-flex; align-items: center; color: var(--tinta); }
.nota__comite .rombo { width: 0.55em; height: 0.55em; margin-right: 0.5em; }
.nota__titulo { font-family: var(--display); font-weight: 700; font-size: var(--t-28); line-height: 1.15; letter-spacing: -0.01em; }
.nota__titulo a { color: var(--tinta); text-decoration: none; }
.nota__titulo a::after { content: ""; position: absolute; inset: 0; }
.nota:hover .nota__titulo a { text-decoration: underline; text-decoration-color: var(--amarillo); text-decoration-thickness: 4px; }
.nota__resumen { color: var(--tinta-suave); font-size: var(--t-16); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nota__autor { font-size: var(--t-14); font-weight: 600; }
.nota__portada { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; background: var(--cielo); }
.nota__nuevo { background: var(--brote); color: var(--tinta); padding: 0.1rem 0.5rem; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }

.nota--principal { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(1.5rem, 3vw, 3rem); align-items: start; padding-top: 1.5rem; }
.nota--principal .nota__portada { grid-row: 1 / span 5; grid-column: 1; aspect-ratio: 4 / 3; }
.nota--principal > :not(.nota__portada) { grid-column: 2; }
.nota--principal .nota__titulo { font-size: var(--t-40); line-height: 1.08; }
.nota--principal .nota__resumen { font-size: var(--t-18); -webkit-line-clamp: 6; }
.nota--principal:not(:has(.nota__portada)) { grid-template-columns: 1fr; }
.nota--principal:not(:has(.nota__portada)) > * { grid-column: 1; max-width: 48rem; }

@media (max-width: 60rem) { .nota { grid-column: span 6; } }
@media (max-width: 40rem) {
  .nota, .nota--principal { grid-column: 1 / -1; }
  .nota--principal { grid-template-columns: 1fr; }
  .nota--principal > *, .nota--principal .nota__portada { grid-column: 1; grid-row: auto; }
}

.vacio-bloque { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.5rem; padding: 2rem 0; }
.vacio-bloque .rombo { width: 3rem; height: 3rem; margin: 0 0.75rem; background: transparent; border: 6px solid var(--verde); }
.seccion--azul .vacio-bloque .rombo { border-color: var(--amarillo); }

/* Galería */
.galeria { columns: 3 18rem; column-gap: 1.25rem; }
.foto { break-inside: avoid; margin: 0 0 1.25rem; }
.foto button { display: block; width: 100%; padding: 0; border: 0; background: var(--cielo); cursor: zoom-in; }
.foto img { width: 100%; height: auto; transition: opacity 250ms var(--sal), transform 400ms var(--sal); }
.foto button:hover img { opacity: 0.88; }
.foto figcaption { padding-top: 0.55rem; font-size: var(--t-14); line-height: 1.45; color: #E4EDFC; }
.foto figcaption b { color: var(--papel); font-weight: 600; }
@media (max-width: 40rem) {
  .galeria { columns: 2; column-gap: 0.75rem; }
  .foto { margin-bottom: 0.9rem; }
  .foto figcaption { font-size: 0.8125rem; }
}

/* Visor de fotos */
.visor { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(11, 27, 51, 0.96); color: var(--papel); }
.visor[open] { display: grid; place-items: center; }
.visor::backdrop { background: rgba(11, 27, 51, 0.6); }
.visor__figura { margin: 0; display: grid; gap: 0.75rem; justify-items: center; padding: 4rem 4.5rem 2rem; max-width: 100%; }
.visor__figura img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; }
.visor__figura figcaption { font-size: var(--t-16); max-width: 60ch; text-align: center; color: #E4EDFC; }
.visor__boton { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 4px; background: var(--papel); color: var(--tinta); cursor: pointer; }
.visor__boton:hover { background: var(--amarillo); }
.visor__cerrar { top: 1rem; right: 1rem; }
.visor__ant { left: 1rem; top: 50%; translate: 0 -50%; }
.visor__sig { right: 1rem; top: 50%; translate: 0 -50%; }
@media (max-width: 40rem) {
  .visor__figura { padding: 4.5rem 0.75rem 5rem; }
  .visor__ant, .visor__sig { top: auto; bottom: 1rem; translate: none; }
}

/* Nosotros */
.nosotros { padding-bottom: clamp(3rem, 6vw, 5rem); }
.nosotros__objetivo { display: grid; gap: 1.25rem; max-width: 56rem; margin-left: max(0px, calc((100% - var(--ancho)) / 2)); }
.destacado { font-family: var(--display); font-weight: 500; font-size: var(--t-40); line-height: 1.2; letter-spacing: -0.01em; }
.nosotros__objetivo > p:last-child { max-width: 65ch; color: var(--tinta-suave); }

.compromiso {
  position: relative; overflow: hidden; background: var(--amarillo); color: var(--tinta);
  padding: clamp(4rem, 8vw, 6.5rem) var(--margen);
}
.compromiso::before {
  content: ""; position: absolute; width: 34rem; height: 34rem; right: -10rem; top: 50%;
  background: var(--brote); transform: translateY(-50%) rotate(45deg);
}
.compromiso__interior { position: relative; max-width: var(--ancho); margin-inline: auto; display: grid; gap: 1.5rem; }
.compromiso__interior > * { max-width: 46rem; }
.compromiso__cita { margin: 0; font-family: var(--display); font-weight: 700; font-size: var(--t-56); line-height: 1.05; letter-spacing: -0.02em; }
.compromiso__interior > p { max-width: 65ch; }
@media (max-width: 56rem) { .compromiso::before { width: 18rem; height: 18rem; right: -9rem; top: 3rem; transform: rotate(45deg); } }

/* Historia */
.historia { background: var(--papel-2); }
.linea { list-style: none; padding: 0; margin-top: 0; position: relative; display: grid; gap: clamp(2.25rem, 4vw, 3.25rem); }
.linea::before { content: ""; position: absolute; left: 0.9rem; top: 0.6rem; bottom: 0.6rem; width: 6px; background: var(--verde); }
.linea__punto { position: relative; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 0.5rem 2.5rem; padding-left: 3.5rem; }
.linea__punto::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--verde); border: 6px solid var(--papel-2); }
.linea__punto--tinta::before { background: var(--tinta); }
.linea__punto--azul::before { background: var(--azul); }
.linea__fecha { font-family: var(--display); font-weight: 700; font-size: var(--t-28); line-height: 1.2; color: var(--tinta); }
.linea__texto { display: grid; gap: 0.9rem; max-width: 65ch; }
@media (max-width: 48rem) { .linea__punto { grid-template-columns: 1fr; } }

/* Pie */
.pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2rem;
  padding: clamp(3rem, 6vw, 4.5rem) var(--margen);
  background: var(--tinta); color: var(--papel);
}
.pie__marca { display: flex; align-items: center; gap: 1.25rem; }
.pie__marca img { width: 96px; height: 96px; }
.pie__nombre { font-family: var(--display); font-weight: 800; font-size: var(--t-28); }
.pie__nota { color: #B9C6DA; font-size: var(--t-16); }
.pie__nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.pie__nav a { color: var(--papel); font-weight: 600; font-size: var(--t-16); text-decoration: none; }
.pie__nav a:hover { text-decoration: underline; text-decoration-color: var(--amarillo); }
.pie__acceso { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--amarillo) !important; }

/* Página de reporte */
.cabeza-reporte { background: var(--azul); color: var(--papel); padding: clamp(2.5rem, 6vw, 4.5rem) var(--margen) clamp(3rem, 6vw, 5rem); }
.cabeza-reporte > * { max-width: 52rem; margin-inline: auto; }
.cabeza-reporte__volver { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--papel); font-weight: 600; font-size: var(--t-16); margin-bottom: 2rem; }
.cabeza-reporte__comite { display: flex; align-items: center; font-weight: 600; font-size: var(--t-16); margin-bottom: 1rem; }
.cabeza-reporte h1 { font-family: var(--display); font-weight: 800; font-size: var(--t-56); line-height: 1.04; letter-spacing: -0.025em; }
.cabeza-reporte__resumen { margin-top: 1.25rem; font-size: var(--t-22); line-height: 1.45; color: #E4EDFC; }
.cabeza-reporte__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 1.75rem; font-size: var(--t-16); font-weight: 600; }
.cuerpo-reporte { padding: clamp(2.5rem, 5vw, 4rem) var(--margen) clamp(4rem, 8vw, 6rem); }
.cuerpo-reporte > * { max-width: 42rem; margin-inline: auto; }
.cuerpo-reporte .portada-reporte { max-width: 60rem; margin: calc(clamp(2.5rem, 5vw, 4rem) * -1 - 2rem) auto clamp(2rem, 4vw, 3rem); width: 100%; background: var(--cielo); }
.texto-reporte { display: grid; gap: 1.25rem; font-size: 1.1875rem; line-height: 1.7; }
.acciones-reporte { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 6px solid var(--verde); }
.pdf-visor { display: block; width: 100%; max-width: 60rem; height: 80vh; margin-top: 2rem; border: 3px solid var(--tinta); background: var(--papel-2); }
@media (max-width: 40rem) { .pdf-visor { display: none; } }
.aviso { padding: 1rem 1.25rem; background: var(--amarillo); color: var(--tinta); font-weight: 600; }
.copiado { font-size: var(--t-14); font-weight: 600; color: var(--verde); align-self: center; }
