/* =====================================================================
   REDESIGN LAYER — "Soft UI Evolution" applicato alla palette esistente.
   Additivo: carica DOPO style.css. Rimuovendo il <link> si torna all'origine.
   Mantiene colori (bordeaux/pesca/crema) e font (Pinyon/Cormorant/Mulish).
   ===================================================================== */

:root {
  --shadow-soft: 0 2px 6px -2px rgba(123, 47, 43, .10),
                 0 12px 28px -12px rgba(123, 47, 43, .18);
  --shadow-lift: 0 6px 14px -6px rgba(123, 47, 43, .18),
                 0 22px 48px -20px rgba(123, 47, 43, .30);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 60px;
}

/* ---------- Barra di avanzamento lettura ---------- */
#scrollProgress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--peach), var(--burgundy));
  z-index: 1000; transition: width .1s linear; border-radius: 0 3px 3px 0;
}

/* ---------- Nav fissa traslucida ---------- */
#siteNav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 clamp(14px, 4vw, 40px);
  background: rgba(252, 248, 244, .82);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transform: translateY(-100%);
  transition: transform .45s var(--ease-out), border-color .45s, background .45s;
}
#siteNav.visible { transform: translateY(0); border-bottom-color: var(--line); }
#siteNav .nav-brand {
  font-family: var(--font-script); color: var(--burgundy);
  font-size: 1.5rem; line-height: 1; white-space: nowrap; text-decoration: none;
}
#siteNav .nav-links {
  display: flex; gap: 4px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
#siteNav .nav-links::-webkit-scrollbar { display: none; }
#siteNav .nav-links a {
  font-family: var(--font-sans); font-size: .82rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none; white-space: nowrap;
  padding: 8px 12px; border-radius: 999px; position: relative;
  transition: color .2s, background .2s;
}
#siteNav .nav-links a:hover { color: var(--burgundy); background: rgba(233, 169, 142, .18); }
#siteNav .nav-links a.active { color: var(--burgundy); background: var(--peach-soft); }
@media (max-width: 560px) {
  #siteNav .nav-brand { display: none; }
  #siteNav { justify-content: center; }
}

/* Le ancore si allineano esattamente al bordo inferiore della nav fissa:
   niente margine extra, così non resta una strisciolina della sezione
   precedente visibile sopra a quella di destinazione. */
section[id], header[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Reveal più fluido + stagger ---------- */
.reveal { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.section-pad .reveal > * { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
/* micro-stagger dei figli diretti quando la sezione entra */
.reveal:not(.in) > *,
.reveal:not(.in) .gift-grid,
.reveal:not(.in) .contact-cards { opacity: 0; transform: translateY(14px); }
.reveal.in > * { opacity: 1; transform: none; }
.reveal.in > *:nth-child(2) { transition-delay: .06s; }
.reveal.in > *:nth-child(3) { transition-delay: .12s; }
.reveal.in > *:nth-child(4) { transition-delay: .18s; }
.reveal.in > *:nth-child(5) { transition-delay: .24s; }
.reveal.in > *:nth-child(n+6) { transition-delay: .3s; }

/* ---------- Ombre morbide e micro-interazioni ---------- */
.gift-btn, .contact-card, .gift-card, .stat, .address-card, .modal-box {
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out),
              border-color .25s var(--ease-out);
}
.gift-btn:hover, .contact-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lift);
  border-color: var(--peach);
}
.gift-btn:active, .contact-card:active { transform: translateY(-1px) scale(.99); }
.gift-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.gift-card .gift-img img { transition: transform .5s var(--ease-out); }
.gift-card:hover .gift-img img { transform: scale(1.06); }

/* ---------- Pulsanti: stato e pressione ---------- */
.btn { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out),
                   background .2s, color .2s, border-color .2s; }
.btn.solid { box-shadow: 0 8px 20px -10px rgba(123, 47, 43, .55); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Focus visibile (accessibilità) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 2px; border-radius: 6px;
}

/* ---------- Hero: ingresso + galleggiamento fiori ---------- */
.hero .corner { animation: floaty 7s ease-in-out infinite; }
.hero .corner.br { animation-delay: -3.5s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.hero > *:not(.corner) { animation: heroIn 1s var(--ease-out) both; }
.hero > *:nth-child(3) { animation-delay: .05s; }
.hero > *:nth-child(4) { animation-delay: .12s; }
.hero > *:nth-child(5) { animation-delay: .19s; }
.hero > *:nth-child(6) { animation-delay: .26s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Titoli di sezione: rifinitura ---------- */
.section-title { letter-spacing: .01em; }
.gift-subhead { position: relative; }

/* ---------- Modali: sopra nav e barra, chiudibili su mobile ---------- */
.modal-overlay { z-index: 2000; }
/* Mentre una modale è aperta, nav e barra di avanzamento si tolgono di mezzo
   così non coprono mai il pulsante di chiusura. */
body.modal-open #siteNav,
body.modal-open #scrollProgress { display: none; }
/* Pulsante di chiusura: resta ancorato in alto mentre si scorre una modale più
   alta dello schermo (sticky è più prevedibile di fixed dentro un contenitore
   trasformato). */
.modal-close { position: sticky; top: 10px; margin-left: auto; display: block; }
.modal-box { padding-top: 18px; }

/* ---------- Scroll prevedibile: niente snap che disturba il "torna su" ---------- */
html { scroll-snap-type: none; }

/* ---------- Back-to-top: rifinitura ---------- */
.back-top { box-shadow: var(--shadow-lift); transition: transform .25s var(--ease-out), opacity .3s, background .25s; }
.back-top.visible:hover { transform: translateY(-3px); }

/* ---------- Rispetto preferenze movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero .corner { animation: none; }
  .reveal:not(.in) > * { opacity: 1; transform: none; }
}
