/* ==========================================================================
   PENPEN — ACCESSO RISERVATO
   Fondo bianco, logo al centro, campo e bottone a pillola, due personaggi
   che fluttuano ai lati. Stessi colori e font della home "in arrivo".
   ========================================================================== */

:root {
  color-scheme: light only;
  --pp-black: #000;
  --pp-cream: #feefe3;
  --pp-orange: #ed6928;
  --pp-ink: #1e1e1c;
  --pp-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body.pp-gate {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  color: var(--pp-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pp-gate__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 30rem;
  padding: 24px 16px;
  text-align: center;
  animation: pp-gate-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pp-gate__eyebrow,
.pp-gate__foot,
.pp-gate__error,
.pp-gate__input {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pp-gate__eyebrow { margin: 0 0 18px; }

.pp-gate__logo { margin: 0 0 clamp(28px, 6vh, 48px); line-height: 0; }
.pp-gate__logo img { width: min(72vw, 300px); height: auto; }

.pp-gate__form { width: 100%; }

.pp-gate__row {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1.5px solid var(--pp-black);
  border-radius: 9999px;
  background: #fff;
}
.pp-gate__row:focus-within { box-shadow: 0 0 0 3px rgb(237 105 40 / 0.25); }

.pp-gate__input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 14px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 16px; /* niente zoom automatico su iPhone */
  letter-spacing: 0.04em;
  text-transform: none;
  outline: none;
}
.pp-gate__input::placeholder { color: #9a9a96; font-size: 12px; letter-spacing: 0.06em; }

.pp-gate__button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 9999px;
  padding: 0.9rem 1.5rem;
  background: var(--pp-black);
  color: var(--pp-cream);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.pp-gate__button img { width: 0.85em; height: auto; transition: transform 0.35s var(--pp-spring); }
.pp-gate__button:hover img,
.pp-gate__button:focus-visible img { transform: translateX(6px) rotate(24deg); }
.pp-gate__button:focus-visible { outline: 2px solid var(--pp-orange); outline-offset: 3px; }

.pp-gate__error { min-height: 1.2em; margin: 14px 0 0; color: var(--pp-orange); }

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

.pp-gate__foot {
  position: fixed;
  left: 0; right: 0;
  bottom: 20px;
  margin: 0;
  color: #9a9a96;
  text-align: center;
}

/* I personaggi: in alto a sinistra e in basso a destra, mai sopra il modulo. */
.pp-gate__char {
  position: fixed;
  width: min(30vw, 22svh, 200px);
  height: auto;
  pointer-events: none;
  user-select: none;
  animation: pp-gate-float 5s ease-in-out infinite;
}
.pp-gate__char--0 { left: max(-4vw, -30px); top: 8%; }
.pp-gate__char--1 { right: max(-3vw, -24px); bottom: 10%; animation-duration: 4.4s; animation-delay: -1.2s; }

@keyframes pp-gate-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes pp-gate-float { 50% { transform: translateY(-12px) rotate(-2deg); } }

@media (prefers-reduced-motion: reduce) {
  .pp-gate__center, .pp-gate__char { animation: none; }
}
