:root {
  color-scheme: light;
  --paper: #fdf8f5;
  --ink: #3d202b;
  --soft-ink: #745362;
  --rose: #8f2e4e;
  --line: #ead2da;
  --serif: "Playfair Display", Georgia, serif;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid #a53563; outline-offset: 5px; }
.status { padding: 2rem; text-align: center; }
.top {
  width: min(1170px, calc(100% - 3rem));
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0;
}
.top a { text-decoration: none; }
.top a:hover { color: var(--rose); }
.wordmark { font: 600 1.35rem var(--serif); white-space: nowrap; }
.wordmark span, .section-heading span, footer span { color: #b75373; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2rem); font-size: .9rem; font-weight: 700; }
nav a:last-child { padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 99px; text-align: center; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: center;
  width: min(1240px, calc(100% - 3rem));
  min-height: min(650px, 82vh);
  margin: auto;
  padding: clamp(2rem, 6vw, 6rem);
  border: 1px solid #eed8dd;
  border-radius: 2rem;
  overflow: hidden;
  background: radial-gradient(ellipse at 82% 46%, #fae6de 0%, transparent 45%),
              linear-gradient(135deg, #faeef1, #f2d5df);
}
.hero::after {
  content: "";
  position: absolute;
  inset: .7rem;
  border: 1px solid #fff9;
  border-radius: 1.5rem;
  pointer-events: none;
}
.hero-copy { z-index: 1; }
.dedication { margin: 0 0 .9rem; font: italic 500 clamp(1.4rem, 3vw, 2.1rem) var(--serif); color: var(--rose); }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(3rem, 7vw, 6.6rem); line-height: 1.02; letter-spacing: -.06em; text-wrap: balance; }
.intro { max-width: 32ch; margin: 1.3rem 0 2rem; color: var(--soft-ink); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .75rem 1.15rem; border: 1px solid transparent; border-radius: 99px; text-decoration: none; font-weight: 700; font-size: .9rem; }
.primary { background: #852948; color: white; }
.primary:hover { background: #6f233c; }
.secondary { border-color: #ac7186; color: #702b45; background: #fff5; }
.secondary:hover { background: #fff9; }
.bouquet {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  aspect-ratio: 1;
  border: 1px solid #b873884a;
  border-radius: 48% 48% 46% 46%;
  background: radial-gradient(ellipse at 50% 35%, #fff8f1c9, #f6d2dc50 65%, transparent 75%);
  box-shadow: inset 0 0 0 8px #fff5;
}
.flower { position: absolute; width: 30%; height: 67%; left: var(--x); top: var(--y); transform: rotate(var(--tilt)); transform-origin: 50% 93%; }
.flower-1 { --x: 36%; --y: 8%; --tilt: 2deg; --petal-color: #cf577b; --pale: #f9c7d4; }
.flower-2 { --x: 30%; --y: 15%; --tilt: -36deg; --petal-color: #ad365c; --pale: #f395b0; z-index: 1; }
.flower-3 { --x: 42%; --y: 17%; --tilt: 36deg; --petal-color: #db7e8e; --pale: #ffe1d1; z-index: 1; }
.flower-4 { --x: 33%; --y: 27%; --tilt: -20deg; --petal-color: #e68298; --pale: #ffe7e6; z-index: 2; }
.flower-5 { --x: 40%; --y: 28%; --tilt: 23deg; --petal-color: #a83961; --pale: #eb98af; z-index: 2; }
.stem { position: absolute; left: 49%; top: 31%; width: 5%; height: 66%; border-radius: 100%; background: linear-gradient(90deg, #526353, #8c986e); }
.stem::before, .stem::after { content: ""; position: absolute; width: 650%; height: 23%; background: linear-gradient(145deg, #a2ab7e, #5b735c); border-radius: 0 90% 0 90%; }
.stem::before { right: 42%; top: 31%; transform: rotate(13deg); }
.stem::after { left: 42%; top: 49%; transform: scaleX(-1) rotate(13deg); }
.bloom { position: absolute; width: 100%; aspect-ratio: 1; top: 0; filter: drop-shadow(0 .22rem .3rem #702b4529); }
.bloom i { position: absolute; left: 28%; top: 3%; width: 44%; height: 52%; transform: rotate(calc(var(--petal) * 51.428deg)); transform-origin: 50% 90%; border-radius: 53% 48% 46% 52%; background: repeating-linear-gradient(90deg, #fff0 0 9%, #fffded38 12%, #fff0 18%), radial-gradient(ellipse at 50% 12%, var(--pale), var(--petal-color) 78%); box-shadow: inset 0 1px 0 #fff8; }
.bloom b { position: absolute; inset: 40%; border-radius: 50%; background: radial-gradient(circle, #fff3ca 12%, #d78667 45%, #a85a65 80%); }
.spark { position: absolute; color: #9b4967; font-size: clamp(1rem, 2vw, 2rem); }
.one { top: 24%; left: 14%; }
.two { top: 12%; right: 18%; }
.three { bottom: 23%; right: 15%; }
.memories, .gift { width: min(1100px, calc(100% - 3rem)); margin: clamp(3.5rem, 8vw, 7rem) auto; scroll-margin-top: 2rem; }
.section-heading { text-align: center; margin-bottom: 2rem; }
.section-heading span, .music-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #f8e4eb; margin-bottom: .75rem; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
.section-heading p, .gift-card p { color: var(--soft-ink); line-height: 1.6; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1.15rem; align-items: start; }
.photo, .gallery-empty { border: 1px solid var(--line); border-radius: 1.1rem; background: #fffdfa; }
.gallery-empty { padding: 2rem; text-align: center; color: var(--soft-ink); }
.photo-cover, .photo-frame { width: 100%; aspect-ratio: 4 / 5; border-radius: 1rem; }
.photo-cover { border: 0; cursor: pointer; display: grid; place-content: center; justify-items: center; gap: .65rem; color: var(--rose); background: radial-gradient(ellipse at 50% 36%, #fcf2f2, #f5e1e8); font-weight: 700; }
.photo:nth-child(3n + 2) .photo-cover { background: radial-gradient(ellipse at 50% 36%, #fff7f2, #f6ddd8); }
.photo:nth-child(3n) .photo-cover { background: radial-gradient(ellipse at 50% 36%, #fbf4fb, #eadce9); }
.cover-heart { color: #b34c71; font-size: 2.5rem; transition: transform .25s; }
.photo-cover:hover .cover-heart { transform: scale(1.2) rotate(-8deg); }
.photo-frame { position: relative; perspective: 900px; }
.photo-sides { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s ease; }
.is-flipped .photo-sides { transform: rotateY(180deg); }
.photo-front, .photo-back { position: absolute; inset: 0; overflow: hidden; border-radius: 1rem; backface-visibility: hidden; }
.photo-front { display: grid; place-items: center; background: #f4e6eb; }
.photo-front img { width: 100%; height: 100%; object-fit: contain; position: absolute; animation: appear .65s both; }
.photo-back { transform: rotateY(180deg); background: #2d1821; color: white; }
.photo-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(9px) brightness(.36); transform: scale(1.13); opacity: .8; pointer-events: none; }
.caption-scroll { position: absolute; inset: .8rem .65rem 3.7rem; display: flex; flex-direction: column; overflow: auto; padding: .2rem .45rem; scrollbar-width: thin; }
.caption { margin: auto 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; text-align: center; }
.caption-toggle { position: absolute; inset: 0; width: 100%; display: grid; justify-items: center; align-items: end; padding: .5rem .25rem; border: 0; border-radius: 1rem; background: transparent; cursor: pointer; }
.is-flipped .caption-toggle { inset: auto 0 0; }
.caption-action { display: grid; place-items: center; min-height: 40px; padding: .3rem .65rem; border-radius: 99px; background: #3d202b; color: white; font-size: .875rem; font-weight: 700; }
.burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.burst i { position: absolute; color: #ed87a8; font-style: normal; font-size: 1.65rem; animation: scatter .8s ease-out both; --direction: calc(var(--heart) * 51.428deg); }
@keyframes scatter { from { transform: rotate(var(--direction)) translateY(0) scale(.6); opacity: 1; } to { transform: rotate(var(--direction)) translateY(-6rem) scale(1.2); opacity: 0; } }
@keyframes appear { from { opacity: .25; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }
.gift-card { padding: clamp(2rem, 7vw, 5rem) 1.2rem; text-align: center; border: 1px solid var(--line); border-radius: 1.75rem; background: radial-gradient(ellipse at top, #f6dae5, #f9edf0 75%); }
.music-icon { margin: 0 0 1rem; background: #fff8; color: var(--rose); font-size: 1.5rem; }
.gift-empty { margin-bottom: 0; }
.tracks { max-width: 480px; margin: 1.4rem auto 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.tracks li { display: grid; justify-items: center; gap: .7rem; padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff8; }
audio { width: 100%; }
footer { padding: 1.4rem; border-top: 1px solid var(--line); text-align: center; color: var(--soft-ink); }
@media (max-width: 720px) {
  .top, .hero, .memories, .gift { width: calc(100% - 1.5rem); }
  .top { padding: 1rem .2rem; }
  nav { gap: .65rem; }
  nav a:last-child { padding: .5rem .65rem; }
  .hero { grid-template-columns: 1fr; gap: 1.6rem; min-height: auto; padding: 2.25rem 1.4rem 1.7rem; text-align: center; }
  .intro { margin-inline: auto; }
  .actions { justify-content: center; }
  .bouquet { width: min(70%, 240px); }
}
@media (max-width: 410px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .burst { display: none; }
}
