:root {
  --green-deep:   #2d5a27;
  --green-mid:    #4e8044;
  --green-light:  #7ab87a;
  --copper:       #b5622a;
  --copper-light: #e8a060;
  --ivory:        #f7f2ea;
  --ivory-dark:   #ede5d8;
  --bark:         #3d2a1a;
  --text-dark:    #1e2e1c;
  --text-muted:   #6b7a65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ivory);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(247,242,234,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45,90,39,0.1);
  transition: all 0.3s;
}
.nav-monogram {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 300; font-style: italic;
  color: var(--green-deep); letter-spacing: 0.05em;
  text-decoration: none; cursor: pointer;
}
nav ul { list-style: none; display: flex; gap: 2.5rem; }
nav ul a {
  font-size: 0.78rem; font-weight: 400; letter-spacing: 0.12em;
  text-decoration: none; color: var(--text-muted); text-transform: uppercase;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--green-deep); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  background-image: url('hero.jpeg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative; overflow: hidden;
}
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(30, 46, 28, 0.25);
  pointer-events: none;
}
#hero > * { position: relative; z-index: 1; }

/* ── HERO MOBILE ── */
@media (max-width: 768px) {
  #hero {
    background-image: url('hero-mobile.jpeg');
    background-position: left center;
    background-size: cover;
  }
}

.hero-label {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper-light); margin-bottom: 1.8rem;
  opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}
.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300; font-style: italic;
  color: var(--ivory); line-height: 1.05;
  opacity: 0; animation: fadeUp 0.9s 0.4s forwards;
}
.hero-names span { color: var(--copper-light); }
.hero-date {
  margin-top: 1.5rem;
  font-size: 0.85rem; font-weight: 400; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(247,242,234,0.6);
  opacity: 0; animation: fadeUp 0.9s 0.6s forwards;
}
.hero-tagline {
  margin-top: 1.8rem; max-width: 520px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 300; font-style: italic;
  color: rgba(247,242,234,0.75); line-height: 1.7;
  opacity: 0; animation: fadeUp 0.9s 0.8s forwards;
}
.hero-countdown {
  display: flex; justify-content: center; gap: 1.8rem;
  margin-top: 2.5rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.9s 1s forwards;
}
.hero-countdown-item {
  display: flex; flex-direction: column; align-items: center;
}
.hero-countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300; color: var(--ivory); line-height: 1;
}
.hero-countdown-label {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(247,242,234,0.55); margin-top: 0.4rem;
}
.hero-countdown-sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 300; color: var(--copper-light);
  align-self: flex-start; padding-top: 0.1rem; line-height: 1; opacity: 0.6;
}
.hero-divider {
  width: 1px; height: 60px; background: var(--copper-light);
  margin: 2rem auto 0;
  opacity: 0; animation: fadeUp 0.9s 1.1s forwards;
}

/* ── SECTION SHARED ── */
section { padding: 6rem 2rem; }
.section-inner { max-width: 860px; margin: 0 auto; }
.section-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper); margin-bottom: 1rem; display: block;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300; font-style: italic;
  color: var(--green-deep); line-height: 1.2;
  margin-bottom: 1.5rem;
}
.section-text {
  font-size: 1rem; font-weight: 300; line-height: 1.85;
  color: var(--text-muted); max-width: 580px;
}

/* ── DETTAGLI ── */
#dettagli { background: var(--ivory); }
.details-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; margin-top: 3rem;
}
.detail-card {
  padding: 2.5rem 2rem;
  position: relative; overflow: hidden;
}
/* Cerimonia: sfondo green-deep, link copper-light */
.detail-card.card-cerimonia {
  background: var(--green-deep);
}
.detail-card.card-cerimonia .detail-link-maps {
  color: var(--copper-light);
  border-bottom-color: rgba(232,160,96,0.4);
}
/* Ricevimento: sfondo copper-light, link green-deep */
.detail-card.card-ricevimento {
  background: var(--copper-light);
}
.detail-card.card-ricevimento .detail-type,
.detail-card.card-ricevimento .detail-name,
.detail-card.card-ricevimento .detail-info,
.detail-card.card-ricevimento .detail-icon {
  color: var(--bark);
}
.detail-card.card-ricevimento .detail-info { color: rgba(61,42,26,0.75); }
.detail-card.card-ricevimento .detail-info strong { color: var(--bark); }
.detail-card.card-ricevimento .detail-link-maps {
  color: var(--green-deep);
  border-bottom-color: rgba(45,90,39,0.4);
}

