/* ==========================================================================
   ENEYA — BIRTHDAY WEBSITE
   Mobile-first stylesheet.

   HOW TO CUSTOMISE COLOURS:
   Everything lives in the :root block below. Change a variable once and it
   updates everywhere. Have fun with it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- Core romantic palette --- */
  --c-blush: #ffd9e4;
  --c-rose: #ff8fab;
  --c-rose-deep: #e0577f;
  --c-plum: #6b2d4f;
  --c-plum-soft: #8a4568;
  --c-cream: #fff8f4;
  --c-lilac: #e6d8ff;
  --c-gold: #f4c77b;
  --c-mint: #cdeee0;

  /* --- Surfaces --- */
  --bg-page: #fff6f9;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-solid: #ffffff;
  --border-soft: rgba(224, 87, 127, 0.16);

  /* --- Text --- */
  --text-strong: #4a1f38;
  --text-body: #6b4257;
  --text-muted: #9a7286;
  --text-on-rose: #ffffff;

  /* --- Gradients --- */
  --grad-hero: radial-gradient(
    120% 90% at 50% 0%,
    #ffe6ef 0%,
    #fff6f9 45%,
    #f6ecff 100%
  );
  --grad-btn: linear-gradient(135deg, #ff9dbb 0%, #e0577f 55%, #b83f68 100%);
  --grad-card: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 240, 246, 0.9)
  );
  --grad-gold: linear-gradient(135deg, #ffe3b0, #f4c77b);

  /* --- Shadows --- */
  --shadow-sm: 0 2px 8px rgba(107, 45, 79, 0.06);
  --shadow-md: 0 10px 28px rgba(107, 45, 79, 0.1);
  --shadow-lg: 0 22px 60px rgba(107, 45, 79, 0.16);
  --shadow-glow: 0 12px 40px rgba(224, 87, 127, 0.35);

  /* --- Radii --- */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* --- Typography --- */
  --font-body: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;

  /* --- Spacing --- */
  --space-section: clamp(4rem, 12vw, 8rem);
  --gutter: clamp(1.1rem, 5vw, 2rem);
  --maxw: 1120px;
  --maxw-narrow: 720px;

  /* --- Motion --- */
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.22s;
  --dur-med: 0.45s;
  --dur-slow: 0.9s;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-page);
  overflow-x: hidden; /* prevents horizontal scroll from animations */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: 0.005em;
}

p {
  margin: 0 0 1.15em;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: var(--c-rose-deep);
}

blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--c-rose-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Screen-reader-only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  background: var(--c-rose-deep);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-soft);
}
.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   3. BACKGROUND DECORATION
   -------------------------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  background-attachment: fixed;
}

/* Floating hearts */
.floating-hearts,
.floating-stars {
  position: absolute;
  inset: 0;
}

.heart-float {
  position: absolute;
  bottom: -10vh;
  font-size: var(--size, 18px);
  opacity: 0;
  animation: floatUp var(--dur, 16s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: var(--peak-opacity, 0.55);
  }
  50% {
    transform: translate3d(var(--drift, 20px), -55vh, 0) rotate(18deg) scale(1);
  }
  90% {
    opacity: var(--peak-opacity, 0.55);
  }
  100% {
    transform: translate3d(calc(var(--drift, 20px) * -1), -115vh, 0)
      rotate(-12deg) scale(0.9);
    opacity: 0;
  }
}

/* Twinkling stars */
.star-float {
  position: absolute;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  50% {
    opacity: var(--peak-opacity, 0.9);
    transform: scale(1.15);
  }
}

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

