html, body { margin: 0; background: #fbf6ee; }
html, body, .fs, .fs * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .fs::-webkit-scrollbar, .fs *::-webkit-scrollbar { display: none; width: 0; height: 0; }

.fs {
  --paper: #fbf6ee; --ink: #3d3833; --soft: #8a8178; --blush: #e9b3a4; --blush-d: #d4806b;
  --sage: #a9bfa4; --butter: #f3d98f; --line: #eadfce;
  position: relative; min-height: 100svh; overflow: clip;
  background: var(--paper); color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
.fs *, .fs *::before, .fs *::after { box-sizing: border-box; }
:where(.fs) p { margin: 0; }
.fs::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url(../assets/paper.svg) 0 0 / 220px 220px;
}

/* hero */
.fs-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 56px 24px 40px; }
.fs-kicker { font-family: 'Patrick Hand', cursive; font-size: 20px; color: var(--blush-d); margin-bottom: 18px; }
.fs-photo { margin: 0 0 22px; width: 132px; height: 132px; border-radius: 50%; padding: 6px; background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(120, 80, 50, .45); }
.fs-photo { background: #fff url(../assets/photo-placeholder.svg) center / calc(100% - 12px) no-repeat; background-clip: content-box; }
.fs-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fs-name { margin: 0; font-family: 'Young Serif', Georgia, serif; font-weight: 400; font-size: clamp(46px, 14vw, 84px); line-height: 1; letter-spacing: -.01em; }
.fs-turning { margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.fs-one { position: relative; margin-top: 6px; font-family: 'Young Serif', Georgia, serif; font-size: clamp(150px, 46vw, 230px); line-height: .95;
  color: var(--blush); text-shadow: 6px 8px 0 var(--butter); }
.fs-hint { margin-top: 14px; font-family: 'Patrick Hand', cursive; font-size: 18px; color: var(--soft); }
.fs-trail--hero { margin-top: 6px; }

/* footprint trail */
.fs-trail { position: relative; width: 120px; margin: 0 auto; }
.fs-print { display: block; width: 26px; height: 40px; margin: 0 auto; background: url(../assets/footprint.svg) center / contain no-repeat;
  opacity: .9; }
.fs-print + .fs-print { margin-top: 10px; }
.fs-print.l { transform: translateX(16px) rotate(172deg); }
.fs-print.r { transform: translateX(-16px) rotate(188deg) scaleX(-1); }
.fs.is-js .fs-print { opacity: 0; scale: .4; transition: opacity .35s ease, scale .45s cubic-bezier(.2, .9, .3, 1.3); }
.fs.is-js .fs-print.on { opacity: .9; scale: 1; }

/* story */
.fs-story { position: relative; max-width: 520px; margin: 0 auto; padding: 24px 24px 8px; text-align: center; }
.fs-intro { font-family: 'Young Serif', Georgia, serif; font-size: clamp(22px, 6.2vw, 28px); line-height: 1.35; margin-bottom: 28px; }
.fs-stop { position: relative; margin: 22px auto; max-width: 300px; padding: 18px 20px; background: #fff; border-radius: 20px;
  box-shadow: 0 0 0 1px var(--line); font-size: 16px; line-height: 1.5; }
.fs-stop--l { transform: rotate(-1.2deg); }
.fs-stop--r { transform: rotate(1.2deg); }
.fs-dot { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--sage);
  box-shadow: 0 0 0 4px var(--paper); }
.fs-stop--r .fs-dot { background: var(--butter); }
.fs-next { margin-top: 26px; font-family: 'Patrick Hand', cursive; font-size: 26px; color: var(--blush-d); }

/* details card */
.fs-details { position: relative; padding: 30px 22px 10px; }
.fs-card { position: relative; max-width: 420px; margin: 0 auto; padding: 34px 26px 30px; text-align: center; background: #fff; border-radius: 28px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgba(120, 80, 50, .5); }
.fs-card::before, .fs-card::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line); }
.fs-card::before { left: -11px; } .fs-card::after { right: -11px; }
.fs-label { font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.fs-day { margin-top: 10px; font-family: 'Patrick Hand', cursive; font-size: 24px; color: var(--blush-d); }
.fs-date { font-family: 'Young Serif', Georgia, serif; font-size: clamp(34px, 10vw, 44px); line-height: 1.1; }
.fs-year { font-size: 15px; font-weight: 700; letter-spacing: .18em; color: var(--soft); }
.fs-rule { width: 64px; height: 8px; margin: 22px auto; background: url(../assets/squiggle.svg) center / contain no-repeat; }
.fs-time { margin-top: 6px; font-family: 'Young Serif', Georgia, serif; font-size: 30px; }
.fs-venue { margin: 8px auto 0; max-width: 26ch; font-size: 17px; line-height: 1.5; }

/* wish */
.fs-wish { padding: 64px 24px 30px; text-align: center; }
.fs-cake { position: relative; width: 190px; margin: 0 auto; cursor: pointer; outline: none; }
.fs-cake:focus-visible { outline: 2px dashed var(--blush-d); outline-offset: 8px; border-radius: 16px; }
.fs-cake-img { display: block; width: 100%; height: auto; }
.fs-candle { position: absolute; left: 50%; top: -20px; width: 16px; height: 64px; margin-left: -8px; border-radius: 6px;
  background: repeating-linear-gradient(-45deg, #fff 0 6px, var(--blush) 6px 12px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.fs-flame { position: absolute; left: 50%; bottom: 100%; width: 16px; height: 26px; margin: 0 0 4px -8px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6c9 0 22%, #ffc94d 45%, #ff8f3d 80%); transform-origin: 50% 90%;
  animation: fsFlick 1.4s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 190, 80, .8)); transition: opacity .3s, transform .3s; }