.detail-icon {
  font-size: 1.4rem; margin-bottom: 1.2rem; display: block; opacity: 0.75;
}
.detail-type {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(247,242,234,0.5); margin-bottom: 0.6rem;
}
.detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 300; font-style: italic;
  color: var(--ivory); margin-bottom: 0.8rem;
}
.detail-info {
  font-size: 0.82rem; font-weight: 300; line-height: 1.7;
  color: rgba(247,242,234,0.65);
}
.detail-info strong { color: rgba(247,242,234,0.9); font-weight: 400; }
.detail-link-maps {
  display: inline-block; margin-top: 1.2rem;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; font-weight: 500;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s;
}
.detail-link-maps:hover { opacity: 0.7; }

/* ── REGALO ── */
#regalo { background: var(--ivory-dark); }
.regalo-box {
  margin-top: 2.5rem;
  border: 1px solid rgba(45,90,39,0.15);
  padding: 2.5rem; border-radius: 4px;
  background: var(--ivory);
}
.iban-block {
  background: var(--green-deep);
  padding: 1.5rem 2rem; border-radius: 4px;
  margin: 1.5rem 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.iban-label {
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(247,242,234,0.5); margin-bottom: 0.4rem;
}
.iban-number {
  font-family: 'DM Sans', monospace;
  font-size: 1rem; font-weight: 400; color: var(--ivory);
  letter-spacing: 0.06em;
}
.copy-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--ivory); font-size: 0.75rem;
  padding: 0.5rem 1.2rem; border-radius: 3px;
  cursor: pointer; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.18); }
.regalo-note {
  font-size: 0.85rem; font-style: italic; color: var(--text-muted);
  line-height: 1.7; border-top: 1px solid rgba(45,90,39,0.1);
  padding-top: 1.5rem; margin-top: 0.5rem;
}

/* ── RSVP ── */
#rsvp { background: var(--ivory); }
.rsvp-form {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
  background: var(--ivory-dark);
  border: 1px solid rgba(45,90,39,0.18);
  border-radius: 3px; padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 300;
  color: var(--text-dark); outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green-mid);
}

