:root {
  --ink: #2c2030;
  --muted: #6c5b64;
  --paper: #fff8ef;
  --rose: #ff5f87;
  --berry: #b82f5a;
  --mint: #36c8b5;
  --sun: #ffc857;
  --violet: #6b5bd6;
  --line: rgba(44, 32, 48, 0.14);
  --shadow: 0 24px 70px rgba(54, 25, 35, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 200, 87, 0.35), transparent 26rem),
    linear-gradient(180deg, #fff4df 0%, #fffaf4 42%, #f4fffb 100%);
}

button,
a {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 248, 239, 0.98) 0%, rgba(255, 248, 239, 0.78) 36%, rgba(255, 248, 239, 0.18) 67%),
    linear-gradient(0deg, rgba(255, 248, 239, 0.82) 0%, rgba(255, 248, 239, 0) 32%);
}

.hero__content {
  width: min(660px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 110px);
  padding: 88px 0 120px;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.8rem, 9vw, 7.8rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  font-size: 1.25rem;
}

.hero__text {
  max-width: 560px;
  margin: 24px 0 0;
  color: #493743;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0 20px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 95, 135, 0.28);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(184, 47, 90, 0.24);
  backdrop-filter: blur(10px);
}

.button--dark {
  background: var(--ink);
  color: #fff;
}

.poem-section,
.wish-lab,
.gift-wheel-section,
.photo-story,
.reasons,
.finale {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(62px, 9vw, 112px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.poem-card {
  position: relative;
  padding: clamp(78px, 9vw, 112px) clamp(28px, 5vw, 64px) clamp(34px, 6vw, 62px);
  border: 2px solid rgba(184, 47, 90, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 239, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(54, 200, 181, 0.12) 39px 41px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.poem-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dashed rgba(184, 47, 90, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.poem-card__stamp {
  position: absolute;
  top: 126px;
  right: clamp(28px, 5vw, 58px);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px dashed rgba(184, 47, 90, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 2rem;
  transform: rotate(7deg);
}

.poem-card__date {
  position: relative;
  z-index: 1;
  margin: 0 0 24px;
  color: var(--berry);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.poem-card p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.75;
}

.poem-card p + p {
  margin-top: 26px;
}

.poem-card__signature {
  color: var(--berry);
  font-weight: 850;
  text-align: right;
}

.wish-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 28px;
  align-items: center;
}

.wish-jar {
  min-height: 390px;
  display: grid;
  place-items: center;
  transform-origin: 50% 88%;
  animation: jarDance 4.6s ease-in-out infinite;
}

.wish-jar__lid {
  width: 180px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--sun), #ff9f43);
  box-shadow: 0 12px 24px rgba(159, 91, 28, 0.16);
  transform-origin: 50% 100%;
  animation: lidWiggle 2.8s ease-in-out infinite;
}

.wish-jar__glass {
  position: relative;
  width: min(280px, 72vw);
  height: 300px;
  margin-top: -2px;
  border: 5px solid rgba(54, 200, 181, 0.5);
  border-radius: 22px 22px 78px 78px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 38px rgba(54, 200, 181, 0.22), var(--shadow);
  overflow: hidden;
}

.wish-jar__glass span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 58px;
  height: 42px;
  border-radius: 8px;
  background: var(--c);
  transform: rotate(-12deg);
  box-shadow: 0 10px 18px rgba(44, 32, 48, 0.12);
  animation: noteFloat 3.4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.wish-jar__glass span:nth-child(1) {
  --delay: -0.2s;
}

.wish-jar__glass span:nth-child(2) {
  --delay: -0.9s;
}

.wish-jar__glass span:nth-child(3) {
  --delay: -1.5s;
}

.wish-jar__glass span:nth-child(4) {
  --delay: -2.1s;
}

.wish-jar__glass span:nth-child(5) {
  --delay: -2.7s;
}

.wish-panel {
  position: relative;
  min-height: 272px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 42px);
  border: 2px solid rgba(44, 32, 48, 0.11);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wish-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 2px dashed rgba(255, 200, 87, 0.48);
  border-radius: 8px;
  pointer-events: none;
}

.wish-panel > * {
  position: relative;
  z-index: 1;
}

.wish-panel.is-changing {
  animation: wishPop 540ms cubic-bezier(0.16, 1, 0.3, 1);
}

.wish-panel.is-changing .wish-panel__text {
  animation: textFlip 460ms ease;
}

.wish-panel__label {
  margin: 0 0 12px;
  color: var(--violet);
  font-weight: 850;
}

.wish-panel__text {
  min-height: 92px;
  margin: 0 0 26px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.wish-spark {
  position: absolute;
  left: var(--start-x);
  bottom: 32px;
  z-index: 0;
  width: var(--size);
  height: calc(var(--size) * 1.45);
  border-radius: 3px;
  background: var(--spark-color);
  transform: translate(-50%, 0) rotate(0deg);
  pointer-events: none;
  animation: wishSpark 820ms ease-out forwards;
}

@keyframes jarDance {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }

  30% {
    transform: rotate(-1.8deg) translateY(-3px);
  }

  64% {
    transform: rotate(1.4deg) translateY(2px);
  }
}

@keyframes lidWiggle {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }

  42% {
    transform: rotate(-4deg) translateY(-4px);
  }

  58% {
    transform: rotate(3deg) translateY(-2px);
  }
}

@keyframes noteFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-12deg);
  }

  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes wishPop {
  0% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.035) rotate(-0.8deg);
    box-shadow: 0 28px 72px rgba(255, 95, 135, 0.2);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes textFlip {
  0% {
    opacity: 0;
    transform: translateY(14px) rotate(1.4deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes wishSpark {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--move-x)), var(--move-y)) rotate(var(--spin)) scale(0.72);
  }
}