/* --------------------------------------------------------------------------
   4. SCROLL PROGRESS BAR
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 70;
  background: transparent;
}
.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--grad-btn);
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   5. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: var(--space-section) var(--gutter);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}
.container--narrow {
  max-width: var(--maxw-narrow);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.section__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-rose-deep);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.section__title {
  font-size: clamp(1.9rem, 1.3rem + 3.2vw, 3.1rem);
  margin-bottom: 0.5rem;
}

.section__subtitle {
  color: var(--text-muted);
  max-width: 46ch;
  margin-inline: auto;
  font-size: 1.02rem;
}

.lead {
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.45rem);
  color: var(--text-strong);
  font-family: var(--font-display);
  line-height: 1.5;
}

.muted {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.reveal--emphasis {
  font-family: var(--font-script);
  font-size: clamp(2rem, 1.4rem + 3.5vw, 3.2rem);
  color: var(--c-rose-deep);
  text-align: center;
  margin: 1.6rem 0;
  line-height: 1.2;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  border: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft),
    filter var(--dur-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.btn--primary {
  background: var(--grad-btn);
  color: var(--text-on-rose);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.05);
  box-shadow: 0 18px 46px rgba(224, 87, 127, 0.45);
}
.btn--primary:active {
  transform: translateY(-1px) scale(0.99);
}

.btn--soft {
  background: rgba(255, 143, 171, 0.16);
  color: var(--c-rose-deep);
  border: 1px solid var(--border-soft);
}
.btn--soft:hover,
.btn--soft:focus-visible {
  background: rgba(255, 143, 171, 0.28);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--c-plum-soft);
  border: 1.5px dashed rgba(224, 87, 127, 0.4);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255, 143, 171, 0.12);
  transform: translateY(-2px);
}

.btn--glow {
  position: relative;
}
.btn--glow::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--grad-btn);
  filter: blur(16px);
  opacity: 0.45;
  z-index: -1;
  animation: pulseGlow 3.2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.04);
  }
}

/* --------------------------------------------------------------------------
   7. OPENING SCREEN
   -------------------------------------------------------------------------- */
.section--opening {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.opening__inner {
  max-width: 40rem;
}

.opening__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-rose-deep);
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.opening__title {
  font-size: clamp(2.4rem, 1.5rem + 7vw, 4.6rem);
  margin-bottom: 0.4rem;
  line-height: 1.08;
}

.opening__title .script {
  display: inline-block;
  color: var(--c-rose-deep);
  font-size: 1.15em;
}

.opening__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1.6vw, 1.9rem);
  color: var(--text-body);
  margin-bottom: 2.2rem;
}

.age-highlight {
  font-weight: 700;
  color: var(--c-plum);
  position: relative;
}
.age-highlight::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0.05em;
  height: 0.35em;
  background: var(--grad-gold);
  border-radius: var(--r-pill);
  z-index: -1;
  opacity: 0.75;
}

.opening__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.heart-beat {
  display: inline-block;
  animation: heartBeat 1.8s ease-in-out infinite;
}
@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.22);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.14);
  }
}

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(224, 87, 127, 0.4);
  border-radius: var(--r-pill);
  display: grid;
  place-items: start center;
  padding-top: 7px;
}
.scroll-cue__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-rose-deep);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  60% {
    transform: translateY(16px);
    opacity: 0.2;
  }
}

/* --------------------------------------------------------------------------
   8. BEFORE YOU
   -------------------------------------------------------------------------- */
.section--before {
  text-align: center;
}
.section--before .section__title {
  font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.6rem);
}

/* --------------------------------------------------------------------------
   9. TIMELINE
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  padding-left: 2.6rem;
}

/* the vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(255, 143, 171, 0) 0%,
    rgba(255, 143, 171, 0.7) 12%,
    rgba(224, 87, 127, 0.7) 88%,
    rgba(224, 87, 127, 0) 100%
  );
  border-radius: var(--r-pill);
}

.timeline__item {
  position: relative;
  margin-bottom: 1.6rem;
}

.timeline__marker {
  position: absolute;
  left: -2.6rem;
  top: 1.1rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--bg-card-solid);
  border: 2px solid rgba(255, 143, 171, 0.5);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.timeline__card {
  background: var(--grad-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-med) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft);
}
.timeline__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.timeline__when {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-rose-deep);
  background: rgba(255, 143, 171, 0.14);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.7rem;
}

.timeline__heading {
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.5rem);
  margin-bottom: 0.4rem;
}

.timeline__text {
  margin: 0;
  color: var(--text-body);
  font-size: 0.98rem;
}

.timeline__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 1.2vw, 1.7rem);
  color: var(--c-plum);
  padding-left: 1rem;
  border-left: 3px solid var(--c-rose);
  margin-top: 0.4rem;
}

.timeline__card--final {
  background: linear-gradient(150deg, #fff0f5, #f3e8ff);
  border-color: rgba(224, 87, 127, 0.3);
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. SLIDERS (shared)
   -------------------------------------------------------------------------- */
