
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --ink: #090507;
  --wine: #270813;
  --red: #a91f45;
  --pink: #ff829f;
  --soft: #f3dce3;
  --muted: #c9aeb8;
}

body {
  background: var(--ink);
  color: #fff4f6;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

section {
  padding: 105px 8%;
  position: relative;
}

.hidden {
  display: none !important;
}

/* BACKGROUND GLOW */

.background-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  left: 25%;
  top: 18%;
  background: #a00035;
  filter: blur(170px);
  opacity: .22;
  pointer-events: none;
  z-index: -2;
}

/* SPARKLES, FLOWER PETALS AND HEARTS */

#sparkles-container,
#petals-container,
#hearts-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

#sparkles-container {
  z-index: 20;
}

#petals-container {
  z-index: 15;
}

#hearts-container {
  z-index: 14;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 14px #ff7eaa, 0 0 24px #ff285f;
  animation: twinkle var(--duration, 3s) ease-in-out var(--delay, 0s) infinite;
}

.sparkle.star {
  width: 7px;
  height: 7px;
  background: transparent;
  border-radius: 0;
}

.sparkle.star::before {
  content: "✦";
  position: absolute;
  color: #ffd8e3;
  font-size: 11px;
  top: -7px;
  left: -4px;
  text-shadow: 0 0 9px #ff6d99;
}

@keyframes twinkle {
  0%, 100% {
    opacity: .15;
    transform: scale(.55) rotate(0);
  }

  50% {
    opacity: 1;
    transform: scale(1.65) rotate(45deg);
  }
}

.petal {
  position: absolute;
  top: -45px;
  color: #f5a2b8;
  opacity: .9;
  text-shadow: 0 0 10px #ff6b91;
  animation: petalFall var(--fall-time, 9s) linear forwards;
}

@keyframes petalFall {
  0% {
    transform: translate3d(0,-5vh,0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: .95;
  }

  100% {
    transform: translate3d(var(--drift, 80px),110vh,0) rotate(720deg);
    opacity: 0;
  }
}

.heart {
  position: absolute;
  bottom: -35px;
  color: #ff547d;
  text-shadow: 0 0 12px #ff315f;
  animation: floatUp var(--float-time, 8s) linear forwards;
}

@keyframes floatUp {
  to {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* MUSIC BUTTON */

.music-button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  background: #8d1234;
  border: 1px solid #ff8ba8;
  box-shadow: 0 0 22px #ff174d55;
  font-size: 20px;
}

/* NAVIGATION */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  padding: 18px 70px 18px 18px;
  background: #10070beF;
  border-bottom: 1px solid #552033;
  backdrop-filter: blur(12px);
}

.navbar a {
  color: #f3cbd5;
  text-decoration: none;
  font-size: 12px;
  transition: .25s;
}

.navbar a:hover {
  color: var(--pink);
}

/* OPENING SCREEN */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 90px 7% 70px;
  background: #10050a;
}

.hero-photo-wrap {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;

  opacity: 1;
  filter: brightness(1.25);

  animation: portraitReveal 2s ease both, slowZoom 22s ease-in-out infinite alternate;
}

@keyframes portraitReveal {
  from {
    opacity: 0;
    transform: scale(1.08);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slowZoom {
  to {
    transform: scale(1.08);
  }
}

.hero-photo-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9,3,7,.82), rgba(13,3,8,.43) 50%, rgba(9,3,7,.78)),
    linear-gradient(0deg, #090507 0%, transparent 38%, rgba(10,2,7,.2));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #ffb3c044;
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  width: min(760px, 100%);
  position: relative;
  z-index: 2;
  animation: fadeUp 1.2s ease both;
}

