/* =========================================================================
   Playful extras: logo, program finder, balloons, confetti, live schedule,
   open/closed status, rocket back-to-top, tilt cards.
   ========================================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Logo: red rounded letters on an arch --------------------------------- */
.logo.logo-arc {
  width: 160px;
  height: auto;
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
a:hover > .logo.logo-arc,
a:focus-visible > .logo.logo-arc {
  transform: rotate(-3deg) scale(1.06);
}
.logo-arc text {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  font-size: 52px;
  letter-spacing: 0.5px;
}
.logo-arc .logo-arc-text {
  fill: #ed1c24;
}
.logo-arc .logo-arc-shadow {
  fill: #ed1c24;
  stroke: #ffffff;
  stroke-width: 7px;
  stroke-linejoin: round;
  paint-order: stroke;
  filter: drop-shadow(0 2px 2px #9b1b1340);
}
.logo.logo-image {
  width: 160px;
  height: auto;
}
.footer-about .logo.logo-arc,
.footer-about .logo.logo-image {
  width: 190px;
}
.marquee-logo.logo-arc,
.marquee-logo.logo-image {
  width: 560px;
  height: auto;
  flex-shrink: 0;
  overflow: visible;
  animation: hsh-marquee 30s linear infinite;
}
@media (max-width: 700px) {
  .logo.logo-arc,
  .logo.logo-image {
    width: 118px;
  }
  .marquee-logo.logo-arc,
  .marquee-logo.logo-image {
    width: 320px;
  }
}

/* --- Program finder -------------------------------------------------------- */
.finder-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  background: white;
  border-radius: 28px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.finder-card::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: #fdecec;
}
.finder-ask,
.finder-results {
  position: relative;
}
.finder-ask h2 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 3.2vw, 44px);
}
.finder-slider {
  display: block;
  position: relative;
  margin-top: 64px;
}
.finder-slider input {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, #ed1c24 var(--fill, 23%), #f1efe8 var(--fill, 23%));
  outline: none;
  cursor: pointer;
}
.finder-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: white;
  border: 6px solid #ed1c24;
  box-shadow: 0 6px 16px #ed1c2455;
  transition: transform 0.2s;
}
.finder-slider input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  border: 6px solid #ed1c24;
  box-shadow: 0 6px 16px #ed1c2455;
}
.finder-slider input:active::-webkit-slider-thumb {
  transform: scale(1.15);
}
.finder-slider input:focus-visible {
  outline: 3px solid #579feb;
  outline-offset: 8px;
}
.finder-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a8a69f;
  margin-top: 10px;
}
.finder-age {
  margin-top: 18px;
  font-size: 18px;
}
.finder-age span {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 34px;
  color: #c8141b;
}
.finder-result {
  position: relative;
  background: #e8f3fd;
  border-radius: 22px;
  padding: 30px;
}
.finder-result h3 {
  font-size: 28px;
  margin: 12px 0 8px;
}
.finder-piece {
  position: absolute;
  right: 22px;
  top: 14px;
  font-size: 64px;
  line-height: 1;
  color: #c8141b;
  opacity: 0.9;
}
.finder-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.finder-summer {
  margin-top: 16px;
  font-size: 15px;
}
.finder-summer a {
  color: #c8141b;
  font-weight: 700;
}
/* --- Balloons in the home hero ------------------------------------------- */
.balloons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.balloon {
  position: absolute;
  width: 52px;
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  transition: transform 0.2s;
}
.balloon:hover {
  transform: scale(1.1);
}
.balloon svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.balloon path:first-child { fill: var(--b); }
.balloon .knot { fill: var(--b); }
.balloon .string { stroke: #c9c4b8; stroke-width: 1.5; }
.balloon .shine { fill: #ffffff66; }
.balloon-orange { --b: #ed1c24; left: 2%; top: 58%; }
.balloon-green { --b: #2ebb5e; left: 20%; top: 8%; width: 40px; }
.balloon-blue { --b: #58a5ef; right: 22%; top: 64%; width: 44px; }
.balloon-yellow { --b: #f6c94b; right: 2%; top: 46%; }
.motion .balloon {
  animation: hsh-balloon 6s ease-in-out infinite;
}
.motion .balloon-green { animation-delay: -1.5s; animation-duration: 7s; }
.motion .balloon-blue { animation-delay: -3s; animation-duration: 6.5s; }
.motion .balloon-yellow { animation-delay: -4.5s; animation-duration: 7.5s; }
@keyframes hsh-balloon {
  0%, 100% { translate: 0 0; rotate: -4deg; }
  50% { translate: 0 -22px; rotate: 4deg; }
}
.balloon.popped {
  animation: hsh-pop-balloon 0.35s ease-out forwards !important;
  pointer-events: none;
}
@keyframes hsh-pop-balloon {
  40% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; }
}
.balloon-hint {
  position: absolute;
  right: 0;
  bottom: 18px;
  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  color: #4a4e55;
  transform: rotate(-3deg);
}
@media (max-width: 1050px) {
  .balloon-orange { top: 70%; }
  .balloon-yellow { top: 74%; }
  .balloon-green,
  .balloon-blue,
  .balloon-hint {
    display: none;
  }
}

/* --- Confetti canvas ------------------------------------------------------ */
.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 400;
}

/* --- Live "happening now" on the daily routine ---------------------------- */
.now-bar {
  max-width: 740px;
  margin: 0 auto 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 999px;
  padding: 10px 20px 10px 10px;
  font-weight: 700;
  color: #2b2f36;
}
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 14px;
  background: #e7f8ed;
  color: #146c31;
}
.open-status:empty {
  display: none;
}
.open-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.open-status.closed {
  background: #fde8e8;
  color: #a33b14;
}
.motion .open-status:not(.closed)::before {
  animation: hsh-blink 1.6s ease-in-out infinite;
}
@keyframes hsh-blink {
  50% { opacity: 0.25; }
}
.contact-info .open-status {
  margin-right: 6px;
  background: #ffffffcc;
}
.routine-card.is-now {
  outline: 3px solid #ed1c24;
  outline-offset: 3px;
  position: relative;
}
.routine-card.is-now::after {
  content: "Happening now";
  position: absolute;
  right: 18px;
  top: -13px;
  background: #ed1c24;
  color: white;
  font-family: "Fredoka", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.motion .routine-card.is-now .routine-icon {
  animation: hsh-wiggle 2.4s ease-in-out infinite;
}

/* --- Rocket back-to-top -------------------------------------------------- */
.to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 70;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1a1917;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px #1a19173d;
  transition: transform 0.3s, opacity 0.3s;
}
.to-top svg {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}
.to-top:hover svg {
  transform: translateY(-4px);
}
.motion .to-top .flame {
  transform-origin: 20px 30px;
  animation: hsh-flame 0.3s ease-in-out infinite alternate;
}
@keyframes hsh-flame {
  to { transform: scaleY(1.35); }
}
.to-top.launch svg {
  transform: translateY(-120vh);
  transition: transform 0.8s ease-in;
}
@media (min-width: 701px) {
  .to-top {
    left: auto;
    right: 24px;
    bottom: 24px;
  }
}

/* --- Tilt cards follow the mouse ---------------------------------------- */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

/* --- Click the doodles for a spin ---------------------------------------- */
.banner-icon,
.hero-doodle {
  cursor: pointer;
  pointer-events: auto;
}
.doodle-spin {
  animation: hsh-doodle 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
@keyframes hsh-doodle {
  to { rotate: 360deg; scale: 1.2; }
}

@media (max-width: 1050px) {
  .finder-card {
    grid-template-columns: 1fr;
    padding: 32px;
    gap: 30px;
  }
}
@media (max-width: 700px) {
  .finder-card {
    padding: 24px 20px;
  }
  .finder-piece {
    font-size: 44px;
  }
  .finder-result {
    padding: 22px;
  }
  .now-bar {
    border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .to-top.launch svg {
    transform: none;
  }
}

/* =========================================================================
   Program finder animation
   ========================================================================= */

/* Age bubble that rides on the slider handle */
.finder-bubble {
  position: absolute;
  bottom: calc(100% + 16px);
  left: var(--thumb, 50%);
  transform: translateX(-50%);
  background: #1a1917;
  color: white;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
}
.finder-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: #1a1917;
  transform: translateX(-50%);
}

/* Handle pulses until a parent touches it */
.motion .finder-slider.hint input::-webkit-slider-thumb {
  animation: hsh-thumb 1.6s ease-in-out infinite;
}
.motion .finder-slider.hint input::-moz-range-thumb {
  animation: hsh-thumb 1.6s ease-in-out infinite;
}
@keyframes hsh-thumb {
  0%, 100% { box-shadow: 0 6px 16px #ed1c2455, 0 0 0 0 #ed1c2466; }
  50% { box-shadow: 0 6px 16px #ed1c2455, 0 0 0 14px #ed1c2400; }
}
.motion .finder-slider.hint .finder-bubble {
  animation: hsh-bubble 1.6s ease-in-out infinite;
}
@keyframes hsh-bubble {
  50% { transform: translateX(-50%) translateY(-5px); }
}

/* Nearest age mark lights up */
.finder-scale span {
  transition: color 0.25s, transform 0.25s;
}
.finder-scale span.active {
  color: #c8141b;
  font-weight: 800;
  transform: translateY(-2px) scale(1.15);
}

/* Age number bounces when it changes */
.motion .finder-age.bump span {
  display: inline-block;
  animation: hsh-age 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes hsh-age {
  0% { transform: scale(1); }
  40% { transform: scale(1.22) rotate(-3deg); }
  100% { transform: scale(1); }
}

/* Entrance: card fades up, then its pieces follow one by one */
.motion .finder-card {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  transition: opacity 0.9s ease-in-out, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion .finder-card.in {
  opacity: 1;
  transform: none;
}
.motion .finder-card::before {
  transform: scale(0);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}
.motion .finder-card.in::before {
  transform: scale(1);
  animation: hsh-breathe 6s ease-in-out 1.5s infinite;
}
@keyframes hsh-breathe {
  50% { transform: scale(1.12); }
}
.motion .finder-ask > *,
.motion .finder-results {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease-in-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion .finder-results {
  transform: translateX(60px);
}
.motion .finder-card.in .finder-ask > *,
.motion .finder-card.in .finder-results {
  opacity: 1;
  transform: none;
}
.motion .finder-card.in .finder-ask > :nth-child(1) { transition-delay: 0.2s; }
.motion .finder-card.in .finder-ask > :nth-child(2) { transition-delay: 0.32s; }
.motion .finder-card.in .finder-ask > :nth-child(3) { transition-delay: 0.44s; }
.motion .finder-card.in .finder-ask > :nth-child(4) { transition-delay: 0.56s; }
.motion .finder-card.in .finder-ask > :nth-child(5) { transition-delay: 0.64s; }
.motion .finder-card.in .finder-ask > :nth-child(6) { transition-delay: 0.72s; }
.motion .finder-card.in .finder-results { transition-delay: 0.5s; }

/* Switching programs: the old card slides out, the new one slides in */
.motion .finder-result.leave {
  animation: hsh-result-out 0.22s ease-in forwards;
}
@keyframes hsh-result-out {
  to {
    opacity: 0;
    transform: translateX(-30px) scale(0.98);
  }
}
.motion .finder-result.pop {
  animation: hsh-result-in 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes hsh-result-in {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.98);
  }
}
.motion .finder-result.pop > :not(.finder-piece) {
  animation: hsh-rise-sm 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.motion .finder-result.pop > .age-chip { animation-delay: 0.08s; }
.motion .finder-result.pop > h3 { animation-delay: 0.16s; }
.motion .finder-result.pop > p { animation-delay: 0.24s; }
.motion .finder-result.pop > .finder-actions { animation-delay: 0.32s; }
@keyframes hsh-rise-sm {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.motion .finder-result .finder-piece {
  animation: hsh-piece-bob 3s ease-in-out infinite;
}
.motion .finder-result.pop .finder-piece {
  animation: hsh-piece 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), hsh-piece-bob 3s ease-in-out 0.8s infinite;
}
@keyframes hsh-piece {
  0% { transform: translateY(-50px) rotate(-40deg) scale(0.6); opacity: 0; }
  60% { transform: translateY(6px) rotate(10deg) scale(1.05); opacity: 1; }
  100% { transform: none; }
}
@keyframes hsh-piece-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .finder-card,
  .finder-ask > *,
  .finder-results {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* =========================================================================
   Home page programs slider on phones: one card at a time, photo on top,
   dots and swipe.
   ========================================================================= */
.slider-dots {
  display: none;
}
@media (max-width: 700px) {
  .program-grid {
    gap: 0;
  }
  .program-pair {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
  }
  .program-pair .program-picture {
    display: block;
    order: -1;
    aspect-ratio: 16 / 10;
    clip-path: none;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
  }
  .program-pair .program-card {
    min-height: 0;
    border-radius: 0 0 16px 16px;
    padding: 22px 22px 24px;
  }
  .program-card h3 {
    font-size: 22px;
    margin: 6px 0 10px;
  }
  .program-card p {
    font-size: 15px;
  }
  .slider-controls {
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
  }
  .slider-controls button {
    width: 46px;
    height: 46px;
    color: white;
    font-size: 18px;
  }
  .slider-dots {
    display: flex;
    gap: 8px;
    order: 0;
  }
  .slider-controls [data-slide="-1"] {
    order: -1;
  }
  .slider-controls [data-slide="1"] {
    order: 1;
  }
  .slider-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ffffff55;
    transition: width 0.3s, background 0.3s;
  }
  .slider-dots button[aria-current="true"] {
    width: 26px;
    background: #ed1c24;
  }
}


/* Age marks line up exactly with the slider handle (same maths as the
   handle: a 38px thumb travels from 19px to 100% - 19px). */
.finder-scale {
  display: block;
  position: relative;
  height: 34px;
  margin-top: 6px;
}
.finder-scale span {
  position: absolute;
  top: 10px;
  left: calc(var(--p) * 100% + 19px - var(--p) * 38px);
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #4a4e55;
  line-height: 1;
  transition: color 0.25s, transform 0.25s;
}
.finder-scale span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: #dedbd2;
  transform: translateX(-50%);
}
.finder-scale span.active {
  color: #c8141b;
  font-weight: 800;
  transform: translateX(-50%) scale(1.25);
}
.finder-scale span.active::before {
  background: #ed1c24;
}
.finder-scale-unit {
  text-align: right;
  font-size: 12px;
  color: #4a4e55;
  margin-top: -2px;
}
@media (max-width: 700px) {
  /* Too tight for every number on phones: keep the tick, show even years. */
  .finder-scale span.odd {
    font-size: 0;
  }
  .finder-scale span.odd.active {
    font-size: 13px;
  }
}
