:root {
  --night-1: #0b1020;
  --night-2: #111a2e;
  --night-3: #0a0e1a;
  --gold: #d4b06a;
  --gold-soft: #e7cd97;
  --gold-deep: #b6914c;
  --cream: #f6f1e7;
  --white: #ffffff;
  --muted: rgba(246, 241, 231, 0.65);
  --line: rgba(212, 176, 106, 0.35);
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(
      120% 90% at 50% -10%,
      var(--night-2) 0%,
      var(--night-1) 45%,
      var(--night-3) 100%
    );
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Starfield */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, rgba(231, 205, 151, 0.6), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 60% 90%, rgba(231, 205, 151, 0.5), transparent),
    radial-gradient(1px 1px at 90% 35%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 50% 12%, rgba(255, 255, 255, 0.4), transparent);
  background-repeat: no-repeat;
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.55; }
  100% { opacity: 1; }
}

/* Soft gold moonlight glow */
.glow {
  position: fixed;
  top: -22vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  max-width: 900px;
  height: 80vw;
  max-height: 900px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle,
    rgba(212, 176, 106, 0.18) 0%,
    rgba(212, 176, 106, 0.07) 35%,
    transparent 65%
  );
  filter: blur(10px);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) 1.5rem clamp(2rem, 6vh, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

/* Hero */
.hero {
  width: 100%;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-soft);
  margin-bottom: clamp(1.5rem, 4vh, 2.4rem);
}

.names {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
}

.names span {
  display: block;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  background: linear-gradient(
    180deg,
    var(--gold-soft) 0%,
    var(--gold) 50%,
    var(--gold-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
}

.names .amp {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-style: italic;
  margin: 0.1em 0;
  opacity: 0.85;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(1.6rem, 4vh, 2.4rem) auto;
  width: min(380px, 80%);
}

.divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line) 50%,
    transparent
  );
}

.divider .diamond {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(212, 176, 106, 0.6);
  flex: none;
}

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--cream);
  margin-bottom: clamp(1.6rem, 4vh, 2.2rem);
}

.date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  font-family: var(--serif);
}

.date-day {
  font-size: clamp(3rem, 11vw, 5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--white);
  letter-spacing: 0.02em;
}

.date-month {
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.date-year {
  font-family: var(--sans);
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  letter-spacing: 0.5em;
  color: var(--muted);
  padding-left: 0.5em;
}

/* Countdown */
.countdown-section {
  width: 100%;
  margin-top: clamp(2.4rem, 6vh, 3.6rem);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 2vw, 1.2rem);
  max-width: 560px;
  margin: 0 auto;
}

.count-box {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(212, 176, 106, 0.22);
  border-radius: 14px;
  padding: clamp(0.9rem, 3vw, 1.5rem) 0.4rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.count-num {
  font-family: var(--display);
  font-size: clamp(1.8rem, 7vw, 3.2rem);
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.count-label {
  font-family: var(--sans);
  font-size: clamp(0.6rem, 1.8vw, 0.8rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.countdown-done {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold-soft);
  max-width: 480px;
  margin: 0 auto;
}

/* CTA */
.cta-section {
  margin-top: clamp(2.6rem, 7vh, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.btn-save {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--night-1);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: none;
  border-radius: 100px;
  padding: 1.05rem 2.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 12px 34px rgba(212, 176, 106, 0.3);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(212, 176, 106, 0.45);
}

.btn-save:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 0.85rem;
}

.cta-hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Footer */
.foot {
  margin-top: auto;
  padding-top: clamp(2.5rem, 6vh, 4rem);
}

.foot-mono {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 8, 16, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.3s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--night-2), var(--night-1));
  border: 1px solid rgba(212, 176, 106, 0.3);
  border-radius: 20px;
  padding: 2.6rem 1.8rem 2rem;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--gold-soft);
}

.modal-eyebrow {
  font-family: var(--sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--gold-soft);
  margin-bottom: 0.6rem;
}

.modal-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.modal-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cal-btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 176, 106, 0.3);
  border-radius: 100px;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.cal-btn:hover {
  background: rgba(212, 176, 106, 0.14);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.modal-detail {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stars,
  .modal,
  .modal-overlay {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .countdown {
    gap: 0.5rem;
  }
  .count-box {
    border-radius: 11px;
  }
}
