:root {
  --ink: #171126;
  --plum: #2b163c;
  --night: #100d24;
  --rose: #e4839f;
  --rose-light: #f4b6c6;
  --gold: #f1c984;
  --cream: #fff9f1;
  --paper: #fffaf4;
  --muted: #a99db2;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --script: "Great Vibes", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--night);
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

::selection {
  color: white;
  background: var(--rose);
}

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

.eyebrow {
  margin: 0 0 18px;
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.intro {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 28px;
  color: var(--cream);
  text-align: center;
  background:
    linear-gradient(rgba(14, 9, 31, 0.38), rgba(14, 9, 31, 0.75)),
    url("assets/birthday-night.png") center / cover;
  transition:
    opacity 1s ease 0.75s,
    visibility 1s ease 0.75s;
}

.intro::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0, rgba(12, 7, 25, 0.22) 50%, rgba(8, 5, 18, 0.65) 100%),
    linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.04) 50%, transparent 58%);
}

.intro.is-opening {
  opacity: 0;
  visibility: hidden;
}

.intro__glow {
  position: absolute;
  width: min(600px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(234, 128, 157, 0.13);
  filter: blur(70px);
  animation: breathe 4s ease-in-out infinite;
}

.intro__content {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
}

.intro h1 {
  max-width: 600px;
  margin: 32px auto 8px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.04;
  text-wrap: balance;
}

.intro__hint {
  margin: 0 0 26px;
  color: rgba(255, 249, 241, 0.64);
  font-size: 0.84rem;
}

.primary-button,
.wish-button {
  position: relative;
  display: inline-flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 16px 24px;
  overflow: hidden;
  color: #2b162b;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(120deg, #f9d4dc, #efb9c7 48%, #f4d898);
  box-shadow: 0 12px 40px rgba(229, 130, 159, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-button::before,
.wish-button::before {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: shimmer 4s ease-in-out infinite 2s;
}

.primary-button:hover,
.wish-button:hover {
  box-shadow: 0 16px 48px rgba(229, 130, 159, 0.38);
  transform: translateY(-3px);
}

.primary-button:focus-visible,
.wish-button:focus-visible,
.envelope:focus-visible,
.sound-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.envelope {
  position: relative;
  display: block;
  width: 214px;
  height: 148px;
  margin: 20px auto 36px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  filter: drop-shadow(0 18px 30px rgba(4, 1, 12, 0.35));
  animation: envelope-float 3.5s ease-in-out infinite;
}

.envelope__back,
.envelope__front,
.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

.envelope__back {
  background: #e9b8c5;
}

.envelope__paper {
  position: absolute;
  z-index: 1;
  right: 17px;
  bottom: 15px;
  left: 17px;
  height: 112px;
  display: grid;
  place-items: center;
  color: #7b4358;
  font-family: var(--serif);
  font-size: 0.82rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
    repeating-linear-gradient(0deg, transparent, transparent 20px, #e8d8cf 21px);
  border-radius: 4px;
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.envelope__front {
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(145deg, #efc5cf, #dda0b1);
  clip-path: polygon(0 15%, 50% 58%, 100% 15%, 100% 100%, 0 100%);
}

.envelope__flap {
  z-index: 3;
  background: linear-gradient(160deg, #f3cbd3, #e5aebd);
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.envelope__seal {
  position: absolute;
  z-index: 4;
  top: 67px;
  left: 87px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffdfdf;
  font-size: 1.05rem;
  border-radius: 50%;
  background: #a94f6a;
  box-shadow: 0 4px 10px rgba(65, 20, 39, 0.28);
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.intro.is-opening .envelope {
  animation: none;
}

.intro.is-opening .envelope__flap {
  transform: rotateX(180deg);
}

.intro.is-opening .envelope__paper {
  transform: translateY(-70px);
}

.intro.is-opening .envelope__seal {
  opacity: 0;
  transform: scale(0.6);
}

.experience {
  visibility: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}

.experience.is-visible {
  visibility: visible;
  opacity: 1;
}

.sound-toggle {
  position: fixed;
  z-index: 50;
  top: 22px;
  right: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(15, 9, 30, 0.52);
  box-shadow: 0 8px 30px rgba(5, 2, 14, 0.18);
  backdrop-filter: blur(15px);
}

.sound-toggle__bars {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 14px;
}

.sound-toggle__bars i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: var(--rose-light);
  animation: soundbar 0.8s ease-in-out infinite alternate;
}

.sound-toggle__bars i:nth-child(2) {
  height: 11px;
  animation-delay: -0.4s;
}

.sound-toggle__bars i:nth-child(3) {
  height: 8px;
  animation-delay: -0.65s;
}

.sound-toggle__bars i:nth-child(4) {
  animation-delay: -0.2s;
}

.sound-toggle.is-muted .sound-toggle__bars i {
  height: 2px;
  animation: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  color: var(--cream);
  text-align: center;
  background:
    linear-gradient(rgba(13, 8, 29, 0.16), rgba(13, 8, 29, 0.54)),
    url("assets/birthday-night.png") center / cover fixed;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 18%, rgba(8, 4, 20, 0.12) 64%, rgba(8, 4, 20, 0.58) 100%),
    linear-gradient(to bottom, rgba(10, 6, 23, 0.16), transparent 35%, rgba(10, 6, 23, 0.62));
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(930px, calc(100% - 42px));
  padding: 110px 0 120px;
}

.hero__kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: clamp(0.66rem, 1.5vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero__script {
  margin: 0 0 -8px;
  color: var(--rose-light);
  font-family: var(--script);
  font-size: clamp(3.8rem, 10vw, 8.4rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: 0 10px 40px rgba(219, 113, 150, 0.24);
}

.hero h2 {
  margin: 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
  text-shadow: 0 15px 60px rgba(4, 2, 13, 0.28);
}

.hero__message {
  max-width: 610px;
  margin: 30px auto 26px;
  color: rgba(255, 249, 241, 0.78);
  font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.32rem);
  font-style: italic;
  line-height: 1.7;
  text-wrap: balance;
}

.hero__date {
  display: inline-flex;
  padding: 10px 19px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(241, 201, 132, 0.34);
  border-radius: 999px;
  background: rgba(22, 13, 42, 0.2);
  backdrop-filter: blur(8px);
}

.reveal-item {
  opacity: 0;
  transform: translateY(28px);
}

.experience.is-visible .reveal-item {
  animation: reveal-up 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.experience.is-visible .reveal-item:nth-child(2) {
  animation-delay: 0.16s;
}

.experience.is-visible .reveal-item:nth-child(3) {
  animation-delay: 0.3s;
}

.experience.is-visible .reveal-item:nth-child(4) {
  animation-delay: 0.46s;
}

.experience.is-visible .reveal-item:nth-child(5) {
  animation-delay: 0.58s;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 24px;
  left: 50%;
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 23px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 16px;
}

.scroll-cue i::after {
  position: absolute;
  top: 7px;
  left: 9px;
  width: 3px;
  height: 7px;
  content: "";
  border-radius: 3px;
  background: var(--rose-light);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

.floating-heart {
  position: absolute;
  z-index: 1;
  bottom: -40px;
  color: rgba(245, 180, 199, 0.32);
  font-size: var(--size);
  animation: heart-rise var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.section {
  position: relative;
  padding: clamp(90px, 12vw, 170px) 24px;
}

.section-heading {
  max-width: 850px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.section-heading > p:last-child {
  max-width: 590px;
  margin: 25px auto 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-heading--light h2 {
  color: var(--cream);
}

.section-heading--light > p:last-child {
  color: rgba(255, 249, 241, 0.58);
}

.letter-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 20%, rgba(229, 131, 160, 0.16), transparent 27%),
    radial-gradient(circle at 90% 80%, rgba(241, 201, 132, 0.14), transparent 24%),
    #f8f0e8;
}

.letter-section::before,
.letter-section::after {
  position: absolute;
  width: 260px;
  height: 260px;
  content: "";
  opacity: 0.35;
  border: 1px solid #d9a2b4;
  border-radius: 50%;
}

.letter-section::before {
  top: 80px;
  left: -180px;
  box-shadow: 0 0 0 30px transparent, 0 0 0 31px #d9a2b4;
}

.letter-section::after {
  right: -190px;
  bottom: 50px;
  box-shadow: 0 0 0 30px transparent, 0 0 0 31px #d9a2b4;
}

.letter-card {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px);
  background:
    linear-gradient(rgba(255, 251, 245, 0.96), rgba(255, 251, 245, 0.96)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(107, 73, 87, 0.08) 32px);
  border: 1px solid rgba(93, 53, 71, 0.09);
  box-shadow: 0 35px 80px rgba(87, 49, 62, 0.13);
  transform: rotate(-0.45deg);
}

.letter-card::before {
  position: absolute;
  inset: 16px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(195, 121, 145, 0.18);
}

.letter-card__salutation {
  margin: 0 0 35px;
  color: #7e4056;
  font-family: var(--script);
  font-size: clamp(2.3rem, 6vw, 4rem);
}

.letter-card [data-letter-body] p {
  margin: 0 0 24px;
  color: #514450;
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.9;
}

.letter-card__signature {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 42px;
  color: #8e7d85;
  font-family: var(--serif);
  font-style: italic;
}

.letter-card__signature strong {
  color: #9d4d68;
  font-family: var(--script);
  font-size: 2.6rem;
  font-weight: 400;
}

.letter-card__sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 1.8rem;
  animation: twinkle 2.4s ease-in-out infinite;
}

.letter-card__sparkle--one {
  top: 24px;
  right: 28px;
}

.letter-card__sparkle--two {
  bottom: 25px;
  left: 32px;
  animation-delay: -1.2s;
}

.memories-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0, rgba(174, 89, 124, 0.19), transparent 31%),
    #171027;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.memory-card {
  position: relative;
  margin: 0;
  padding: 13px 13px 25px;
  color: var(--ink);
  background: #fffaf3;
  box-shadow: 0 25px 70px rgba(3, 1, 11, 0.42);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.memory-card:hover {
  z-index: 3;
  box-shadow: 0 35px 90px rgba(3, 1, 11, 0.55);
  transform: rotate(0) translateY(-12px) scale(1.03);
}

.memory-card--left {
  transform: rotate(-5deg);
}

.memory-card--center {
  transform: translateY(-28px) rotate(2deg);
}

.memory-card--right {
  transform: rotate(5deg);
}

.memory-card__photo {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 5;
  place-items: center;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(18, 10, 35, 0.12), rgba(18, 10, 35, 0.28)),
    url("assets/birthday-night.png");
  background-size: auto, 295%;
  background-repeat: no-repeat;
  transition: background-size 0.7s ease;
}

.memory-card:hover .memory-card__photo {
  background-size: auto, 320%;
}

.photo-one {
  background-position: center, 10% 82%;
}

.photo-two {
  background-position: center, 88% 10%;
}

.photo-three {
  background-position: center, 50% 55%;
}

.memory-card__photo.has-photo {
  background-position: center;
  background-size: cover;
}

.memory-card:hover .memory-card__photo.has-photo {
  background-size: cover;
}

.photo-placeholder {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--serif);
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(21, 11, 40, 0.22);
  backdrop-filter: blur(8px);
}

.has-photo .photo-placeholder {
  display: none;
}

.memory-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 10px 0;
  text-align: center;
}

.memory-card figcaption strong {
  color: #71384d;
  font-family: var(--script);
  font-size: 2rem;
  font-weight: 400;
}

.memory-card figcaption span {
  color: #8e7f85;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-style: italic;
}

.reasons-section {
  overflow: hidden;
  color: var(--cream);
  background:
    linear-gradient(rgba(24, 14, 42, 0.88), rgba(24, 14, 42, 0.95)),
    url("assets/birthday-night.png") center / cover fixed;
}

.reasons__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(3px);
}

.reasons__orb--one {
  top: 15%;
  left: -100px;
  width: 260px;
  height: 260px;
  background: rgba(225, 113, 151, 0.1);
  box-shadow: 0 0 100px rgba(225, 113, 151, 0.24);
}

.reasons__orb--two {
  right: -80px;
  bottom: 10%;
  width: 200px;
  height: 200px;
  background: rgba(241, 201, 132, 0.09);
  box-shadow: 0 0 90px rgba(241, 201, 132, 0.2);
}

.reasons-list {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.reason {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  transition: padding-left 0.3s ease, background 0.3s ease;
}

.reason:hover {
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(229, 131, 160, 0.08), transparent);
}

.reason span {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.reason p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
}

.wish-section {
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 42%, rgba(127, 58, 100, 0.3), transparent 30%),
    linear-gradient(#130d28, #0b091a);
}

.wish-card {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  text-align: center;
}

.wish-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 9vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.wish-card__copy {
  margin: 12px auto 26px;
  color: rgba(255, 249, 241, 0.61);
  font-size: 0.9rem;
}

.cake {
  position: relative;
  width: 230px;
  height: 185px;
  margin: 48px auto 20px;
}

.cake__plate {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(#d8cad9, #9d8da8);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.25);
}

.cake__layer {
  position: absolute;
  left: 20px;
  width: 190px;
  background: linear-gradient(90deg, #d97f9d, #f0aabd 46%, #c9678b);
  box-shadow: inset -18px 0 25px rgba(96, 29, 61, 0.16);
}

.cake__layer--one {
  bottom: 14px;
  height: 62px;
  border-radius: 5px 5px 16px 16px;
}

.cake__layer--two {
  bottom: 75px;
  left: 42px;
  width: 146px;
  height: 50px;
  border-radius: 5px 5px 12px 12px;
  background: linear-gradient(90deg, #f0c1cb, #ffe3df 46%, #dea0b4);
}

.cake__top {
  position: absolute;
  z-index: 2;
  bottom: 118px;
  left: 42px;
  width: 146px;
  height: 22px;
  border-radius: 50%;
  background: #ffe8e2;
  box-shadow: inset 0 -5px 7px rgba(177, 98, 123, 0.13);
}

.cake__candles {
  position: absolute;
  z-index: 3;
  bottom: 133px;
  left: 68px;
  display: flex;
  gap: 29px;
}

.cake__candles span {
  position: relative;
  display: block;
  width: 8px;
  height: 34px;
  border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(45deg, #f2b84b 0 5px, #f8e3a5 5px 9px);
}

.cake__candles i {
  position: absolute;
  top: -19px;
  left: -3px;
  width: 14px;
  height: 20px;
  border-radius: 50% 50% 45% 45%;
  background: #ffcf69;
  box-shadow: 0 0 13px #ff9f45, 0 0 28px rgba(255, 174, 80, 0.7);
  transform-origin: center bottom;
  animation: flame 0.85s ease-in-out infinite alternate;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cake.is-blown .cake__candles i {
  opacity: 0;
  transform: translateY(-8px) scale(0.1);
}

.final-message {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows 0.8s ease, opacity 0.8s ease, margin 0.8s ease;
}

.final-message > * {
  min-height: 0;
}

.final-message.is-visible {
  grid-template-rows: auto;
  margin-top: 38px;
  opacity: 1;
}

.final-message span {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.final-message strong {
  display: block;
  margin: 10px 0;
  color: var(--rose-light);
  font-family: var(--script);
  font-size: clamp(3rem, 8vw, 5.3rem);
  font-weight: 400;
}

.final-message strong i {
  font-style: normal;
}

.final-message p {
  margin: 0;
  color: rgba(255, 249, 241, 0.7);
  font-family: var(--serif);
  font-style: italic;
}

footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 25px 20px;
  color: rgba(255, 249, 241, 0.42);
  font-size: 0.72rem;
  background: #090716;
}

footer i {
  color: var(--rose);
}

.observe {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.observe.is-in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes breathe {
  0%,
  100% { transform: scale(0.88); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes envelope-float {
  0%,
  100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes shimmer {
  0%,
  55% { left: -120%; }
  78%,
  100% { left: 150%; }
}

@keyframes soundbar {
  to { height: 13px; }
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

@keyframes heart-rise {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  10% { opacity: 1; }
  85% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-110vh) rotate(80deg); }
}

@keyframes twinkle {
  0%,
  100% { opacity: 0.25; transform: scale(0.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.2) rotate(25deg); }
}

@keyframes flame {
  from { transform: rotate(-4deg) scaleY(0.94); }
  to { transform: rotate(5deg) scaleY(1.08); }
}

@media (max-width: 780px) {
  .hero {
    background-attachment: scroll;
    background-position: 58% center;
  }

  .reasons-section {
    background-attachment: scroll;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    width: min(370px, 100%);
    gap: 46px;
  }

  .memory-card--left,
  .memory-card--center,
  .memory-card--right {
    transform: rotate(0);
  }

  .memory-card--left {
    transform: rotate(-2deg);
  }

  .memory-card--right {
    transform: rotate(2deg);
  }

  .memory-card:hover {
    transform: translateY(-8px);
  }

  .letter-card {
    transform: none;
  }

  .scroll-cue span {
    display: none;
  }
}

@media (max-width: 520px) {
  .intro {
    padding: 24px 20px;
  }

  .envelope {
    width: 184px;
    height: 126px;
    margin-bottom: 30px;
  }

  .envelope__seal {
    top: 57px;
    left: 74px;
    width: 38px;
    height: 38px;
  }

  .intro h1 {
    margin-top: 22px;
  }

  .sound-toggle {
    top: 14px;
    right: 14px;
    padding: 10px 12px;
  }

  .sound-toggle__label {
    display: none;
  }

  .hero__content {
    padding-top: 90px;
  }

  .section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .section-heading br {
    display: none;
  }

  .letter-card {
    padding: 50px 30px;
  }

  .reason {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }

  footer {
    flex-wrap: wrap;
  }
}

@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;
  }

  .floating-heart {
    display: none;
  }
}
