:root {
  --tinta: #102f37;
  --mar: #123d4a;
  --turquesa: #1e8c8a;
  --cielo: #b9e5e0;
  --sol: #ffd65a;
  --coral: #ff765f;
  --papel: #f7f4ea;
  --blanco: #fffdf7;
  --borde: #173c44;
  --sombra: 8px 8px 0 #102f37;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: inherit;
}

.salto {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: -5rem;
  padding: 0.75rem 1rem;
  background: var(--sol);
  border: 2px solid var(--borde);
  font-weight: 700;
}

.salto:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cabecera {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.75rem clamp(1rem, 5vw, 5rem);
  background: rgba(247, 244, 234, 0.94);
  border-bottom: 2px solid var(--borde);
  backdrop-filter: blur(12px);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.marca-icono {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--coral);
  border: 2px solid var(--borde);
  border-radius: 50% 42% 50% 45%;
  color: var(--blanco);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.35rem;
  transform: rotate(-5deg);
}

.menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
}

.menu a {
  padding: 0.4rem 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible,
.menu a.activo {
  border-color: var(--coral);
}

.menu-boton {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  background: var(--blanco);
  border: 2px solid var(--borde);
}

.menu-boton span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--tinta);
}

.portada {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 6vw, 6rem);
  min-height: calc(100vh - 76px);
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 8vw, 8rem);
  align-items: center;
  overflow: hidden;
}

.portada::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(18, 61, 74, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 61, 74, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to right, black, transparent 75%);
}

.portada-texto {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.etiqueta {
  margin: 0 0 0.7rem;
  color: var(--turquesa);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 0.98;
}

h1 {
  max-width: 760px;
  font-size: clamp(4rem, 10vw, 8.5rem);
  letter-spacing: -0.045em;
}

h1 span {
  position: relative;
  color: var(--coral);
  font-style: italic;
  white-space: nowrap;
}

h1 span::after {
  position: absolute;
  right: 0;
  bottom: -0.08em;
  left: 0;
  height: 8px;
  background: var(--sol);
  content: "";
  transform: rotate(-2deg);
}

.introduccion {
  max-width: 570px;
  margin: 2rem 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.boton {
  display: inline-block;
  padding: 0.9rem 1.35rem;
  background: var(--sol);
  border: 2px solid var(--borde);
  box-shadow: 5px 5px 0 var(--tinta);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.boton:hover,
.boton:focus-visible {
  box-shadow: 2px 2px 0 var(--tinta);
  transform: translate(3px, 3px);
}

.retrato {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  margin-inline: auto;
  padding: 1rem 1rem 1.4rem;
  background: var(--blanco);
  border: 2px solid var(--borde);
  box-shadow: var(--sombra);
  transform: rotate(3deg);
}

.cinta {
  position: absolute;
  z-index: 2;
  top: -20px;
  left: 50%;
  width: 120px;
  height: 38px;
  background: rgba(255, 214, 90, 0.82);
  transform: translateX(-50%) rotate(-4deg);
}

.foto-marcador {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #2d3034;
  border: 2px solid var(--borde);
  color: var(--mar);
  text-align: center;
}

.foto-personal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.foto-personal p {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 1.6rem);
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: var(--sol);
  border: 2px solid var(--borde);
  box-shadow: 3px 3px 0 var(--tinta);
  font-weight: 700;
  transform: translateX(-50%) rotate(-2deg);
}

.nota {
  margin: 1.1rem 0 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
}

.sello {
  position: absolute;
  display: grid;
  width: 105px;
  height: 105px;
  place-items: center;
  border: 4px double var(--coral);
  border-radius: 50%;
  color: var(--coral);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-14deg);
}

.sello-uno {
  right: 4%;
  bottom: 7%;
}

.formas-uno {
  position: absolute;
  z-index: -1;
  top: 10%;
  right: -9%;
  width: 34vw;
  height: 34vw;
  min-width: 330px;
  min-height: 330px;
  background: var(--sol);
  border: 3px solid var(--borde);
  border-radius: 46% 54% 61% 39% / 52% 37% 63% 48%;
  transform: rotate(18deg);
}

.seccion {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 8vw, 8rem);
}

