:root {
  --cream: #fdfaf3;
  --cream-2: #f7efde;
  --paper: #fffdf7;
  --ink: #2b2a28;
  --ink-soft: #524c44;
  --ink-mute: #7a6e60;

  /* sampled from the actual streamers and balloons */
  --party-coral: #f0867e;
  --party-lavender: #b79bd6;
  --party-lime: #c7d584;
  --party-mint: #a9d6a4;

  /* deeper relatives of the same palette, for text that has to be readable */
  --plum: #6f5178;
  --rose: #b04a62;

  --tan: #c9a87a;
  --tan-soft: rgba(201, 168, 122, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* skip-link for keyboard / screen-reader users */
.skip-link {
  position: absolute;
  top: 0; left: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  font-family: "Fredoka", sans-serif; font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transform: translateY(-110%);
  transition: transform 0.15s;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

/* visible keyboard focus on every interactive element */
:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

/* line break helper for hero h1 */
.title-br { display: block; height: 0; }
@supports not (display: block) { .title-br::before { content: "\A"; } }
body {
  font-family: "Patrick Hand", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(255,255,255,.7), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(230,200,160,.3), transparent 40%),
    var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- background confetti ---------- */
.page-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55; }
.page-confetti i {
  position: absolute; width: 8px; height: 8px; border-radius: 2px;
  transform: rotate(var(--r, 12deg));
  background: var(--c, var(--rose));
  animation: confetti-drift 14s linear infinite;
  animation-delay: var(--d, 0s);
}
@keyframes confetti-drift {
  0%   { transform: translateY(0)    rotate(var(--r, 12deg)); }
  100% { transform: translateY(-30px) rotate(calc(var(--r, 12deg) + 30deg)); }
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ---------- pennants ---------- */
.pennants {
  position: relative;
  height: 110px;
  margin: 0 auto 8px;
  max-width: 760px;
}
.pennants .string {
  position: absolute; left: 30px; right: 30px; top: 14px;
  height: 70px;
  border-top: 3px solid #6b4f33;
  border-radius: 50%;
  transform: scaleY(0.45); transform-origin: top center;
}
.pennants .flags {
  position: absolute; left: 0; right: 0; top: 18px;
  display: flex; justify-content: center; gap: 6px;
  transform: rotate(-1deg);
}
.pennants .flag {
  width: 50px; height: 64px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  display: flex; align-items: flex-start; justify-content: center;
  color: #3a2d22; font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: 26px; padding-top: 6px;
  animation: flag-sway 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.15s);
  transform-origin: top center;
}
.pennants .flag.r { background: var(--party-coral); }
.pennants .flag.o { background: var(--party-lavender); }
.pennants .flag.y { background: var(--party-lime); }
.pennants .flag.g { background: var(--party-mint); }
.pennants .flag.b { background: var(--party-coral); }
.pennants .flag.p { background: var(--party-lavender); }
@keyframes flag-sway {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 8px 0 8px; position: relative; }
.kicker {
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--ink-soft);
  transform: rotate(-2deg);
  display: inline-block;
}
h1.title {
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(56px, 9vw, 104px);
  line-height: .96;
  margin: 6px 0 0;
  letter-spacing: -2px;
  color: var(--ink);
}
h1.title .accent { color: var(--plum); }
.age {
  margin-top: 14px;
  display: inline-block;
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fff;
  background: var(--rose);
  padding: 6px 22px 8px;
  border-radius: 40px;
  transform: rotate(2deg);
  box-shadow: 0 4px 0 rgba(0,0,0,.1);
  animation: age-bounce 2.4s ease-in-out infinite;
}
@keyframes age-bounce {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50%      { transform: rotate(2deg) translateY(-4px); }
}

/* ---------- cover scene ---------- */
.cover-scene {
  position: relative;
  margin: 32px auto 0;
  max-width: 720px;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  background: var(--paper);
  border: 3px solid var(--tan);
  box-shadow: 0 14px 0 rgba(60,40,20,.07), 0 18px 40px rgba(60,40,20,.10);
  overflow: hidden;
  transform: rotate(-0.6deg);
}
.cover-scene .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: hero-bob 4.5s ease-in-out infinite;
}
@keyframes hero-bob {
  0%, 100% { transform: translateY(0)    scale(1); }
  50%      { transform: translateY(-6px) scale(1.012); }
}

