/* Jack's birthday page (/jack-birthday), 15 November 2026.
   Page-only styles; the site's tokens come from styles.css. */

.jb-header { overflow: hidden; padding-top: clamp(4.5rem, 9vw, 6.5rem); }
.jb-bunting {
  position: absolute; top: 0; left: 0; width: 100%; height: clamp(54px, 7.5vw, 90px);
  pointer-events: none;
}
.jb-header .page-header__inner { position: relative; z-index: 1; }
.jb-header h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; }
.jb-header h1 em { color: var(--color-coral-2); font-style: italic; }
.jb-balloons {
  position: absolute; right: clamp(-10px, 4vw, 80px); top: clamp(56px, 6vw, 80px);
  width: clamp(120px, 18vw, 220px); height: auto; z-index: 0;
}
@media (max-width: 720px) {
  .jb-balloons { width: 74px; right: -6px; top: 58px; }
  .jb-header .crumb { padding-right: 64px; }
  .jb-header .eyebrow { font-size: .78rem; }
}
.jb-balloon { transform-box: fill-box; transform-origin: 50% 100%; animation: jb-bob 5s ease-in-out infinite; }
.jb-balloon.b2 { animation-delay: -1.6s; animation-duration: 5.8s; }
.jb-balloon.b3 { animation-delay: -3.1s; animation-duration: 4.6s; }
@keyframes jb-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* Main photo */
.jb-hero-photo { margin: 0; }
.jb-hero-photo .jb-frame {
  border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--color-cream-2);
  box-shadow: 0 18px 40px -22px rgba(44, 56, 72, .45);
  outline: 6px solid var(--bg-card); outline-offset: 0;
}
.jb-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jb-caption { font-size: var(--fs-sm); color: var(--color-ink-2); margin-top: var(--space-3); font-style: italic; }

/* Rosette */
.jb-rosette { width: min(200px, 60%); height: auto; display: block; margin: 0 auto var(--space-4); filter: drop-shadow(0 8px 14px rgba(44,56,72,.18)); transform: rotate(-6deg); }
.jb-r-sm { font-family: var(--font-sans); font-weight: 800; font-size: 10px; letter-spacing: 1.5px; fill: var(--color-muted); }
.jb-r-big { font-family: var(--font-display); font-weight: 600; font-size: 44px; fill: var(--color-ink); }
.jb-r-xs { font-family: var(--font-sans); font-weight: 700; font-size: 7.5px; letter-spacing: 1px; fill: var(--color-coral-2); }

/* Gallery */
.jb-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); margin-top: var(--space-6); }
.jb-gallery figure { margin: 0; }
.jb-gallery .jb-frame { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--color-cream-2); }
.jb-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jb-num {
  display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--color-coral); color: #fff; font-style: normal; font-weight: 700; font-size: .8em; margin-right: .4em;
}

/* Cake */
.jb-cake-wrap { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 720px) { .jb-cake-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.jb-cake { width: 100%; max-width: 260px; height: auto; overflow: visible; }
.jb-cake-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 6px; fill: var(--color-cream-3); }
.jb-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: jb-flicker 1.2s ease-in-out infinite alternate; transition: opacity .25s ease, transform .25s ease; }
@keyframes jb-flicker {
  0% { transform: scale(1, 1) rotate(-2deg); }
  50% { transform: scale(.94, 1.05) rotate(1.5deg); }
  100% { transform: scale(1.03, .97) rotate(-1deg); }
}
.jb-smoke { opacity: 0; transition: opacity .4s ease; }
.jb-out .jb-flame { opacity: 0; transform: scale(.3, .2); animation: none; }
.jb-out .jb-smoke { opacity: .8; animation: jb-smoke 2.4s ease-out forwards; }
@keyframes jb-smoke { 0% { opacity: .8; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-14px); } }
.jb-wish { min-height: 1.6em; font-weight: 600; color: var(--color-coral-2); margin-top: var(--space-3); }

/* Confetti layer (made by jack-birthday.js) */
.jb-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.jb-confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; }

/* Home + /jack announcement chip */
.jb-chip-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-7); }

@media (prefers-reduced-motion: reduce) {
  .jb-balloon, .jb-flame { animation: none; }
}
