/* Font "pop" ospitato in locale (niente Google Fonts: privacy) */
@font-face {
  font-family: "Bagel Fat One";
  src: url("assets/fonts/bagel-fat-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Gochi Hand";
  src: url("assets/fonts/gochi-hand.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Colori provvisori: si allineano al save the date quando arriva */
:root {
  --muro: #3d5a73;      /* blu polvere, più scuro del carta da zucchero */
  --mattone: #a5442e;   /* rosso mattone */
  --carta: #f3ecdf;     /* bianco sporco: sfondo della locandina */
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--muro);
  font-family: "Gochi Hand", "Comic Sans MS", cursive;
  color: var(--mattone);
  -webkit-font-smoothing: antialiased;
}

.muro {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6vmin;
}

/* La locandina: formato A (1 : 1.414), sta sempre tutta nello schermo */
.locandina {
  position: relative;
  width: min(86vw, calc(84svh / 1.414), 520px);
  aspect-ratio: 1 / 1.414;
  display: block;
  background: var(--carta);
  box-shadow: 0 1.5vmin 4vmin rgba(0, 0, 0, 0.35);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
img.locandina { object-fit: cover; }

.locandina:hover { transform: rotate(0deg) scale(1.01); }

/* Solo per la versione provvisoria in HTML */
div.locandina { container-type: size; }

.contenuto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 9cqw 7cqw 10cqw;
}

.std {
  font-family: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 15cqw;
  line-height: 0.88;
  letter-spacing: 0.01em;
  transform: rotate(-3deg);
}

.disegno {
  width: 74cqw;
  height: auto;
  display: block;
}

.nomi {
  font-weight: normal;
  font-size: 9cqw;
  line-height: 1.1;
  white-space: nowrap;
}
.nomi .e { font-family: "Bagel Fat One", sans-serif; font-size: 0.8em; }

.data {
  font-size: 8cqw;
  letter-spacing: 0.08em;
  border-top: 2px solid var(--mattone);
  border-bottom: 2px solid var(--mattone);
  padding: 0.3em 0.8em;
}

.sotto {
  font-size: 6cqw;
  letter-spacing: 0.03em;
}

@media (prefers-reduced-motion: reduce) {
  .locandina { transition: none; }
}