.gift-wheel-section {
  padding-top: clamp(24px, 5vw, 58px);
}

.gift-wheel-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
}

.gift-wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.gift-wheel {
  position: relative;
  --label-radius: clamp(112px, 30vw, 158px);
  --wheel-counter-rotation: 0deg;
  width: min(500px, 86vw);
  aspect-ratio: 1;
  border: 12px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 13%, transparent 13.5%),
    conic-gradient(
      from -22.5deg,
      #ff5f87 0deg 45deg,
      #ffc857 45deg 90deg,
      #36c8b5 90deg 135deg,
      #6b5bd6 135deg 180deg,
      #ff9f43 180deg 225deg,
      #f45b69 225deg 270deg,
      #8bd66b 270deg 315deg,
      #58a6ff 315deg 360deg
    );
  box-shadow: var(--shadow);
  transition: transform 4.8s cubic-bezier(0.12, 0.78, 0.12, 1);
}

.gift-wheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.62) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.62) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  transform: rotate(22.5deg);
}

.gift-wheel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.gift-wheel span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: clamp(82px, 20vw, 112px);
  min-height: 76px;
  padding: 6px 4px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  color: #fff;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  text-align: center;
  text-shadow: 0 2px 12px rgba(44, 32, 48, 0.34);
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateY(calc(0px - var(--label-radius)))
    rotate(var(--counter-angle))
    rotate(var(--wheel-counter-rotation));
  transform-origin: center;
  transition: transform 4.8s cubic-bezier(0.12, 0.78, 0.12, 1);
  pointer-events: none;
}

.gift-wheel strong {
  display: block;
  width: 100%;
  max-width: 11ch;
  font-size: clamp(0.58rem, 1.18vw, 0.82rem);
  line-height: 1.04;
  text-transform: uppercase;
}

.gift-wheel-hub {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(82px, 16vw, 118px);
  aspect-ratio: 1;
  border: 8px solid #fff;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(44, 32, 48, 0.18);
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.gift-wheel-pointer {
  position: absolute;
  top: 14px;
  z-index: 4;
  width: 0;
  height: 0;
  border-left: 23px solid transparent;
  border-right: 23px solid transparent;
  border-top: 58px solid var(--ink);
  filter: drop-shadow(0 8px 12px rgba(44, 32, 48, 0.22));
}

.gift-wheel-panel {
  position: relative;
  min-height: 284px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 42px);
  border: 2px solid rgba(44, 32, 48, 0.11);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gift-wheel-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(54, 200, 181, 0.42);
  border-radius: 8px;
  pointer-events: none;
}

