/* ===========================================================
   Federica & Gianluca — wedding site styles
   Palette: ivory / ink / gold / blush / sage
   =========================================================== */

:root {
  --ivory:    #FBF7F0;
  --ivory-2:  #F5EFE3;
  --ivory-3:  #EFE7D6;
  --ink:      #2A2620;
  --ink-soft: #5A4F42;
  --gold:     #B89968;
  --gold-2:   #C9A86A;
  --gold-deep:#8A6F4A;
  --blush:    #E8D9C7;
  --sage:     #9DA88E;
  --rule:     rgba(42, 38, 32, 0.18);

  --serif:  'Cormorant Garamond', 'EB Garamond', 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Allura', 'Italianno', cursive;
  --script-heavy: 'Pinyon Script', 'Allura', cursive;
  --sans:   'Cormorant Garamond', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--ivory);
}

/* paper-grain texture rimosso — sfondo ivory pulito */
body::before {
  content: none;
}

#app { position: relative; z-index: 2; }

/* ===========================================================
   Reusable section heads
   =========================================================== */

.section {
  max-width: 920px;
  margin: 0 auto;
  padding: 140px 48px 60px;
  position: relative;
}

@media (max-width: 700px) {
  .section { padding: 100px 28px 40px; }
}

.section-head {
  text-align: center;
  margin-bottom: 64px;
}

.section-mono {
  color: var(--gold);
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.eyebrow {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(54px, 7vw, 92px);
  line-height: 1;
  color: var(--ink);
  margin: 0 0 28px;
}

.section-head svg {
  margin: 0 auto;
  color: var(--gold);
}

/* ===========================================================
   HERO — invitation card
   =========================================================== */

.hero {
  min-height: 100vh;
  padding: 80px 32px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(900px 600px at 50% 30%, #FFFDF7 0%, transparent 70%);
}

.hero-corner {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 0.6px solid var(--gold);
  pointer-events: none;
}
.hero-corner.tl { top: 32px; left: 32px; border-right: none; border-bottom: none; }
.hero-corner.tr { top: 32px; right: 32px; border-left: none; border-bottom: none; }
.hero-corner.bl { bottom: 32px; left: 32px; border-right: none; border-top: none; }
.hero-corner.br { bottom: 32px; right: 32px; border-left: none; border-top: none; }

@media (max-width: 700px) {
  .hero-corner { width: 60px; height: 60px; }
  .hero-corner.tl, .hero-corner.tr { top: 16px; }
  .hero-corner.bl, .hero-corner.br { bottom: 16px; }
  .hero-corner.tl, .hero-corner.bl { left: 16px; }
  .hero-corner.tr, .hero-corner.br { right: 16px; }
}

.hero-inner {
  text-align: center;
  max-width: 860px;
  width: 100%;
}

.hero-mono {
  color: var(--gold);
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 24px;
}

.hero-names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(80px, 13vw, 180px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin: 0 0 24px;
  color: var(--ink);
}

.hero-names .amp {
  font-style: italic;
  font-family: var(--serif);
  font-size: 0.4em;
  vertical-align: middle;
  font-weight: 300;
  color: var(--gold-deep);
  padding: 0 0.08em;
}

.hero-divider {
  display: flex;
  justify-content: center;
  margin: 8px 0 28px;
  color: var(--gold);
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: 12px;
}

.hero-date .dot {
  color: var(--gold);
  font-size: 1em;
  transform: translateY(-2px);
}

.hero-date .time {
  margin-left: 24px;
  padding-left: 24px;
  border-left: 0.6px solid var(--rule);
  font-style: italic;
  color: var(--ink-soft);
}

.hero-venues {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  margin: 56px 0 36px;
  flex-wrap: wrap;
}

.venue {
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.venue-label {
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.venue-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.04em;
  font-variant: small-caps;
  margin-bottom: 6px;
  color: var(--ink);
}

.venue-addr {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}

.venue-cta {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.6s var(--ease-soft, cubic-bezier(.4,0,.2,1)),
    transform 0.7s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)),
    letter-spacing 0.7s var(--ease-editorial, cubic-bezier(.22,.61,.36,1));
}
.venue:hover .venue-cta,
.venue:focus-visible .venue-cta {
  opacity: 1;
  transform: translateY(0);
  letter-spacing: 0.42em;
}
.venue:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(184,153,104,0.35);
  border-radius: 4px;
}

.venue-sep {
  width: 1px;
  height: 60px;
  background: var(--rule);
}

@media (max-width: 700px) {
  .hero-venues { gap: 28px; flex-direction: column; }
  .venue-sep { width: 60px; height: 1px; }
}

.hero-rsvp-line {
  font-family: var(--script);
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--gold-deep);
  margin-top: 12px;
}

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 64px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  cursor: pointer;
}

.hero-scroll .arrow {
  font-size: 18px;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ===========================================================
   COUNTDOWN — scenographic with quote
   =========================================================== */

.countdown {
  position: relative;
  padding: 140px 32px 160px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184,153,104,0.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 50%, var(--ivory) 100%);
  overflow: hidden;
}

.countdown::before,
.countdown::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.6px;
  height: 80px;
  background: var(--gold);
  opacity: 0.4;
  transform: translateX(-50%);
}
.countdown::before { top: 0; }
.countdown::after  { bottom: 0; }

.cd-quote {
  position: relative;
  max-width: 720px;
  margin: 0 auto 100px;
  padding: 0 24px;
}

.cd-quote-mark {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 140px;
  line-height: 0.3;
  color: var(--gold);
  opacity: 0.45;
  margin-bottom: 16px;
  letter-spacing: -0.05em;
}

.cd-quote-text {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 32px;
  letter-spacing: 0.005em;
}

.cd-quote-text em {
  font-style: italic;
  color: var(--gold-deep);
  font-weight: 400;
}

.cd-quote .divider,
.cd-quote svg {
  margin: 0 auto;
  color: var(--gold);
  display: block;
}

.cd-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 56px;
}

.cd-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 1.6vw, 24px);
  flex-wrap: nowrap;
  max-width: 980px;
  margin: 0 auto;
}

.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.cd-frame {
  position: relative;
  width: clamp(80px, 13vw, 150px);
  height: clamp(110px, 17vw, 200px);
  background: linear-gradient(180deg, #FFFDF8 0%, var(--ivory-2) 100%);
  border: 0.6px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 30px 60px -30px rgba(42,38,32,0.18),
    0 8px 24px -8px rgba(42,38,32,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* corner ornaments on each card */
.cd-frame::before,
.cd-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0.6px solid var(--gold);
  pointer-events: none;
}
.cd-frame::before {
  top: 8px; left: 8px;
  border-right: none; border-bottom: none;
}
.cd-frame::after {
  bottom: 8px; right: 8px;
  border-left: none; border-top: none;
}

/* horizontal hairline through middle (the "flip" seam) */
.cd-frame-line {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 50%;
  height: 0.6px;
  background: var(--rule);
  pointer-events: none;
  z-index: 2;
}

.cd-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(54px, 9.5vw, 110px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
  backface-visibility: hidden;
}

.cd-num-old {
  z-index: 1;
}
.cd-num-new {
  opacity: 0;
  z-index: 0;
}

.cd-card.is-flipping .cd-num-old {
  animation: cdFlipOut 0.6s cubic-bezier(0.6, 0, 0.4, 1) forwards;
  transform-origin: 50% 100%;
}
.cd-card.is-flipping .cd-num-new {
  animation: cdFlipIn 0.6s cubic-bezier(0.6, 0, 0.4, 1) forwards;
  transform-origin: 50% 0%;
}

@keyframes cdFlipOut {
  0%   { transform: rotateX(0deg);   opacity: 1; }
  50%  { transform: rotateX(-90deg); opacity: 0.4; }
  100% { transform: rotateX(-90deg); opacity: 0; }
}
@keyframes cdFlipIn {
  0%   { transform: rotateX(90deg);  opacity: 0; }
  50%  { transform: rotateX(90deg);  opacity: 0.4; }
  100% { transform: rotateX(0deg);   opacity: 1; }
}

.cd-label {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.cd-sep {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 7vw, 70px);
  color: var(--gold);
  line-height: clamp(110px, 17vw, 200px);
  align-self: flex-start;
  opacity: 0.6;
  user-select: none;
}

.cd-foot {
  margin-top: 56px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.cd-foot-sep { color: var(--gold); }

@media (max-width: 720px) {
  .cd-grid { gap: 6px; }
  .cd-sep { display: none; }
  .countdown { padding: 100px 16px 120px; }
}

/* Reveal animations for countdown */
.countdown.in .cd-quote-mark { animation: fadeUp 1s 0.1s ease-out both; }
.countdown.in .cd-quote-text { animation: fadeUp 1.1s 0.25s cubic-bezier(.22,.61,.36,1) both; }
.countdown.in .cd-quote svg  { animation: fadeIn 1s 0.5s ease-out both; }
.countdown.in .cd-eyebrow    { animation: fadeUp 0.9s 0.6s ease-out both; }
.countdown.in .cd-cell:nth-child(1) { animation: fadeUp 1s 0.75s cubic-bezier(.22,.61,.36,1) both; }
.countdown.in .cd-cell:nth-child(3) { animation: fadeUp 1s 0.85s cubic-bezier(.22,.61,.36,1) both; }
.countdown.in .cd-cell:nth-child(5) { animation: fadeUp 1s 0.95s cubic-bezier(.22,.61,.36,1) both; }
.countdown.in .cd-cell:nth-child(7) { animation: fadeUp 1s 1.05s cubic-bezier(.22,.61,.36,1) both; }
.countdown.in .cd-foot       { animation: fadeUp 1s 1.2s ease-out both; }

/* ===========================================================
   STORIA
   =========================================================== */

.storia {
  background: linear-gradient(180deg, transparent 0%, var(--ivory-2) 50%, transparent 100%);
}

.storia-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.storia-body p {
  font-size: 19px;
  line-height: 1.85;
  margin: 0 0 22px;
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.storia-body .lead {
  font-size: 22px;
  color: var(--ink);
  font-style: italic;
}

.storia-body .signature {
  margin-top: 32px;
  font-family: var(--script);
  font-size: 36px;
  font-style: normal;
  color: var(--gold-deep);
}

/* ===========================================================
   PROGRAMMA — timeline
   =========================================================== */

.timeline {
  max-width: 620px;
  margin: 0 auto;
}

.t-row {
  display: grid;
  grid-template-columns: 100px 32px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.t-time {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  text-align: right;
  padding-top: 4px;
}

.t-axis {
  position: relative;
  width: 32px;
  display: flex;
  justify-content: center;
  align-self: stretch;
}

.t-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  margin-top: 12px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.t-line {
  position: absolute;
  top: 22px;
  bottom: -16px;
  width: 0.6px;
  background: var(--gold);
  opacity: 0.5;
  left: 50%;
}

.t-body {
  padding-bottom: 36px;
  padding-top: 0;
}

.t-title {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}

.t-sub {
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .t-row { grid-template-columns: 70px 24px 1fr; gap: 16px; }
  .t-time { font-size: 17px; }
  .t-title { font-size: 19px; }
}

/* ===========================================================
   DRESS CODE
   =========================================================== */

.dress {
  background: linear-gradient(180deg, transparent 0%, var(--ivory-2) 50%, transparent 100%);
}

.dress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 760px;
  margin: 0 auto;
}

.dress-card {
  background: var(--ivory);
  border: 0.6px solid var(--rule);
  padding: 40px 36px;
  text-align: center;
  position: relative;
}

.dress-card::before, .dress-card::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 0.6px solid var(--gold);
}
.dress-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.dress-card::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.dress-label {
  font-family: var(--script);
  font-size: 48px;
  color: var(--gold-deep);
  margin-bottom: 20px;
}

.dress-swatches {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.dress-swatches span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.6px solid var(--rule);
  display: block;
}

.dress-card .dress-swatches.named {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.dress-swatches.named .sw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dress-swatches.named .sw span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0.6px solid var(--rule);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}

.dress-swatches.named .sw em {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}

.dress-card p {
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}

.dress-card .dress-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 0.6px solid rgba(184, 153, 104, 0.25);
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.78;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.dress-note {
  text-align: center;
  margin-top: 56px;
  color: var(--gold);
}

.dress-note p {
  margin-top: 16px;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .dress-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ===========================================================
   LISTA NOZZE
   =========================================================== */

.lista-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.lista-body .lead {
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 36px;
  line-height: 1.8;
}

.lista-card {
  background: var(--ivory);
  border: 0.6px solid var(--rule);
  padding: 44px 40px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}

.lista-card::before, .lista-card::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0.6px solid var(--gold);
}
.lista-card::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.lista-card::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.lista-card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: 14px;
}

.lista-card-title {
  font-family: var(--script);
  font-size: 56px;
  color: var(--ink);
  text-align: center;
  margin-bottom: 36px;
  line-height: 1;
}

.lista-iban {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.iban-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 0.6px solid var(--rule);
}
.iban-row:last-child { border-bottom: none; }

.iban-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.iban-val {
  font-size: 17px;
  color: var(--ink);
  font-style: italic;
}

.iban-val.mono {
  font-family: 'Courier New', monospace;
  font-style: normal;
  letter-spacing: 0.06em;
  font-size: 15px;
}

.fineprint {
  margin-top: 28px;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .iban-row { grid-template-columns: 1fr; gap: 4px; }
  .lista-card-title { font-size: 40px; }
  .lista-card { padding: 36px 24px; }
}

/* ===========================================================
   PLAYLIST — Spotify collaborativa
   =========================================================== */

.playlist {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184, 153, 104, 0.06), transparent 60%),
    var(--ivory);
}

