/* ¡Volvió! · página web
   Idea: fotos reales pegadas con cinta en una pared, como los afiches de barrio.
   Todo lo demás, tranquilo y legible. */
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito.woff') format('woff');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage.woff') format('woff');
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --marino: #1E2A5E;
  --marino-suave: #2B3A78;
  --naranja: #F0642D;
  --naranja-texto: #C84E1E;
  --verde: #178F49;
  --crema: #FBF4E8;
  --pared: #F2E6D2;
  --papel: #FFFDF8;
  --cinta: rgba(222, 206, 172, 0.72);
  --tinta: #1A1F36;
  --gris: #5D6488;
  --linea: #E6DAC6;
  --titulo: 'Bricolage', 'Nunito', system-ui, sans-serif;
  --texto: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ancho: 68rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--texto);
  font-weight: 500;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--marino); font-weight: 800; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--titulo); color: var(--marino); margin: 0; line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 6px; }

.envoltura { width: 100%; max-width: var(--ancho); margin: 0 auto; padding-inline: 1.25rem; }
.suave { color: var(--gris); }
.mini { font-size: 0.95rem; }

/* ---------- barra ---------- */
.barra { padding-block: 1rem 0.5rem; }
.barra .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.barra img { height: 1.9rem; width: auto; }
.barra nav { display: flex; gap: 1.25rem; }
.barra nav a { text-decoration: none; font-size: 0.98rem; }

