:root {
  --color-1: #f1f4f1;
  --color-2: #e3eae3;
  --color-3: #cfdccf;
  --color-dark: #7f947f;
  --text: #333;
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.7;
}

/* GENERIC */
section {
  padding: 5rem 1.5rem;
  position: relative;
}

.container {
  max-width: 900px;
  margin: auto;
  text-align: center;
}

h1 {
  font-family: var(--font-script);
  font-size: 5.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.ampersand {
  font-style: italic;
  color: var(--color-dark);
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 0.12em;
  color: #777;
}

h3 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--color-dark);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* SECTION ORNAMENT */
.section-ornament {
  margin-bottom: 1.5rem;
}
.section-ornament svg {
  width: 160px;
  height: 24px;
}

/* SHARED CARD / ICON / MAP */
.card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  margin-top: 2rem;
}

.icon {
  width: 50px;
  fill: var(--color-dark);
  opacity: 0.75;
}

.map {
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.map-link {
  display: block;
  position: relative;
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}

.map-link img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.map-link:hover img {
  transform: scale(1.03);
}

.map-cta {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* HERO */
.hero {
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)),
              url('../img/sfondo.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero .container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
  animation: heroFadeIn 1.2s ease forwards;
}

.hero-header {
  padding-top: 0.5rem;
}

.hero .countdown {
  margin-top: auto;
  margin-bottom: 14rem;
}

.hero h1,
.hero .ampersand { color: white; }

.hero h2 { color: rgba(255,255,255,.85); }

.hero .time-box {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-top-color: rgba(255,255,255,.6);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.hero .number { color: white; }
.hero .label  { color: rgba(255,255,255,.7); }

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


/* COUNTDOWN */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.time-box {
  background: white;
  padding: 1.2rem 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.09);
  border-top: 3px solid var(--color-dark);
}

.number {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1;
}

.label {
  font-size: .65rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aaa;
  margin-top: 0.4rem;
}

/* SECTIONS */
.ceremony  { background: var(--color-1); }
.reception { background: #fff; }
.timeline  { background: var(--color-2); }
.gift      { background: var(--color-3); display: none; }
.rsvp      { background: var(--color-2); display: none; }

/* TIMELINE */
.timeline .icon {
  fill: none;
  stroke: var(--color-dark);
}

.timeline-list {
  margin-top: 2.5rem;
  position: relative;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-dark) 5%, var(--color-dark) 95%, transparent);
  opacity: 0.35;
}

.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 2rem;
  position: relative;
}

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

.tl-time {
  width: 70px;
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  padding-top: 0.1rem;
  text-align: right;
  padding-right: 10px;
}

.tl-dot {
  width: 22px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
  position: relative;
}

.tl-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-dark);
  opacity: 0.7;
  display: block;
  flex-shrink: 0;
}

.tl-content {
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tl-content strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.tl-content span {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .timeline-list::before { left: 60px; }
  .tl-time { width: 50px; font-size: 0.85rem; }
  .tl-content strong { font-size: 1rem; }
}

.iban {
  margin-top: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-dark);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: .75rem 2.5rem;
  background: var(--color-dark);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: #6a7d6a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(127,148,127,.35);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  background: white;
  color: #aaa;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

/* ANIMATIONS */
.animate {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE — tablet */
@media (max-width: 768px) {
  h1 { font-size: 4rem; }
  h3 { font-size: 1.9rem; }

  .hero .countdown {
    margin-bottom: 8rem;
  }

  .map iframe { height: 220px; }
}

/* RESPONSIVE — mobile */
@media (max-width: 560px) {
  section { padding: 3rem 1rem; }

  h1 { font-size: 3rem; }
  h2 { font-size: 1rem; letter-spacing: 0.06em; }
  h3 { font-size: 1.6rem; }

  .hero-header { padding-top: 1rem; }

  .hero .countdown {
    gap: 0.7rem;
    margin-bottom: 4rem;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-box {
    padding: 0.8rem 1rem;
    min-width: 64px;
    border-radius: 12px;
  }

  .number { font-size: 2rem; }

  .label { font-size: 0.6rem; letter-spacing: 1.5px; }

  .card { padding: 1.25rem; border-radius: 14px; }

  .map iframe { height: 180px; }

  .section-ornament svg { width: 120px; }

  footer { font-size: 0.95rem; }
}
