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

:root {
  --blush:      #FDF1F6;
  --petal:      #F8CFE1;
  --rose:       #E893B7;
  --mauve:      #B23E78;
  --plum:       #8C3A63;
  --mist:       #AEBBCB;
  --mist-deep:  #8C9DB3;
  --mist-light: #C9D3E0;
  --cream:      #FFFCFA;
  --ink-eye:    #5C4A57;
}

html { scroll-behavior: smooth; }

body {
  background: var(--blush);
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  color: var(--plum);
  min-height: 100vh;
  overflow-x: hidden;
}

#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.petal {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  border-radius: 50% 0 50% 0;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0%   { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  5%   { opacity: .7; }
  90%  { opacity: .5; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ══ OVERLAY SOBRE CERRADO ══════════════════════════════════ */
#envelope-overlay {
  position: fixed;
  inset: 0;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity .8s ease, visibility .8s ease;
}

#envelope-overlay.closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-container {
  position: relative;
  width: min(300px, 85vw);
  height: auto;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp .8s .3s ease forwards;
}

/* ══ ENVELOPE HINT ══════════════════════════════════════════ */
.envelope-hint {
  position: absolute;
  bottom: -58px;
  left: 50%;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.8px;
  color: var(--mauve);
  background: linear-gradient(135deg, var(--cream) 0%, #FFF5F9 100%);
  border: 1px solid var(--petal);
  padding: 10px 24px;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(178,62,120,.12);
  white-space: nowrap;
  opacity: 0;
  animation: hintFadeIn .7s .85s ease forwards, pulseHint 2.6s 1.3s ease-in-out infinite;
  transition: filter .3s, box-shadow .3s;
}

.envelope-container:hover .envelope-hint {
  box-shadow: 0 6px 28px rgba(178,62,120,.2);
  filter: brightness(1.03);
}

@keyframes hintFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pulseHint {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); box-shadow: 0 4px 20px rgba(178,62,120,.12); }
  50% { transform: translateX(-50%) translateY(0) scale(1.04); box-shadow: 0 7px 28px rgba(178,62,120,.22); }
}

/* ══ ENVELOPE IMG · GIF ═══════════════════════════════════════ */
.envelope-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 300px;
  filter: drop-shadow(0 12px 36px rgba(140,58,99,.18));
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), filter .4s ease;
  cursor: pointer;
}

.envelope-container:hover .envelope-svg {
  transform: scale(1.12);
  filter: drop-shadow(0 24px 56px rgba(140,58,99,.38));
}

.envelope-container.open .envelope-svg {
  animation: zoomOut .7s ease-in forwards;
}

@keyframes zoomOut {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ══ MAIN INVITATION ════════════════════════════════════════ */
main {
  opacity: 0;
  animation: fadeIn 1s 1s ease forwards;
}

main.visible { opacity: 1; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.open-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mauve);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(178,62,120,.2);
  opacity: 0;
  animation: fadeUp .6s 1.8s ease forwards;
}

.open-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(178,62,120,.3);
}

.open-btn:active { transform: scale(0.95); }

/* ══ HERO ══════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 56px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-illustration-wrap {
  position: relative;
  width: min(340px, 90vw);
  margin: 0 auto 24px;
  opacity: 0;
  animation: fadeUp .8s .1s ease forwards;
}

.bunting-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.elephant-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 340px;
  margin: 0 auto;
  animation: floatEle 5s ease-in-out infinite;
}

@keyframes floatEle {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.bunting-flag {
  animation: buntingSwing 3.4s ease-in-out infinite;
  transform-origin: top center;
}

.bunting-flag:nth-child(2) { animation-delay: .15s; }
.bunting-flag:nth-child(3) { animation-delay: .3s; }
.bunting-flag:nth-child(4) { animation-delay: .45s; }
.bunting-flag:nth-child(5) { animation-delay: .6s; }
.bunting-flag:nth-child(6) { animation-delay: .75s; }

@keyframes buntingSwing {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rose);
  border: 1px solid var(--petal);
  border-radius: 40px;
  padding: 6px 20px;
  margin-bottom: 26px;
  opacity: 0;
  animation: fadeUp .7s .35s ease forwards;
}

.hero-pre {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 3vw, 20px);
  color: var(--rose);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeUp .7s .55s ease forwards;
}

.hero-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(44px, 9.5vw, 84px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1px;
  opacity: 0;
  background: linear-gradient(90deg, var(--mauve) 0%, var(--rose) 40%, var(--mauve) 60%, var(--mauve) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp .8s .75s ease forwards, shimmer 4s 1.5s linear infinite;
}

.hero-name span {
  display: block;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 5vw, 48px);
  letter-spacing: 2px;
  margin-top: 4px;
}

@keyframes shimmer { to { background-position: 200% center; } }

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px auto;
  max-width: 360px;
  opacity: 0;
  animation: fadeUp .6s .95s ease forwards;
}

.hero-divider::before, .hero-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--petal), transparent);
}

.hero-msg {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--plum);
  max-width: 440px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: fadeUp .7s 1.1s ease forwards;
}

.hero-scroll-hint {
  opacity: 0;
  animation: fadeUp .6s 1.5s ease forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--petal);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
}

.scroll-arrow {
  width: 22px; height: 22px;
  border-right: 1.5px solid var(--petal);
  border-bottom: 1.5px solid var(--petal);
  transform: rotate(45deg);
  animation: bounce 1.4s 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(6px); }
}

section { position: relative; z-index: 1; }

/* ══ INFO CARDS ════════════════════════════════════════════ */
.info-section { padding: 0 24px 64px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: var(--cream);
  border: 1px solid var(--petal);
  border-radius: 22px;
  padding: 30px 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px) scale(.97);
  transition: opacity .5s ease, transform .5s ease, box-shadow .25s;
  will-change: transform, opacity;
}

