/* =========================================================
   INVITO GIULIO - STATICO ANIMATO VELOCE
   Animazioni leggere: transform + opacity, nessun effetto CPU-heavy
========================================================= */

:root {
  --nv-blue: #56bee9;
  --nv-blue-dark: #207fa9;
  --nv-gold: #e6b85a;
  --nv-cream: #fff8eb;
  --nv-pink: #ffb8cb;
  --nv-text: #24485d;
  --nv-soft: #688798;
  --nv-shadow: rgba(40,112,151,.16);
}

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

html {
  min-height: 100%;
  background: #e9f9ff;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--nv-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(255,255,255,.94) 0 6%, transparent 15%),
    radial-gradient(circle at 85% 16%, rgba(255,255,255,.85) 0 7%, transparent 16%),
    linear-gradient(180deg, #dff6ff 0%, #f9fdff 58%, #fff8eb 100%);
}

img,
svg {
  display: block;
}

button {
  font: inherit;
}

.nv-page {
  width: 100%;
  padding: 18px;
}

.nv-invite {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 50px);
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 112%, rgba(255,237,195,.95) 0 18%, transparent 46%),
    linear-gradient(180deg, #daf5ff 0%, #f9fdff 58%, #fff8eb 100%);
  box-shadow: 0 24px 70px var(--nv-shadow);
}

.nv-invite::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.85) 0 7%, transparent 18%),
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.74) 0 6%, transparent 17%),
    radial-gradient(circle at 48% 76%, rgba(255,255,255,.42) 0 10%, transparent 28%);
}

.nv-invite::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -86px;
  z-index: 1;
  height: 220px;
  background:
    radial-gradient(110px 56px at 10% 45%, #fff 0 70%, transparent 72%),
    radial-gradient(160px 78px at 30% 38%, #fff 0 70%, transparent 72%),
    radial-gradient(135px 66px at 56% 49%, #fff 0 70%, transparent 72%),
    radial-gradient(190px 86px at 84% 42%, #fff 0 70%, transparent 72%);
  opacity: .96;
  pointer-events: none;
}

.nv-sky-dust {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.nv-sky-dust span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  box-shadow:
    0 0 12px rgba(255,255,255,.95),
    0 0 22px rgba(230,184,90,.38);
  transform: translateZ(0) scale(var(--s));
  animation: nvTwinkle 3.8s ease-in-out infinite;
  animation-delay: var(--d);
  will-change: opacity, transform;
}

.nv-sky-dust span:nth-child(3n) {
  background: rgba(255,232,175,.96);
}

.nv-sky-dust span:nth-child(4n) {
  background: rgba(170,226,255,.94);
}

.nv-balloon {
  position: absolute;
  z-index: 30;
  top: 0;
  left: -6px;
  width: clamp(185px, 24vw, 360px);
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 15px 22px rgba(43,109,145,.16));
  transform: translateZ(0);
  animation: nvBalloonFloat 6.5s ease-in-out infinite;
  will-change: transform;
}

.nv-card {
  position: relative;
  z-index: 20;
  width: min(780px, 100%);
  margin: 82px auto 0;
  padding: clamp(28px, 5vw, 60px);
  text-align: center;
  border-radius: 34px;
  background: rgba(255,255,255,.91);
  border: 1px solid rgba(255,255,255,.96);
  box-shadow: 0 22px 58px rgba(40,112,151,.14);
}

.nv-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  border: 1px dashed rgba(230,184,90,.52);
  pointer-events: none;
}

.nv-card > * {
  position: relative;
  z-index: 2;
}

.nv-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--nv-blue-dark), var(--nv-blue));
  box-shadow: 0 12px 24px rgba(32,127,169,.24);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nv-photo-block {
  position: relative;
  width: clamp(198px, 32vw, 260px);
  margin: 0 auto 16px;
}

.nv-photo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffffff, #7fd9ff, #fff2be, #ffc5d6, #ffffff);
  animation: nvRotate 12s linear infinite;
  will-change: transform;
}

.nv-photo-circle {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #fff;
  border: 8px solid #fff;
  box-shadow: 0 16px 34px rgba(50,116,153,.2);
}

.nv-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
}

.nv-kicker {
  margin: 0 0 8px;
  color: var(--nv-gold);
  font-size: clamp(15px, 3vw, 22px);
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.nv-title {
  margin: 0;
  color: #24556f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 13vw, 112px);
  font-weight: 800;
  line-height: .85;
  letter-spacing: -.075em;
  text-shadow: 0 5px 0 rgba(255,255,255,.95);
}

.nv-subtitle {
  margin: 12px 0 6px;
  color: var(--nv-blue-dark);
  font-size: clamp(18px, 4vw, 30px);
  font-weight: 900;
}

.nv-bear-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 12px;
}

