/* ===========================================================
   Francesco & Letizia — invito di nozze digitale
   Foglio di stile condiviso
   =========================================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
}

body {
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  position: fixed;
  inset: 0;
}

/* Contenitore a schermo intero: l'immagine riempie tutto il
   viewport reale del telefono (100dvh tiene conto della barra
   degli indirizzi che compare/scompare), senza margini né
   scorrimento. */
.frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #d8c9b0;
}

.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

/* Link che ricopre l'intera pagina 1 */
.full-link {
  position: absolute;
  inset: 0;
  display: block;
  outline: none;
  z-index: 2;
}

/* Aree cliccabili invisibili: la posizione in px viene calcolata
   da js/layout.js in base al ritaglio reale dell'immagine */
.hotspot {
  position: absolute;
  display: block;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

/* Piccolo feedback al tocco, elegante e discreto */
.hotspot:active,
.full-link:active {
  background: rgba(122, 31, 43, 0.06);
}

/* ---------- Navigazione "indietro" ---------- */
.back-nav {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  text-decoration: none;
  color: #7a1f2b;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(122, 31, 43, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.back-nav:active {
  transform: translateX(-50%) scale(0.92);
  background: rgba(255, 255, 255, 0.8);
}

.back-nav svg {
  width: 12px;
  height: 12px;
  display: block;
}

/* ---------- Toast di conferma copia IBAN ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8%);
  transform: translate(-50%, 12px);
  background: #7a1f2b;
  color: #f5ede1;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.03em;
  font-family: "Cormorant Garamond", Georgia, serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