/* float-up balloons over the cover */
.cover-scene .balloons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cover-scene .balloons .b {
  position: absolute;
  width: 36px; height: 44px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  box-shadow: inset -5px -7px 0 rgba(0,0,0,.12);
  bottom: -60px;
  animation: balloon-rise var(--dur, 10s) linear infinite;
  animation-delay: var(--d, 0s);
  opacity: 0.85;
}
.cover-scene .balloons .b::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  width: 1px; height: 60px; background: rgba(122, 90, 58, 0.6);
}
@keyframes balloon-rise {
  0%   { transform: translate(0, 0)        rotate(-3deg); opacity: 0; }
  10%  { opacity: 0.85; }
  90%  { opacity: 0.85; }
  100% { transform: translate(20px, -700px) rotate(3deg);  opacity: 0; }
}

/* slot overlays for optional cartoon Brielle + puppy cut-out PNGs */
.cover-scene .overlay-figure {
  position: absolute;
  bottom: 0;
  width: 32%;
  aspect-ratio: 3 / 4;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  animation: figure-step 1.4s ease-in-out infinite;
}
.cover-scene .overlay-figure.brielle {
  left: 18%;
  animation-delay: 0s;
}
.cover-scene .overlay-figure.puppy {
  right: 12%;
  animation-delay: 0.2s;
}
@keyframes figure-step {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50%      { transform: rotate(1.5deg)  translateY(-3px); }
}

/* ---------- story copy ---------- */
.story {
  text-align: center;
  margin: 36px auto 0;
  max-width: 640px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.45;
  color: var(--ink);
}
.story em {
  font-style: normal;
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 1.18em;
  color: var(--plum);
}
.story .big {
  display: block;
  margin-top: 10px;
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(24px, 3.2vw, 34px);
  color: var(--ink);
}

/* ---------- card ---------- */
.card {
  background: var(--paper);
  border: 2px solid var(--tan);
  border-radius: 18px;
  box-shadow: 0 10px 0 rgba(60,40,20,.06);
  padding: 28px 32px;
  margin-top: 48px;
}
.card.tilt-l { transform: rotate(-.5deg); }
.card.tilt-r { transform: rotate(.5deg); }

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
}
.detail .lbl {
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 26px;
  color: var(--plum);
  margin-bottom: 4px;
}
.detail .val {
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
}
.detail .val a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1.5px dashed var(--rose);
}

.menu-line {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1.5px dashed var(--tan);
  text-align: center;
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: 28px;
  color: var(--rose);
}

/* ---------- map ---------- */
.map {
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--tan);
  aspect-ratio: 16 / 7;
  background: #e8e2d3;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- RSVP: tap-to-text ---------- */
.rsvp { text-align: center; }
.rsvp h2 {
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(34px, 4.5vw, 48px);
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: -1px;
}
.rsvp h2 .accent { color: var(--plum); }
.rsvp .sub {
  color: var(--ink-soft);
  font-size: 22px;
  margin: 0 auto 26px;
  max-width: 30ch;
}

a.btn {
  display: inline-block;
  font-family: "Fredoka", sans-serif; font-weight: 700;
  font-size: clamp(20px, 2.6vw, 26px);
  color: #fff;
  background: var(--rose);
  border-radius: 40px;
  padding: 16px 36px 18px;
  box-shadow: 0 6px 0 rgba(112,42,60,.55);
  text-decoration: none;
  transition: transform .1s, box-shadow .1s;
}
a.btn:hover { transform: translateY(-1px); }
a.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(112,42,60,.55); }

/* the number, spelled out, for anyone whose device cannot open a text link */
.rsvp .number {
  margin-top: 18px;
  font-size: 22px;
  color: var(--ink-soft);
}
.rsvp .number a {
  font-family: "Fredoka", sans-serif; font-weight: 600;
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1.5px dashed var(--rose);
  white-space: nowrap;
}

/* ---------- footer ---------- */
footer {
  text-align: center;
  margin-top: 48px;
  color: var(--ink-mute);
  font-size: 18px;
}
footer .heart { color: var(--rose); }

/* ---------- scroll-driven scenes ---------- */
.scene { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.scene.in { opacity: 1; transform: translateY(0); }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .wrap { padding: 16px 16px 60px; }
  .cover-scene { aspect-ratio: 3 / 2; }
  .details-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; }
  .pennants .flag { width: 40px; height: 52px; font-size: 22px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .cover-scene .balloons { display: none; }
  .scene { opacity: 1; transform: none; }
}