.slider {
  position: relative;
}

.slider__viewport {
  overflow: hidden;
  padding: 0.5rem 0 1rem;
  /* fade the edges so cards feel like they continue */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 4%,
    #000 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 4%,
    #000 96%,
    transparent 100%
  );
}

.slider__track {
  list-style: none;
  display: flex;
  gap: 1rem;
  transition: transform var(--dur-med) var(--ease-soft);
  will-change: transform;
}

.slider__slide {
  flex: 0 0 84%;
  min-width: 0;
}

.slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

.slider__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-card-solid);
  color: var(--c-rose-deep);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-fast) var(--ease-soft),
    background var(--dur-fast) var(--ease-soft);
}
.slider__btn:hover,
.slider__btn:focus-visible {
  background: var(--c-blush);
  transform: scale(1.08);
}
.slider__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.slider__dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(224, 87, 127, 0.25);
  transition: all var(--dur-fast) var(--ease-soft);
}
.slider__dot[aria-current="true"] {
  width: 22px;
  border-radius: var(--r-pill);
  background: var(--c-rose-deep);
}

/* --------------------------------------------------------------------------
   11. CARDS
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  min-height: 15rem;
  padding: 1.6rem 1.4rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--grad-card);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition:
    transform var(--dur-med) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.card__title {
  font-size: 1.3rem;
  margin: 0;
}

.card__text {
  margin: 0;
  font-size: 0.97rem;
}

/* "Things we haven't done yet" cards are buttons */
.card--todo {
  cursor: pointer;
  align-items: flex-start;
  font-family: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.card--todo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 100% at 50% 0%,
    rgba(255, 143, 171, 0.22),
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-soft);
}
.card--todo:hover::before,
.card--todo[aria-expanded="true"]::before {
  opacity: 1;
}

.card--todo .card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  position: relative;
}

.card__secret {
  position: relative;
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--c-plum-soft);
  transition:
    max-height var(--dur-med) var(--ease-soft),
    opacity var(--dur-med) var(--ease-soft),
    margin-top var(--dur-med) var(--ease-soft);
}
.card--todo[aria-expanded="true"] .card__secret {
  max-height: 8rem;
  opacity: 1;
  margin-top: 0.6rem;
}

/* --------------------------------------------------------------------------
   12. LOOKING FORWARD GRID
   -------------------------------------------------------------------------- */
.forward-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.forward-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-med) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft),
    background var(--dur-med) var(--ease-soft);
}
.forward-card:hover {
  transform: translateX(6px) scale(1.01);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.forward-card__icon {
  font-size: 1.6rem;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--c-blush), var(--c-lilac));
}

.forward-card__text {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.99rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   13. GALLERY
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.gallery__item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(150deg, var(--c-blush), var(--c-lilac));
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-med) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft);
}
.gallery__item:hover,
.gallery__item:focus-within {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-lg);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-soft);
}
.gallery__item:hover img {
  transform: scale(1.06);
}

/* Placeholder shown when the photo file doesn't exist yet */
.gallery__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(107, 45, 79, 0.65);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.35) 0 12px,
      rgba(255, 255, 255, 0.12) 12px 24px
    ),
    linear-gradient(150deg, var(--c-blush), var(--c-lilac));
}

/* First gallery item spans full width on mobile for a nice rhythm */
.gallery__item--feature {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}

/* --------------------------------------------------------------------------
   14. MUSIC
   -------------------------------------------------------------------------- */
.music-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--grad-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
}

