:root {
  color-scheme: light;
  --ink: #201430;
  --muted: #6a5d78;
  --paper: #fffaf2;
  --cream: #fff3d8;
  --pink: #ff4f8b;
  --coral: #ff7a59;
  --gold: #ffc857;
  --blue: #2d6cdf;
  --cyan: #6ee7f9;
  --shadow: 0 24px 70px rgba(40, 19, 67, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 200, 87, 0.38), transparent 24rem),
    radial-gradient(circle at 86% 10%, rgba(110, 231, 249, 0.34), transparent 22rem),
    linear-gradient(160deg, #fffaf2 0%, #fff0f6 44%, #eef6ff 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  width: 100%;
}

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

.intro {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
}

.intro__content,
.surprise__copy,
.section-heading,
.finale {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0 0 34px;
  font-size: 7rem;
  line-height: 0.92;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: 4.4rem;
  line-height: 1.02;
  font-weight: 900;
}

h3 {
  margin: 8px 0 12px;
  font-size: 1.55rem;
  line-height: 1.16;
}

p {
  font-size: 1.12rem;
  line-height: 1.7;
}

.gift-button {
  position: relative;
  display: inline-grid;
  gap: 24px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.gift-button:focus-visible {
  outline: 4px solid rgba(45, 108, 223, 0.45);
  outline-offset: 12px;
  border-radius: 28px;
}

.gift-button__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 38px rgba(32, 20, 48, 0.24);
  transform: translateY(0);
  transition: transform 180ms ease, background 180ms ease;
}

.gift-button:hover .gift-button__label {
  background: #3b2456;
  transform: translateY(-3px);
}

.gift {
  position: relative;
  width: min(68vw, 310px);
  aspect-ratio: 1 / 0.9;
  filter: drop-shadow(0 28px 28px rgba(32, 20, 48, 0.2));
  animation: giftFloat 2.6s ease-in-out infinite;
}

.gift__box,
.gift__lid,
.gift__ribbon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gift__box {
  bottom: 0;
  width: 78%;
  height: 58%;
  border-radius: 14px 14px 24px 24px;
  background: linear-gradient(135deg, var(--pink), var(--coral));
}

.gift__lid {
  z-index: 2;
  top: 22%;
  width: 88%;
  height: 18%;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7eb1, #ff5d4f);
  transition: transform 560ms cubic-bezier(0.18, 0.9, 0.28, 1.2);
}

.gift__ribbon--vertical {
  bottom: 0;
  z-index: 3;
  width: 16%;
  height: 76%;
  background: linear-gradient(#ffe08a, var(--gold));
}

.gift__ribbon--horizontal {
  bottom: 29%;
  z-index: 3;
  width: 78%;
  height: 15%;
  background: linear-gradient(90deg, #ffe08a, var(--gold));
}

.gift__bow {
  position: absolute;
  top: 2%;
  z-index: 4;
  width: 32%;
  height: 30%;
  border: 18px solid var(--gold);
  background: transparent;
}

.gift__bow--left {
  left: 19%;
  border-radius: 70% 40% 70% 40%;
  transform: rotate(-18deg);
}

.gift__bow--right {
  right: 19%;
  border-radius: 40% 70% 40% 70%;
  transform: rotate(18deg);
}

.surprise {
  min-height: 72svh;
  display: grid;
  place-items: center;
  padding: 76px 20px 42px;
  opacity: 0;
  transform: translateY(42px) scale(0.98);
  transition: opacity 560ms ease, transform 560ms ease;
}

.surprise__copy {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.surprise__copy p:last-child,
.memory__text p,
.finale p {
  width: min(760px, 100%);
  margin: 22px auto 0;
  color: var(--muted);
}

body.is-open .gift {
  animation: none;
}

body.is-open .gift__lid {
  transform: translate(-50%, -120%) rotate(-10deg);
}

body.is-open .surprise {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.memory {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

.memory--hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
}

.memory__text {
  min-width: 0;
}

.hero-photo,
.postcard {
  margin: 0;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-photo {
  transform: rotate(1.5deg);
}

.hero-photo img {
  height: min(58vw, 620px);
  object-fit: cover;
  object-position: 54% 46%;
}

.postcards {
  padding: 52px 18px 84px;
}

.postcards__grid {
  width: min(1120px, 100%);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.postcard {
  display: grid;
  grid-template-rows: auto 1fr;
}

.postcard img {
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
}

.postcard div {
  padding: 32px;
}

.postcard__tag {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.postcard p:last-child {
  margin: 0;
  color: var(--muted);
}

.finale {
  width: min(960px, calc(100% - 36px));
  margin-bottom: 34px;
  padding: 72px 68px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.92), rgba(255, 79, 139, 0.9)),
    var(--gold);
  box-shadow: var(--shadow);
}

.finale .eyebrow,
.finale p {
  color: rgba(32, 20, 48, 0.78);
}

.finale h2 {
  color: white;
  text-shadow: 0 8px 28px rgba(32, 20, 48, 0.24);
}

@keyframes giftFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-13px) rotate(1.5deg);
  }
}

@media (max-width: 820px) {
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  p {
    font-size: 1.05rem;
  }

  .intro {
    padding-top: 24px;
  }

  .memory--hero,
  .postcards__grid {
    grid-template-columns: 1fr;
  }

  .memory {
    padding: 42px 0;
  }

  .hero-photo {
    transform: rotate(0.8deg);
  }

  .hero-photo img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 520px) {
  .eyebrow {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  h1 {
    margin-bottom: 28px;
    font-size: 2.55rem;
    line-height: 1;
  }

  h2 {
    font-size: 2.1rem;
  }

  p {
    font-size: 1rem;
  }

  .gift {
    width: min(76vw, 250px);
  }

  .gift__bow {
    border-width: 13px;
  }

  .gift-button__label {
    width: min(100%, 280px);
  }

  .surprise {
    padding-top: 42px;
  }

  .postcard div {
    padding: 22px;
  }

  .finale {
    padding: 38px 22px;
  }
}

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