.playlist-card {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 56px 56px;
  background: var(--ivory);
  border: 0.6px solid var(--rule);
  text-align: center;
  box-shadow:
    0 30px 60px -30px rgba(42, 38, 32, 0.10),
    0 1px 0 rgba(255,255,255,0.8) inset;
}

.playlist-card::before, .playlist-card::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 0.6px solid var(--gold);
  pointer-events: none;
  transition:
    width 0.7s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)),
    height 0.7s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)),
    border-color 0.5s ease;
}
.playlist-card::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.playlist-card::after  { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.playlist-card:hover::before,
.playlist-card:hover::after {
  width: 44px;
  height: 44px;
  border-color: var(--gold-deep);
}

.playlist-card-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 20px;
}

.playlist-lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 36px;
  text-wrap: pretty;
}
.playlist-lead em {
  font-style: italic;
  color: var(--gold-deep);
}

.playlist-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  max-width: 460px;
  margin: 0 auto 40px;
  padding: 28px 0;
  border-top: 0.6px solid var(--rule);
  border-bottom: 0.6px solid var(--rule);
}

.playlist-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.playlist-step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--gold-deep);
}

.playlist-step-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}

.playlist-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 36px;
  background: var(--ink);
  color: var(--ivory);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    background 0.5s ease,
    letter-spacing 0.7s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)),
    transform 0.5s var(--ease-editorial, cubic-bezier(.22,.61,.36,1));
}

.playlist-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 253, 248, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease-editorial, cubic-bezier(.22,.61,.36,1));
}
.playlist-cta:hover::after { transform: translateX(100%); }

.playlist-cta:hover {
  background: #1DB954; /* Spotify green — solo on hover, sfumatura emozionale */
  letter-spacing: 0.5em;
  transform: translateY(-2px);
}

.playlist-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: currentColor;
  transition: transform 0.6s var(--ease-editorial, cubic-bezier(.22,.61,.36,1));
}
.playlist-cta:hover .playlist-cta-icon {
  transform: rotate(-12deg) scale(1.1);
}

.playlist-cta-label {
  position: relative;
  z-index: 1;
}

.playlist-cta-arrow {
  font-size: 14px;
  margin-left: -4px;
  transition: transform 0.6s var(--ease-editorial, cubic-bezier(.22,.61,.36,1));
}
.playlist-cta:hover .playlist-cta-arrow {
  transform: translate(4px, -4px);
}

.playlist-fineprint {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  opacity: 0.8;
}

@media (max-width: 600px) {
  .playlist-card { padding: 48px 28px 40px; }
  .playlist-steps { flex-direction: column; gap: 16px; padding: 24px 0; max-width: 280px; }
  .playlist-step { flex-direction: row; gap: 16px; }
  .playlist-step-text { text-align: left; }
  .playlist-cta { padding: 16px 24px; letter-spacing: 0.28em; font-size: 13px; }
  .playlist-cta:hover { letter-spacing: 0.4em; }
}

/* Reveal */
.playlist.in .playlist-card-eyebrow { animation: fadeUp 0.9s 0.3s ease-out both; }
.playlist.in .playlist-lead         { animation: fadeUp 1s 0.45s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)) both; }
.playlist.in .playlist-step:nth-child(1) { animation: fadeUp 0.9s 0.6s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)) both; }
.playlist.in .playlist-step:nth-child(2) { animation: fadeUp 0.9s 0.72s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)) both; }
.playlist.in .playlist-step:nth-child(3) { animation: fadeUp 0.9s 0.84s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)) both; }
.playlist.in .playlist-cta          { animation: fadeUp 1s 1s var(--ease-editorial, cubic-bezier(.22,.61,.36,1)) both; }
.playlist.in .playlist-fineprint    { animation: fadeIn 0.9s 1.2s ease-out both; }

/* ===========================================================
   GALLERIA
   =========================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
  align-items: start;
}

.g-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--ivory-2);
  border: 0.6px solid var(--rule);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
  width: 100%;
}

.g-card .ph-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.g-card:hover .ph-art {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.04);
}

.g-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(42, 38, 32, 0.55) 100%);
  pointer-events: none;
}

.g-card figcaption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow: 0 1px 4px rgba(42, 38, 32, 0.4);
  pointer-events: none;
}

.g-num { font-style: italic; opacity: 0.85; }
.g-tag { font-style: italic; }

.gallery-note {
  text-align: center;
  margin-top: 56px;
  color: var(--gold);
}
.gallery-note p {
  margin-top: 16px;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===========================================================
   RSVP
   =========================================================== */

.rsvp {
  background: linear-gradient(180deg, transparent 0%, var(--ivory-2) 30%, var(--ivory-2) 70%, transparent 100%);
  padding-bottom: 120px;
}

.rsvp-form {
  max-width: 580px;
  margin: 0 auto;
}

.rsvp-intro {
  text-align: center;
  font-size: 18px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 44px;
  line-height: 1.7;
}

.rsvp-intro strong {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}

.field {
  margin-bottom: 28px;
}

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.6px solid var(--rule);
  padding: 10px 0;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.field input[type="text"]:focus,
.field textarea:focus {
  border-bottom-color: var(--gold);
}

.field input[type="text"]::placeholder,
.field textarea::placeholder {
  color: rgba(90, 79, 66, 0.4);
  font-style: italic;
}

.field textarea {
  resize: vertical;
  font-family: var(--serif);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio {
  flex: 1;
  min-width: 160px;
  cursor: pointer;
  position: relative;
  text-align: center;
  padding: 14px 18px;
  border: 0.6px solid var(--rule);
  background: var(--ivory);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.radio input { position: absolute; opacity: 0; pointer-events: none; }

.radio.on {
  border-color: var(--gold);
  color: var(--ink);
  background: #FFF;
  box-shadow: inset 0 0 0 0.6px var(--gold);
}

.radio.on::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.rsvp-submit {
  width: 100%;
  margin-top: 16px;
  padding: 20px 32px;
  background: var(--ink);
  color: var(--ivory);
  border: none;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.rsvp-submit:hover {
  background: var(--gold-deep);
}

.rsvp-thanks {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 32px;
  border: 0.6px solid var(--rule);
  background: var(--ivory);
  position: relative;
}

.rsvp-thanks > svg { color: var(--gold); margin: 0 auto 20px; }

.rsvp-thanks h3 {
  font-family: var(--script);
  font-size: 56px;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 400;
}

.rsvp-thanks p {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
}

.rsvp-thanks .signature {
  margin-top: 28px;
  font-family: var(--script);
  font-size: 32px;
  color: var(--gold-deep);
}

/* ===========================================================
   CLOSING — la frase finale
   =========================================================== */

.closing {
  position: relative;
  padding: 140px 32px 120px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(184, 153, 104, 0.08), transparent 60%),
    #F7F0E2;
  text-align: center;
  overflow: hidden;
}

.closing::before,
.closing::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 0.6px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold) 30%,
    var(--gold) 70%,
    transparent
  );
  opacity: 0.5;
}
.closing::before { top: 0; }
.closing::after  { bottom: 0; }

.closing-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-inner > svg:first-child {
  color: var(--gold);
  margin-bottom: 40px;
  opacity: 0.85;
}

.closing-quote-mark {
  display: block;
  font-family: var(--serif);
  font-size: 140px;
  line-height: 0.6;
  color: var(--gold);
  opacity: 0.55;
  margin-bottom: -20px;
  letter-spacing: -0.04em;
}

.closing-text {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 44px;
  letter-spacing: 0;
  text-wrap: pretty;
}

.closing-text em {
  font-style: normal;
  color: var(--gold-deep);
  font-weight: 400;
}

.closing-inner .divider {
  margin: 0 auto;
  color: var(--gold);
}

