/* la portada de crudone.com sin cookie: la foto a pantalla completa; el desplazamiento lo lleva portada.js */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #3d6fa8;
}
body {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#escena {
  position: fixed;
  inset: 0;
  overflow: hidden;
  contain: strict;
}
#foto {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
  -webkit-user-drag: none;
  visibility: hidden; /* hasta que portada.js la coloca */
}
#foto.lista { visibility: visible; }
/* la pista de abajo: texto descarado y una flecha que rebota (solo transform y opacity) */
#pista {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  font: 800 clamp(16px, 4.2vw, 22px)/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 12px rgba(0, 0, 0, .25);
  pointer-events: none;
  transition: opacity .45s;
  animation: pista 1.4s cubic-bezier(.3, 0, .3, 1) infinite;
}
#pista i {
  width: 16px;
  height: 16px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}
#pista.fuera { opacity: 0; }
@keyframes pista { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(10px); } 60% { transform: translateY(-3px); } }

/* el sello al soltarse el culo: grande, torcido, con rebote; se queda en los pies */
#sello {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(14vh + env(safe-area-inset-top, 0px));
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
#sello span {
  max-width: min(88vw, 760px);
  padding: .28em .5em;
  border: .12em solid #e3171f;
  border-radius: .18em;
  background: rgba(255, 255, 255, .88);
  color: #e3171f;
  font: 900 clamp(28px, 7.5vw, 68px)/1.05 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .01em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  transform: rotate(-7deg);
}
#sello.visto { opacity: 1; transition: none; }
#sello.visto span { animation: sello .7s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes sello {
  0% { opacity: 0; transform: rotate(-16deg) scale(2.8); }
  55% { opacity: 1; transform: rotate(-6deg) scale(.9); }
  75% { transform: rotate(-8deg) scale(1.06); }
  100% { transform: rotate(-7deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #pista { animation: none; }
  #sello.visto span { animation: none; }
}