.gift-wheel-panel > * {
  position: relative;
  z-index: 1;
}

.gift-wheel-panel.is-revealed {
  animation: wishPop 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gift-wheel-panel__label {
  margin: 0 0 12px;
  color: var(--violet);
  font-weight: 850;
}

.gift-wheel-panel__result {
  min-height: 120px;
  margin: 0 0 26px;
  font-size: clamp(1.28rem, 2.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.35;
}

.gift-wheel-summary {
  margin-top: 22px;
  padding: 18px;
  border: 2px dashed rgba(184, 47, 90, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 239, 0.96), rgba(255, 255, 255, 0.96)),
    var(--paper);
  box-shadow: 0 14px 32px rgba(184, 47, 90, 0.12);
}

.gift-wheel-summary__title {
  margin: 0 0 10px;
  color: var(--berry);
  font-weight: 900;
}

.gift-wheel-summary ul {
  margin: 0;
  padding-left: 22px;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.6;
}

.gift-wheel-summary li::marker {
  color: var(--rose);
}

.photo-story {
  padding-top: clamp(24px, 5vw, 58px);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.photo-card {
  position: relative;
  min-height: 360px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.photo-card--wide {
  grid-row: span 2;
  min-height: 740px;
}

.photo-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 38%, rgba(44, 32, 48, 0.78) 100%);
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(20px, 4vw, 34px);
  color: #fff;
}

.photo-card span {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
}

.photo-card p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.5;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.reason-grid article {
  min-height: 220px;
  padding: 26px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(44, 32, 48, 0.08);
}

.reason-grid span {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 30px;
  border-radius: 50%;
  background: var(--mint);
  color: #083b35;
  font-weight: 900;
}

.reason-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.finale {
  width: 100%;
  margin: 0;
  padding-inline: max(18px, calc((100% - 1120px) / 2));
  background:
    linear-gradient(135deg, rgba(255, 95, 135, 0.94), rgba(255, 200, 87, 0.95)),
    #ff9f43;
}

.finale h2,
.finale p {
  max-width: 820px;
}

.finale p:not(.eyebrow) {
  margin: 22px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.6;
}

.finale .eyebrow {
  color: #5e1430;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

@media (max-width: 820px) {
  .hero {
    min-height: 94vh;
    align-items: end;
  }

  .hero__image {
    object-position: 60% center;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(255, 248, 239, 0.98) 0%, rgba(255, 248, 239, 0.84) 48%, rgba(255, 248, 239, 0.18) 100%);
  }

  .hero__content {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 44vh 0 52px;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .wish-layout,
  .gift-wheel-layout,
  .photo-grid,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .gift-wheel-stage {
    min-height: 420px;
  }

  .gift-wheel-pointer {
    top: 4px;
  }

  .photo-card,
  .photo-card--wide {
    min-height: 430px;
  }

  .wish-jar {
    min-height: 320px;
  }

  .poem-card::before {
    width: 58px;
  }
}

@media (max-width: 480px) {
  .hero__actions,
  .button {
    width: 100%;
  }

  .button {
    padding-inline: 14px;
  }

  .poem-section,
  .wish-lab,
  .gift-wheel-section,
  .photo-story,
  .reasons {
    width: min(100% - 28px, 1120px);
  }

  .gift-wheel-stage {
    min-height: 350px;
  }

  .gift-wheel {
    --label-radius: clamp(98px, 30vw, 128px);
    width: min(330px, 90vw);
    border-width: 8px;
  }

  .gift-wheel span {
    width: 76px;
    min-height: 58px;
    padding: 3px 2px;
    font-size: 1.05rem;
  }

  .gift-wheel strong {
    max-width: 10ch;
    font-size: 0.54rem;
  }

  .photo-card,
  .photo-card--wide {
    min-height: 380px;
  }
}
