:root {
  --ink: #fff8f0;
  --muted: rgba(255, 248, 240, 0.72);
  --night: #090913;
  --plum: #2b122e;
  --rose: #f47b9b;
  --gold: #f6cf7a;
  --mint: #95ead4;
  --glass: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.2);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(244, 123, 155, 0.26), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(149, 234, 212, 0.16), transparent 26rem),
    linear-gradient(160deg, #090913 0%, #151027 45%, #281332 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 2.6rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-weight: 700;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
}

.icon-button,
.primary-button,
.ghost-button {
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.music-icon {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 0.32rem rgba(246, 207, 122, 0.16),
    0 0 1.4rem rgba(246, 207, 122, 0.8);
}

.icon-button.is-playing .music-icon {
  animation: pulse 900ms ease-in-out infinite;
}

.hero-copy {
  width: min(46rem, 100%);
  align-self: center;
  padding: 10vh 0 7vh;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5rem, 21vw, 13rem);
  line-height: 0.74;
  letter-spacing: 0;
  text-shadow: 0 14px 60px rgba(244, 123, 155, 0.34);
}

.subtitle {
  width: min(39rem, 100%);
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.24rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.primary-button,
.ghost-button {
  padding: 0 1.25rem;
  font-weight: 800;
}

.primary-button {
  color: #241018;
  background: linear-gradient(135deg, var(--gold), #ffdfe8 45%, var(--rose));
  box-shadow: 0 18px 46px rgba(244, 123, 155, 0.26);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.star-note:hover {
  transform: translateY(-2px);
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible,
.star-note:focus-visible {
  outline: 3px solid rgba(149, 234, 212, 0.72);
  outline-offset: 4px;
}

.countdown-panel {
  justify-self: end;
  width: min(34rem, 100%);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.countdown-panel p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-weight: 700;
}

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

.countdown-grid span {
  min-height: 4.8rem;
  display: grid;
  place-items: center;
  padding: 0.65rem 0.35rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-grid strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.45rem, 5vw, 2.25rem);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  width: 1.4rem;
  height: 2.25rem;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.scroll-hint span {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 0.32rem;
  height: 0.32rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gold);
  animation: drop 1.55s ease-in-out infinite;
}

section:not(.hero) {
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 4vw, 3rem);
}

.section-heading {
  width: min(60rem, 100%);
  margin: 0 auto 2rem;
}

h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.96;
}

.constellation {
  min-height: 100svh;
}

.orbit-stage {
  position: relative;
  width: min(56rem, 100%);
  aspect-ratio: 1.45 / 1;
  min-height: 26rem;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.045);
  background-size: 4rem 4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.orbit-stage::before,
.orbit-stage::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(246, 207, 122, 0.22);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.orbit-stage::after {
  inset: 22% 16%;
  border-color: rgba(149, 234, 212, 0.2);
  transform: rotate(18deg);
}

.planet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(8rem, 24vw, 13rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #fff8f0, #ffd6e1 22%, #f47b9b 50%, #55203d 100%);
  box-shadow:
    inset -1.6rem -1.6rem 4rem rgba(0, 0, 0, 0.24),
    0 0 5rem rgba(244, 123, 155, 0.42);
}

.planet span {
  color: #351425;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 700;
}

.star-note {
  position: absolute;
  width: 3.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.star-note span {
  width: 1rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 0.55rem rgba(246, 207, 122, 0.13),
    0 0 2.2rem rgba(246, 207, 122, 0.9);
}

.star-note-one {
  left: 13%;
  top: 18%;
}

.star-note-two {
  right: 13%;
  top: 16%;
}

.star-note-three {
  left: 18%;
  bottom: 16%;
}

.star-note-four {
  right: 16%;
  bottom: 18%;
}

.note-card {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  width: min(28rem, calc(100% - 2rem));
  min-height: 4.25rem;
  display: grid;
  align-items: center;
  transform: translateX(-50%);
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 9, 19, 0.7);
  color: var(--ink);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
  font-weight: 700;
  text-align: center;
}

.letter {
  display: grid;
  place-items: center;
}

.letter-paper {
  width: min(50rem, 100%);
  padding: clamp(1.3rem, 5vw, 4rem);
  border: 1px solid rgba(246, 207, 122, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.letter-paper p {
  color: rgba(255, 248, 240, 0.82);
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
  line-height: 1.85;
}

.letter-paper .signature {
  margin-top: 2rem;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.wish-grid {
  width: min(68rem, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 auto;
}

.wish-grid article {
  min-height: 16rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.2);
}

.wish-grid span {
  color: var(--mint);
  font-weight: 900;
}

.wish-grid h3 {
  margin: 3rem 0 0.9rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.wish-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.finale {
  min-height: 88svh;
  display: grid;
  place-items: center;
  text-align: center;
}

.finale-inner {
  width: min(58rem, 100%);
}

.finale .primary-button {
  margin-top: 2rem;
}

.hidden-wish {
  max-width: 42rem;
  margin: 1.3rem auto 0;
  color: var(--gold);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(0.7rem);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

.hidden-wish.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drop {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, 0.82rem);
  }
}

@keyframes pulse {
  50% {
    transform: scale(0.72);
    box-shadow:
      0 0 0 0.55rem rgba(246, 207, 122, 0.1),
      0 0 1.9rem rgba(246, 207, 122, 0.95);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
    padding: 1rem;
  }

  .button-text {
    display: none;
  }

  .hero-copy {
    padding: 8vh 0 3vh;
  }

  h1 {
    font-size: clamp(4.9rem, 29vw, 8rem);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .countdown-panel {
    justify-self: stretch;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orbit-stage {
    aspect-ratio: auto;
    min-height: 34rem;
  }

  .wish-grid {
    grid-template-columns: 1fr;
  }

  .wish-grid article {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