.nv-bear {
  width: clamp(125px, 16vw, 180px);
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(102,77,55,.12));
  animation: nvBearFloat 5.5s ease-in-out infinite;
  will-change: transform;
}

.nv-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px auto 20px;
  color: var(--nv-gold);
}

.nv-divider span {
  width: min(112px, 22vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230,184,90,.8), transparent);
}

.nv-divider i {
  font-style: normal;
  font-size: 24px;
  animation: nvCloudPulse 3.8s ease-in-out infinite;
}

.nv-story {
  max-width: 630px;
  margin: 0 auto;
}

.nv-story p {
  margin: 0 auto 13px;
  color: #3d6477;
  font-size: clamp(17px, 3.4vw, 22px);
  line-height: 1.58;
}

.nv-story p:last-child {
  margin-bottom: 0;
}

.nv-date-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  align-items: center;
  max-width: 450px;
  margin: 26px auto 0;
  padding: 18px;
  border-radius: 26px;
  text-align: left;
  background: linear-gradient(135deg, #ffffff, #fff8eb);
  box-shadow: 0 13px 30px rgba(92,131,153,.13);
}

.nv-date-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--nv-pink), var(--nv-gold));
}

.nv-date-icon svg,
.nv-info-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.nv-date-text span {
  display: block;
  margin-bottom: 3px;
  color: #7b99aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nv-date-text strong {
  display: block;
  color: #24556f;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1;
}

.nv-date-text em {
  display: block;
  margin-top: 7px;
  color: var(--nv-blue-dark);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.nv-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px auto 0;
}

.nv-info-card {
  overflow: hidden;
  padding: 20px 16px;
  border-radius: 24px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 11px 26px rgba(56,118,152,.1);
}

.nv-info-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 18px;
  color: var(--nv-blue-dark);
  background: #eaf8ff;
}

.nv-info-icon svg {
  width: 24px;
  height: 24px;
}

.nv-info-card h2 {
  margin: 0 0 7px;
  color: #24556f;
  font-size: 17px;
  font-weight: 900;
}

.nv-info-card p {
  min-height: 78px;
  margin: 0;
  color: #557789;
  font-size: 15px;
  line-height: 1.45;
}

.nv-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: 999px;
  color: #207fa9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  background: #e9f8ff;
  transition: transform .2s ease;
}

.nv-map-button:hover {
  transform: translateY(-2px);
}

.nv-map-button::before {
  content: "📍";
  margin-right: 7px;
}

.nv-countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 470px;
  margin: 26px auto;
}

.nv-countdown div {
  padding: 15px 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #eefaff);
  box-shadow: 0 10px 24px rgba(54,124,163,.1);
}

.nv-countdown strong {
  display: block;
  color: var(--nv-blue-dark);
  font-size: clamp(25px, 6vw, 42px);
  line-height: 1;
}

.nv-countdown span {
  display: block;
  margin-top: 6px;
  color: #7898a8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nv-final-text {
  max-width: 590px;
  margin: 0 auto;
  color: #3d6477;
  font-size: clamp(17px, 3.4vw, 22px);
  line-height: 1.58;
}

.nv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 24px;
  padding: 0 30px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--nv-blue-dark), var(--nv-blue));
  box-shadow: 0 15px 32px rgba(36,127,169,.28);
  transition: transform .2s ease;
}

.nv-button:hover {
  transform: translateY(-2px);
}

.nv-signature {
  margin: 24px auto 0;
  color: #24556f;
  font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1;
  transform: rotate(-2deg);
  text-shadow: 0 4px 0 rgba(255,255,255,.85);
}

.nv-signature::before,
.nv-signature::after {
  content: "✦";
  display: inline-block;
  margin: 0 10px;
  color: #e6b85a;
  font-family: Georgia, serif;
  font-size: .42em;
  transform: translateY(-6px);
}

/* =========================================================
   BONIFICO
========================================================= */

.nv-gift {
  position: relative;
  z-index: 20;
  width: min(780px, 100%);
  margin: 22px auto 0;
  padding: 16px;
  border-radius: 30px;
  text-align: center;
  background: rgba(255,255,255,.93);
  border: 1px solid rgba(255,255,255,.98);
  box-shadow: 0 18px 46px rgba(40,112,151,.16);
}

.nv-gift-text strong {
  display: block;
  color: #24556f;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.nv-gift-text span {
  display: block;
  margin-top: 4px;
  color: #688798;
  font-size: 13px;
  line-height: 1.25;
}

