*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-deep: #0a0a12;
  --bg-mid: #12101c;
  --accent: #e8b4c8;
  --accent-soft: rgba(232, 180, 200, 0.35);
  --gold: #d4af7a;
  --text: #f5eef2;
  --text-muted: rgba(245, 238, 242, 0.72);
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  font-family: "Outfit", system-ui, sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  position: relative;
}

.hidden {
  display: none !important;
}

/* ——— Countdown ——— */
.countdown-screen {
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(232, 180, 200, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 50% at 80% 100%, rgba(99, 102, 241, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg-deep), var(--bg-mid));
}

.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.countdown-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 42rem;
}

.countdown-whisper {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  animation: breathe 4s ease-in-out infinite;
}

.countdown-sub {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 300;
  margin: 0 0 2.5rem;
  line-height: 1.6;
}

.timer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 2rem;
}

.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.25rem;
  padding: 1rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  animation: floatSoft 6s ease-in-out infinite;
}

.timer-block:nth-child(odd) {
  animation-delay: -2s;
}

.timer-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.timer-sep {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--accent-soft);
  padding-bottom: 0.5rem;
  opacity: 0.6;
  animation: pulseSep 2s ease-in-out infinite;
}

.countdown-foot {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseSep {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
}

/* ——— Reveal ——— */
.reveal-screen {
  background:
    radial-gradient(ellipse 100% 70% at 50% -10%, rgba(232, 180, 200, 0.22), transparent 45%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(212, 175, 122, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, #0f0e18 100%);
}

.reveal-content {
  position: relative;
  max-width: 52rem;
  width: 100%;
  z-index: 2;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-a {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  background: rgba(232, 180, 200, 0.35);
  top: -15%;
  left: -10%;
  animation: orbMove 18s ease-in-out infinite;
}

.orb-b {
  width: min(320px, 55vw);
  height: min(320px, 55vw);
  background: rgba(99, 102, 241, 0.2);
  bottom: -10%;
  right: -5%;
  animation: orbMove 22s ease-in-out infinite reverse;
}

@keyframes orbMove {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(8%, 5%) scale(1.05);
  }
  66% {
    transform: translate(-5%, 8%) scale(0.95);
  }
}

.hero {
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 36rem;
  margin: 0 auto;
}

.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 1.5rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  backdrop-filter: blur(14px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-soft);
}

.card-icon {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  opacity: 0.85;
  animation: iconGlow 3s ease-in-out infinite;
}

.card:nth-child(2) .card-icon {
  animation-delay: -1s;
}

.card:nth-child(3) .card-icon {
  animation-delay: -2s;
}

@keyframes iconGlow {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.card h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.closing {
  text-align: center;
  margin-top: clamp(2.5rem, 8vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.signature {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.5rem;
  animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
    letter-spacing: 0.02em;
  }
}

.meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  animation: revealIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes revealIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating hearts (generated in JS) */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-hearts span {
  position: absolute;
  bottom: -10%;
  font-size: 1rem;
  opacity: 0;
  animation: riseHeart linear forwards;
  color: var(--accent);
}

@keyframes riseHeart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.6);
  }
  10% {
    opacity: 0.65;
  }
  90% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateY(-110vh) rotate(25deg) scale(1);
  }
}

/* Unlock flash */
.countdown-screen.unlocking {
  animation: fadeOutScreen 1.2s ease forwards;
}

@keyframes fadeOutScreen {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .timer-block {
    animation: none;
  }
}