.eyebrow {
  color: #ff9bb2;
  letter-spacing: 4px;
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-kicker {
  color: #f8dce4;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 20px;
  margin-bottom: 14px;
}

.hero h1 {
  font: 400 clamp(43px, 7vw, 82px)/1.15 "Playfair Display", serif;
  text-shadow: 0 4px 30px #000;
}

.hero h1 span {
  color: #ff8aa5;
  font-style: italic;
}

.hero-description {
  max-width: 540px;
  margin: 22px auto 30px;
  color: #f1dce2;
  line-height: 1.9;
  font-size: 14px;
}

.main-button {
  color: white;
  border: 1px solid #ff9bb2;
  border-radius: 40px;
  padding: 14px 30px;
  cursor: pointer;
  background: linear-gradient(135deg, #bd3158, #690d2b);
  box-shadow: 0 0 25px #d51b5544;
  transition: transform .25s, box-shadow .25s;
}

.main-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 35px #ff477b88;
}

.main-button span {
  margin-left: 8px;
}

.scroll-hint {
  margin-top: 28px;
  font-size: 11px;
  color: #e2c0ca;
  letter-spacing: 1px;
}

.birthday-reveal {
  display: none;
  margin: 32px auto 0;
  padding: 25px;
  background: #12060bbd;
  border: 1px solid #a74663;
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.birthday-reveal.show {
  display: block;
  animation: fadeUp .8s ease both;
}

.reveal-label {
  font-size: 9px;
  letter-spacing: 3px;
  color: #ff9bb2;
  margin-bottom: 12px;
}

.birthday-reveal h2 {
  font: 400 clamp(24px,4vw,34px) "Playfair Display",serif;
  color: #ffd6e0;
  margin-bottom: 12px;
}

.birthday-reveal p:not(.reveal-label) {
  color: #e8cbd4;
  line-height: 1.8;
  font-size: 13px;
  margin-bottom: 20px;
}

.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  height: 110px;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, var(--ink));
}

/* SECTION HEADINGS */

.section-heading {
  max-width: 680px;
  text-align: center;
  margin: 0 auto 48px;
}

.section-heading h2 {
  font: 400 clamp(32px,5vw,49px) "Playfair Display",serif;
  margin-bottom: 15px;
}