.closing-sign {
  margin-top: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* Reveal */
.closing.in .closing-inner > svg:first-child { animation: fadeUp 1s 0.1s ease-out both; }
.closing.in .closing-quote-mark              { animation: fadeIn 1.2s 0.3s ease-out both; }
.closing.in .closing-text                    { animation: fadeUp 1.2s 0.5s cubic-bezier(.22,.61,.36,1) both; }
.closing.in .closing-inner .divider          { animation: fadeIn 1s 0.9s ease-out both; }
.closing.in .closing-sign                    { animation: fadeUp 0.9s 1.1s ease-out both; }

/* ===========================================================
   FOOTER
   =========================================================== */

.footer {
  text-align: center;
  padding: 80px 32px 60px;
  border-top: 0.6px solid var(--rule);
  color: var(--ink-soft);
  background: var(--ivory);
}

.footer > svg { color: var(--gold); margin: 0 auto 16px; }

.f-names {
  font-family: var(--script);
  font-size: 36px;
  color: var(--ink);
  margin-bottom: 8px;
}

.f-date {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.f-line {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ===========================================================
   Animations — elegant entrance reveals + gentle motion
   =========================================================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes drawIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

/* Reveal-on-scroll: elements get .reveal then .in when in view */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 1.1s cubic-bezier(.22,.61,.36,1),
    transform 1.1s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }
.reveal.delay-4 { transition-delay: 0.48s; }

/* Section heads stagger their inner pieces */
.section-head .section-mono { animation: fadeIn 1.4s ease-out both; }
.section.in .section-head .eyebrow { animation: fadeUp 0.9s 0.15s ease-out both; }
.section.in .section-head .section-title { animation: fadeUp 1.1s 0.25s cubic-bezier(.22,.61,.36,1) both; }
.section.in .section-head svg:last-child { animation: fadeIn 1.2s 0.45s ease-out both; transform-origin: center; }

/* Hero entrance — staggered cascade on load */
.hero .hero-mono       { animation: fadeIn 1.6s 0.1s ease-out both; }
.hero .hero-eyebrow    { animation: fadeUp 1s 0.55s ease-out both; }
.hero .hero-names      { animation: fadeUp 1.4s 0.75s cubic-bezier(.22,.61,.36,1) both; }
.hero .hero-divider    { animation: fadeIn 1.2s 1.1s ease-out both; }
.hero .hero-date       { animation: fadeUp 1s 1.25s ease-out both; }
.hero .hero-venues     { animation: fadeUp 1s 1.45s ease-out both; }
.hero .hero-rsvp-line  { animation: fadeUp 1s 1.65s ease-out both; }
.hero .hero-scroll     { animation: fadeIn 1.6s 2s ease-out both; }

/* Hero corner ornaments draw in */
.hero-corner {
  animation: fadeIn 1.4s 0.4s ease-out both;
}

/* Timeline rows reveal sequentially when section enters */
.programma.in .t-row {
  animation: fadeUp 0.9s cubic-bezier(.22,.61,.36,1) both;
}
.programma.in .t-row:nth-child(1) { animation-delay: 0.4s; }
.programma.in .t-row:nth-child(2) { animation-delay: 0.55s; }
.programma.in .t-row:nth-child(3) { animation-delay: 0.7s; }
.programma.in .t-row:nth-child(4) { animation-delay: 0.85s; }
.programma.in .t-row:nth-child(5) { animation-delay: 1.0s; }
.programma.in .t-row:nth-child(6) { animation-delay: 1.15s; }

/* Timeline gold diamonds shimmer subtly */
.t-dot {
  animation: shimmer 4s ease-in-out infinite;
}

/* Dress cards reveal */
.dress.in .dress-card:nth-child(1) { animation: fadeUp 1.1s 0.4s cubic-bezier(.22,.61,.36,1) both; }
.dress.in .dress-card:nth-child(2) { animation: fadeUp 1.1s 0.55s cubic-bezier(.22,.61,.36,1) both; }
.dress.in .dress-swatches.named .sw {
  animation: fadeIn 0.8s ease-out both;
}
.dress.in .dress-card:nth-child(1) .sw:nth-child(1) { animation-delay: 0.7s; }
.dress.in .dress-card:nth-child(1) .sw:nth-child(2) { animation-delay: 0.8s; }
.dress.in .dress-card:nth-child(1) .sw:nth-child(3) { animation-delay: 0.9s; }
.dress.in .dress-card:nth-child(1) .sw:nth-child(4) { animation-delay: 1.0s; }
.dress.in .dress-card:nth-child(1) .sw:nth-child(5) { animation-delay: 1.1s; }
.dress.in .dress-card:nth-child(2) .sw:nth-child(1) { animation-delay: 0.85s; }
.dress.in .dress-card:nth-child(2) .sw:nth-child(2) { animation-delay: 0.95s; }
.dress.in .dress-card:nth-child(2) .sw:nth-child(3) { animation-delay: 1.05s; }
.dress.in .dress-card:nth-child(2) .sw:nth-child(4) { animation-delay: 1.15s; }
.dress.in .dress-card:nth-child(2) .sw:nth-child(5) { animation-delay: 1.25s; }

/* Lista nozze card fade-up */
.lista.in .lista-card { animation: fadeUp 1.1s 0.35s cubic-bezier(.22,.61,.36,1) both; }
.lista.in .lead       { animation: fadeUp 0.9s 0.2s ease-out both; }

/* Gallery cards reveal in waves */
.galleria.in .g-card {
  animation: fadeUp 1s cubic-bezier(.22,.61,.36,1) both;
}
.galleria.in .g-card:nth-child(1) { animation-delay: 0.3s; }
.galleria.in .g-card:nth-child(2) { animation-delay: 0.42s; }
.galleria.in .g-card:nth-child(3) { animation-delay: 0.54s; }
.galleria.in .g-card:nth-child(4) { animation-delay: 0.66s; }
.galleria.in .g-card:nth-child(5) { animation-delay: 0.78s; }
.galleria.in .g-card:nth-child(6) { animation-delay: 0.9s; }

/* RSVP form fields stagger */
.rsvp.in .rsvp-form .field {
  animation: fadeUp 0.9s ease-out both;
}
.rsvp.in .rsvp-form .field:nth-of-type(1) { animation-delay: 0.3s; }
.rsvp.in .rsvp-form .field:nth-of-type(2) { animation-delay: 0.42s; }
.rsvp.in .rsvp-form .field:nth-of-type(3) { animation-delay: 0.54s; }
.rsvp.in .rsvp-form .field:nth-of-type(4) { animation-delay: 0.66s; }
.rsvp.in .rsvp-form .field:nth-of-type(5) { animation-delay: 0.78s; }
.rsvp.in .rsvp-submit { animation: fadeUp 0.9s 0.9s ease-out both; }
.rsvp.in .rsvp-intro  { animation: fadeIn 1.1s 0.2s ease-out both; }

/* ===========================================================
   HOVER MICRO-INTERACTIONS — editorial & refined
   =========================================================== */

/* ---- Curve di easing dedicate ---- */
:root {
  --ease-editorial: cubic-bezier(.22, .61, .36, 1);
  --ease-soft:      cubic-bezier(.4, 0, .2, 1);
}

/* ---- Hero · venue names: gold underline that draws in ---- */
.venue-name {
  position: relative;
  display: inline-block;
  cursor: default;
}
.venue-name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 0.6px;
  background: var(--gold);
  transition: width 0.7s var(--ease-editorial), left 0.7s var(--ease-editorial);
}
.venue:hover .venue-name {
  letter-spacing: 0.06em;
  transition: letter-spacing 0.7s var(--ease-editorial);
}
.venue:hover .venue-name::after {
  width: 80%;
  left: 10%;
}
.venue-name {
  transition: letter-spacing 0.7s var(--ease-editorial);
}

/* ---- Hero · scroll cue arrow rinforzato on hover ---- */
.hero-scroll {
  transition: color 0.4s var(--ease-soft), letter-spacing 0.5s var(--ease-editorial);
}
.hero-scroll:hover {
  color: var(--ink);
  letter-spacing: 0.5em;
}
.hero-scroll:hover .arrow {
  animation-duration: 1s;
}

/* ---- Section heads · monogramma whisper-rotate ---- */
.section-mono {
  transition: transform 1.2s var(--ease-editorial), color 0.6s var(--ease-soft);
  display: inline-flex;
}
.section-head:hover .section-mono {
  transform: rotate(6deg) scale(1.06);
  color: var(--gold-deep);
}

/* ---- Section titles · calligraphic underline from center ---- */
.section-title {
  position: relative;
  display: inline-block;
  cursor: default;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0;
  height: 0.6px;
  background: var(--gold);
  transition: width 0.9s var(--ease-editorial), left 0.9s var(--ease-editorial);
  transform-origin: center;
}
.section-head:hover .section-title::after {
  width: 60%;
  left: 20%;
}

/* ---- Timeline rows · ink shift + diamond bloom ---- */
.t-row {
  transition: transform 0.6s var(--ease-editorial);
  cursor: default;
}
.t-time, .t-title, .t-sub {
  transition: color 0.5s var(--ease-soft), transform 0.7s var(--ease-editorial), letter-spacing 0.6s var(--ease-editorial);
}
.t-row:hover .t-time {
  color: var(--gold-deep);
  letter-spacing: 0.16em;
}
.t-row:hover .t-title {
  transform: translateX(8px);
  color: var(--ink);
  letter-spacing: 0.04em;
}
.t-row:hover .t-sub {
  transform: translateX(8px);
  color: var(--ink-soft);
}

/* timeline diamond grows + glows on hover */
.t-row .t-mark, .t-row .t-dot, .t-row [class*="diamond"], .t-row::before {
  transition: transform 0.7s var(--ease-editorial), background 0.5s var(--ease-soft), box-shadow 0.6s var(--ease-soft);
}
.t-row:hover .t-mark,
.t-row:hover .t-dot,
.t-row:hover [class*="diamond"],
.t-row:hover::before {
  transform: rotate(45deg) scale(1.5);
  box-shadow: 0 0 0 4px rgba(184, 153, 104, 0.15);
}

/* ---- Dress card · cornici espandono, sollevamento sottile ---- */
.dress-card {
  transition:
    transform 0.7s var(--ease-editorial),
    box-shadow 0.7s var(--ease-soft),
    border-color 0.5s var(--ease-soft),
    background 0.6s var(--ease-soft);
  cursor: default;
}
.dress-card::before, .dress-card::after {
  transition:
    width 0.6s var(--ease-editorial),
    height 0.6s var(--ease-editorial),
    border-color 0.5s var(--ease-soft);
}
.dress-card:hover {
  transform: translateY(-6px);
  border-color: rgba(184, 153, 104, 0.6);
  box-shadow:
    0 30px 60px -30px rgba(42, 38, 32, 0.18),
    0 8px 24px -8px rgba(42, 38, 32, 0.10);
}
.dress-card:hover::before,
.dress-card:hover::after {
  width: 38px;
  height: 38px;
  border-color: var(--gold-deep);
}

/* swatches: lieve scale + glow on individual hover */
.dress-swatches.named .sw {
  transition: transform 0.5s var(--ease-editorial);
  cursor: default;
}
.dress-swatches.named .sw span {
  transition:
    transform 0.5s var(--ease-editorial),
    box-shadow 0.5s var(--ease-soft);
}
.dress-swatches.named .sw:hover {
  transform: translateY(-4px);
}
.dress-swatches.named .sw:hover span {
  transform: scale(1.12);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.5),
    0 8px 18px -6px rgba(42,38,32,0.25);
}
.dress-swatches.named .sw em {
  transition: color 0.4s var(--ease-soft), letter-spacing 0.5s var(--ease-editorial);
}
.dress-swatches.named .sw:hover em {
  color: var(--ink);
  letter-spacing: 0.24em;
}

/* ---- Lista nozze card · ornamenti che si estendono ---- */
.lista-card {
  transition:
    transform 0.7s var(--ease-editorial),
    box-shadow 0.7s var(--ease-soft),
    border-color 0.5s var(--ease-soft);
  cursor: default;
}
.lista-card::before, .lista-card::after {
  transition:
    width 0.7s var(--ease-editorial),
    height 0.7s var(--ease-editorial),
    border-color 0.5s var(--ease-soft);
}
.lista-card:hover {
  transform: translateY(-6px);
  border-color: rgba(184, 153, 104, 0.6);
  box-shadow:
    0 40px 80px -40px rgba(42, 38, 32, 0.20),
    0 10px 30px -10px rgba(42, 38, 32, 0.10);
}
.lista-card:hover::before,
.lista-card:hover::after {
  width: 48px;
  height: 48px;
  border-color: var(--gold-deep);
}

/* IBAN row: highlight ink + reveal copy hint */
.iban-row {
  transition: background 0.5s var(--ease-soft);
  cursor: default;
}
.iban-row:hover {
  background: rgba(184, 153, 104, 0.06);
}
.iban-row .iban-val {
  transition: color 0.4s var(--ease-soft), letter-spacing 0.5s var(--ease-editorial);
}
.iban-row:hover .iban-val {
  color: var(--gold-deep);
  letter-spacing: 0.04em;
}

/* ---- Galleria · foto : gentile zoom + cornice oro ---- */
.g-card {
  position: relative;
  cursor: default;
  transition: box-shadow 0.7s var(--ease-soft);
}
.g-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 0.6px solid var(--gold);
  opacity: 0;
  transition: opacity 0.7s var(--ease-editorial), inset 0.7s var(--ease-editorial);
  pointer-events: none;
  z-index: 3;
}
.g-card:hover {
  box-shadow:
    0 30px 60px -30px rgba(42, 38, 32, 0.30),
    0 10px 24px -10px rgba(42, 38, 32, 0.15);
}
.g-card:hover::after {
  opacity: 0.8;
  inset: 18px;
}
.g-card:hover .ph-art {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.04);
}

/* g-card caption: slide & gold accent */
.g-card .g-cap, .g-card figcaption {
  transition:
    transform 0.7s var(--ease-editorial),
    letter-spacing 0.7s var(--ease-editorial),
    color 0.5s var(--ease-soft);
}
.g-card:hover .g-cap,
.g-card:hover figcaption {
  letter-spacing: 0.18em;
  color: var(--ivory);
}

/* ---- Countdown cells · soft lift on hover ---- */
.cd-cell {
  transition: transform 0.6s var(--ease-editorial);
  cursor: default;
}
.cd-frame {
  transition:
    transform 0.6s var(--ease-editorial),
    box-shadow 0.6s var(--ease-soft),
    border-color 0.5s var(--ease-soft);
}
.cd-cell:hover .cd-frame {
  transform: translateY(-4px);
  border-color: rgba(184, 153, 104, 0.5);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 40px 70px -30px rgba(42,38,32,0.25),
    0 10px 28px -8px rgba(42,38,32,0.14);
}
.cd-cell:hover .cd-label {
  color: var(--gold-deep);
  letter-spacing: 0.42em;
  transition: color 0.5s var(--ease-soft), letter-spacing 0.6s var(--ease-editorial);
}
.cd-frame::before, .cd-frame::after {
  transition: width 0.6s var(--ease-editorial), height 0.6s var(--ease-editorial), border-color 0.5s var(--ease-soft);
}
.cd-cell:hover .cd-frame::before,
.cd-cell:hover .cd-frame::after {
  width: 22px;
  height: 22px;
  border-color: var(--gold-deep);
}

/* ---- RSVP form fields · gold underline grows ---- */
.field {
  position: relative;
}
.field input[type="text"],
.field textarea {
  transition: border-color 0.5s var(--ease-soft), padding 0.4s var(--ease-soft);
}
.field input[type="text"]:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-bottom-color: rgba(184, 153, 104, 0.6);
}

.radio {
  transition:
    transform 0.4s var(--ease-editorial),
    border-color 0.4s var(--ease-soft),
    color 0.4s var(--ease-soft),
    background 0.4s var(--ease-soft),
    letter-spacing 0.5s var(--ease-editorial);
}
.radio:hover:not(.on) {
  transform: translateY(-2px);
  border-color: rgba(184, 153, 104, 0.6);
  color: var(--ink);
  letter-spacing: 0.04em;
}

.rsvp-submit[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.rsvp-error {
  margin: 8px 0 4px;
  padding: 14px 18px;
  background: rgba(184, 70, 70, 0.06);
  border: 0.6px solid rgba(184, 70, 70, 0.25);
  color: #8a3a3a;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  text-wrap: pretty;
}

.rsvp-submit {
  position: relative;
  overflow: hidden;
  transition:
    background 0.5s var(--ease-soft),
    letter-spacing 0.6s var(--ease-editorial),
    transform 0.5s var(--ease-editorial);
}
.rsvp-submit:hover {
  letter-spacing: 0.5em;
  transform: translateY(-2px);
}
.rsvp-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 253, 248, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease-editorial);
}
.rsvp-submit:hover::after {
  transform: translateX(100%);
}

/* ---- Closing · monogramma rotazione gentile ---- */
.closing-inner > svg:first-child {
  transition: transform 1.4s var(--ease-editorial);
}
.closing:hover .closing-inner > svg:first-child {
  transform: rotate(-8deg) scale(1.08);
}

/* ---- Footer · monogramma + names lift ---- */
.footer > svg {
  transition: transform 1s var(--ease-editorial);
}
.footer:hover > svg {
  transform: scale(1.1) rotate(4deg);
}
.f-names {
  transition: letter-spacing 0.7s var(--ease-editorial);
}
.footer:hover .f-names {
  letter-spacing: 0.04em;
}

/* ---- Hero monogramma · respiro on hover (oltre l'animazione di entrata) ---- */
.hero-mono {
  transition: transform 1.2s var(--ease-editorial), filter 1s var(--ease-soft);
  cursor: default;
}
.hero:hover .hero-mono {
  transform: scale(1.04);
  filter: drop-shadow(0 0 24px rgba(184, 153, 104, 0.25));
}

/* ---- Hero date numbers · stagger on hover ---- */
.hero-date {
  cursor: default;
}
.hero-date .d {
  display: inline-block;
  transition: transform 0.7s var(--ease-editorial), color 0.5s var(--ease-soft);
}
.hero-date:hover .d:nth-child(1) { transform: translateY(-3px); }
.hero-date:hover .d:nth-child(3) { transform: translateY(-3px); transition-delay: 0.06s; }
.hero-date:hover .d:nth-child(5) { transform: translateY(-3px); transition-delay: 0.12s; }
.hero-date:hover .dot { color: var(--gold-deep); transition: color 0.5s var(--ease-soft); }

/* ===========================================================
   END HOVER
   =========================================================== */

/* ===========================================================
   FRANCIACORTA — Il giorno dopo
   =========================================================== */

