/* fable — a soft storybook sky */

:root {
  --blush: #fbe4ec;
  --petal: #f6c9d8;
  --rose: #e9a3ba;
  --lavender: #e6d9f7;
  --lilac: #cdb8ee;
  --cream: #fff7f0;
  --gold: #f1c76b;
  --ink: #5b3f5e;
  --ink-soft: #8a6b8d;
  --card: rgba(255, 255, 255, 0.55);
  --card-edge: rgba(255, 255, 255, 0.85);
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--blush) 0%, var(--lavender) 55%, var(--cream) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.scene {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 64px) 20px;
  isolation: isolate;
}

/* ---------- sky ---------- */

.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  opacity: 0.9;
}

.stars-a {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 30% 8%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 48% 26%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 66% 12%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 84% 22%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 92% 44%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 8% 60%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 74% 68%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 22% 82%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 56% 88%, #fff 60%, transparent 62%);
  background-size: 100% 100%;
  animation: twinkle 4s ease-in-out infinite;
}

.stars-b {
  background-image:
    radial-gradient(1.5px 1.5px at 20% 34%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 40% 52%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 60% 40%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 80% 6%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 96% 76%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 36% 94%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 4% 30%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 88% 56%, #fff 60%, transparent 62%);
  background-size: 100% 100%;
  animation: twinkle 5.5s ease-in-out infinite reverse;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.moon {
  position: absolute;
  top: 9%;
  right: 12%;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff4d6;
  box-shadow:
    inset -18px -8px 0 0 var(--lavender),
    0 0 40px 10px rgba(255, 244, 214, 0.55);
  transform: rotate(-20deg);
  animation: bob 9s ease-in-out infinite;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  filter: drop-shadow(0 8px 18px rgba(200, 160, 200, 0.25));
  animation: drift linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 { width: 180px; height: 56px; top: 22%; left: -220px; animation-duration: 75s; }
.cloud-1::before { width: 80px; height: 80px; top: -38px; left: 30px; }
.cloud-1::after  { width: 60px; height: 60px; top: -24px; right: 34px; }

.cloud-2 { width: 130px; height: 42px; top: 68%; left: -170px; animation-duration: 95s; animation-delay: -30s; opacity: 0.85; }
.cloud-2::before { width: 58px; height: 58px; top: -28px; left: 22px; }
.cloud-2::after  { width: 44px; height: 44px; top: -18px; right: 26px; }

.cloud-3 { width: 220px; height: 64px; top: 46%; left: -260px; animation-duration: 120s; animation-delay: -70s; opacity: 0.7; }
.cloud-3::before { width: 96px; height: 96px; top: -46px; left: 40px; }
.cloud-3::after  { width: 70px; height: 70px; top: -30px; right: 40px; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 300px)); }
}

@keyframes bob {
  0%, 100% { transform: rotate(-20deg) translateY(0); }
  50%      { transform: rotate(-20deg) translateY(-8px); }
}

.sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 18px;
  text-shadow: 0 0 10px rgba(241, 199, 107, 0.8);
  animation: shimmer 3.2s ease-in-out infinite;
}

.s1 { top: 16%; left: 18%; animation-delay: 0s; }
.s2 { top: 30%; left: 78%; animation-delay: 0.7s; font-size: 14px; }
.s3 { top: 74%; left: 12%; animation-delay: 1.4s; font-size: 22px; }
.s4 { top: 82%; left: 70%; animation-delay: 2.1s; }
.s5 { top: 55%; left: 90%; animation-delay: 1s; font-size: 12px; }

@keyframes shimmer {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.15) rotate(20deg); }
}

/* ---------- story ---------- */

.story {
  text-align: center;
  max-width: 720px;
  width: 100%;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: clamp(4.5rem, 16vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #d8809c 0%, #b48cd9 55%, #e8b86d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(216, 128, 156, 0.25));
}

.date {
  margin: 14px 0 0;
  font-weight: 600;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
  margin: clamp(28px, 6vw, 48px) auto 0;
  max-width: 560px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(14px, 3vw, 22px) 6px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  box-shadow:
    0 10px 30px rgba(180, 140, 217, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.num {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1;
  color: var(--ink);
}

.label {
  margin-top: 8px;
  font-size: clamp(0.65rem, 1.6vw, 0.8rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.whisper {
  margin: clamp(22px, 5vw, 36px) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--ink-soft);
}

.whisper a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px dotted var(--rose);
}

body.arrived .whisper {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 420px) {
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moon { width: 60px; height: 60px; right: 8%; top: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .cloud, .moon, .sparkle { animation: none; }
  .stars { opacity: 0.7; }
  .cloud-1 { left: 10%; }
  .cloud-2 { left: 65%; }
  .cloud-3 { left: 35%; }
}

/* ---------- fairy dust cursor ---------- */

.dust {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M14 2 L16.6 11.4 L26 14 L16.6 16.6 L14 26 L11.4 16.6 L2 14 L11.4 11.4 Z' fill='%23f1c76b' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/></svg>") 14 14, auto;
  }
  a, button { cursor: pointer; }
}