@keyframes fsFlick { 0%, 100% { transform: rotate(-3deg) scaleY(1); } 50% { transform: rotate(3deg) scaleY(1.08); } }
.fs-smoke { position: absolute; left: 50%; bottom: 100%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: rgba(140, 130, 120, .5);
  opacity: 0; pointer-events: none; }
.fs.is-wished .fs-flame { opacity: 0; transform: scale(.2) translateY(6px); animation: none; }
.fs.is-wished .fs-smoke { animation: fsSmoke 1.8s ease-out forwards; }
@keyframes fsSmoke { 0% { opacity: .7; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(10px, -70px) scale(5); } }
.fs-wish-text { margin-top: 18px; font-family: 'Patrick Hand', cursive; font-size: 22px; color: var(--ink); }
.fs-wish-after { display: none; color: var(--blush-d); }
.fs.is-wished .fs-wish-before { display: none; }
.fs.is-wished .fs-wish-after { display: inline; animation: fsPop .5s ease both .2s; }
@keyframes fsPop { 0% { opacity: 0; } 100% { opacity: 1; } }
.fs-hooray { display: block; margin-bottom: 4px; font-family: 'Young Serif', Georgia, serif; font-size: 46px; line-height: 1.1; color: var(--blush-d);
  text-shadow: 3px 4px 0 var(--butter); }
.fs.is-wished .fs-hooray { animation: fsHooray .7s cubic-bezier(.2, .9, .3, 1.4) both .15s; }
@keyframes fsHooray { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 70% { opacity: 1; transform: scale(1.12) rotate(2deg); } 100% { transform: none; } }
.fs.is-wished .fs-cake-img { animation: fsJump .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fsJump { 0% { transform: none; } 30% { transform: translateY(-14px) scale(1.04, .96); } 60% { transform: translateY(0) scale(.97, 1.03); } 100% { transform: none; } }

/* bunting that drops in after the wish */
.fs-bunting { position: relative; display: flex; justify-content: center; gap: 3px; max-width: 290px; height: 42px; margin: -34px auto 30px; }
.fs-bunting::before { content: ""; position: absolute; left: 4px; right: 4px; top: -12px; height: 20px; border-bottom: 2px solid #d8c9b3;
  border-radius: 0 0 50% 50% / 0 0 100% 100%; opacity: 0; transition: opacity .4s; }
.fs-bunting span { width: 26px; height: 30px; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--blush); transform-origin: 50% 0;
  opacity: 0; transform: translateY(-26px) rotate(-25deg); transition: opacity .35s ease, transform .6s cubic-bezier(.2, .9, .3, 1.5); }
