:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-2: #0d1c34;
  --panel: rgba(11, 19, 34, 0.74);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.72);
  --accent: #7cf7e9;
  --accent-2: #ffcc66;
  --accent-3: #ff7ba8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 247, 233, 0.22), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(255, 123, 168, 0.18), transparent 22%),
    radial-gradient(circle at 50% 80%, rgba(255, 204, 102, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.stage {
  position: relative;
  width: min(980px, 100%);
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(13, 23, 42, 0.76), rgba(8, 16, 30, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.9;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}

.orb-one {
  top: -50px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: rgba(124, 247, 233, 0.18);
}

.orb-two {
  top: 40px;
  right: 10%;
  width: 160px;
  height: 160px;
  background: rgba(255, 123, 168, 0.14);
  animation-delay: -2s;
}

.orb-three {
  bottom: -40px;
  right: 2%;
  width: 100px;
  height: 100px;
  background: rgba(255, 204, 102, 0.16);
  animation-delay: -5s;
}

.hero {
  max-width: 720px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.eyebrow,
.reveal__eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  max-width: 11ch;
}

.lead {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.9vw, 1.15rem);
  line-height: 1.7;
  color: var(--muted);
}

.gift-shell {
  display: grid;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.gift-card,
.reveal__panel {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.gift-card {
  padding: clamp(22px, 4vw, 32px);
}

.gift-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip,
.progress {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chip {
  padding: 10px 14px;
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--muted);
}

.progress__value {
  color: var(--text);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 18px;
}

.gift-box {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 420px);
  aspect-ratio: 1 / 0.84;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

.gift-box:focus-visible {
  filter: drop-shadow(0 0 0.8rem rgba(124, 247, 233, 0.45));
}

.gift-box__base,
.gift-box__lid,
.gift-box__ribbon,
.gift-box__glow,
.gift-box__spark,
.gift-box__label {
  position: absolute;
}

.gift-box__base {
  inset: auto 8% 10% 8%;
  height: 50%;
  border-radius: 24px 24px 28px 28px;
  background:
    linear-gradient(180deg, rgba(26, 198, 191, 0.95), rgba(10, 142, 181, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 26px 40px rgba(0, 0, 0, 0.22);
}

.gift-box__lid {
  inset: 10% 5% auto 5%;
  height: 30%;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 204, 102, 0.96), rgba(255, 170, 70, 0.96));
  transform-origin: center bottom;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.gift-box__ribbon {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 233, 238, 0.9));
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.22);
}

.gift-box__ribbon--vertical {
  width: 14%;
  inset: 8% 43% 8% 43%;
  border-radius: 999px;
}

.gift-box__ribbon--horizontal {
  height: 14%;
  inset: 31% 5% 37% 5%;
  border-radius: 999px;
}

.gift-box__glow {
  inset: 18% 10% 0;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 247, 233, 0.38), transparent 65%);
  filter: blur(18px);
  opacity: 0.6;
}

.gift-box__spark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent-3);
  opacity: 0.9;
}

.gift-box__spark--one {
  top: 4%;
  left: 18%;
}

.gift-box__spark--two {
  top: 10%;
  right: 14%;
  background: var(--accent-2);
}

.gift-box__spark--three {
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
}

.gift-box__label {
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gift-box.is-arming .gift-box__lid {
  animation: wobble 0.38s ease-in-out;
}

.gift-box.is-open .gift-box__lid {
  transform: translateY(-52px) rotate(-8deg);
}

.gift-box.is-open .gift-box__base {
  transform: translateY(8px);
}

.gift-box.is-open .gift-box__glow {
  opacity: 1;
}

.gift-box.is-open .gift-box__label {
  opacity: 0;
  transform: translateX(-50%) scale(0.8);
}

.hint {
  margin: 18px auto 0;
  max-width: 48ch;
  text-align: center;
  color: var(--muted);
  line-height: 1.65;
}

.meter {
  width: min(100%, 420px);
  height: 8px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter__bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width 0.35s ease;
}

.reveal {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: max-height 0.7s ease, opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
}

.reveal__panel {
  padding: clamp(22px, 4vw, 32px);
}

.reveal__panel h3 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04;
  max-width: 12ch;
}

.reveal__text {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 60ch;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.note-card {
  min-height: 160px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.note-card__tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.cta {
  margin-top: 22px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #06111d;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 32px rgba(124, 247, 233, 0.2);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(124, 247, 233, 0.28);
}

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

@keyframes wobble {
  0%,
  100% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(-5deg);
  }
  70% {
    transform: rotate(4deg);
  }
}

.confetti {
  position: fixed;
  top: -16px;
  width: 12px;
  height: 18px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 999;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift, 0px), 110vh, 0) rotate(720deg);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 16px;
  }

  .stage {
    padding: 18px;
    border-radius: 28px;
  }

  .gift-topline {
    align-items: flex-start;
  }

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

  .gift-box {
    width: min(100%, 360px);
  }
}

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

  .reveal {
    transform: none;
  }
}
