/* Palette dal moodboard: fiori di campo, tavolate bianche, bicchieri colorati */
:root {
  --lime: #a4b33f;
  --mustard: #e3a92b;
  --orange: #e2653a;
  --pink: #df5f7f;
  --plum: #6b2a55;
  --blue: #4a8ee0;

  --paper: #fbf7ef;
  --paper-2: #f4eee1;
  --ink: #2f2c24;
  --ink-soft: #6b6557;
  --leaf: #4f6b3a;
  --line: #e4dccb;

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--plum); }
img, iframe { max-width: 100%; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(251, 247, 239, .92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.nav-logo { font: italic 600 1.5rem var(--serif); color: var(--ink); text-decoration: none; }
.nav-logo span { color: var(--orange); margin: 0 2px; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--orange); }
.nav-cta { background: var(--ink); color: var(--paper) !important; padding: 8px 16px; border-radius: 99px; }
.nav-cta:hover { background: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    box-shadow: 0 10px 20px rgba(0,0,0,.06);
    max-height: 0; overflow: hidden; transition: max-height .35s;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 14px; }
  .nav-cta { border-radius: 0; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 120px 16px 140px;
  background:
    radial-gradient(ellipse at 50% 0%, #fff6dc 0%, transparent 60%),
    linear-gradient(180deg, #fdf3e0 0%, var(--paper) 70%);
  overflow: hidden;
}
.lights { position: absolute; top: 60px; left: 0; width: 100%; height: 160px; }
.bulbs { position: absolute; top: 60px; left: 0; width: 100%; height: 160px; pointer-events: none; }
.bulb {
  position: absolute; width: 10px; height: 13px; border-radius: 50% 50% 45% 45%;
  background: #ffd873;
  box-shadow: 0 0 10px 4px rgba(255, 207, 92, .55), 0 0 30px 8px rgba(255, 207, 92, .25);
  transform: translate(-50%, 0);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: .55; } }

.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; top: -20px; border-radius: 50%; opacity: .85;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translate(var(--dx, 0), 110vh) rotate(360deg); }
}

.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.eyebrow {
  font: 500 .85rem var(--sans); letter-spacing: .3em; text-transform: uppercase;
  color: var(--orange); margin: 0 0 18px;
}
.names {
  font: italic 400 clamp(3rem, 10vw, 6.5rem)/1 var(--serif);
  margin: 0; letter-spacing: -.02em;
  font-variation-settings: "opsz" 144;
}
.names em { color: var(--pink); font-style: italic; }
.names.small { font-size: 2.2rem; }
.date {
  font: 300 clamp(1.4rem, 4vw, 2rem) var(--serif);
  letter-spacing: .25em; margin: 24px 0 4px;
}
.place { color: var(--ink-soft); margin: 0 0 36px; }

.countdown { display: flex; justify-content: center; gap: clamp(8px, 3vw, 22px); margin-bottom: 40px; }
.countdown div {
  flex: 0 1 84px; min-width: 0; padding: 12px 4px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 14px;
}
.countdown span { display: block; font: 500 1.9rem/1.1 var(--serif); }
.countdown small { font-size: clamp(.6rem, 2.6vw, .72rem); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.countdown div:nth-child(1) span { color: var(--orange); }
.countdown div:nth-child(2) span { color: var(--pink); }
.countdown div:nth-child(3) span { color: var(--plum); }
.countdown div:nth-child(4) span { color: var(--blue); }

.meadow { position: absolute; bottom: -1px; left: 0; width: 100%; height: 110px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--orange); color: #fff; border: 2px solid var(--orange);
  padding: 13px 26px; border-radius: 99px;
  font: 700 .95rem var(--sans); letter-spacing: .02em; text-decoration: none;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--pink); border-color: var(--pink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(70px, 10vw, 120px) 16px; max-width: 1060px; margin: 0 auto; }
.intro { background: var(--paper-2); max-width: none; text-align: center; }
.intro > * { max-width: 700px; margin-left: auto; margin-right: auto; }
.lead { font: 300 clamp(1.2rem, 2.6vw, 1.55rem)/1.6 var(--serif); }
.lead.small { font-size: 1.2rem; }
.signature { font: italic 500 1.6rem var(--serif); color: var(--pink); margin-top: 18px; }

.title {
  text-align: center; margin: 0 0 8px;
  font: 400 clamp(2.2rem, 6vw, 3.4rem)/1.1 var(--serif);
}
.title span { font-style: italic; color: var(--orange); }
.subtitle { text-align: center; color: var(--ink-soft); margin: 0 0 50px; }
.note { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 30px; }