.section-heading h2 span {
  color: #ff8aa5;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

/* GALLERY SECTIONS */

.birthday-section {
  background: linear-gradient(180deg,#10070b,#170811);
  text-align: center;
}

.chaos-section {
  background: #0b0709;
  text-align: center;
}

.universe-section {
  background: linear-gradient(180deg,#170811,#0c070a);
  text-align: center;
}

.gallery {
  display: grid;
  gap: 24px;
  max-width: 1120px;
  margin: auto;
}

.three-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.chaos-grid {
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.universe-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.photo-card {
  margin: 0;
  padding: 11px;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg,#2a101b,#12080d);
  border: 1px solid #5d263a;
  transition: .35s;
  box-shadow: 0 10px 30px #0004;
}

.photo-card:hover {
  transform: translateY(-7px);
  border-color: #f17a9b;
  box-shadow: 0 14px 35px #e52c6040;
}

.photo-card img,
.photo-card video {
  display: block;
  width: 100%;
  height: 290px;
  object-fit: cover;
  border-radius: 8px;
  background: #080406;
}

.chaos-grid .photo-card img {
  height: 235px;
}

.video-card video {
  object-fit: contain;
}

.photo-card figcaption {
  padding: 15px 5px 8px;
  color: #f2cbd6;
  font-size: 12px;
  line-height: 1.6;
}

.section-footnote {
  margin: 38px auto 0;
  color: #e18ba3;
  font: italic 19px "Playfair Display",serif;
}

/* LETTER AND ENVELOPE */

.letter-section {
  text-align: center;
  background: #0b0709;
}

.envelope-container {
  display: block;
  position: relative;
  width: min(330px,85vw);
  height: 225px;
  margin: 100px auto 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: #650d2a;
  border-radius: 5px;
}

.letter-paper {
  position: absolute;
  z-index: 2;
  left: 5%;
  top: 10px;
  width: 90%;
  height: 190px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: auto;
  text-align: left;
  color: #54172b;
  background: #fff0e9;
  border-radius: 4px;
  transition: transform .9s ease, height .9s ease;
}

.letter-paper strong {
  font: 600 17px "Playfair Display",serif;
}

.letter-paper span {
  font-size: 11px;
  line-height: 1.8;
}

.letter-paper .letter-signoff {
  font-size: 15px;
}

.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #ad2149;
  clip-path: polygon(0 0,50% 56%,100% 0,100% 100%,0 100%);
}

.envelope-flap {
  position: absolute;
  z-index: 4;
  top: 0;
  width: 100%;
  height: 56%;
  background: #d34a70;
  clip-path: polygon(0 0,100% 0,50% 100%);
  transform-origin: top;
  transition: transform .7s ease;
}

.envelope-heart {
  position: absolute;
  z-index: 5;
  top: 42%;
  left: 46%;
  color: white;
  font-size: 30px;
}

.envelope-container.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-container.open .envelope-heart {
  display: none;
}

.envelope-container.open .letter-paper {
  transform: translateY(-185px);
  height: 390px;
}

.click-hint {
  color: #ff9bb2;
  font-size: 12px;
  margin-top: 22px;
}

/* BLESSINGS */

.blessings-section {
  background: #140910;
  text-align: center;
}

.blessing-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 850px;
  margin: auto;
}

.blessing-card {
  width: 145px;
  height: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #a64a67;
  border-radius: 13px;
  background: linear-gradient(145deg,#351321,#1b0a12);
  color: #f8dce4;
  cursor: pointer;
  transition: .3s;
}

.blessing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px #ff477b44;
  border-color: #ff91ad;
}

.blessing-card span {
  color: #ff8eaa;
  font: 22px "Playfair Display",serif;
}

.blessing-card b {
  font-size: 10px;
  font-weight: 400;
}

.blessing-card i {
  color: #ffc3d1;
  font-style: normal;
}

.blessing-message {
  min-height: 85px;
  max-width: 700px;
  margin: 35px auto 0;
  color: #ffd0dc;
  font: 21px/1.8 "Playfair Display",serif;
  padding: 12px;
}

/* FINAL SURPRISE */

.final-section {
  min-height: 85vh;
  padding: 110px 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at center,#450d24,#090507 70%);
}

.final-section h2 {
  font: 400 clamp(34px,6vw,60px)/1.25 "Playfair Display",serif;
  margin-bottom: 22px;
}

.final-section h2 span {
  color: #ff8aa5;
  font-style: italic;
}

.final-section > p:not(.eyebrow) {
  max-width: 560px;
  color: #e6c7d0;
  line-height: 1.9;
  margin-bottom: 30px;
  font-size: 13px;
}

.final-message {
  display: none;
  max-width: 680px;
  margin: 38px auto 0;
}

.final-message.show {
  display: block;
  animation: fadeUp .9s ease both;
}

.final-message h2 {
  color: #ffb0c2;
  margin: 18px 0;
}

.final-message p {
  color: #f0d4dc;
  line-height: 2;
}

.final-stars {
  color: #ffc0d0;
  font-size: 26px;
}

.big-heart {
  color: #ff7898;
  font-size: 58px;
  margin: 18px;
  animation: heartbeat 1.4s infinite;
}

.final-message h3 {
  font: italic 20px "Playfair Display",serif;
  margin: 10px;
}

.final-signature {
  color: #ff9bb2 !important;
  font: italic 24px "Playfair Display",serif;
}

/* FOOTER */

footer {
  padding: 28px;
  text-align: center;
  color: #a98b95;
  font-size: 11px;
  line-height: 2;
  background: #070406;
}

/* ANIMATIONS */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartbeat {
  0%,100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

/* TABLET RESPONSIVENESS */

@media (max-width: 850px) {
  section {
    padding: 85px 6%;
  }

  .chaos-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .photo-card img,
  .photo-card video {
    height: 240px;
  }

  .chaos-grid .photo-card img {
    height: 220px;
  }

  .navbar {
    gap: 14px;
  }
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 580px) {
  .hero {
    padding: 90px 6% 70px;
  }

  .hero-photo {
    object-position: 58% center;
  }

  .hero-photo-shade {
    background:
      linear-gradient(90deg,#090507bb,#09050766),
      linear-gradient(0deg,#090507 0%,transparent 70%);
  }

  .navbar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 16px 60px 16px 12px;
    gap: 17px;
  }

  .navbar a {
    font-size: 10px;
  }

  .three-grid,
  .chaos-grid,
  .universe-grid {
    grid-template-columns: 1fr;
    max-width: 390px;
  }

  .photo-card img,
  .photo-card video,
  .chaos-grid .photo-card img {
    height: 310px;
  }

  .blessing-card {
    width: 112px;
    height: 112px;
  }

  .blessing-message {
    font-size: 18px;
  }

  .envelope-container.open .letter-paper {
    transform: translateY(-175px);
    height: 365px;
  }
}
