/* M11 guest polish: countdown, scroll cue, section reveals */

.wedding-countdown {
  margin: 28px auto 0;
  max-width: var(--layout-card-width);
  width: 100%;
  padding: 28px 24px 32px;
  text-align: center;
  color: var(--charcoal);
  background: linear-gradient(180deg, rgb(251 249 245 / 96%), rgb(248 244 237 / 98%));
  border: 1px solid rgb(148 103 33 / 18%);
  box-shadow: 0 10px 28px rgb(43 38 30 / 6%);
}

.countdown-heading {
  margin: 0 0 22px;
  font: 400 12px/1.5 var(--font-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown-unit {
  padding: 14px 8px 12px;
  border: 1px solid rgb(148 103 33 / 22%);
  background: var(--ivory);
}

.countdown-value {
  display: block;
  font: 400 clamp(28px, 6vw, 40px)/1.05 Georgia, "Times New Roman", serif;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  display: block;
  margin-top: 8px;
  font: 400 10px/1.4 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-complete {
  margin: 18px 0 0;
  font: 400 15px/1.65 Georgia, "Times New Roman", serif;
  color: var(--charcoal);
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 12;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgb(148 103 33 / 28%);
  background: rgb(251 249 245 / 94%);
  color: var(--gold);
  font: 400 11px/1.4 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease, transform .45s ease;
}

.scroll-cue.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-cue.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.scroll-cue-icon {
  width: 14px;
  height: 14px;
  animation: scrollCueBounce 2.2s ease-in-out infinite;
}

.music-control {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 13;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid rgb(148 103 33 / 35%);
  border-radius: 999px;
  background: rgb(251 249 245 / 94%);
  color: var(--gold);
  cursor: pointer;
  box-shadow: 0 4px 16px rgb(43 38 30 / 10%);
}

.music-control[hidden] {
  display: none !important;
}

.music-control svg {
  display: block;
  width: 22px;
  height: 22px;
}

.music-control:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--reveal-duration, 600ms) ease, transform var(--reveal-duration, 600ms) ease;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-icon { animation: none; }
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

@media (max-width: 520px) {
  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .music-control {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 350px) {
  .wedding-countdown {
    padding-inline: 16px;
  }
}
