@font-face {
  font-family: "Karla";
  src: url("fonts/karla-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Paleta del manual de marca de Hugo Delfín */
:root {
  --azul: #0760ac;
  --azul-claro: #45a8fe;
  --azul-palido: #e8f3ff;
  --tinta: #202020;
  --gris: #a6a6a6;
  --gris-texto: #5c5c5c;
  --blanco: #ffffff;
  --amarillo: #f0c75e;
  --radio: 14px;
  --sombra: 0 18px 40px -18px rgba(7, 54, 100, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Karla", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--azul);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.shell {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--tinta);
  color: var(--blanco);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--azul-claro);
  outline-offset: 3px;
}

/* Botones */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 2px solid var(--azul);
  border-radius: 999px;
  background: var(--azul);
  color: var(--blanco);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: #054c88;
  border-color: #054c88;
}

.button--ghost {
  background: transparent;
  color: var(--azul);
}

.button--ghost:hover {
  background: var(--azul);
  color: var(--blanco);
}

.button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.button--claro {
  background: var(--blanco);
  border-color: var(--blanco);
  color: var(--azul);
}

.button--claro:hover {
  background: var(--azul-palido);
  border-color: var(--azul-palido);
}

.button--grande {
  min-height: 60px;
  padding: 0 36px;
  font-size: 1.125rem;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--azul);
}

/* Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(7, 96, 172, 0.1);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.topbar__logo img {
  width: 72px;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar__nav a:not(.button) {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
}

.topbar__nav a:not(.button):hover {
  color: var(--azul);
}

/* Portada */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 96px;
  text-align: center;
  background:
    radial-gradient(120% 70% at 100% 100%, rgba(69, 168, 254, 0.18), transparent 60%),
    radial-gradient(90% 60% at 0% 0%, rgba(69, 168, 254, 0.1), transparent 55%),
    var(--blanco);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__logo {
  width: min(620px, 100%);
  margin: 0 auto;
}

.hero__meta {
  margin: 4px 0 0;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tinta);
}

.hero__period {
  margin: 6px 0 0;
  color: var(--gris-texto);
  letter-spacing: 0.08em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hero__trazo {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(460px, 70%);
  transform: translateX(-50%);
  opacity: 0.85;
}

/* Introducción */
.intro {
  padding: 72px 0 24px;
}

.intro__inner {
  max-width: 820px;
  text-align: center;
}

.intro__lead {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.45;
  font-weight: 500;
}

/* Cifras */
.cifras {
  padding: 40px 0 88px;
  text-align: center;
}

.cifras__lista {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.cifra {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 20px;
  border-radius: var(--radio);
  background: var(--azul-palido);
  text-align: left;
}

.cifra__numero {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--azul);
}

.cifra__titulo {
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.cifra__detalle {
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--gris-texto);
}

/* Encabezados de sección */
.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
}

.section-head__trazo {
  width: min(280px, 60%);
  margin: 10px auto 0;
}

.section-head--claro .eyebrow,
.section-head--claro h2 {
  color: var(--blanco);
}

/* Informe */
.informe {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, #f4f9ff 0%, #ffffff 40%);
}

.indice {
  max-width: 900px;
  margin: 0 auto 36px;
}

.indice ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: apartado;
}

.indice li {
  counter-increment: apartado;
}

.indice a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(7, 96, 172, 0.25);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.indice a::before {
  content: counter(apartado);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--azul-palido);
  color: var(--azul);
  font-weight: 800;
  font-size: 0.8125rem;
}

.indice a:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.lector {
  max-width: 860px;
  margin: 0 auto;
}

.lector__barra {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--blanco);
  box-shadow: var(--sombra);
}

.lector__contador {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lector__descarga {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--azul-claro);
  color: var(--tinta);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.lector__descarga span {
  margin-left: 4px;
  font-weight: 500;
  opacity: 0.75;
}

.lector__paginas {
  display: grid;
  gap: 20px;
}

.pagina {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: var(--sombra);
  aspect-ratio: 1400 / 1980;
}

.pagina a {
  display: block;
  cursor: zoom-in;
}

.pagina img {
  width: 100%;
}

.lector__nota {
  max-width: 860px;
  margin: 22px auto 0;
  text-align: center;
  color: var(--gris-texto);
  font-size: 0.9375rem;
}

/* Instagram */
.instagram {
  padding: 88px 0;
  background: var(--azul);
  color: var(--blanco);
}

.instagram__usuario {
  display: inline-block;
  margin-top: 8px;
  color: var(--blanco);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  opacity: 0.9;
}

.instagram__usuario:hover {
  opacity: 1;
  text-decoration: underline;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ig-grid a {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.ig-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ig-grid a:hover img {
  transform: scale(1.04);
}

.instagram__accion {
  margin-top: 32px;
  text-align: center;
}

/* Contacto */
.contacto {
  position: relative;
  padding: 96px 0 0;
  text-align: center;
  background: var(--blanco);
}

.contacto__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.contacto h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
}

.contacto p {
  margin: 14px 0 30px;
  font-size: 1.1875rem;
  color: var(--gris-texto);
}

/* Ilustración de la costa de Boca del Río, teñida con el azul de marca */
.contacto__costa {
  width: 100%;
  aspect-ratio: 845 / 231;
  max-height: 320px;
  margin-top: 40px;
  background: var(--azul);
  -webkit-mask: url("assets/costa.png") center bottom / contain no-repeat;
  mask: url("assets/costa.png") center bottom / contain no-repeat;
  opacity: 0.9;
}

/* Pie */
.footer {
  padding: 44px 0 36px;
  background: var(--tinta);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer__logo {
  width: 140px;
  margin-bottom: 12px;
}

.footer p {
  margin: 0;
  letter-spacing: 0.06em;
}

.footer__legal {
  font-size: 0.875rem;
  color: var(--gris);
}

/* Página 404 */
.error {
  min-height: 70vh;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 64px 0;
  text-align: center;
}

.error h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
}

.error p {
  margin: 0;
  color: var(--gris-texto);
}

.error .button {
  justify-self: center;
}

@media (max-width: 900px) {
  .cifras__lista {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 72px;
  }

  .topbar__inner {
    min-height: 60px;
  }

  .topbar__logo img {
    width: 60px;
  }

  .topbar__nav {
    gap: 14px;
  }

  .topbar__nav a:not(.button) {
    display: none;
  }

  .hero {
    padding: 28px 0 80px;
  }

  .hero__meta {
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
  }

  .hero__actions .button {
    flex: 1 1 100%;
  }

  .intro {
    padding-top: 56px;
  }

  .cifras {
    padding-bottom: 64px;
  }

  .cifras__lista {
    gap: 10px;
  }

  .cifra {
    padding: 20px 16px;
  }

  .informe,
  .instagram {
    padding: 64px 0;
  }

  .indice ol {
    justify-content: flex-start;
  }

  .lector__barra {
    top: 68px;
    padding-left: 16px;
  }

  .lector__descarga span {
    display: none;
  }

  .lector__paginas {
    gap: 12px;
  }

  .ig-grid {
    gap: 4px;
  }

  .ig-grid a {
    border-radius: 4px;
  }

  .contacto {
    padding-top: 64px;
  }

  .button--grande {
    width: 100%;
  }
}

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

  .button,
  .ig-grid img {
    transition: none;
  }
}