.music-card__art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      80% 80% at 30% 20%,
      rgba(255, 255, 255, 0.5),
      transparent 60%
    ),
    linear-gradient(135deg, #ffb3c9, #b98cff 55%, #7fd8c4);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.35);
}

/* Cover art sits on top of the gradient when it loads */
.music-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
/* Hide the ♪ glyph once real cover art is showing.
   JS adds .has-cover to the art wrapper when the image loads. */
.music-card__art.has-cover .music-card__note {
  display: none;
}

.music-card__note {
  font-size: 3.4rem;
  color: #fff;
  text-shadow: 0 6px 20px rgba(107, 45, 79, 0.35);
  animation: noteFloat 3.4s ease-in-out infinite;
}
@keyframes noteFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

.music-card__title {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.music-card__subtitle {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.96rem;
}

.music-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.music-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.music-card__note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.9rem 0 0;
}

/* Native offline audio player */
.music-audio {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  border-radius: var(--r-pill);
  outline: none;
}
/* Tint the browser's built-in player to match the palette */
.music-audio::-webkit-media-controls-panel {
  background: linear-gradient(135deg, #ffe6ef, #f3e8ff);
}
.music-audio::-webkit-media-controls-play-button,
.music-audio::-webkit-media-controls-mute-button {
  filter: hue-rotate(300deg) saturate(1.4);
}

/* --------------------------------------------------------------------------
   14b. OPENING-SCREEN SOUND TOGGLE
   -------------------------------------------------------------------------- */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.7);
  color: var(--c-plum-soft);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-fast) var(--ease-soft),
    background var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}
.sound-toggle:hover,
.sound-toggle:focus-visible {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.sound-toggle.is-playing {
  background: rgba(255, 143, 171, 0.18);
  border-color: rgba(224, 87, 127, 0.35);
  color: var(--c-rose-deep);
}

.sound-toggle__icon {
  font-size: 1.05rem;
  line-height: 1;
}
.sound-toggle.is-playing .sound-toggle__icon {
  animation: soundPulse 1.6s ease-in-out infinite;
}
@keyframes soundPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

/* --------------------------------------------------------------------------
   15. LETTER
   -------------------------------------------------------------------------- */
.letter {
  background: linear-gradient(170deg, #fffdfb, #fff4f8);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 5vw, 3rem);
  box-shadow: var(--shadow-md);
  position: relative;
}
.letter::before {
  content: "❤";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-btn);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
}

.letter p {
  font-size: 1.03rem;
  color: var(--text-body);
}

.letter__signoff {
  margin-top: 1.8rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-strong);
}
.letter__name {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--c-rose-deep);
}

/* --------------------------------------------------------------------------
   16. GIFT / SURPRISE
   -------------------------------------------------------------------------- */
.section--surprise {
  text-align: center;
}

.gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.gift__box {
  position: relative;
  width: min(220px, 60vw);
  aspect-ratio: 1;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  transition: transform var(--dur-med) var(--ease-bounce);
  animation: giftWobble 3.6s ease-in-out infinite;
}
.gift__box:hover,
.gift__box:focus-visible {
  transform: scale(1.06);
}
.gift__box[aria-expanded="true"] {
  animation: none;
}

@keyframes giftWobble {
  0%,
  100% {
    transform: rotate(0deg);
  }
  4% {
    transform: rotate(-4deg);
  }
  8% {
    transform: rotate(4deg);
  }
  12% {
    transform: rotate(-3deg);
  }
  16% {
    transform: rotate(0deg);
  }
}

.gift__emoji {
  font-size: clamp(5rem, 22vw, 8rem);
  line-height: 1;
  filter: drop-shadow(0 14px 26px rgba(107, 45, 79, 0.25));
  transition: transform var(--dur-med) var(--ease-bounce);
}
.gift__box[aria-expanded="true"] .gift__emoji {
  transform: scale(1.1) translateY(-6px);
}

.gift__hint {
  position: absolute;
  bottom: -0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-rose-deep);
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
.gift__box[aria-expanded="true"] .gift__hint {
  display: none;
}

.gift__reveal {
  max-width: 34rem;
  animation: fadeUp var(--dur-slow) var(--ease-soft) both;
}

