/* ===== Custom Properties ===== */
:root {
  --color-dark: #5F6F52;
  --color-sage: #A9B388;
  --color-cream: #FEFAE0;
  --color-warm: #F9EBC7;

  --font-calligraphy: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Lato', Helvetica, Arial, sans-serif;

  --container-max: 1100px;
  --gap: 2rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--color-dark);
  background-color: var(--color-cream);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-dark);
}

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Section ===== */
.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--color-warm);
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-dark);
}

.section__title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--color-sage);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.nav--scrolled {
  background-color: var(--color-sage);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(95, 111, 82, 0.2);
}

.nav--scrolled .nav__logo {
  color: var(--color-cream);
}

.nav--scrolled .nav__links a {
  color: var(--color-cream);
}

.nav--scrolled .nav__links a:hover {
  color: var(--color-warm);
}

.nav--scrolled .nav__links a::after {
  background: var(--color-cream);
}

.nav--scrolled .nav__toggle span {
  background: var(--color-cream);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-calligraphy);
  font-size: 1.8rem;
  text-decoration: none;
  color: var(--color-cream);
  font-weight: 400;
  transition: color 0.3s;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
  position: relative;
  color: var(--color-cream);
}

.nav__links a:hover {
  color: var(--color-warm);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-cream);
  transition: width 0.3s;
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-cream);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    background-color: var(--color-sage);
    padding: 5rem 2rem;
    transition: right 0.3s;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  }

  .nav__links--open {
    right: 0;
  }
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--color-sage);
  position: relative;
}

.hero__date-label {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--color-cream);
  margin-bottom: 1.5rem;
}

.hero__names {
  font-family: var(--font-calligraphy);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-cream);
  margin-bottom: 0.25rem;
}

.hero__and {
  font-family: var(--font-calligraphy);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--color-warm);
  margin: 0.25rem 0;
}

.hero__date {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 2rem;
  color: var(--color-cream);
}

.hero__countdown {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}

.countdown__item {
  text-align: center;
}

.countdown__number {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--color-cream);
}

.countdown__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(254, 250, 224, 0.7);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  animation: bounce 2s infinite;
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-cream);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== Programma / Timeline ===== */
.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-sage);
}

.timeline__item {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline__time {
  flex: 1;
  text-align: right;
  padding-right: 2rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-sage);
}

.timeline__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-sage);
  border: 3px solid var(--color-cream);
  box-shadow: 0 0 0 2px var(--color-sage);
  flex-shrink: 0;
  z-index: 1;
}

.timeline__content {
  flex: 1;
  padding-left: 2rem;
}

.timeline__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline__desc {
  font-size: 0.9rem;
  color: var(--color-sage);
}

.timeline__luogo {
  font-size: 0.8rem;
  color: var(--color-sage);
  opacity: 0.75;
  margin-top: 0.3rem;
  font-style: italic;
}

/* ===== Location ===== */
.locations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .locations {
    grid-template-columns: 1fr 1fr;
  }
}

.location-card {
  background: var(--color-cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(95, 111, 82, 0.1);
  border-top: 4px solid var(--color-sage);
}

.section--alt .location-card {
  background: white;
}

.location-card__map {
  width: 100%;
  height: 250px;
  border: 0;
}

.location-card__info {
  padding: 1.5rem;
}

.location-card__name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.location-card__address {
  font-size: 0.9rem;
  color: var(--color-sage);
  margin-bottom: 1rem;
}

.location-card__link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--color-cream);
  background-color: var(--color-sage);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.location-card__link:hover {
  background-color: var(--color-dark);
  color: var(--color-cream);
}

/* ===== RSVP ===== */
.rsvp__hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-sage);
  margin-bottom: 1rem;
}

.rsvp__wrapper {
  -webkit-overflow-scrolling: touch;
  overflow: auto;
  border-radius: 12px;
}

.rsvp__frame {
  width: 100%;
  min-height: 800px;
  border: 0;
  border-radius: 12px;
  display: block;
}

.rsvp__placeholder {
  text-align: center;
  padding: 3rem 2rem;
  border: 2px dashed var(--color-sage);
  border-radius: 12px;
  color: var(--color-sage);
}

.rsvp__placeholder p {
  margin-bottom: 1rem;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-grid__item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  background: var(--color-warm);
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-grid__item:hover img {
  transform: scale(1.05);
}

.gallery-grid__item--video {
  aspect-ratio: 16/9;
  grid-column: span 2;
}

.gallery-grid__item--video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery__empty {
  text-align: center;
  padding: 3rem;
  color: var(--color-sage);
  font-style: italic;
}

/* ===== Regalo ===== */
.regalo {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.regalo__message {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  color: var(--color-dark);
}

.regalo__card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(95, 111, 82, 0.1);
  display: inline-block;
  border-top: 4px solid var(--color-sage);
}

.regalo__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-sage);
  margin-bottom: 0.5rem;
}

.regalo__iban {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
  word-break: break-all;
}

.regalo__intestatario {
  font-size: 0.9rem;
  color: var(--color-sage);
  margin-bottom: 1.5rem;
}

.regalo__qr {
  margin-top: 1.5rem;
}

.regalo__qr canvas {
  margin: 0 auto;
}

/* ===== Easter Egg ===== */
.easter-egg {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  font-size: 1.2rem;
  opacity: 0.15;
  text-decoration: none;
  transition: opacity 0.3s;
  z-index: 50;
  cursor: default;
}

.easter-egg:hover {
  opacity: 0.6;
}

/* ===== Secret Page ===== */
.secret {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.secret__title {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  color: var(--color-sage);
}

.secret__text {
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.8;
  color: var(--color-sage);
}

.secret__video {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(95, 111, 82, 0.2);
}

.secret__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.secret__back {
  margin-top: 3rem;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--color-cream);
  background-color: var(--color-sage);
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.secret__back:hover {
  background-color: var(--color-dark);
  color: var(--color-cream);
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 0;
  background-color: var(--color-sage);
  color: var(--color-cream);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__love {
  font-family: var(--font-calligraphy);
  font-size: 1.3rem;
}

.footer__credit {
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer__credit a {
  color: var(--color-cream);
}

/* ===== Utilities ===== */
@media (max-width: 600px) {
  .hero__countdown {
    gap: 1rem;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline__item {
    flex-wrap: wrap;
    padding-left: 30px;
  }

  .timeline__time {
    flex: 0 0 auto;
    text-align: left;
    padding-right: 0;
    font-size: 1.1rem;
    width: 100%;
    order: -1;
  }

  .timeline__dot {
    position: absolute;
    left: 0;
  }

  .timeline__content {
    padding-left: 0;
    width: 100%;
  }

  .gallery-grid__item--video {
    grid-column: span 1;
  }
}