/* ---------- botones y campos ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3.4rem; padding: 0 1.5rem; border-radius: 999px; border: 0;
  background: var(--marino); color: #fff; text-decoration: none; cursor: pointer;
  font: 800 1.06rem var(--texto);
}
.boton:hover { background: var(--marino-suave); }
.boton:active { transform: translateY(1px); }
.boton.verde { background: var(--verde); }
.boton.naranja { background: var(--naranja); }
.boton.borde { background: transparent; color: var(--marino); box-shadow: inset 0 0 0 2px var(--marino); }
.boton.ancho { width: 100%; }
.boton[disabled] { opacity: 0.5; cursor: default; }
.boton svg { width: 1.35rem; height: 1.35rem; flex: none; }

.avisame { display: grid; gap: 0.6rem; margin-top: 1.75rem; max-width: 30rem; }
.avisame label { font-weight: 800; color: var(--marino); }
.avisame .fila { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.avisame input {
  flex: 1 1 13rem; min-height: 3.4rem; border-radius: 999px; border: 2px solid var(--linea);
  background: #fff; padding: 0 1.25rem; font: 700 1.06rem var(--texto); color: var(--tinta); min-width: 0;
}
.avisame input:focus { outline: none; border-color: var(--marino); }
.avisame .boton { flex: 0 0 auto; }
.avisame .estado { font-weight: 700; min-height: 1.5em; }

/* ---------- foto pegada con cinta ---------- */
.pegada {
  position: relative; background: var(--papel); padding: 0.7rem 0.7rem 0.9rem;
  box-shadow: 0 1px 1px rgba(26,31,54,.08), 0 14px 28px -12px rgba(26,31,54,.35);
  transform: rotate(var(--giro, -1.5deg));
}
.pegada::before, .pegada::after {
  content: ''; position: absolute; top: -0.85rem; width: 5.5rem; height: 1.7rem; background: var(--cinta);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.pegada::before { left: 12%; transform: rotate(-6deg); }
.pegada::after { right: 12%; transform: rotate(5deg); }
.pegada img { width: 100%; height: auto; }
.pegada figcaption { font-weight: 800; color: var(--tinta); padding-top: 0.6rem; font-size: 1rem; }
.pegada figcaption span { color: var(--gris); font-weight: 600; }

/* ---------- portada ---------- */
.portada { background: var(--pared); padding-block: 1.5rem 3.25rem; overflow: hidden; }
.portada > .envoltura { display: grid; gap: 2rem; align-items: center; }
.portada .pegada { max-width: 19rem; width: 82%; margin: 1.25rem auto 0; order: -1; }
.portada p.bajada { font-size: 1.2rem; margin-top: 1.1rem; max-width: 34rem; }

@media (min-width: 52rem) {
  .portada { padding-block: 2.5rem 4.5rem; }
  .portada > .envoltura { grid-template-columns: 1.1fr 0.9fr; }
  .portada .pegada { max-width: 26rem; width: 100%; margin: 0 0 0 auto; order: 0; }
}

.aviso-cohetes { background: var(--naranja); color: #fff; }
.aviso-cohetes .envoltura { padding-block: 0.8rem; display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 700; }
.aviso-cohetes a { color: #fff; }

/* ---------- secciones ---------- */
.seccion { padding-block: 3.5rem; }
.seccion .cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.seccion .cabeza p { max-width: 32rem; margin-top: 0.6rem; }

/* tarjetas de mascotas: mini afiches */
.afiches { display: flex; gap: 1.25rem; overflow-x: auto; padding: 1rem 0.25rem 1.25rem; margin-inline: -0.25rem; scroll-snap-type: x mandatory; }
.afiches::-webkit-scrollbar { display: none; }
.afiche {
  --giro: 0deg;
  flex: 0 0 15rem; scroll-snap-align: start; text-decoration: none; color: inherit; font-weight: 500;
  background: var(--papel); box-shadow: 0 1px 1px rgba(26,31,54,.08), 0 10px 20px -10px rgba(26,31,54,.3);
  transform: rotate(var(--giro)); position: relative; transition: transform .2s ease;
}
.afiche:nth-child(3n+1) { --giro: -1deg; }
.afiche:nth-child(3n+2) { --giro: 0.8deg; }
.afiche:nth-child(3n) { --giro: -0.4deg; }
.afiche:hover { transform: rotate(0deg) translateY(-3px); }
.afiche::before { content: ''; position: absolute; top: -0.7rem; left: 50%; width: 4.5rem; height: 1.4rem; margin-left: -2.25rem; background: var(--cinta); transform: rotate(-3deg); z-index: 1; }
.afiche .franja { font-family: var(--titulo); font-weight: 800; letter-spacing: 0.08em; font-size: 0.95rem; color: #fff; background: var(--naranja); padding: 0.45rem 0.8rem; }
.afiche .franja.encontrada { background: var(--marino); }
.afiche .franja.volvio { background: var(--verde); }
.afiche .foto { aspect-ratio: 1; background: #E9DFCF center / cover no-repeat; }
.afiche .datos { padding: 0.8rem 0.9rem 1rem; }
.afiche .nombre { font-family: var(--titulo); font-weight: 800; font-size: 1.6rem; color: var(--tinta); line-height: 1.05; }
.afiche .premio { display: inline-block; margin-top: 0.35rem; font-weight: 800; color: var(--naranja-texto); }

.vacio { display: flex; gap: 1.25rem; align-items: center; background: var(--papel); padding: 1rem; box-shadow: 0 10px 20px -12px rgba(26,31,54,.3); max-width: 34rem; }
.vacio img { width: 6.5rem; height: 6.5rem; object-fit: cover; flex: none; }

/* primeras horas */
.horas { background: var(--marino); color: var(--crema); }
.horas h2 { color: var(--crema); }
.horas .cabeza p { color: #C9CDE0; }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: paso; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 3.25rem 1fr; gap: 0.25rem 1rem; }
.pasos li::before {
  content: counter(paso); grid-row: span 2; font-family: var(--titulo); font-weight: 800; font-size: 3rem; line-height: 0.9; color: var(--naranja);
}
.pasos h3 { color: var(--crema); }
.pasos p { color: #D6D9E8; }
@media (min-width: 52rem) { .pasos { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* placa y nota */
.dos { display: grid; gap: 2.25rem; align-items: center; }
@media (min-width: 52rem) { .dos { grid-template-columns: 1fr 1fr; gap: 4rem; } .dos.invertido > :first-child { order: 2; } }
.dos .pegada { max-width: 30rem; }
.lista-simple { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.75rem; }
.lista-simple li { padding-left: 1.6rem; position: relative; }
.lista-simple li::before { content: ''; position: absolute; left: 0.2rem; top: 0.55rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--naranja); }
.etiqueta { display: inline-block; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--naranja-texto); margin-bottom: 0.75rem; }
.nota { background: var(--pared); }
.nota blockquote { margin: 1.25rem 0 0; font-size: 1.25rem; line-height: 1.55; color: var(--tinta); }
.nota .firma { margin-top: 1rem; font-weight: 800; color: var(--marino); }

/* pie */
.pie { background: var(--marino); color: #C9CDE0; padding-block: 2.75rem 3rem; }
.pie .envoltura { display: grid; gap: 1.5rem; }
.pie img { height: 2rem; width: auto; }
.pie nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.pie a { color: var(--crema); font-weight: 700; }

/* ---------- página de una mascota / placa ---------- */
.ficha-pagina { background: var(--pared); padding-block: 1rem 3rem; min-height: 70vh; }
.ficha { max-width: 34rem; margin: 0 auto; }
.ficha .afiche-grande { background: var(--papel); position: relative; box-shadow: 0 1px 1px rgba(26,31,54,.08), 0 16px 30px -14px rgba(26,31,54,.4); margin-top: 1.25rem; }
.ficha .afiche-grande::before, .ficha .afiche-grande::after { content: ''; position: absolute; top: -0.8rem; width: 5.5rem; height: 1.6rem; background: var(--cinta); z-index: 1; }
.ficha .afiche-grande::before { left: 8%; transform: rotate(-5deg); }
.ficha .afiche-grande::after { right: 8%; transform: rotate(4deg); }
.ficha .titular { font-family: var(--titulo); font-weight: 800; letter-spacing: 0.1em; text-align: center; color: #fff; background: var(--naranja); font-size: 1.6rem; padding: 0.7rem 1rem; }
.ficha .titular.encontrada { background: var(--marino); }
.ficha .titular.volvio { background: var(--verde); }
.ficha .titular.hola { background: var(--marino); letter-spacing: 0.02em; }
.ficha .foto { aspect-ratio: 1; background: #E9DFCF center / cover no-repeat; display: grid; place-items: center; }
.ficha .cuerpo { padding: 1.25rem 1.25rem 1.5rem; display: grid; gap: 0.9rem; }
.ficha h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
.ficha .linea { display: flex; gap: 0.45rem; align-items: center; color: var(--gris); font-weight: 600; }
.ficha .linea svg { width: 1.1rem; height: 1.1rem; flex: none; }
.ficha .destacado { font-weight: 800; color: var(--marino); }
.ficha .caja { background: var(--crema); border-left: 4px solid var(--naranja); padding: 0.8rem 1rem; font-weight: 600; }
.ficha .caja.verde { border-color: var(--verde); }
.ficha .botones { display: grid; gap: 0.7rem; margin-top: 0.3rem; }
.ficha .botones .par { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.ficha .botones .boton { min-height: 3.6rem; }
.ficha .tel { text-align: center; color: var(--gris); font-weight: 700; }
.ficha .despues { margin-top: 2rem; display: grid; gap: 0.75rem; }

/* texto legal */
.legal { max-width: 42rem; }
.legal h1 { font-size: clamp(2.4rem, 8vw, 3.2rem); margin-top: 1.5rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 0.5rem; }

/* 404 */
.perdida404 { display: grid; gap: 1.5rem; justify-items: start; padding-block: 2rem 4rem; }
.perdida404 .pegada { max-width: 20rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--tinta); color: #fff; padding: 0.85rem 1.25rem; border-radius: 14px; font-weight: 700;
  max-width: calc(100% - 2.5rem); text-align: center; z-index: 10;
}
.cargando { padding: 4rem 0; text-align: center; color: var(--gris); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
