:root {
  --cream: #FAF7F2;
  --ink: #2B2823;
  --gold: #B8964F;
  --gold-light: #D4AF37;
  --serif: "Cormorant Garamond", serif;
  --sans: "Jost", sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.45;
}

.invite {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 62vh auto;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
}

.photo-panel {
  position: relative;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,18,14,0.25) 0%, rgba(20,18,14,0.5) 75%, rgba(20,18,14,0.7) 100%);
}

.hero-content {
  position: absolute;
  bottom: clamp(0.75rem, 3vh, 2rem);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  color: var(--cream);
}

.hero-name {
  font-family: "Alex Brush", cursive;
  font-weight: 700;
  font-size: 80px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  -webkit-text-stroke: 0.5px currentColor;
}

.hero-number {
  color: var(--cream);
}

.scroll-hint {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 5vw, 2rem);
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.scroll-hint-arrow {
  width: 34px;
  height: 34px;
  border-right: 4px solid var(--cream);
  border-bottom: 4px solid var(--cream);
  transform: rotate(45deg);
  animation: scroll-hint-bounce 1.4s ease-in-out infinite;
}

.scroll-hint-text {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--cream);
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.55; }
  50% { transform: rotate(45deg) translate(10px, 10px); opacity: 1; }
}

.info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 1.6vh, 0.9rem);
  padding: clamp(1rem, 3vh, 1.6rem) 1.1rem clamp(1.5rem, 4vh, 2.5rem);
}

.widget {
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: clamp(0.5rem, 1.4vh, 0.9rem);
  background: rgba(184,150,79,0.06);
  box-shadow: 0 2px 10px rgba(43,40,35,0.05);
}

.widget-header {
  text-align: center;
}

.intro-line {
  text-align: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.9vh, 1.1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-eyebrow {
  display: block;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.8vh, 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4em;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.2vh, 2.1rem);
}

.info-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.35rem, 1.2vh, 0.7rem);
}

.detail-label {
  display: block;
  font-weight: 600;
  font-size: clamp(0.7rem, 1.4vh, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3em;
}

.detail-label-wa {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.wa-label-icon {
  display: inline-flex;
  font-size: 1.25em;
  line-height: 1;
}

.wa-svg {
  display: block;
}

.detail-value {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vh, 1.55rem);
  font-weight: 500;
}

.section-text {
  font-size: clamp(0.85rem, 1.7vh, 1rem);
  font-weight: 400;
}

.iban-box {
  text-align: left;
}

.dos-donts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.28em;
  margin-top: 0.3em;
}

.dos-donts-list li {
  font-size: clamp(0.78rem, 1.6vh, 0.95rem);
  line-height: 1.3;
  padding-left: 1.2em;
  position: relative;
}

.dos-donts-list li.do::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #4a7c4e;
  font-weight: 600;
}

.dos-donts-list li.dont::before {
  content: "\2715";
  position: absolute;
  left: 0;
  color: #b3382c;
  font-weight: 600;
}

.iban-value {
  display: block;
  font-family: var(--sans);
  font-size: clamp(0.92rem, 2.1vh, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 0.3em;
}

.iban-name {
  display: block;
  font-family: var(--sans);
  font-size: clamp(0.8rem, 1.6vh, 0.95rem);
  margin-top: 0.3em;
}

.iban-copy {
  margin-top: clamp(0.4rem, 1.2vh, 0.75rem);
  font-family: var(--sans);
  font-size: clamp(0.75rem, 1.5vh, 0.88rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--ink);
  padding: 0.45em 1.2em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.iban-copy:hover {
  background: var(--gold);
  color: var(--cream);
}

.iban-copy.copied {
  background: var(--gold-light);
  color: var(--cream);
  border-color: var(--gold-light);
}

.gift-thanks {
  margin-top: clamp(0.5rem, 1.4vh, 0.85rem);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.9rem, 1.9vh, 1.15rem);
  line-height: 1.35;
  color: var(--ink);
}

.whatsapp-box {
  text-align: left;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: clamp(0.4rem, 1.2vh, 0.7rem);
  font-family: var(--sans);
  font-size: clamp(0.8rem, 1.6vh, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--cream);
  background: #25D366;
  padding: 0.55em 1.3em;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.whatsapp-btn:hover {
  background: #1EBE57;
  transform: translateY(-1px);
}

.whatsapp-icon {
  display: inline-flex;
  font-size: 1.2em;
  line-height: 1;
}

/* Widget upload foto */
.photo-box {
  text-align: left;
}

.photo-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: clamp(0.4rem, 1.2vh, 0.7rem);
}

.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--sans);
  font-size: clamp(0.78rem, 1.6vh, 0.92rem);
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  padding: 0.5em 1.2em;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--cream);
  transition: background 0.25s ease, transform 0.15s ease;
}

.photo-btn:hover {
  transform: translateY(-1px);
}

.photo-btn-outline {
  background: transparent;
  color: var(--ink);
}

.photo-btn-outline:hover {
  background: var(--gold);
  color: var(--cream);
}

.photo-status {
  margin-top: 0.55rem;
  font-size: clamp(0.78rem, 1.5vh, 0.9rem);
  min-height: 1.1em;
}

.photo-status.ok { color: #2e7d32; }
.photo-status.err { color: #b3382c; }

/* Overlay di upload con barra di progresso (visibile SOLO durante il caricamento) */
.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20,18,14,0.88);
  backdrop-filter: blur(2px);
}

.upload-overlay.open {
  display: flex;
}

.upload-card {
  width: min(90vw, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  color: var(--cream);
}

.upload-text {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 2.2vh, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #25D366;
  border-radius: 999px;
  transition: width 0.15s ease;
}

.progress-pct {
  font-family: var(--sans);
  font-size: clamp(0.85rem, 1.8vh, 1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.footer-line {
  text-align: right;
  font-family: "Alex Brush", cursive;
  font-weight: 400;
  font-size: clamp(1.3rem, 3.2vh, 2.2rem);
  color: var(--ink);
}

@media (min-width: 721px) {
  html, body {
    overflow: hidden;
  }
  .invite {
    grid-template-columns: 42% 58%;
    grid-template-rows: 1fr;
    height: 100vh;
    height: 100dvh;
    min-height: unset;
  }
  .info-panel {
    gap: clamp(0.4rem, 1.4vh, 0.9rem);
    padding: clamp(0.7rem, 2vh, 1.6rem) clamp(1.2rem, 4vw, 3rem);
    overflow-y: auto;
    justify-content: flex-start;
  }
  .info-row {
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.6rem, 2vw, 1.4rem);
  }
  .scroll-hint {
    display: none;
  }
  .hero-name {
    font-size: clamp(2.6rem, min(13vh, 9vw), 7rem);
  }
}