/* fiorellini */
.flower-row { display: flex; justify-content: center; gap: 14px; margin-bottom: 30px; }
.flower-row i {
  width: 30px; height: 30px; background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg%3E%3Ccircle cx='20' cy='9' r='8'/%3E%3Ccircle cx='30.5' cy='16' r='8'/%3E%3Ccircle cx='26.5' cy='28.5' r='8'/%3E%3Ccircle cx='13.5' cy='28.5' r='8'/%3E%3Ccircle cx='9.5' cy='16' r='8'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg%3E%3Ccircle cx='20' cy='9' r='8'/%3E%3Ccircle cx='30.5' cy='16' r='8'/%3E%3Ccircle cx='26.5' cy='28.5' r='8'/%3E%3Ccircle cx='13.5' cy='28.5' r='8'/%3E%3Ccircle cx='9.5' cy='16' r='8'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
  position: relative;
  animation: sway 4s ease-in-out infinite;
}
.flower-row i:nth-child(even) { animation-delay: -2s; }
@keyframes sway { 50% { transform: rotate(18deg) scale(1.06); } }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 88px; top: 8px; bottom: 8px;
  border-left: 2px dashed var(--line);
}
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 42px; padding: 0 0 36px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 80px; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 5px var(--paper);
}
.timeline time { font: 500 1.25rem var(--serif); color: var(--c); text-align: right; padding-top: 1px; }
.timeline h3 { margin: 0; font: 500 1.35rem var(--serif); }
.timeline p { margin: 4px 0 0; color: var(--ink-soft); }

/* ---------- LOCATION ---------- */
.location { max-width: none; background: var(--paper-2); }
.loc-grid { max-width: 1060px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.loc-text h3 { font: italic 500 1.9rem var(--serif); margin: 0 0 12px; color: var(--leaf); }
address { font-style: normal; font-weight: 500; margin-top: 16px; }
.map { border-radius: var(--radius); overflow: hidden; border: 6px solid #fff; box-shadow: 0 20px 40px -20px rgba(60, 50, 30, .35); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 760px) { .loc-grid { grid-template-columns: 1fr; } }

/* ---------- CARDS ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 40px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 26px 24px;
  border-top: 6px solid var(--c);
  box-shadow: 0 12px 30px -18px rgba(60, 50, 30, .35);
}
.card h3 { margin: 0 0 8px; font: 500 1.3rem var(--serif); color: var(--c); filter: brightness(.85); }
.card p { margin: 0; color: var(--ink-soft); }

/* ---------- LISTA NOZZE ---------- */
.regalo { text-align: center; }
.regalo .lead { max-width: 640px; margin: 20px auto 30px; }
.iban {
  display: inline-block; background: #fff; border: 2px dashed var(--mustard);
  border-radius: var(--radius); padding: 24px 32px;
}
.iban p { margin: 0; }
.iban-label { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); }
.iban-name { font: italic 500 1.3rem var(--serif); margin-bottom: 16px !important; }
.iban-code { font: 500 clamp(1rem, 3.6vw, 1.25rem) ui-monospace, Menlo, monospace; letter-spacing: .04em; margin: 2px 0 18px !important; }
.iban .causale { margin-top: 16px; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.iban .btn.copied { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.thanks { font: italic 400 1.3rem var(--serif); color: var(--pink); margin-top: 28px; }

/* ---------- RSVP ---------- */
.rsvp { max-width: none; background: linear-gradient(180deg, var(--paper-2), #fbe9dc); }
.form {
  max-width: 560px; margin: 0 auto; background: #fff;
  padding: clamp(24px, 5vw, 40px); border-radius: 24px;
  box-shadow: 0 24px 50px -30px rgba(107, 42, 85, .45);
  display: grid; gap: 20px;
}
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input:not([type=radio]), .form textarea {
  font: 400 1rem var(--sans); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper);
  transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--orange); }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.choice legend { font-weight: 500; font-size: .95rem; margin-bottom: 8px; width: 100%; }
.choice label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 99px; font-weight: 400;
}
.choice label:has(input:checked) { border-color: var(--orange); background: #fdf0e8; }
.choice input { accent-color: var(--orange); }
.if-yes { display: grid; gap: 20px; }
.if-yes.hidden, .if-kids.hidden { display: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row label { align-content: space-between; }
.opt { color: var(--ink-soft); font-weight: 400; }
.form .btn { justify-self: start; }
.form-msg { margin: 0; font-weight: 500; }
.form-msg.ok { color: var(--leaf); }
.form-msg.err { color: var(--orange); }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 70px 16px 50px; color: var(--ink-soft); }
.footer .names { color: var(--ink); margin-bottom: 10px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