.franciacorta {
  background: linear-gradient(180deg, transparent 0%, var(--ivory-2) 50%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.franciacorta-intro {
  max-width: 620px;
  margin: 0 auto 80px;
  text-align: center;
  font-size: 19px;
  line-height: 1.85;
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.fc-cluster {
  max-width: 820px;
  margin: 0 auto 72px;
  position: relative;
  z-index: 2;
}
.fc-cluster:last-child { margin-bottom: 0; }

.fc-cluster-head {
  text-align: center;
  margin-bottom: 36px;
}

.fc-cluster-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.fc-cluster-title {
  font-family: var(--script);
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 1;
  color: grey;
  margin: 0 0 14px;
}

.fc-cluster-rule {
  display: flex;
  justify-content: center;
  color: var(--gold);
  opacity: 0.7;
}

.fc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.fc-grid.fc-grid-4 {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.fc-card {
  position: relative;
  display: block;
  padding: 36px 32px;
  background: rgba(255, 253, 248, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 0.6px solid rgba(184, 153, 104, 0.22);
  text-align: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 20px 40px -28px rgba(42, 38, 32, 0.10);
  transition:
    transform 0.7s var(--ease-editorial),
    box-shadow 0.7s var(--ease-soft),
    border-color 0.5s var(--ease-soft),
    background 0.6s var(--ease-soft);
}

.fc-card::before, .fc-card::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0.6px solid var(--gold);
  pointer-events: none;
  transition:
    width 0.6s var(--ease-editorial),
    height 0.6s var(--ease-editorial),
    border-color 0.5s var(--ease-soft);
}
.fc-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.fc-card::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.fc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 153, 104, 0.5);
  background: rgba(255, 253, 248, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 30px 60px -30px rgba(42, 38, 32, 0.18),
    0 8px 20px -8px rgba(42, 38, 32, 0.08);
}
.fc-card:hover::before,
.fc-card:hover::after {
  width: 32px;
  height: 32px;
  border-color: var(--gold-deep);
}

.fc-card-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  font-variant: small-caps;
  color: var(--ink);
  margin: 0 0 10px;
}

.fc-card-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

/* Place cards: layout asimmetrico più editoriale */
.fc-place {
  position: relative;
  display: block;
  padding: 28px 28px 30px;
  background: transparent;
  border: none;
  border-top: 0.6px solid rgba(184, 153, 104, 0.25);
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.6s var(--ease-soft), padding-left 0.6s var(--ease-editorial);
}
.fc-place:hover {
  background: rgba(255, 253, 248, 0.5);
  padding-left: 36px;
}

.fc-place-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
  transition: letter-spacing 0.6s var(--ease-editorial);
}
.fc-place:hover .fc-place-eyebrow {
  letter-spacing: 0.46em;
}

.fc-place-name {
  font-family: var(--script);
  font-weight: 400;
  font-style: normal;
  font-size: 42px;
  line-height: 1;
  color: grey;
  margin: 0 0 10px;
}

.fc-place-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
  max-width: 460px;
}

/* CTA "Apri in Maps ↗" — reveal on hover/focus, soft and editorial */
.fc-card-cta {
  display: block;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.6s var(--ease-soft),
    transform 0.7s var(--ease-editorial),
    letter-spacing 0.7s var(--ease-editorial);
}
.fc-card:hover .fc-card-cta,
.fc-card:focus-visible .fc-card-cta,
.fc-place:hover .fc-card-cta,
.fc-place:focus-visible .fc-card-cta {
  opacity: 1;
  transform: translateY(0);
  letter-spacing: 0.42em;
}

.fc-place .fc-card-cta {
  text-align: left;
  margin-top: 10px;
  max-width: 460px;
}

/* Focus visibility for keyboard nav */
.fc-card:focus-visible,
.fc-place:focus-visible {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 0 0 2px rgba(184,153,104,0.35),
    0 30px 60px -30px rgba(42,38,32,0.18);
}

@media (max-width: 720px) {
  .fc-grid,
  .fc-grid.fc-grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .fc-place { padding: 24px 16px 26px; }
  .fc-place:hover { padding-left: 24px; }
  .fc-card { padding: 28px 22px; }
  .fc-cluster { margin-bottom: 56px; }
}

/* Reveal */
.franciacorta.in .franciacorta-intro { animation: fadeUp 1s 0.2s ease-out both; }
.franciacorta.in .fc-cluster:nth-of-type(1) { animation: fadeUp 1s 0.4s var(--ease-editorial) both; }
.franciacorta.in .fc-cluster:nth-of-type(2) { animation: fadeUp 1s 0.55s var(--ease-editorial) both; }
.franciacorta.in .fc-cluster:nth-of-type(3) { animation: fadeUp 1s 0.7s var(--ease-editorial) both; }

/* ===========================================================
   WATERCOLOR — illustrazioni ad acquerello decorative
   =========================================================== */

.watercolor {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  position: absolute;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* Venue watercolor · chiesa e villa accanto ai due luoghi della Hero */
.venue-watercolor {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 180px;
  margin-bottom: 20px;
  pointer-events: none;
  user-select: none;
}
.venue-watercolor img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  opacity: 1;
  filter: saturate(0.88) contrast(0.96);
  mix-blend-mode: multiply;
  -webkit-user-drag: none;
  transition: opacity 0.7s var(--ease-soft), transform 0.9s var(--ease-editorial), filter 0.6s var(--ease-soft);
  will-change: transform, opacity;
}
.venue:hover .venue-watercolor img,
.venue:focus-visible .venue-watercolor img {
  transform: translateY(-3px) scale(1.03);
  filter: saturate(1) contrast(1);
}

/* ===========================================================
   FRANCIACORTA · sezione semplice testuale (no foto)
   =========================================================== */

/* Regole immersive disattivate — il watercolor non viene più usato qui */
.fc-immersive,
.fc-immersive-bg,
.fc-immersive-overlay,
.fc-immersive-content { display: none !important; }
.fc-watercolor-side { display: none !important; }

/* ===========================================================
   MUSIC PLAYER — floating button discreto
   =========================================================== */

.music-player {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  background: rgba(251, 247, 240, 0.72);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 0.6px solid rgba(184, 153, 104, 0.32);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 30px -10px rgba(42, 38, 32, 0.18),
    0 4px 12px -4px rgba(42, 38, 32, 0.08);
  transition:
    background 0.5s var(--ease-soft),
    border-color 0.5s var(--ease-soft),
    transform 0.6s var(--ease-editorial),
    box-shadow 0.6s var(--ease-soft),
    letter-spacing 0.6s var(--ease-editorial);
  opacity: 0;
  animation: fadeUp 1s 2.4s ease-out both;
}

.music-player:hover {
  background: rgba(255, 253, 248, 0.92);
  border-color: rgba(184, 153, 104, 0.55);
  transform: translateY(-2px);
  letter-spacing: 0.34em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -14px rgba(42, 38, 32, 0.22),
    0 6px 16px -6px rgba(42, 38, 32, 0.10);
}

.music-player:focus-visible {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 2px rgba(184, 153, 104, 0.35),
    0 18px 40px -14px rgba(42, 38, 32, 0.22);
}

.music-player.is-playing {
  color: var(--ink);
  border-color: rgba(184, 153, 104, 0.5);
}

.music-player-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ivory);
  flex-shrink: 0;
  transition: background 0.5s var(--ease-soft), transform 0.6s var(--ease-editorial);
}

.music-player:hover .music-player-icon {
  background: var(--gold-deep);
  transform: rotate(-4deg) scale(1.04);
}

.music-player.is-playing .music-player-icon {
  background: var(--ink);
}

.music-player-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.music-player-label {
  white-space: nowrap;
  position: relative;
}

/* equalizer bars when playing — sostituiscono visivamente l'icona play */
.music-player-eq {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 14px;
  height: 14px;
}
.music-player-eq span {
  display: inline-block;
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  animation: musicEq 1.1s ease-in-out infinite;
}
.music-player-eq span:nth-child(1) { height: 60%; animation-delay: -0.3s; }
.music-player-eq span:nth-child(2) { height: 100%; animation-delay: -0.6s; }
.music-player-eq span:nth-child(3) { height: 70%; animation-delay: -0.15s; }
.music-player-eq span:nth-child(4) { height: 90%; }

@keyframes musicEq {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

@media (max-width: 720px) {
  .music-player {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px 8px 14px;
    font-size: 11px;
    letter-spacing: 0.22em;
    gap: 10px;
  }
  .music-player .music-player-label-text { display: none; }
  .music-player-icon { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-player-eq span { animation: none; }
  .music-player { animation: none; opacity: 1; }
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ===========================================================
   Tweak controls override (panel font)
   =========================================================== */
.tweaks-panel {
  font-family: 'Inter', system-ui, sans-serif;
}


/* ===========================================================
   ✨ EFFECTS — Romantic & Cinematic Upgrade
   Aggiunto: petali, bokeh, cursore, reveal, parallasse, hover oro
   =========================================================== */

/* ---------- 1) PETALI DORATI (canvas a tutta finestra) ---------- */
.fx-petals {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 3; /* sopra al grain, sotto al contenuto principale */
  opacity: 0.85;
}

/* ---------- 2) BOKEH (luci dorate fluttuanti) ---------- */
.fx-bokeh {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.fx-bokeh span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
              rgba(255, 230, 175, 0.95) 0%,
              rgba(201, 168, 106, 0.55) 30%,
              rgba(184, 153, 104, 0.18) 60%,
              rgba(184, 153, 104, 0) 80%);
  filter: blur(8px);
  opacity: 0;
  animation: bokehFloat linear infinite;
  will-change: transform, opacity;
  mix-blend-mode: screen;
}
@keyframes bokehFloat {
  0%   { transform: translate(0, 30px) scale(0.85); opacity: 0; }
  10%  { opacity: var(--bokeh-opacity, 0.3); }
  50%  { transform: translate(var(--drift, 20px), -40px) scale(1); opacity: var(--bokeh-opacity, 0.3); }
  90%  { opacity: var(--bokeh-opacity, 0.3); }
  100% { transform: translate(calc(var(--drift, 20px) * -0.5), -110px) scale(0.85); opacity: 0; }
}

/* ---------- 3) CURSORE: scia di petalini ---------- */
.fx-cursor-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}
.fx-cursor-dot {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50% 30% 50% 30%;
  background: radial-gradient(circle at 35% 35%, rgba(232, 217, 199, 0.95), rgba(184, 153, 104, 0.6) 60%, rgba(184, 153, 104, 0));
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--s, 1)) rotate(var(--rot, 0deg));
  animation: cursorPetalFade 1.2s cubic-bezier(.4,.0,.2,1) forwards;
  will-change: transform, opacity;
}
@keyframes cursorPetalFade {
  0%   { opacity: 0.85; }
  100% { opacity: 0; transform: translate(-50%, calc(-50% + 18px)) scale(calc(var(--s, 1) * 0.4)) rotate(calc(var(--rot, 0deg) + 90deg)); }
}

/* ---------- 4) RAMI D'OLIVO che si tracciano ai lati del monogramma ---------- */
.fx-hero-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 40px)); /* centrato sul monogramma, non sulla pagina */
  color: var(--gold);
  pointer-events: none;
  z-index: 1; /* dietro al monogramma (z-index 3) */
  opacity: 0.85;
}
@media (max-width: 700px) {
  .fx-hero-frame {
    /* Su mobile lo rendo più piccolo invece di nasconderlo */
    transform: translate(-50%, calc(-50% - 20px)) scale(0.65);
  }
}

/* Tracciatura stelo */
.fx-draw {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawStroke 2.2s cubic-bezier(.55,.0,.1,1) forwards;
}
.fx-draw-stem-l { animation-delay: 0.4s; }
.fx-draw-stem-r { animation-delay: 0.4s; }

@keyframes drawStroke {
  to { stroke-dashoffset: 0; }
}

/* Le foglie appaiono in sequenza dopo lo stelo */
.fx-leaves ellipse {
  opacity: 0;
  transform-origin: center;
  animation: leafIn 0.6s cubic-bezier(.22,.61,.36,1) forwards;
}
.fx-leaves-l ellipse:nth-child(1) { animation-delay: 1.6s; }
.fx-leaves-l ellipse:nth-child(2) { animation-delay: 1.75s; }
.fx-leaves-l ellipse:nth-child(3) { animation-delay: 1.9s; }
.fx-leaves-l ellipse:nth-child(4) { animation-delay: 2.05s; }
.fx-leaves-l ellipse:nth-child(5) { animation-delay: 2.2s; }
.fx-leaves-l ellipse:nth-child(6) { animation-delay: 2.35s; }
.fx-leaves-r ellipse:nth-child(1) { animation-delay: 1.6s; }
.fx-leaves-r ellipse:nth-child(2) { animation-delay: 1.75s; }
.fx-leaves-r ellipse:nth-child(3) { animation-delay: 1.9s; }
.fx-leaves-r ellipse:nth-child(4) { animation-delay: 2.05s; }
.fx-leaves-r ellipse:nth-child(5) { animation-delay: 2.2s; }
.fx-leaves-r ellipse:nth-child(6) { animation-delay: 2.35s; }

@keyframes leafIn {
  0%   { opacity: 0; }
  100% { opacity: 0.75; }
}

.fx-fade-in {
  opacity: 0;
  animation: fadeInSimple 1.2s 2.6s ease-out forwards;
}
@keyframes fadeInSimple { to { opacity: 1; } }

/* ---------- 5) TESTO REVEAL parola per parola ---------- */
.fx-reveal-words .fx-rw-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.fx-reveal-words .fx-rw-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(.22,.61,.36,1), opacity 0.9s ease;
  transition-delay: calc(var(--delay, 0ms) + var(--i, 0) * 40ms);
}
.fx-reveal-words.in .fx-rw-inner {
  transform: translateY(0);
  opacity: 1;
}
.fx-reveal-simple {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.22,.61,.36,1);
}
.fx-reveal-simple.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 6) LETTERA PER LETTERA (firma) ---------- */
.fx-reveal-letters {
  display: inline-block;
  overflow: visible;
  /* Padding generoso per le ascendenti del font script */
  padding: 0.25em 0.05em 0.15em;
}
.fx-reveal-letters .fx-rl-char {
  display: inline-block;
  opacity: 0;
  /* Solo translate (no scale, no blur — entrambi causavano ghosting sulle ascendenti
     di Pinyon Script su lettere come f, d, l, b) */
  transform: translateY(0.2em);
  transition:
    opacity 0.9s cubic-bezier(.22,.61,.36,1),
    transform 0.9s cubic-bezier(.22,.61,.36,1);
  /* Forziamo overflow visibile per non clippare le ascendenti */
  overflow: visible;
}
.fx-reveal-letters.in .fx-rl-char {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 7) PARALLASSE ---------- */
.fx-parallax-img {
  transform: translate3d(0, var(--parallax-y, 0), 0);
  transition: transform 0.05s linear;
  will-change: transform;
}