.seccion-encabezado {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.numero {
  margin: 0.35rem 0 0;
  padding: 0.15rem 0.65rem;
  background: var(--sol);
  border: 2px solid var(--borde);
  border-radius: 50%;
  font-weight: 700;
  transform: rotate(-8deg);
}

h2 {
  font-size: clamp(3rem, 7vw, 6rem);
}

.tarjetas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}

.tarjeta {
  position: relative;
  min-height: 245px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 2px solid var(--borde);
  box-shadow: 6px 6px 0 var(--tinta);
  transition: transform 180ms ease;
}

.tarjeta:hover {
  transform: translateY(-5px) rotate(-0.5deg);
}

.tarjeta:nth-child(2),
.tarjeta:nth-child(4) {
  transform: translateY(18px);
}

.tarjeta:nth-child(2):hover,
.tarjeta:nth-child(4):hover {
  transform: translateY(13px) rotate(0.5deg);
}

.tarjeta-azul {
  background: var(--cielo);
}

.tarjeta-amarilla {
  background: var(--sol);
}

.tarjeta-coral {
  background: #ffad9f;
}

.tarjeta-verde {
  background: #a8d9c5;
}

.tarjeta-icono {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  place-items: center;
  background: var(--blanco);
  border: 2px solid var(--borde);
  border-radius: 50%;
  font-size: 1.4rem;
}

.tarjeta h3,
.publicacion h3 {
  margin: 0 0 0.7rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.1;
}

.tarjeta p {
  max-width: 42ch;
  margin: 0;
}

.publicaciones {
  margin-top: 2rem;
  background: var(--mar);
  color: var(--blanco);
}

.seccion-encabezado-claro .etiqueta {
  color: var(--sol);
}

.lista-publicaciones {
  max-width: 1050px;
}

.publicacion {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  box-shadow: 8px 8px 0 var(--sol);
  color: var(--tinta);
}

.fecha {
  display: grid;
  width: 92px;
  min-height: 92px;
  place-content: center;
  background: var(--coral);
  border: 2px solid var(--borde);
  color: var(--blanco);
  line-height: 1;
  text-align: center;
}

.fecha span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fecha strong {
  margin-top: 0.35rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.3rem;
  font-weight: 400;
}

.estado {
  margin: 0 0 0.25rem;
  color: var(--turquesa);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.publicacion-contenido p:last-child {
  margin: 0;
  color: #49666c;
}

.flecha {
  font-size: 2.2rem;
}

.aviso {
  max-width: 600px;
  margin: 2.5rem 0 0;
  color: var(--cielo);
}

.pie {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
  align-items: center;
  background: var(--sol);
  border-top: 2px solid var(--borde);
  color: var(--tinta);
}

.pie p {
  margin: 0;
}

.pie p:first-child {
  font-weight: 700;
}

.pie a {
  justify-self: end;
  font-weight: 700;
}

@media (max-width: 850px) {
  .menu-boton {
    display: block;
  }

  .menu {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: 0;
    display: none;
    padding: 1rem;
    background: var(--papel);
    border-bottom: 2px solid var(--borde);
    flex-direction: column;
    align-items: stretch;
  }

  .menu.abierto {
    display: flex;
  }

  .menu a {
    padding: 0.7rem 0;
  }

  .portada {
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .portada-texto {
    text-align: left;
  }

  .retrato {
    width: min(88%, 390px);
    margin-top: 1.5rem;
  }

  .sello-uno {
    right: auto;
    bottom: 2%;
    left: 5%;
  }

  .formas-uno {
    top: 48%;
    right: -25%;
    width: 70vw;
    height: 70vw;
  }

  .tarjetas {
    grid-template-columns: 1fr;
  }

  .tarjeta:nth-child(2),
  .tarjeta:nth-child(4),
  .tarjeta:nth-child(2):hover,
  .tarjeta:nth-child(4):hover {
    transform: none;
  }

  .pie {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pie a {
    justify-self: center;
  }
}

@media (max-width: 540px) {
  .marca span:last-child {
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(3.65rem, 20vw, 5.3rem);
  }

  .seccion-encabezado {
    gap: 0.9rem;
  }

  .publicacion {
    grid-template-columns: 1fr;
  }

  .fecha {
    width: 78px;
    min-height: 78px;
  }

  .flecha {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