.gift__line {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin-bottom: 0.5rem;
}
.gift__line--big {
  font-size: clamp(1.5rem, 1.2rem + 2vw, 2.2rem);
}
.gift__line--script {
  font-family: var(--font-script);
  font-size: clamp(2rem, 1.5rem + 3vw, 3rem);
  color: var(--c-rose-deep);
  line-height: 1.2;
  margin-bottom: 1.4rem;
}

.gift__message {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.gift__message p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   17. FINAL SCREEN
   -------------------------------------------------------------------------- */
.section--final {
  min-height: 90svh;
  display: grid;
  place-items: center;
  text-align: center;
}

.final__inner {
  max-width: 40rem;
}

.final__title {
  font-size: clamp(2rem, 1.4rem + 5vw, 3.6rem);
  margin-bottom: 1rem;
}
.final__title .script {
  display: inline-block;
  color: var(--c-rose-deep);
  font-size: 1.15em;
}

.final__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 1vw, 1.5rem);
  color: var(--text-body);
  margin-bottom: 1.6rem;
}

.final__signature {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 1.2rem + 1.6vw, 2rem);
  color: var(--c-plum-soft);
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 2.5rem var(--gutter) 3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   19. SCROLL REVEAL ANIMATIONS
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease-soft),
    transform 0.7s var(--ease-soft);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children inside grids/lists */
.forward-grid .reveal:nth-child(2) {
  transition-delay: 0.06s;
}
.forward-grid .reveal:nth-child(3) {
  transition-delay: 0.12s;
}
.forward-grid .reveal:nth-child(4) {
  transition-delay: 0.18s;
}
.forward-grid .reveal:nth-child(5) {
  transition-delay: 0.24s;
}
.forward-grid .reveal:nth-child(6) {
  transition-delay: 0.3s;
}
.forward-grid .reveal:nth-child(7) {
  transition-delay: 0.36s;
}
.forward-grid .reveal:nth-child(8) {
  transition-delay: 0.42s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Opening screen entrance */
.section--opening .reveal {
  animation: fadeUp 0.9s var(--ease-soft) both;
}
.section--opening .reveal:nth-child(1) {
  animation-delay: 0.05s;
}
.section--opening .reveal:nth-child(2) {
  animation-delay: 0.2s;
}
.section--opening .reveal:nth-child(3) {
  animation-delay: 0.38s;
}
.section--opening .reveal:nth-child(4) {
  animation-delay: 0.56s;
}
.section--opening .reveal:nth-child(5) {
  animation-delay: 0.7s;
}

/* Body state while the "surprise" transition plays */
body.is-transitioning {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE — TABLET & DESKTOP
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  .slider__slide {
    flex-basis: 46%;
  }
  .forward-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .gallery__item--feature {
    grid-column: span 2;
    aspect-ratio: 3 / 4;
  }
  .music-card {
    flex-direction: row;
    align-items: center;
    padding: 2rem;
  }
  .music-card__art {
    flex: 0 0 40%;
    aspect-ratio: 1;
  }
}

@media (min-width: 900px) {
  .slider__slide {
    flex-basis: 31.5%;
  }
  .forward-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery__item--feature {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
  }
  .timeline {
    padding-left: 0;
  }
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline__item {
    width: 50%;
    padding-right: 2.6rem;
  }
  .timeline__item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 2.6rem;
  }
  .timeline__marker {
    left: auto;
    right: -1.1rem;
  }
  .timeline__item:nth-child(even) .timeline__marker {
    right: auto;
    left: -1.1rem;
  }
}

/* --------------------------------------------------------------------------
   21. REDUCED MOTION
   Respect the user's system preference.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
  .heart-float,
  .star-float {
    display: none;
  }
  .btn--glow::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   22. PRINT (in case she wants to keep the letter)
   -------------------------------------------------------------------------- */
@media print {
  .bg-layer,
  #confetti-canvas,
  .scroll-progress,
  .slider__controls,
  .gift__box,
  .btn,
  .site-footer {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