.nv-gift-toggle,
.nv-copy-iban {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 13px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #e6b85a, #ffb8cb);
  box-shadow: 0 12px 26px rgba(230,184,90,.26);
  transition: transform .2s ease;
}

.nv-gift-toggle:hover,
.nv-copy-iban:hover {
  transform: translateY(-2px);
}

.nv-gift-toggle::before {
  content: "🏦";
  margin-right: 8px;
}

.nv-iban-panel {
  width: min(520px, 100%);
  margin: 14px auto 0;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(54,124,163,.1);
}

.nv-iban-panel span {
  display: block;
  margin-bottom: 8px;
  color: #e6b85a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nv-iban-panel strong {
  display: block;
  color: #207fa9;
  font-size: clamp(18px, 4vw, 25px);
  line-height: 1.25;
  word-break: break-word;
}

.nv-iban-panel small {
  display: block;
  margin: 11px 0 14px;
  color: #557789;
  font-size: 13px;
  line-height: 1.45;
}

.nv-copy-iban {
  min-height: 44px;
  margin-top: 0;
  background: linear-gradient(135deg, #207fa9, #56bee9);
}

/* =========================================================
   ANIMAZIONI
========================================================= */

@keyframes nvBalloonFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  50% {
    transform: translate3d(0, -14px, 0) rotate(1deg);
  }
}

@keyframes nvBearFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

@keyframes nvRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes nvTwinkle {
  0%, 100% {
    opacity: .28;
    transform: translateZ(0) scale(calc(var(--s) * .75));
  }
  50% {
    opacity: 1;
    transform: translateZ(0) scale(calc(var(--s) * 1.18));
  }
}

@keyframes nvCloudPulse {
  0%, 100% {
    transform: translateY(0) scale(.96);
  }
  50% {
    transform: translateY(-3px) scale(1.06);
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .nv-page {
    padding: 10px;
  }

  .nv-invite {
    padding: 12px;
    border-radius: 26px;
  }

  .nv-balloon {
    z-index: 35;
    width: 150px;
    top: 7px;
    left: -18px;
  }

  .nv-card {
    z-index: 20;
    margin-top: 56px;
    padding: 22px 13px;
    border-radius: 28px;
  }

  .nv-card::before {
    inset: 8px;
    border-radius: 21px;
  }

  .nv-badge {
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 11px;
  }

  .nv-photo-block {
    width: 182px;
    margin-bottom: 12px;
  }

  .nv-photo-ring {
    inset: -10px;
  }

  .nv-photo-circle {
    border-width: 7px;
  }

  .nv-kicker {
    margin-bottom: 5px;
    font-size: 14px;
  }

  .nv-title {
    font-size: 62px;
  }

  .nv-subtitle {
    margin: 8px 0 4px;
    font-size: 19px;
  }

  .nv-bear-wrap {
    margin: 5px 0 8px;
  }

  .nv-bear {
    width: 138px;
  }

  .nv-divider {
    margin: 10px auto 13px;
  }

  .nv-story p {
    margin-bottom: 9px;
    font-size: 16px;
    line-height: 1.48;
  }

  .nv-date-box {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    text-align: center;
  }

  .nv-date-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
  }

  .nv-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .nv-info-card {
    padding: 16px 13px;
  }

  .nv-info-card p {
    min-height: auto;
  }

  .nv-map-button,
  .nv-button {
    width: 100%;
  }

  .nv-countdown {
    gap: 8px;
    margin: 16px auto;
  }

  .nv-countdown div {
    padding: 11px 6px;
    border-radius: 18px;
  }

  .nv-countdown span {
    font-size: 10px;
  }

  .nv-final-text {
    font-size: 16px;
    line-height: 1.48;
  }

  .nv-button {
    min-height: 52px;
    margin-top: 16px;
  }

  .nv-signature {
    margin-top: 16px;
    font-size: 42px;
  }

  .nv-gift {
    margin-top: 16px;
    padding: 14px 12px;
    border-radius: 24px;
  }

  .nv-gift-toggle {
    width: 100%;
    min-height: 52px;
  }

  .nv-iban-panel {
    padding: 14px;
  }
}

@media (max-width: 380px) {
  .nv-balloon {
    width: 136px;
  }

  .nv-photo-block {
    width: 170px;
  }

  .nv-title {
    font-size: 56px;
  }

  .nv-bear {
    width: 128px;
  }

  .nv-story p,
  .nv-final-text {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nv-balloon,
  .nv-bear,
  .nv-photo-ring,
  .nv-divider i,
  .nv-sky-dust span {
    animation: none !important;
  }
}