/* ===========================================================
   🎨 OVERRIDE per migliorare l'esistente
   =========================================================== */

/* ---------- HERO: tipografia più drammatica + sotto cornice animata ---------- */
.hero {
  position: relative;
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-names {
  /* override del font-size inline 70px → più ariosa */
  font-size: clamp(56px, 9vw, 110px) !important;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(184, 153, 104, 0.08);
}
.hero-names .amp {
  font-size: clamp(28px, 4vw, 48px) !important;
  vertical-align: middle;
  color: var(--gold) !important;
  font-style: italic;
  padding: 0 0.15em;
}
/* Disabilito le animazioni originali su .hero .hero-names per non collidere col reveal letters */
.hero .hero-names {
  animation: none !important;
}
/* Animazione del monogramma: NON tocca il filter (sennò perde il color dorato del PNG)
   Anima solo opacity + transform, e usa una wrapper-class per non collidere con il filter del PNG */
.hero .hero-mono {
  animation: heroMonoIn 1.4s 0.2s cubic-bezier(.22,.61,.36,1) both !important;
  position: relative;
  z-index: 3; /* sopra alla cornice decorativa */
}
@keyframes heroMonoIn {
  0%   { opacity: 0; transform: scale(0.7) translateY(20px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Cornici angolari più rifinite con gradient oro — si "disegnano" dall'angolo */
.hero-corner {
  border-color: var(--gold) !important;
  border-width: 1px !important;
  opacity: 0;
  animation: heroCornerIn 1.6s cubic-bezier(.22,.61,.36,1) both;
  transform-origin: top left;
}
.hero-corner.tr { transform-origin: top right; }
.hero-corner.bl { transform-origin: bottom left; }
.hero-corner.br { transform-origin: bottom right; }
.hero-corner.tl { animation-delay: 0.4s; }
.hero-corner.tr { animation-delay: 0.6s; }
.hero-corner.bl { animation-delay: 0.8s; }
.hero-corner.br { animation-delay: 1.0s; }
@keyframes heroCornerIn {
  0%   { opacity: 0; transform: scale(0.3); }
  60%  { opacity: 1; }
  100% { opacity: 0.85; transform: scale(1); }
}

/* Sottile divisorio diagonale ai bordi della Hero per dare più "carta da invito" */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0;
  top: 20%;
  animation: heroSideIn 1.4s 1.4s cubic-bezier(.22,.61,.36,1) forwards;
  pointer-events: none;
}
.hero::before { left: 80px; }
.hero::after  { right: 80px; }
@media (max-width: 700px) {
  .hero::before, .hero::after { display: none; }
}
@keyframes heroSideIn {
  to { opacity: 0.35; }
}

/* Date e luoghi entrano in sequenza */
.hero-date { animation: fadeUpSlow 1.2s 1.6s cubic-bezier(.22,.61,.36,1) both; }
.hero-divider { animation: fadeUpSlow 1.2s 1.4s cubic-bezier(.22,.61,.36,1) both; }
.hero-venues { animation: fadeUpSlow 1.4s 2.0s cubic-bezier(.22,.61,.36,1) both; }
.hero-rsvp-line { animation: fadeUpSlow 1.2s 2.4s cubic-bezier(.22,.61,.36,1) both; }
.hero-scroll { animation: scrollPulse 2.4s 3s ease-in-out infinite, fadeUpSlow 1s 2.8s ease both; }
@keyframes fadeUpSlow {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ---------- COUNTDOWN: cifre con accento oro brillante ---------- */
.cd-card {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%) !important;
  box-shadow: 0 4px 20px rgba(184, 153, 104, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}
.cd-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, transparent 30%, rgba(184, 153, 104, 0.08) 50%, transparent 70%);
  background-size: 200% 200%;
  animation: cdShimmer 6s ease-in-out infinite;
}
@keyframes cdShimmer {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}
.cd-num {
  color: var(--ink) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ---------- GALLERIA: hover con cornice oro animata + zoom ---------- */
.g-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1), box-shadow 0.6s ease;
}
.g-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(58, 50, 38, 0.25);
}
.g-card .ph-art {
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1), filter 0.6s ease;
}
.g-card:hover .ph-art {
  transform: scale(1.06);
  filter: saturate(1.1) brightness(1.02);
}
/* Cornice oro che si disegna sull'hover */
.g-card {
  overflow: hidden;
}
.g-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid transparent;
  pointer-events: none;
  z-index: 3;
  transition: border-color 0.4s ease;
}
.g-card:hover::before {
  border-color: rgba(251, 247, 240, 0.85);
}
/* Le quattro linee oro animate dagli angoli */
.g-card .g-frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--gold);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(.22,.61,.36,1);
  z-index: 4;
  pointer-events: none;
}
.g-card:hover .g-frame-corner {
  opacity: 0.9;
}
.g-card .g-frame-corner.tl { top: 14px;    left: 14px;    border-right: none; border-bottom: none; transform: translate(-6px, -6px); }
.g-card .g-frame-corner.tr { top: 14px;    right: 14px;   border-left: none;  border-bottom: none; transform: translate(6px, -6px); }
.g-card .g-frame-corner.bl { bottom: 14px; left: 14px;    border-right: none; border-top: none;    transform: translate(-6px, 6px); }
.g-card .g-frame-corner.br { bottom: 14px; right: 14px;   border-left: none;  border-top: none;    transform: translate(6px, 6px); }
.g-card:hover .g-frame-corner { transform: translate(0, 0); }

/* Numero e tag in figcaption più eleganti */
.g-card figcaption {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.g-card:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- BOTTONI: riempimento oro liquido all'hover ---------- */
.rsvp-submit,
.playlist-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink) !important; /* override del grey inline */
  border: 1px solid var(--ink) !important;
  transition: color 0.5s ease, transform 0.3s ease, box-shadow 0.4s ease, border-color 0.4s ease !important;
}
.rsvp-submit::before,
.playlist-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 50%, var(--gold-2) 100%);
  transform: translateY(102%);
  transition: transform 0.7s cubic-bezier(.22,.61,.36,1);
  z-index: -1;
}
.rsvp-submit:hover::before,
.playlist-cta:hover::before {
  transform: translateY(0);
}
.rsvp-submit:hover,
.playlist-cta:hover {
  border-color: var(--gold-deep) !important;
  box-shadow: 0 12px 30px -8px rgba(138, 111, 74, 0.45);
  transform: translateY(-2px);
  color: var(--ivory) !important;
}
.rsvp-submit:active,
.playlist-cta:active {
  transform: translateY(0);
}

/* ---------- HOVER su CARD generiche (timeline rows, fc cards, dress, lista) ---------- */
.t-row {
  transition: transform 0.4s ease;
}
.t-row:hover {
  transform: translateX(4px);
}
.t-row:hover .t-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 153, 104, 0.15);
  transform: scale(1.2);
}
.t-dot {
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.fc-card, .fc-place {
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1), box-shadow 0.5s ease, border-color 0.5s ease;
}
.fc-card:hover, .fc-place:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(184, 153, 104, 0.25);
  border-color: var(--gold) !important;
}

.dress-card, .lista-card, .playlist-card, .venue {
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1), box-shadow 0.5s ease;
}
.dress-card:hover, .lista-card:hover, .playlist-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -12px rgba(58, 50, 38, 0.15);
}

/* Venue card hover sulle due location nella Hero */
.venue {
  position: relative;
  padding: 8px;
  border-radius: 6px;
}
.venue::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 0.4s ease;
}
.venue:hover::after {
  border-color: rgba(184, 153, 104, 0.45);
}
.venue:hover .venue-name {
  color: var(--gold-deep) !important;
}
.venue-name {
  transition: color 0.4s ease;
}

/* Swatch dress code animate */
.dress-swatches .sw span {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.dress-swatches .sw:hover span {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 6px 16px -4px rgba(58, 50, 38, 0.3);
}

/* Radio button RSVP più tattili */
.radio {
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.radio:hover {
  transform: translateY(-1px);
  border-color: var(--gold) !important;
}

/* Input focus oro */
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(184, 153, 104, 0.15);
}

/* ---------- CLOSING: testo statico grigio, niente shimmer ---------- */
.closing-text em {
  position: relative;
  display: inline-block;
  /* Stesso grigio del resto del testo closing — niente gradient, niente animazione */
  color: grey;
  font-style: italic;
}

/* ---------- MUSIC PLAYER più raffinato ---------- */
.music-player {
  background: var(--ivory) !important;
  border: 1px solid var(--gold) !important;
  color: var(--gold-deep) !important;
  box-shadow: 0 4px 20px -4px rgba(184, 153, 104, 0.3) !important;
  transition: all 0.4s cubic-bezier(.22,.61,.36,1) !important;
}
.music-player:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 28px -4px rgba(184, 153, 104, 0.5) !important;
}
.music-player.is-playing {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%) !important;
  color: var(--ivory) !important;
  border-color: var(--gold-deep) !important;
}

/* ---------- TIMELINE programma con linea oro che cresce ---------- */
.t-line {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%) !important;
  position: relative;
}
.programma.in .t-line {
  animation: lineGrow 1.4s cubic-bezier(.22,.61,.36,1) both;
  transform-origin: top;
}
@keyframes lineGrow {
  0%   { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
.programma.in .t-dot {
  animation: dotPop 0.6s cubic-bezier(.22,.61,.36,1) both;
}
.programma.in .t-row:nth-child(1) .t-dot { animation-delay: 0.2s; }
.programma.in .t-row:nth-child(2) .t-dot { animation-delay: 0.4s; }
.programma.in .t-row:nth-child(3) .t-dot { animation-delay: 0.6s; }
.programma.in .t-row:nth-child(4) .t-dot { animation-delay: 0.8s; }
.programma.in .t-row:nth-child(5) .t-dot { animation-delay: 1.0s; }
.programma.in .t-row:nth-child(6) .t-dot { animation-delay: 1.2s; }
@keyframes dotPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- SECTION TITLE: sottolinea oro animata ---------- */
.section-title {
  position: relative;
  display: inline-block;
}
.section.in .section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  animation: titleUnderline 1.2s 0.6s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes titleUnderline {
  to { transform: translateX(-50%) scaleX(1); }
}

/* ---------- DIVIDER con diamante che brilla ---------- */
.section.in .section-head svg path[d^="M"] {
  animation: diamondPulse 2.4s 1s ease-in-out infinite;
}
@keyframes diamondPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ---------- STORIA come lettera scritta a mano ---------- */
.storia-body {
  position: relative;
}
.storia-body::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(184, 153, 104, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(232, 217, 199, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}
.storia .lead {
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 24px) !important;
  line-height: 1.7;
}

/* ---------- VENUE watercolor pulsa leggermente ---------- */
.venue-watercolor img {
  transition: transform 0.7s cubic-bezier(.22,.61,.36,1), filter 0.5s ease;
}
.venue:hover .venue-watercolor img {
  transform: scale(1.08) rotate(-1deg);
  filter: saturate(1.15);
}

/* ---------- PLAYLIST step numbers eleganti ---------- */
.playlist-step {
  transition: transform 0.4s ease;
}
.playlist-step:hover {
  transform: translateY(-3px);
}
.playlist-step:hover .playlist-step-num {
  color: var(--gold) !important;
  transform: scale(1.1);
}
.playlist-step-num {
  transition: color 0.3s ease, transform 0.4s ease;
}

/* ---------- ASSICURO che canvas/bokeh stiano sotto al contenuto ---------- */
body::before { z-index: 1 !important; }
.fx-bokeh    { z-index: 2; }
.fx-petals   { z-index: 3; }
#app         { position: relative; z-index: 5; }

/* ---------- SCROLL behavior smooth ---------- */
html { scroll-behavior: smooth; }

/* ---------- RIDOTTO per accessibilità ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fx-petals, .fx-bokeh, .fx-cursor-container { display: none !important; }
  .fx-draw { stroke-dasharray: 0 !important; stroke-dashoffset: 0 !important; }
  .fx-reveal-words .fx-rw-inner,
  .fx-reveal-simple,
  .fx-reveal-letters .fx-rl-char {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- MOBILE tweaks: performance ---------- */
@media (max-width: 700px) {
  .hero-names { font-size: clamp(46px, 12vw, 72px) !important; }
  .closing-text { font-size: clamp(36px, 10vw, 60px) !important; }
}

/* ===========================================================
   ✨ NUOVI EFFETTI — v3
   Busta · Cursore dorato · Polaroid · Mappa
   =========================================================== */

/* ----------------------------------------------------------
   A) BUSTA INTRO — fullscreen overlay all'apertura del sito
   ---------------------------------------------------------- */
.fx-envelope-stage {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #FFFCF5 0%, var(--ivory-2) 50%, var(--ivory-3) 100%);
  cursor: pointer;
  overflow: hidden;
  /* Nessuna dissolvenza in entrata: lo stage è opaco dal primo render così copre
     subito i nomi. La dissolvenza resta solo in uscita (.phase-fading). */
}
.fx-envelope-stage.phase-fading {
  animation: envStageOut 0.8s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes envStageOut { to   { opacity: 0; visibility: hidden; } }

.fx-envelope-skip {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 1px solid rgba(184, 153, 104, 0.4);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  animation: envSkipIn 0.6s 2.5s ease-out forwards;
  transition: background 0.3s ease, color 0.3s ease;
}
.fx-envelope-skip:hover {
  background: var(--gold);
  color: var(--ivory);
  border-color: var(--gold);
}
@keyframes envSkipIn { to { opacity: 0.7; } }

.fx-envelope-scene {
  position: relative;
  width: min(420px, 88vw);
  perspective: 1200px;
}

.fx-envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  transform-origin: center;
  animation: envEnter 0.9s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes envEnter {
  0%   { opacity: 0; transform: translateY(40px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Corpo della busta */
.fx-env-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--ivory-2) 0%, var(--ivory-3) 100%);
  border: 0.6px solid var(--gold);
  border-radius: 4px;
  box-shadow:
    0 20px 60px -16px rgba(58, 50, 38, 0.35),
    0 4px 12px -2px rgba(58, 50, 38, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 1;
}

/* Patta inferiore (la "V" frontale) */
.fx-env-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4; /* sopra al cartoncino quando è dentro */
  pointer-events: none;
  filter: drop-shadow(0 -2px 4px rgba(58, 50, 38, 0.08));
}

/* Patta superiore — si apre verso l'alto */
.fx-env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65%;
  z-index: 5;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.9s cubic-bezier(.55, 0, .1, 1);
  filter: drop-shadow(0 4px 6px rgba(58, 50, 38, 0.12));
}
.fx-envelope-stage.phase-opening .fx-env-flap,
.fx-envelope-stage.phase-pulling .fx-env-flap,
.fx-envelope-stage.phase-fading  .fx-env-flap {
  transform: rotateX(-180deg);
}

/* Sigillo di ceralacca */
.fx-env-seal {
  position: absolute;
  top: calc(65% - 26px);
  left: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #C9A86A 0%, #8A6F4A 60%, #6B5340 100%);
  border: 0.5px solid rgba(106, 83, 64, 0.4);
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    0 3px 8px rgba(58, 50, 38, 0.3);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, 0) scale(1);
  transition: transform 0.5s ease, opacity 0.4s ease;
}
.fx-env-seal-letters {
  font-family: var(--script);
  font-size: 22px;
  color: rgba(251, 247, 240, 0.9);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  line-height: 1;
  padding-bottom: 3px;
}
/* Sigillo si rompe in due quando la patta inizia ad aprire */
.fx-envelope-stage.phase-opening .fx-env-seal,
.fx-envelope-stage.phase-pulling .fx-env-seal,
.fx-envelope-stage.phase-fading  .fx-env-seal {
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.7) rotate(-12deg);
}