.card.visible { opacity: 1; transform: translateY(0) scale(1); }

.card:hover {
  box-shadow: 0 12px 40px rgba(178,62,120,.15);
  transform: translateY(-5px) scale(1.02) !important;
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blush);
  border: 1px solid var(--petal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  transition: transform .3s;
}

.card:hover .card-icon { transform: scale(1.15) rotate(-5deg); }

.card-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 10px;
}

.card-value {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 21px;
  color: var(--mauve);
  line-height: 1.35;
}

.card-sub {
  font-size: 13px;
  color: var(--rose);
  margin-top: 6px;
}

/* ══ CALENDAR SECTION ══════════════════════════════════════ */
.cal-section { text-align: center; padding: 0 24px 64px; }

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  font-style: italic;
  color: var(--mauve);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.section-title.visible { opacity: 1; transform: translateY(0); }

.section-sub {
  font-size: 14px;
  color: var(--rose);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s .1s ease, transform .6s .1s ease;
}

.section-sub.visible { opacity: 1; transform: translateY(0); }

.cal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s .2s ease, transform .6s .2s ease;
}

.cal-buttons.visible { opacity: 1; transform: translateY(0); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 40px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.25);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.btn:hover::after { transform: scaleX(1); }

.btn-outline { background: var(--cream); border-color: var(--petal); color: var(--mauve); }

.btn-outline:hover {
  background: var(--blush);
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(178,62,120,.15);
}

.btn-solid {
  background: var(--mauve);
  color: var(--cream);
  border-color: var(--mauve);
  font-size: 16px;
  padding: 15px 36px;
  animation: pulseWa 3s 2s ease infinite;
}

.btn-solid:hover {
  background: var(--plum);
  border-color: var(--plum);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(140,58,99,.3);
}

@keyframes pulseWa {
  0%, 90%, 100% { box-shadow: 0 0 0 0 rgba(178,62,120,0); }
  45%            { box-shadow: 0 0 0 10px rgba(178,62,120,.18); }
}

/* ══ RSVP SECTION ══════════════════════════════════════════ */
.rsvp-section {
  text-align: center;
  padding: 56px 24px 80px;
  background: var(--cream);
  border-top: 1px solid var(--petal);
  border-bottom: 1px solid var(--petal);
}

.rsvp-inner { max-width: 480px; margin: 0 auto; }

.rsvp-emoji {
  font-size: 46px;
  display: block;
  margin-bottom: 16px;
  animation: heartbeat 2.6s 1s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  14%       { transform: scale(1.15) rotate(-4deg); }
  28%       { transform: scale(1) rotate(0deg); }
  42%       { transform: scale(1.1) rotate(4deg); }
  56%       { transform: scale(1) rotate(0deg); }
}

/* ══ COUNTDOWN ════════════════════════════════════════════ */
.countdown-wrap {
  text-align: center;
  padding: 56px 24px;
  background: linear-gradient(135deg, #FBE7F0 0%, #FFF8FB 100%);
  border-top: 1px solid var(--petal);
}

.countdown-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.countdown-box {
  background: var(--cream);
  border: 1px solid var(--petal);
  border-radius: 18px;
  padding: 20px 28px;
  min-width: 90px;
  opacity: 0;
  transform: translateY(20px) scale(.95);
  transition: opacity .5s ease, transform .5s ease;
}

.countdown-box.visible { opacity: 1; transform: translateY(0) scale(1); }

.countdown-num {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 42px;
  color: var(--mauve);
  line-height: 1;
  display: block;
  transition: transform .15s;
}

.countdown-num.tick { transform: scale(1.2); }

.countdown-lbl {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rose);
  margin-top: 6px;
  display: block;
}

/* ══ FOOTER ════════════════════════════════════════════════ */
footer {
  text-align: center;
  padding: 18px 24px 36px;
  font-size: 13px;
  color: var(--rose);
  letter-spacing: .5px;
  font-weight: 500;
}

.footprints {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
  opacity: .8;
}

.footprints svg:nth-child(odd) { transform: translateY(4px); }

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

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .countdown-grid { gap: 10px; }
  .countdown-box { padding: 16px 18px; min-width: 72px; }
  .countdown-num { font-size: 32px; }
  .open-btn { width: 44px; height: 44px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
