* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: #ead7a1; }
body { overflow: hidden; }
.birthday { position: relative; width: 100%; height: 100%; height: 100svh; overflow: hidden; isolation: isolate; }
.birthday-photo, .photo-backdrop, .shade, #confetti { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo-backdrop { background: url('./birthday.jpg') center 50% / cover; filter: blur(22px); transform: scale(1.1); }
.birthday-photo { object-fit: cover; object-position: 50% 48%; }
.shade { background: linear-gradient(transparent 65%, rgb(39 22 15 / 55%) 100%); }
#confetti { pointer-events: none; z-index: 2; }
h1 { position: absolute; z-index: 3; bottom: max(20px, env(safe-area-inset-bottom)); left: 2%; right: 2%; margin: 0; text-align: center; font-family: Impact, 'Arial Black', 'Helvetica Neue', sans-serif; font-weight: 950; font-size: clamp(46px, 8.5vw, 142px); line-height: .98; letter-spacing: -.015em; color: #ffe56b; text-shadow: 3px 4px 0 #512c1d, 0 3px 20px rgb(0 0 0 / 35%); -webkit-text-stroke: 1px #512c1d; }
h1 span { display: block; }
h1 span:last-child { font-size: 1.25em; }
.motion-toggle { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; padding: 11px; border: 1px solid rgb(255 255 255 / 55%); border-radius: 50%; background: rgb(45 30 20 / 24%); color: white; cursor: pointer; }
.motion-toggle:hover { background: rgb(45 30 20 / 50%); }
.motion-toggle:focus-visible { outline: 3px solid #ffe56b; outline-offset: 4px; }
.motion-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle .play-icon { display: none; }
.motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
.motion-toggle[aria-pressed="true"] .play-icon { display: block; }
@media (max-aspect-ratio: 3/4) {
  .birthday-photo { object-fit: contain; }
  .photo-backdrop { filter: blur(24px) brightness(.88); }
  .shade { background: linear-gradient(transparent 60%, rgb(39 22 15 / 65%) 100%); }
  h1 { bottom: max(34px, env(safe-area-inset-bottom)); font-size: 11vw; line-height: 1.03; }
  h1 span:last-child { font-size: 1.45em; }
}
@media (min-aspect-ratio: 2/1) {
  .birthday-photo { object-fit: contain; }
  h1 { font-size: min(10vh, 7vw); }
}