/* Presenze toggle */
.presenze-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.3rem; }
.presenze-btn {
  flex: 1; min-width: 160px;
  border: 1px solid rgba(45,90,39,0.2);
  border-radius: 3px; padding: 0.9rem 1rem;
  background: var(--ivory-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; font-weight: 300;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.presenze-btn.active {
  background: var(--green-deep); color: var(--ivory);
  border-color: var(--green-deep);
}
.presenze-num-wrap {
  display: none; margin-top: 0.8rem; align-items: center; gap: 0.8rem;
}
.presenze-num-wrap.visible { display: flex; }
.presenze-num-wrap label {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.num-input {
  width: 80px;
  background: var(--ivory-dark);
  border: 1px solid rgba(45,90,39,0.18);
  border-radius: 3px; padding: 0.6rem 0.8rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; color: var(--text-dark); outline: none;
  text-align: center;
}

/* Intolleranze */
.intolleranze-section {
  display: none; margin-top: 0.4rem;
}
.intolleranze-section.visible { display: block; }
.intolleranze-hint {
  font-size: 0.8rem; color: var(--text-muted);
  font-style: italic; margin-bottom: 1rem;
}
.intolleranza-row {
  display: flex; align-items: center;
  gap: 0; margin-bottom: 0.5rem;
  background: var(--ivory-dark);
  border: 1px solid rgba(45,90,39,0.15);
  border-radius: 3px; overflow: hidden;
}
.intolleranza-check-col {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1rem;
  flex: 1; cursor: pointer;
  font-size: 0.9rem; font-weight: 300; color: var(--text-dark);
  transition: background 0.15s;
}
.intolleranza-check-col:hover { background: rgba(45,90,39,0.05); }
.intolleranza-check-col input[type="checkbox"] {
  accent-color: var(--green-deep);
  width: 16px; height: 16px; cursor: pointer; flex-shrink: 0;
}
.intolleranza-qty-col {
  display: none; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-left: 1px solid rgba(45,90,39,0.15);
  background: rgba(45,90,39,0.04);
}
.intolleranza-qty-col.visible { display: flex; }
.intolleranza-qty-col label {
  font-size: 0.78rem; color: var(--text-muted); white-space: nowrap;
}
.qty-input {
  width: 56px;
  background: var(--ivory);
  border: 1px solid rgba(45,90,39,0.2);
  border-radius: 3px; padding: 0.35rem 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; color: var(--text-dark);
  outline: none; text-align: center;
}
.altro-detail-wrap {
  display: none; padding: 0 1rem 0.7rem;
  background: var(--ivory-dark);
  border: 1px solid rgba(45,90,39,0.15);
  border-top: none; border-radius: 0 0 3px 3px;
}
.altro-detail-wrap.visible { display: block; }

.submit-btn {
  grid-column: 1 / -1;
  background: var(--green-deep); color: var(--ivory);
  border: none; padding: 1rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer; border-radius: 3px;
  transition: background 0.25s, transform 0.15s;
  margin-top: 0.5rem;
}
.submit-btn:hover { background: var(--green-mid); transform: translateY(-1px); }
.form-success {
  display: none; text-align: center; padding: 2rem;
  background: rgba(45,90,39,0.06); border-radius: 4px;
  border: 1px solid rgba(45,90,39,0.15);
}
.form-success-icon { font-size: 2rem; margin-bottom: 1rem; }
.form-success p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* ── FOTO ── */
#foto { background: var(--green-deep); }
#foto .section-eyebrow { color: var(--copper-light); }
#foto .section-title { color: var(--ivory); }
#foto .section-text { color: rgba(247,242,234,0.65); }
.foto-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.foto-step {
  border: 1px solid rgba(247,242,234,0.12);
  padding: 2rem 1.5rem; border-radius: 4px;
}
.foto-step-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 300; font-style: italic;
  color: var(--copper-light); line-height: 1; margin-bottom: 1rem;
}
.foto-step-title {
  font-size: 0.85rem; font-weight: 500;
  color: var(--ivory); margin-bottom: 0.6rem; letter-spacing: 0.04em;
}
.foto-step-desc {
  font-size: 0.82rem; font-weight: 300; line-height: 1.7;
  color: rgba(247,242,234,0.55);
}
.foto-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 2.5rem;
  background: var(--copper); color: var(--ivory);
  padding: 0.9rem 2rem; border-radius: 3px;
  text-decoration: none; font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
}
.foto-cta:hover { background: var(--copper-light); color: var(--bark); transform: translateY(-1px); }

/* ── FOOTER ── */
footer { background: var(--bark); padding: 3rem 2rem; text-align: center; }
.footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem; font-weight: 300; font-style: italic;
  color: var(--ivory); margin-bottom: 0.5rem;
}
.footer-sub {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(247,242,234,0.35);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  nav { padding: 1rem 1.5rem; }
  nav ul { gap: 1.2rem; }
  nav ul a { font-size: 0.68rem; }
  .details-grid { grid-template-columns: 1fr; }
  .rsvp-form { grid-template-columns: 1fr; }
  .rsvp-form .form-group.full { grid-column: 1; }
  .submit-btn { grid-column: 1; }
  .hero-countdown-sep { display: none; }
  section { padding: 4rem 1.5rem; }
}

/* ── PERSONE (form RSVP) ── */
.persone-section {
  display: none; margin-top: 1rem;
}
.persone-section.visible { display: block; }
.persone-hint {
  font-size: 0.8rem; color: var(--text-muted);
  font-style: italic; margin-bottom: 1rem;
}
.persona-row {
  border: 1px solid rgba(45,90,39,0.15);
  border-radius: 4px; padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  background: var(--ivory-dark);
}
.persona-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 0.8rem; flex-wrap: wrap;
}
.persona-label {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green-deep); white-space: nowrap;
  min-width: 80px;
}
.persona-nome {
  flex: 1; min-width: 160px;
  padding: 0.5rem 0.8rem !important;
  font-size: 0.88rem !important;
}
.persona-checks {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.persona-check-label {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.82rem; font-weight: 300;
  color: var(--text-dark); cursor: pointer;
  border: 1px solid rgba(45,90,39,0.18);
  border-radius: 3px; padding: 0.4rem 0.8rem;
  background: var(--ivory);
  transition: all 0.15s; user-select: none;
}
.persona-check-label:has(input:checked) {
  background: rgba(45,90,39,0.09);
  border-color: var(--green-mid);
  color: var(--green-deep);
}
.persona-check-label input {
  accent-color: var(--green-deep);
  width: 14px; height: 14px;
}
.altro-persona-wrap {
  margin-top: 0.6rem;
}