.fs-bunting span:nth-child(4n+2) { background: var(--butter); }
.fs-bunting span:nth-child(4n+3) { background: var(--sage); }
.fs-bunting span:nth-child(4n+4) { background: var(--blush-d); }
.fs-bunting span:nth-child(2), .fs-bunting span:nth-child(8) { margin-top: 3px; }
.fs-bunting span:nth-child(3), .fs-bunting span:nth-child(7) { margin-top: 5px; }
.fs-bunting span:nth-child(4), .fs-bunting span:nth-child(6) { margin-top: 6px; }
.fs-bunting span:nth-child(5) { margin-top: 7px; }
.fs.is-wished .fs-bunting::before { opacity: 1; }
.fs.is-wished .fs-bunting span { opacity: 1; transform: none; animation: fsSwing 2.6s ease-in-out infinite alternate; }
.fs-bunting span:nth-child(2) { transition-delay: .06s; animation-delay: -.4s; }
.fs-bunting span:nth-child(3) { transition-delay: .12s; animation-delay: -.8s; }
.fs-bunting span:nth-child(4) { transition-delay: .18s; animation-delay: -1.2s; }
.fs-bunting span:nth-child(5) { transition-delay: .24s; animation-delay: -1.6s; }
.fs-bunting span:nth-child(6) { transition-delay: .30s; animation-delay: -2s; }
.fs-bunting span:nth-child(7) { transition-delay: .36s; animation-delay: -2.4s; }
.fs-bunting span:nth-child(8) { transition-delay: .42s; animation-delay: -.6s; }
.fs-bunting span:nth-child(9) { transition-delay: .48s; animation-delay: -1s; }
@keyframes fsSwing { 0% { rotate: -5deg; } 100% { rotate: 5deg; } }

/* party layer: poppers and balloons over the whole screen */
.fs-party { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.fs-popper { position: absolute; bottom: -8px; width: 92px; height: 115px; background: url(../assets/popper.svg) center / contain no-repeat;
  transform-origin: 50% 92%; animation: fsPopper 3.4s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.fs-popper--l { left: 2px; --r: 34deg; }
.fs-popper--r { right: 2px; --r: -34deg; }
@keyframes fsPopper {
  0% { transform: translateY(110%) rotate(var(--r)); }
  9% { transform: translateY(0) rotate(var(--r)) scale(1); }
  13% { transform: translateY(6px) rotate(var(--r)) scale(1.18, .82); }
  20% { transform: translateY(-4px) rotate(var(--r)) scale(.92, 1.08); }
  28%, 82% { transform: translateY(0) rotate(var(--r)) scale(1); opacity: 1; }
  100% { transform: translateY(115%) rotate(var(--r)); opacity: 0; }
}
.fs-balloon { position: absolute; bottom: -150px; left: var(--x); width: var(--w); height: calc(var(--w) * 1.24);
  border-radius: 50% 50% 47% 47% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .75) 0 7%, transparent 8%), radial-gradient(circle at 40% 35%, var(--c2), var(--c) 70%);
  animation: fsRise var(--d) cubic-bezier(.35, .1, .6, 1) var(--delay) forwards; }
.fs-balloon::before { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 8px; margin-left: -5px; background: var(--c);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fs-balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 70px; margin: 6px 0 0 -.75px;
  background: linear-gradient(#c9b9a3, rgba(201, 185, 163, 0)); }
@keyframes fsRise {
  0% { transform: translate(0, 0) rotate(-4deg); }
  25% { transform: translate(14px, -32vh) rotate(4deg); }
  50% { transform: translate(-12px, -64vh) rotate(-5deg); }
  75% { transform: translate(12px, -96vh) rotate(4deg); }
  100% { transform: translate(0, calc(-100vh - 320px)) rotate(-3deg); }
}

/* note + host */
.fs-note { max-width: 380px; margin: 0 auto; padding: 8px 24px 10px; text-align: center; color: var(--soft); font-size: 16px; }
.fs-host { padding: 26px 24px 64px; text-align: center; }
.fs-feet { width: 56px; height: auto; margin: 0 auto 10px; display: block; opacity: .8; }
.fs-host p { font-family: 'Young Serif', Georgia, serif; font-size: 20px; }

/* reveal */
.fs.is-js .fs-up { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.fs.is-js .fs-up.in { opacity: 1; transform: none; }
.fs.is-js .fs-stop--l.fs-up.in { transform: rotate(-1.2deg); }
.fs.is-js .fs-stop--r.fs-up.in { transform: rotate(1.2deg); }

@media (min-width: 760px) {
  .fs-photo { width: 156px; height: 156px; }
  .fs-stop { max-width: 340px; }
  .fs-stop--l { margin-left: calc(50% - 250px); }
  .fs-stop--r { margin-right: calc(50% - 250px); }
}
@media (prefers-reduced-motion: reduce) {
  .fs *, .fs *::before, .fs *::after { animation: none !important; transition: none !important; }
  .fs.is-js .fs-print { opacity: .9; }
  .fs.is-js .fs-up { opacity: 1; transform: none; }
  .fs-party { display: none; }
}