/* Cartoncino interno: parte dentro, esce fuori */
.fx-env-card {
  position: absolute;
  top: 8%;
  left: 8%;
  right: 8%;
  bottom: 8%;
  background: var(--ivory);
  border: 0.5px solid rgba(184, 153, 104, 0.4);
  border-radius: 3px;
  box-shadow:
    0 2px 8px rgba(58, 50, 38, 0.15),
    inset 0 0 0 4px var(--ivory),
    inset 0 0 0 5px rgba(184, 153, 104, 0.2);
  z-index: 3;
  transform: translateY(0);
  transition: transform 1.4s cubic-bezier(.34, 1.2, .64, 1), z-index 0s 1.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.fx-envelope-stage.phase-pulling .fx-env-card,
.fx-envelope-stage.phase-fading  .fx-env-card {
  transform: translateY(-58%) scale(1.05);
  z-index: 7;
  transition: transform 1.4s cubic-bezier(.34, 1.2, .64, 1), z-index 0s;
}

.fx-env-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.6s ease 0.8s;
}
.fx-envelope-stage.phase-pulling .fx-env-card-inner,
.fx-envelope-stage.phase-zooming .fx-env-card-inner,
.fx-envelope-stage.phase-fading  .fx-env-card-inner {
  opacity: 1;
}

/* Monogramma grande centrato nel cartoncino */
.fx-env-mono-img {
  width: 65%;
  max-width: 220px;
  height: auto;
  display: block;
  object-fit: contain;
  /* Il logo è già dorato nativo, niente filter */
}

@media (max-width: 480px) {
  .fx-envelope-scene { width: 86vw; }
  .fx-env-seal { width: 44px; height: 44px; }
  .fx-env-seal-letters { font-size: 18px; }
  .fx-env-mono-img { width: 55%; max-width: 160px; }
}

/* ----------------------------------------------------------
   B) MAPPA — sezione percorso Chiesa → Villa
   ---------------------------------------------------------- */
.section.mappa {
  padding-bottom: 80px;
}
.mappa-intro {
  text-align: center;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.7;
}
.mappa-intro strong {
  color: var(--gold-deep);
  font-weight: 500;
}

.mappa-canvas {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  aspect-ratio: 800 / 360;
  border-radius: 6px;
  overflow: visible;
}

.mappa-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow:
    0 12px 40px -16px rgba(58, 50, 38, 0.25),
    inset 0 0 0 1px rgba(184, 153, 104, 0.2);
}

/* Strada tratteggiata che si traccia all'entrata in viewport */
.mappa-strada {
  stroke-dasharray: 6 8;
  stroke-dashoffset: 0;
  opacity: 0;
}
.section.mappa.in .mappa-strada {
  animation: mappaStradaIn 2.2s 0.6s cubic-bezier(.55, 0, .1, 1) forwards;
}
@keyframes mappaStradaIn {
  0%   { opacity: 0; stroke-dasharray: 6 800; }
  20%  { opacity: 1; }
  100% { opacity: 1; stroke-dasharray: 6 8; }
}

/* Pin (cerchi sotto le watercolor) */
.mappa-pin circle:first-child {
  transform-origin: center;
  opacity: 0;
}
.section.mappa.in .mappa-pin-church circle:first-child {
  animation: pinDrop 0.7s 0.4s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
.section.mappa.in .mappa-pin-villa circle:first-child {
  animation: pinDrop 0.7s 2.5s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
/* Pulse: solo 2 cicli alla comparsa, NIENTE animazione infinita */
.section.mappa.in .mappa-pin-church circle:nth-child(2) {
  animation: pinRing 1.8s 1.1s ease-out 2 forwards;
}
.section.mappa.in .mappa-pin-villa circle:nth-child(2) {
  animation: pinRing 1.8s 3.2s ease-out 2 forwards;
}
.mappa-pin circle:nth-child(2) {
  transform-origin: center;
  transform-box: fill-box;
  opacity: 0; /* invisibile a riposo, l'animazione la rende visibile e poi la fa svanire */
}
@keyframes pinDrop {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.5); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pinRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Su mobile, ELIMINO completamente il pulse: niente luce intermittente */
@media (max-width: 700px) {
  .section.mappa.in .mappa-pin-church circle:nth-child(2),
  .section.mappa.in .mappa-pin-villa circle:nth-child(2) {
    animation: none !important;
    opacity: 0 !important;
  }

  /* FIX BUG mobile — percorso Chiesa → Villa:
     1) Disegno STATICO: niente animazione "marciante" dei trattini (causa l'effetto
        di intermittenza di luce lungo il percorso). Il tracciato appare già completo.
     2) Tolgo l'OMBREGGIATURA dietro all'SVG: su mobile il box-shadow veniva ridisegnato
        a ogni frame durante l'animazione, generando il flicker dietro il percorso.
        Tengo solo l'hairline dorata interna per definire il bordo. */
  .mappa-strada {
    opacity: 1 !important;
    animation: none !important;
    stroke-dasharray: 6 8 !important;
    stroke-dashoffset: 0 !important;
  }
  .mappa-svg {
    box-shadow: inset 0 0 0 1px rgba(184, 153, 104, 0.2) !important;
  }
}

.mappa-dist-tag {
  opacity: 0;
}
.section.mappa.in .mappa-dist-tag {
  animation: fadeInSimple 1s 2s ease-out forwards;
}

/* Watercolor + info delle due location (posizionate via assoluto sopra all'SVG) */
.mappa-loc {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1), filter 0.4s ease;
}
.section.mappa.in .mappa-loc-church {
  animation: fadeUpSlow 1s 0.8s cubic-bezier(.22,.61,.36,1) forwards;
}
.section.mappa.in .mappa-loc-villa {
  animation: fadeUpSlow 1s 2.9s cubic-bezier(.22,.61,.36,1) forwards;
}
.mappa-loc:hover {
  transform: translateY(-4px);
}

/* La chiesa: in alto/sinistra, vicino al pin (180,195) ≈ 22% in x */
.mappa-loc-church {
  top: 8%;
  left: 5%;
  width: 26%;
}
/* La villa: in basso/destra, vicino al pin (620,180) ≈ 77% in x */
.mappa-loc-villa {
  top: 38%;
  right: 5%;
  width: 26%;
  align-items: center;
}

.mappa-loc-img {
  width: 100%;
  max-width: 170px;
  aspect-ratio: 3 / 4; /* Match dell'aspect ratio originale degli acquerelli (1045x1400) */
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid var(--ivory);
  box-shadow:
    0 14px 32px -10px rgba(58, 50, 38, 0.3),
    0 0 0 1px rgba(184, 153, 104, 0.35);
  background: var(--ivory);
  /* Leggera inclinazione naturale tipo "polaroid attaccata sul muro" */
}
.mappa-loc-church .mappa-loc-img {
  transform: rotate(-2deg);
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.mappa-loc-villa .mappa-loc-img {
  transform: rotate(2deg);
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.mappa-loc-church:hover .mappa-loc-img {
  transform: rotate(-1deg) translateY(-3px);
}
.mappa-loc-villa:hover .mappa-loc-img {
  transform: rotate(1deg) translateY(-3px);
}
.mappa-loc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease;
}

.mappa-loc-info {
  margin-top: 12px;
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 10px 14px;
  border-radius: 4px;
  border: 0.5px solid rgba(184, 153, 104, 0.25);
}
.mappa-loc-label {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 4px;
}
.mappa-loc-name {
  font-family: var(--script);
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink-soft);
  line-height: 1.05;
  margin-bottom: 4px;
}
.mappa-loc-addr {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 6px;
  opacity: 0.8;
}
.mappa-loc-cta {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.3s ease;
}
.mappa-loc:hover .mappa-loc-cta {
  color: var(--gold-deep);
}

/* MAPPA mobile: stesso layout desktop ma dimensioni scalate, così il percorso resta visibile */
@media (max-width: 700px) {
  .mappa-canvas {
    /* Mantengo l'aspect ratio originale così l'SVG e le watercolor si sovrappongono come desktop */
    aspect-ratio: 800 / 420;
  }
  .mappa-svg {
    /* SVG resta come sfondo della canvas */
    position: absolute;
    inset: 0;
  }
  .mappa-loc {
    /* Posizione assoluta come desktop */
    position: absolute;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mappa-loc-church {
    top: 6%;
    left: 2%;
    width: 32%;
  }
  .mappa-loc-villa {
    top: 38%;
    right: 2%;
    width: 32%;
  }
  .mappa-loc-img {
    max-width: 105px;
    width: 100%;
  }
  .mappa-loc-info {
    padding: 6px 10px;
    margin-top: 8px;
  }
  .mappa-loc-label {
    font-size: 9px;
    letter-spacing: 0.28em;
  }
  .mappa-loc-name {
    font-size: 17px;
    line-height: 1.05;
  }
  .mappa-loc-addr {
    font-size: 11px;
  }
  .mappa-loc-cta {
    font-size: 10px;
    letter-spacing: 0.2em;
  }
}

/* Mobile XS: pochissimo padding e watercolor un po' più piccoli */
@media (max-width: 420px) {
  .mappa-canvas {
    aspect-ratio: 800 / 460;
  }
  .mappa-loc-img {
    max-width: 80px;
  }
  .mappa-loc-name {
    font-size: 15px;
  }
  .mappa-loc-info {
    padding: 5px 8px;
  }
  .mappa-loc-addr {
    font-size: 10px;
  }
}

/* ----------------------------------------------------------
   D) CURSORE DORATO — anello con lag elastico + dot centrale
   ---------------------------------------------------------- */
body.fx-gold-cursor-active,
body.fx-gold-cursor-active * {
  cursor: none !important;
}
/* Mantieni cursor di default su input testuali (UX) */
body.fx-gold-cursor-active input[type="text"],
body.fx-gold-cursor-active textarea {
  cursor: text !important;
}
body.fx-gold-cursor-active input[type="radio"],
body.fx-gold-cursor-active a,
body.fx-gold-cursor-active button,
body.fx-gold-cursor-active [role="button"] {
  cursor: none !important;
}

.fx-gold-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1.2px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(.22,.61,.36,1),
              height 0.3s cubic-bezier(.22,.61,.36,1),
              background 0.3s ease,
              border-color 0.3s ease,
              opacity 0.3s ease;
  mix-blend-mode: normal;
  will-change: transform;
}
.fx-gold-ring.is-active {
  width: 48px;
  height: 48px;
  background: rgba(184, 153, 104, 0.15);
  border-color: var(--gold-deep);
}
.fx-gold-ring.is-press {
  width: 24px;
  height: 24px;
  background: rgba(184, 153, 104, 0.3);
}

.fx-gold-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--gold-deep);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.1s linear, width 0.2s ease, height 0.2s ease;
  will-change: transform;
}
.fx-gold-dot.is-active {
  width: 4px;
  height: 4px;
  opacity: 0.6;
}

