:root {
  --gold: #b8934a;
  --gold-deep: #8f6f2e;
  --gold-soft: #cfa858;
  --cream: #f8f2e4;
  --ink: #5b4a2f;
  --ink-soft: #7d6a49;
  --white: #fffdf8;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--cream);
  background-image: url("assets/paper-texture.jpg");
  background-repeat: repeat;
  background-size: 140px 140px;
  color: var(--ink);
  font-family: "EB Garamond", serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 40px;
}

/* ---------- SPARKLES ---------- */
#sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

/* ---------- SPLASH SCREEN ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--cream);
  background-image: url("assets/paper-texture.jpg");
  background-repeat: repeat;
  background-size: 140px 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}
#splash.hiding {
  opacity: 0;
  pointer-events: none;
}
#splash.hidden {
  display: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
}

.splash-monogram {
  width: 140px;
  max-width: 42vw;
  margin-bottom: 20px;
  animation: floatIn 1.2s ease both;
}

.splash-name {
  width: 280px;
  max-width: 75vw;
  margin-bottom: 6px;
  animation: floatIn 1.2s ease 0.2s both;
}

.splash-age {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 44px;
  animation: floatIn 1.2s ease 0.35s both;
}

#splashBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 38px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-deep);
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  animation: floatIn 1.2s ease 0.5s both, pulse 2.5s ease 1.7s infinite;
  transition: background 0.3s ease, color 0.3s ease;
}
#splashBtn:hover, #splashBtn:focus-visible {
  background: var(--gold);
  color: var(--white);
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185,147,74,0); }
  50%       { box-shadow: 0 0 0 6px rgba(185,147,74,0.18); }
}

/* ---------- MUSIC BUTTON ---------- */
.music-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: rgba(248, 242, 228, 0.9);
  color: var(--gold-deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease;
}
.music-btn svg { width: 18px; height: 18px; }
.music-btn:hover { background: rgba(185, 147, 74, 0.15); }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- MAIN CARD ---------- */
main {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.card {
  position: relative;
  background: rgba(255, 253, 248, 0.55);
  border: 1px solid rgba(185, 147, 74, 0.2);
  border-radius: 4px;
  padding: 56px 32px 48px;
  text-align: center;
  overflow: hidden;
}

/* ---------- FLORALS ---------- */
.corner-floral {
  position: absolute;
  width: 160px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
.corner-floral img { width: 100%; display: block; }
.corner-tl { top: -20px; left: -45px; }
.corner-br {
  bottom: -30px;
  right: -45px;
  transform: rotate(180deg);
  width: 180px;
}

/* ---------- MONOGRAM + NAME ---------- */
.monogram {
  width: 130px;
  max-width: 38vw;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.name-signature {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 4px;
  position: relative;
  z-index: 1;
}

.age-label {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 28px;
  position: relative;
  z-index: 1;
}

/* ---------- DIVIDER ---------- */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}

/* ---------- REMINDER TEXT ---------- */
.reminder-text {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* ---------- COUNTDOWN ---------- */
.countdown-label {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  background: rgba(185, 147, 74, 0.08);
  border: 1px solid rgba(185, 147, 74, 0.25);
  border-radius: 6px;
  padding: 10px 6px 8px;
}

.countdown-num {
  font-family: "Cinzel", serif;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 500;
  color: var(--gold-deep);
  line-height: 1;
  letter-spacing: 1px;
}

.countdown-unit {
  font-family: "Cinzel", serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 5px;
}

.countdown-sep {
  font-family: "Cinzel", serif;
  font-size: 22px;
  color: var(--gold-soft);
  font-weight: 300;
  margin-bottom: 14px;
  opacity: 0.7;
}

/* ---------- RECEPTION INFO ---------- */
.reception-info {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 2;
  margin: 0 0 28px;
  position: relative;
  z-index: 1;
}

/* ---------- DEADLINE ---------- */
.deadline {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 24px;
  position: relative;
  z-index: 1;
}
.deadline strong {
  font-style: normal;
  color: var(--gold-deep);
}

/* ---------- CONFIRM BUTTON ---------- */
.btn-confirm {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  background: var(--gold);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn-confirm svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-confirm:hover, .btn-confirm:focus-visible {
  background: var(--gold-deep);
  transform: translateY(-1px);
}
.btn-confirm:active { transform: scale(0.97); }
.btn-confirm:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 24px 0 0;
}
.footer p {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
  opacity: 0.7;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 540px) {
  .card { padding: 64px 52px 56px; }
  .countdown-item { min-width: 68px; }
}

@media (max-width: 360px) {
  .card { padding: 48px 20px 40px; }
  .countdown-item { min-width: 50px; padding: 8px 4px 6px; }
  .countdown-sep { font-size: 18px; }
  .corner-floral { width: 120px; }
}
