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

:root {
/*--bg:           #ede9e3;*/
  --bg:         #f0deda;
  --card:       #ffffff;
  --text:       #3a3530;
  --muted:      #8a8078;
  --border:     #ddd8cf;
  --accent:     #8b1a1a;
  --accent-bg:  #f5eaea;
  --shadow:     0 4px 32px rgba(80, 65, 50, 0.10), 0 1px 6px rgba(80, 65, 50, 0.06);
}

html {
  background: var(--bg);
  min-height: 100%;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding: 20px 12px 40px;
}

/* ===== CARD ===== */
.card {
  max-width: 430px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Ogni sezione diretta della card ha solo border-top,
   tranne la prima (.hero) che non ne ha bisogno */
.card > section,
.card > footer {
  border-top: 1px solid var(--border);
}

.card > .hero {
  border-top: none;
}

/* Il .divider interno tra cerimonia e ricevimento
   rimane, ma togliamo il doppio bordo */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 28px;
  /* non è una section quindi non prende il border-top automatico */
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 40px 28px 28px;
  background: var(--card);
}

.illustration {
  width: 84%;
  max-width: 268px;
  margin: 0 auto 20px;
}

.illustration svg,
.illustration img {
  width: 100%;
  height: auto;
  display: block;
}

.names {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.wedding-date {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
  text-align: center;
  padding: 28px 28px 26px;
  background: var(--card);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.unit span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}

.unit small {
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.welcome-text {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 300px;
  margin: 0 auto;
}

/* ===== RSVP ===== */
.rsvp-section {
  padding: 32px 28px;
  text-align: center;
  background: #faf8f5;
}

.rsvp-deadline {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 10px 0 22px;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* ===== LOCATION ===== */
.location-section {
  padding: 32px 28px;
  text-align: center;
  background: var(--card);
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.loc-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}

.loc-address {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.loc-time {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ===== IMMAGINE LOCATION ===== */
.location-image-wrap {
  margin-top: 22px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(80, 65, 50, 0.13);
  border: 1px solid var(--border);
}

.location-image-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  background: var(--text);
  color: var(--card);
}

/* RSVP — filled, prominent */
.btn-rsvp {
  display: block;
  max-width: 220px;
  margin: 0 auto;
  text-align: center;
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
  font-size: 0.75rem;
  padding: 13px 32px;
  letter-spacing: 0.16em;
}

.btn-rsvp:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

/* Outline variant (IBAN toggle) */
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

/* Copy button */
.btn-copy {
  background: var(--accent-bg);
  border-color: transparent;
  color: var(--accent);
  font-size: 0.7rem;
  padding: 9px 22px;
  margin-top: 12px;
}

.btn-copy:active {
  background: var(--accent);
  color: var(--card);
}

/* ===== PROGRAMMA ===== */
.program-section {
  padding: 32px 28px;
  background: var(--card);
}

.section-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 18px;
  color: var(--text);
}

.timeline {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
  padding-bottom: 30px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.tl-content {
  flex: 1;
  padding-top: 3px;
}

.tl-time {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid #e8cccc;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 7px;
  font-weight: 400;
}

.tl-content h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 3px;
  line-height: 1.2;
  color: var(--text);
}

.tl-content p {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ===== LUNA DI MIELE ===== */
.honeymoon-section {
  padding: 32px 28px;
  text-align: center;
  background: #faf8f5;
}

.honeymoon-image {
  display: block;
  width: 72%;
  max-width: 220px;
  height: auto;
  margin: 14px auto 18px;
}

.hm-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0 20px;
}

/* IBAN collapse */
.iban-box {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 16px;
  animation: fadeIn 0.25s ease;
}

.iban-box.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.iban {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text);
  background: var(--card);
  padding: 14px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  word-break: break-all;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 22px 28px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
}

@media (max-width: 360px) {
  .countdown { gap: 16px; }
  .unit span { font-size: 2.2rem; }

  .honeymoon-image {
    width: 75%;
    max-width: 180px;
    margin: 12px auto 16px;
  }
}