/* Hide cursore quando si è in iframe del tweaks-panel (i widget tecnici) */
.tweaks-panel,
.tweaks-panel * {
  cursor: auto !important;
}

/* ----------------------------------------------------------
   F) POLAROID — foto della galleria che si "sviluppano"
   ---------------------------------------------------------- */
.fx-polaroid-wrap {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.fx-polaroid-img {
  /* Stato iniziale: sbiadita, leggermente più chiara, desaturata
     Mantengo l'estetica del filter originale come destinazione finale */
  filter: saturate(0.18) brightness(1.15) contrast(0.92) !important;
  transition: filter 1.8s cubic-bezier(.4, 0, .2, 1) !important;
}
.fx-polaroid-wrap.developed .fx-polaroid-img {
  filter: saturate(0.92) contrast(1.02) !important; /* stesso valore del .g-card .ph-art originale */
}
/* Su hover, il filter va a saturazione piena (come prima) */
.g-card:hover .fx-polaroid-wrap.developed .fx-polaroid-img {
  filter: saturate(1) contrast(1.04) !important;
}
/* In modalità polaroid il parallax sull'img potrebbe sforare l'overflow:hidden.
   Disabilito il translate3d del parallax (mantengo solo lo zoom su hover) */
.fx-polaroid-wrap .fx-parallax-img {
  transform: none !important;
}
/* Lo zoom su hover lo riapplichiamo sul wrap polaroid */
.g-card:hover .fx-polaroid-wrap .fx-polaroid-img {
  transform: scale(1.06) !important;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1), filter 0.6s ease !important;
}
/* Strato "rivelatore" che attraversa la foto al momento dello sviluppo */
.fx-polaroid-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(251, 247, 240, 0) 30%,
    rgba(251, 247, 240, 0.45) 50%,
    rgba(251, 247, 240, 0) 70%,
    transparent 100%
  );
  transform: translateX(-100%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.fx-polaroid-wrap.developed::before {
  animation: polaroidSweep 1.6s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes polaroidSweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ----------------------------------------------------------
   Reduced motion: tutto in stato finale, niente animazione
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fx-envelope-stage { display: none !important; }
  .fx-gold-ring, .fx-gold-dot { display: none !important; }
  body.fx-gold-cursor-active, body.fx-gold-cursor-active * { cursor: auto !important; }
  .fx-polaroid-img { filter: none !important; }
  .fx-polaroid-wrap::before { display: none !important; }
}

/* ===========================================================
   v4 PATCH — Busta morbida con zoom, cursore cuore, handwritten
   =========================================================== */

/* ---------- BUSTA: animazione più morbida + zoom verso lo spettatore ---------- */

/* Patta: easing più morbido, durata maggiore */
.fx-env-flap {
  transition: transform 1.6s cubic-bezier(.25, 0.1, .25, 1) !important;
}

/* Cartoncino: easing più morbido */
.fx-env-card {
  transition: transform 1.8s cubic-bezier(.25, 0.1, .25, 1), z-index 0s 1.8s !important;
}
.fx-envelope-stage.phase-pulling .fx-env-card,
.fx-envelope-stage.phase-zooming .fx-env-card,
.fx-envelope-stage.phase-fading  .fx-env-card {
  transform: translateY(-58%) scale(1.05);
  z-index: 7;
  transition: transform 1.8s cubic-bezier(.25, 0.1, .25, 1), z-index 0s !important;
}

/* Sigillo: cade dolcemente verso il basso quando la patta si apre, invece di sparire */
.fx-env-seal {
  transition: transform 1.2s cubic-bezier(.4, 0.0, .2, 1), opacity 1.0s ease 0.2s !important;
}
.fx-envelope-stage.phase-opening .fx-env-seal,
.fx-envelope-stage.phase-pulling .fx-env-seal,
.fx-envelope-stage.phase-zooming .fx-env-seal,
.fx-envelope-stage.phase-fading  .fx-env-seal {
  opacity: 0;
  transform: translate(-50%, 80px) scale(0.85) rotate(-18deg);
}

/* ============================================================
   ZOOM FINALE — la busta sfuma, il cartoncino col monogramma
   cresce verso lo spettatore e si dissolve rivelando la Home
   ============================================================ */

/* Zoom della busta (corpo) — leggera crescita iniziale poi dissolvenza.
   Importante: dopo la fase 'pulling', la busta NON deve più crescere come prima
   (scale 3.5 / 10) — è il cartoncino il protagonista del finale. */
.fx-envelope {
  transition: transform 1.6s cubic-bezier(.6, 0, .15, 1), opacity 1.4s ease-out;
}
.fx-envelope-stage.phase-zooming .fx-envelope {
  /* Leggera crescita "atmosferica" della busta mentre si sgonfia */
  transform: scale(1.15);
  opacity: 0;
}
.fx-envelope-stage.phase-fading .fx-envelope {
  /* La busta è ormai invisibile, fissiamola lì */
  transform: scale(1.15);
  opacity: 0;
}

/* Anche flap, body, front, seal della busta sfumano insieme alla busta —
   il loro opacity 0 garantisce che il cartoncino non venga coperto */
.fx-envelope-stage.phase-zooming .fx-env-body,
.fx-envelope-stage.phase-fading  .fx-env-body,
.fx-envelope-stage.phase-zooming .fx-env-front,
.fx-envelope-stage.phase-fading  .fx-env-front,
.fx-envelope-stage.phase-zooming .fx-env-flap,
.fx-envelope-stage.phase-fading  .fx-env-flap {
  opacity: 0;
  transition: opacity 1.2s ease-out;
}

/* IL CARTONCINO è ora il protagonista: cresce verso lo spettatore.
   Compensa il fatto che è figlio di .fx-envelope che ha scale(1.15) sfumante,
   quindi le scale si compongono.
   - in 'zooming': torna al centro (rimosso il -58% di translateY) e cresce moderatamente
   - in 'fading': dramatic scale verso lo spettatore + dissolvenza */
.fx-env-card {
  /* Posizione/transizione base già definite sopra */
}
.fx-envelope-stage.phase-zooming .fx-env-card {
  /* Si centra sullo schermo (non più offset in alto) e inizia a crescere */
  transform: translateY(-20%) scale(2.2) !important;
  z-index: 8;
  transition: transform 1.6s cubic-bezier(.5, 0, .1, 1) !important;
  /* Mentre la busta sotto sparisce, il cartoncino mantiene un suo soft shadow */
  box-shadow:
    0 30px 80px -20px rgba(58, 50, 38, 0.4),
    inset 0 0 0 4px var(--ivory),
    inset 0 0 0 5px rgba(184, 153, 104, 0.25);
}
.fx-envelope-stage.phase-fading .fx-env-card {
  /* Crescita drammatica verso lo spettatore + dissolvenza */
  transform: translateY(-20%) scale(9) !important;
  opacity: 0;
  z-index: 8;
  transition: transform 1.6s cubic-bezier(.55, 0, .15, 1),
              opacity 1.3s ease-out 0.2s !important;
  /* L'ombra si dissolve insieme */
  box-shadow: 0 60px 160px -40px rgba(58, 50, 38, 0);
}

/* Il monogramma dentro al cartoncino: durante la crescita, leggera fade-out
   in sincrono col cartoncino così non resta come "spot" residuo */
.fx-envelope-stage.phase-fading .fx-env-mono-img {
  opacity: 0;
  transition: opacity 1.0s ease-out 0.5s;
}

/* Sigillo: scompare già in opening/pulling, ma assicuriamoci stia giù in zooming/fading */
.fx-envelope-stage.phase-zooming .fx-env-seal,
.fx-envelope-stage.phase-fading  .fx-env-seal {
  opacity: 0 !important;
}

/* Lo stage diventa trasparente in coda al fade del cartoncino */
.fx-envelope-stage.phase-fading {
  animation: envStageOut 1.5s cubic-bezier(.55, 0, .1, 1) forwards !important;
}
@keyframes envStageOut {
  0%   { opacity: 1; }
  50%  { opacity: 0.8; }
  100% { opacity: 0; visibility: hidden; }
}

/* Entrance: la busta entra più dolcemente */
.fx-envelope {
  animation: envEnterSoft 1.2s cubic-bezier(.25, 0.1, .25, 1) both !important;
}
@keyframes envEnterSoft {
  0%   { opacity: 0; transform: translateY(30px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- CURSORE CUORE: sostituisce ring + dot ---------- */
.fx-gold-heart {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 10001;
  color: var(--gold);
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(.22,.61,.36,1),
              height 0.3s cubic-bezier(.22,.61,.36,1),
              color 0.3s ease,
              opacity 0.3s ease;
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(184, 153, 104, 0.35));
}
.fx-gold-heart svg {
  width: 100%;
  height: 100%;
  display: block;
}
.fx-gold-heart.is-active {
  width: 28px;
  height: 28px;
  color: var(--gold-deep);
  filter: drop-shadow(0 3px 6px rgba(138, 111, 74, 0.5));
}
.fx-gold-heart.is-press {
  width: 16px;
  height: 16px;
  color: var(--gold-deep);
}
/* Battito molto sottile in stato attivo */
.fx-gold-heart.is-active svg {
  animation: heartBeat 0.9s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.12); }
  40%      { transform: scale(1); }
  55%      { transform: scale(1.08); }
  70%      { transform: scale(1); }
}

/* ---------- HANDWRITTEN REVEAL: testo scritto a penna ---------- */
.fx-handwritten {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  font-family: var(--script);
  font-size: clamp(40px, 8vw, 84px);
  color: var(--ink-soft);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 auto 36px;
}
.fx-hw-line-wrap {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  /* Stato iniziale: maschera completamente trasparente → testo invisibile */
  -webkit-mask-image: linear-gradient(to right, #000 -10%, transparent -2%, transparent 100%);
          mask-image: linear-gradient(to right, #000 -10%, transparent -2%, transparent 100%);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.fx-handwritten.in .fx-hw-line-wrap {
  animation: handwriteReveal 1.6s cubic-bezier(.55, 0, .25, 1) forwards;
  animation-delay: var(--line-delay, 0s);
}
@keyframes handwriteReveal {
  /* Stato iniziale: la maschera "transparent" copre tutto (il testo è nascosto da una maschera completamente trasparente).
     Stato finale: la maschera "nera" copre tutto (il testo è visibile da una maschera completamente opaca).
     Il fronte tra trasparente e opaco si sposta da sinistra a destra. */
  0%   { -webkit-mask-image: linear-gradient(to right, #000 -10%, transparent -2%, transparent 100%);
                 mask-image: linear-gradient(to right, #000 -10%, transparent -2%, transparent 100%); }
  100% { -webkit-mask-image: linear-gradient(to right, #000 0%,    #000 102%,       transparent 110%);
                 mask-image: linear-gradient(to right, #000 0%,    #000 102%,       transparent 110%); }
}

/* La penna dorata che si muove sopra al fronte di scrittura */
.fx-hw-pen {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.fx-hw-pen svg {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -75%) rotate(-25deg);
  /* Posizione iniziale: fuori a sinistra */
}
.fx-handwritten.in .fx-hw-pen {
  animation: handwritePenOpacity 1.6s cubic-bezier(.55, 0, .25, 1) forwards;
  animation-delay: var(--line-delay, 0s);
}
.fx-handwritten.in .fx-hw-pen svg {
  animation: handwritePenMove 1.6s cubic-bezier(.55, 0, .25, 1) forwards;
  animation-delay: var(--line-delay, 0s);
}
@keyframes handwritePenOpacity {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes handwritePenMove {
  0%   { transform: translate(0%, -10%) rotate(-25deg); }
  50%  { transform: translate(50%, -15%) rotate(-22deg); }
  100% { transform: translate(100%, -10%) rotate(-28deg); }
}

/* Stile del testo della seconda riga: italic con accento oro */
.fx-handwritten .fx-hw-line-wrap:nth-child(2) .fx-hw-text {
  font-style: italic;
  background: linear-gradient(120deg, var(--gold-deep) 0%, var(--gold-2) 50%, var(--gold-deep) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Solo dopo che la scrittura è completata, accendiamo lo shimmer animato */
.fx-handwritten.in .fx-hw-line-wrap:nth-child(2) .fx-hw-text {
  animation: goldShimmerHw 6s 3.6s ease-in-out infinite;
}
@keyframes goldShimmerHw {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- Reduced motion: handwritten visibile, niente animazione ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-handwritten .fx-hw-line-wrap {
    -webkit-mask-image: none !important;
            mask-image: none !important;
  }
  .fx-hw-pen { display: none !important; }
  .fx-gold-heart { display: none !important; }
  body.fx-gold-cursor-active, body.fx-gold-cursor-active * { cursor: auto !important; }
}

/* ===========================================================
   v5 — MOBILE PERFEZIONAMENTI
   Rifinitura finale per garantire un'esperienza mobile di qualità pari al desktop
   =========================================================== */

@media (max-width: 700px) {

  /* --- HERO --- */
  .hero {
    padding: 60px 20px 40px;
    min-height: 100vh;
    min-height: 100svh; /* small viewport height per evitare jump con la barra di Safari */
  }
  .hero-inner {
    padding: 20px 0;
  }
  .hero-mono {
    margin-bottom: 24px;
  }
  /* Riduco i filetti dorati verticali laterali — fastidiosi su schermo stretto */
  .hero::before, .hero::after { display: none; }
  /* Cornici angolari più piccole e con bordi più sottili */
  .hero-corner {
    border-width: 0.6px !important;
  }

  /* I nomi su mobile non devono andare a capo male */
  .hero-names {
    line-height: 1.25;
    word-spacing: -0.05em;
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: visible;
  }
  .hero-names .amp {
    display: inline-block;
    padding: 0 0.08em;
  }

  /* Date più piccola su mobile */
  .hero-date {
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: center;
  }

  /* Venue: stack verticale, immagini watercolor proporzionate */
  .hero-venues {
    flex-direction: column;
    gap: 28px;
  }
  .venue-sep { display: none; }
  .venue {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  /* --- COUNTDOWN --- */
  .cd-grid {
    gap: 8px !important;
    flex-wrap: wrap;
    justify-content: center;
  }
  .cd-cell {
    flex: 1 1 calc(25% - 12px);
    min-width: 64px;
  }
  .cd-sep {
    display: none; /* I due punti tra le cifre risultano stretti su mobile */
  }

  /* --- STORIA --- */
  .storia-body {
    padding: 0 4px;
  }
  .storia .lead {
    font-size: clamp(17px, 4.5vw, 22px) !important;
    line-height: 1.6;
  }

  /* --- PROGRAMMA: timeline più compatta --- */
  .timeline {
    padding-left: 4px;
    padding-right: 4px;
  }
  .t-row {
    grid-template-columns: 60px 16px 1fr !important;
    gap: 12px;
    align-items: flex-start;
  }
  .t-time {
    font-size: 13px;
    letter-spacing: 0.08em;
    padding-top: 6px;
  }
  .t-axis {
    width: 16px !important;
    position: relative;
    overflow: visible;
  }
  .t-dot {
    width: 8px;
    height: 8px;
    margin-top: 14px;
  }
  /* La linea della timeline deve restare nella sua colonna (axis) e non sconfinare nel body */
  .t-line {
    width: 0.6px;
    left: 50% !important;
    top: 24px !important;
    bottom: -16px !important;
    transform: translateX(-50%);
    z-index: 0;
  }
  .t-body {
    /* Il body parte da subito sotto la riga di tempo, allineato col dot, e non si sovrappone alla linea */
    padding-top: 4px;
    padding-bottom: 24px;
    min-width: 0; /* evita che testi lunghi facciano espandere la grid column */
    overflow: visible;
  }
  .t-title {
    font-size: 17px;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .t-sub {
    font-size: 13px;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  /* --- MAPPA: solo rifinitura padding (layout e dimensioni nelle media query mappa-specifiche sopra) --- */
  .section.mappa {
    padding-bottom: 60px;
  }
  .mappa-intro {
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.65;
  }

  /* --- DRESS CODE: stack verticale --- */
  .dress-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .dress-card {
    padding: 24px 20px;
  }
  .dress-swatches {
    justify-content: center;
    gap: 10px;
  }

  /* --- LISTA NOZZE: IBAN leggibile --- */
  .lista-card {
    padding: 24px 18px;
  }
  .iban-val.mono {
    font-size: 13px;
    word-break: break-all;
    letter-spacing: 0;
  }
  .iban-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
  }
  .iban-label {
    font-size: 10px;
    letter-spacing: 0.24em;
  }

  /* --- PLAYLIST: steps più compatti --- */
  .playlist-card {
    padding: 28px 20px;
  }
  .playlist-steps {
    flex-direction: column;
    gap: 16px;
  }
  .playlist-step {
    flex-direction: row;
    gap: 14px;
    text-align: left;
    width: 100%;
  }
  .playlist-step-num {
    font-size: 28px;
    flex-shrink: 0;
  }
  .playlist-cta {
    padding: 16px 24px !important;
    font-size: 13px;
  }

  /* --- GALLERIA: griglia ottimizzata --- */
  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }
  .g-card figcaption {
    font-size: 11px;
    padding: 12px 10px;
  }
  /* Disabilito gli effetti hover-only (su mobile non c'è hover): le foto restano sempre come "post-hover" */
  .g-card .ph-art,
  .g-card .fx-polaroid-wrap.developed .fx-polaroid-img {
    filter: saturate(1) contrast(1.02) !important;
  }
  .g-card .g-frame-corner {
    /* Più sottili e sempre leggermente visibili su mobile */
    width: 16px;
    height: 16px;
    opacity: 0.4;
    transform: none;
  }
  .g-card .g-frame-corner.tl { top: 8px; left: 8px; }
  .g-card .g-frame-corner.tr { top: 8px; right: 8px; }
  .g-card .g-frame-corner.bl { bottom: 8px; left: 8px; }
  .g-card .g-frame-corner.br { bottom: 8px; right: 8px; }

  /* --- FRANCIACORTA: già gestita sopra (immersive responsive) --- */
  .fc-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .fc-grid-4 {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px;
  }
  .fc-card, .fc-place {
    padding: 20px 18px;
  }
  .fc-card-name, .fc-place-name {
    font-size: 18px;
  }
  .fc-card-desc, .fc-place-desc {
    font-size: 14px;
    line-height: 1.55;
  }
  .fc-cluster {
    margin-bottom: 56px;
  }

  /* --- RSVP: form input più grandi (touch-friendly) --- */
  .rsvp-form {
    padding: 0 4px;
  }
  .field input,
  .field textarea {
    font-size: 16px !important; /* evita zoom iOS al focus */
    padding: 14px 14px !important;
  }
  .radio-row {
    flex-direction: column;
    gap: 10px;
  }
  .radio {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 15px;
  }
  .rsvp-submit {
    width: 100%;
    padding: 18px 24px !important;
    font-size: 13px;
  }

  /* --- CLOSING handwritten: prevenire wrap incontrollato --- */
  .closing {
    padding: 80px 24px 60px;
  }
  .fx-handwritten {
    font-size: clamp(34px, 11vw, 60px);
    margin-bottom: 28px;
  }
  .fx-hw-line-wrap {
    padding: 0 8px;
    /* Su mobile su schermi stretti le righe lunghe potrebbero non entrare —
       riduco il font con clamp sopra. La maschera funziona anche se il testo va a capo */
    white-space: nowrap; /* forzo no-wrap per non rompere la maschera */
  }
  /* Per le righe lunghe su mobile, lascio scorrere se serve */
  .fx-handwritten {
    max-width: 100vw;
    overflow: hidden;
  }

  /* --- MUSIC PLAYER: posizione un po' più alta dal fondo per non sovrapporre alle home indicators iOS --- */
  .music-player {
    bottom: 20px !important;
    right: 16px !important;
  }

  /* --- BUSTA: dimensione ottimizzata per mobile portrait --- */
  .fx-envelope-scene {
    width: 84vw;
    max-width: 360px;
  }
  .fx-envelope-skip {
    top: 16px;
    right: 16px;
    font-size: 10px;
    padding: 6px 12px;
  }

  /* --- FOOTER più compatto --- */
  .footer {
    padding: 40px 20px 32px;
  }
  .f-names {
    font-size: 32px !important;
  }

  /* --- TWEAKS PANEL: nascondo su mobile (è uno strumento da editor desktop) --- */
  .tweaks-panel {
    display: none !important;
  }
}

/* Mobile XS molto stretti */
@media (max-width: 380px) {
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-names {
    font-size: clamp(40px, 13vw, 60px) !important;
  }
  .cd-cell {
    flex: 1 1 calc(50% - 12px);
  }
  .fc-grid-4 {
    grid-template-columns: 1fr !important;
  }
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  /* Handwritten: riduco ulteriormente per evitare overflow orizzontale */
  .fx-handwritten {
    font-size: clamp(28px, 12vw, 44px);
  }
}

/* Su mobile in landscape diamo all'hero un comportamento più orizzontale */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding: 40px 24px;
    min-height: 100vh;
  }
  .hero-mono {
    margin-bottom: 12px;
  }
  .hero-venues {
    flex-direction: row;
    gap: 40px;
  }
  .venue-sep { display: block; }
  .fc-immersive {
    min-height: 80vh;
  }
}

/* ===========================================================
   v7 — Forzo rendering "testo" per le frecce Unicode
   Su iOS Safari, ↗ (U+2197) viene renderizzato come emoji azzurra.
   Soluzione: font-variant-emoji + VS-15 (\uFE0E) già nel JSX +
   font-family senza fallback su font emoji.
   =========================================================== */
.venue-cta,
.mappa-loc-cta,
.fc-card-cta,
.fx-envelope-skip,
.hero-scroll .arrow {
  font-variant-emoji: text;
  -webkit-font-variant-emoji: text;
  /* Forziamo un font-family che NON includa Apple Color Emoji */
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif !important;
}
/* Solo per le frecce: colore oro forzato, no rendering emoji */
.venue-cta, .fc-card-cta {
  color: var(--gold-deep) !important;
}
.mappa-loc-cta, .fx-envelope-skip {
  color: var(--gold) !important;
}
.hero-scroll .arrow {
  color: var(--gold-deep) !important;
}

/* ===========================================================
   v9 PATCH — Mobile fixes finali
   =========================================================== */

/* Section title: padding e line-height adeguati su mobile
   per evitare che i font script con ascendenti alti (Pinyon Script)
   vengano TAGLIATI in alto (es. la 't' di "Playlist"). */
@media (max-width: 700px) {
  .section-title {
    font-size: 38px !important;      /* il clamp originale era 54-92px ma c'è un override inline a 50px;
                                         qui forziamo 38px per mobile */
    line-height: 1.25 !important;    /* dà respiro alle ascendenti */
    padding-top: 6px;                /* spazio per la 'l', 't', 'd' che possono sforare */
    padding-bottom: 4px;
    overflow: visible;
  }
}
@media (max-width: 420px) {
  .section-title {
    font-size: 32px !important;
    line-height: 1.3 !important;
  }
}

/* HERO nomi "Federica & Gianluca": stesso problema su mobile,
   il font script può venire tagliato in alto/basso */
@media (max-width: 700px) {
  .hero-names {
    line-height: 1.25 !important;
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: visible;
  }
  /* RevealLetters wrappa ogni lettera in .fx-rl-char: assicuriamoci che il loro box non venga clippato */
  .fx-reveal-letters {
    display: inline-block;
    overflow: visible;
    padding: 6px 4px;
  }
  .fx-rl-char {
    overflow: visible;
  }
}

/* ===========================================================
   v10 PATCH — Fix definitivo flicker mobile sulla mappa + altre
   =========================================================== */

/* Su mobile (e soprattutto iOS Safari), il path .mappa-strada con
   stroke="url(#mappaRoad)" GRADIENT + stroke-dasharray fa flicker
   ad ogni repaint durante lo scroll. Soluzione: rendere la strada
   STATICA su mobile, senza animazione, e con stroke solido (no gradient). */
@media (max-width: 700px) {
  /* Forzo opacity finale, niente animazione di tracciatura */
  .section.mappa .mappa-strada {
    opacity: 1 !important;
    stroke-dasharray: 6 8 !important;
    animation: none !important;
    /* Override del gradient con un colore solido per evitare repaint pesanti */
    stroke: #B89968 !important;
    stroke-opacity: 0.7;
  }
  /* Disattivo anche pinDrop (entrata) — lascio i cerchi statici sopra le coordinate */
  .section.mappa.in .mappa-pin-church circle:first-child,
  .section.mappa.in .mappa-pin-villa circle:first-child {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  /* Sicurezza extra: anche il secondo cerchio (pulse) viene completamente nascosto su mobile */
  .section.mappa .mappa-pin circle:nth-child(2) {
    display: none !important;
  }
  /* La label distanza appare statica, senza fade animato */
  .section.mappa .mappa-dist-tag {
    opacity: 1 !important;
    animation: none !important;
  }
  /* Le watercolor delle location: appaiono immediatamente senza fade animato
     che possa contribuire a un effetto "intermittente" */
  .section.mappa.in .mappa-loc-church,
  .section.mappa.in .mappa-loc-villa {
    animation: none !important;
    opacity: 1 !important;
  }

  /* === FIX DEFINITIVO FLICKER A DESTRA (villa) ===
     Cause: backdrop-filter su .mappa-loc-info sopra l'SVG +
     compositing con stroke del path = repaint cycle.
     Soluzione: niente backdrop-filter su mobile, sfondo solido,
     e forzo GPU layer separato per non ricomporre la villa ad ogni scroll */
  .section.mappa .mappa-loc-info {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(251, 247, 240, 0.96) !important;
  }
  .section.mappa .mappa-loc-church,
  .section.mappa .mappa-loc-villa {
    transform: translateZ(0); /* forzo GPU layer separato */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: auto; /* niente will-change su scroll: causerebbe più memory pressure */
  }
  .section.mappa .mappa-loc-img {
    /* Anche le watercolor in layer separato per non repintare con l'SVG */
    transform: translateZ(0) rotate(-2deg);
  }
  .section.mappa .mappa-loc-villa .mappa-loc-img {
    transform: translateZ(0) rotate(2deg);
  }
  /* Disattivo hover effects che su mobile non vengono triggerati ma resterebbero come transition */
  .section.mappa .mappa-loc-church:hover .mappa-loc-img,
  .section.mappa .mappa-loc-villa:hover .mappa-loc-img {
    transform: translateZ(0) rotate(-2deg);
  }
  .section.mappa .mappa-loc-villa:hover .mappa-loc-img {
    transform: translateZ(0) rotate(2deg);
  }

  /* Altre animazioni infinite che su mobile possono dare fastidio: le freno */
  .cd-card::before { animation: none !important; }       /* countdown shimmer */
  .section-head svg path[d^="M"] { animation: none !important; } /* diamond pulse divider */
}
