/* ChatterBox theme — v0.6 layer: fluid type, phone layouts and motion.
   Loads after main.css. Every animation lives inside a no-preference media
   query, so "Reduce motion" on the device switches all of it off. */

:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);          /* fast start, soft landing */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);    /* small overshoot for pops */
  --dur-slow: 640ms;
  --header-h: 76px;
  --gutter: var(--space-6);
}
@media (max-width: 640px) { :root { --header-h: 64px; --gutter: var(--space-4); } }

/* =====================================================================
   1. Readability
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body.cbx { text-rendering: optimizeLegibility; font-optical-sizing: auto; font-kerning: normal; }
.cbx { -webkit-tap-highlight-color: transparent; }
.cbx h1, .cbx h2, .cbx h3 { text-wrap: balance; }
.cbx p, .cbx li, .cbx blockquote, .cbx figcaption { text-wrap: pretty; }
.cbx p, .cbx li, .cbx h1, .cbx h2, .cbx h3 { overflow-wrap: break-word; }
.cbx ::selection { background: var(--sun-100); color: var(--ink-900); }

/* Fluid headings: scale smoothly with the screen instead of jumping at breakpoints. */
.cbx-hero__title { font-size: clamp(40px, 4.4vw + 18px, 68px); line-height: 1.06; }
.cbx-photo-hero h1 { font-size: clamp(34px, 3.2vw + 20px, 56px); line-height: 1.08; }
.cbx-page-hero h1 { font-size: clamp(34px, 2.8vw + 20px, 52px); line-height: 1.1; }
.cbx-signup-stage h1 { font-size: clamp(40px, 4vw + 20px, 64px); line-height: 1.06; }
.cbx-section__head h2, .cbx-split__title, .cbx-cta h2 { font-size: clamp(28px, 1.4vw + 22px, 38px); line-height: 1.16; }
.cbx-signup__head .cbx-form__title { font-size: clamp(28px, 1.4vw + 22px, 38px); line-height: 1.16; }
.cbx-highlight--feature h3 { font-size: clamp(28px, 1.4vw + 22px, 38px); line-height: 1.16; }
.cbx-prose h2 { font-size: clamp(25px, 1vw + 20px, 30px); line-height: 1.2; }
.cbx-stats__num { font-size: clamp(40px, 2vw + 30px, 52px); line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Leads and intros: 1.6 line height, comfortable measure. */
.cbx-hero__lead, .cbx-photo-hero p, .cbx-page-hero p, .cbx-split__text, .cbx-section__head p, .cbx-signup-stage__lead {
  font-size: clamp(17px, .4vw + 15.5px, 19px); line-height: 1.6;
}
.cbx-photo-hero p { max-width: 44ch; }
.cbx .cbx-hero__lead { margin-top: clamp(26px, 1.2vw + 16px, 34px); }  /* clears the squiggle under the headline */
/* `.cbx p { margin: 0 }` outranks single-class rules, so restore the paragraph spacing they meant to set. */
.cbx .cbx-split__text { margin-top: var(--space-3); }
.cbx .cbx-footer__about { margin-top: var(--space-4); }
.cbx .cbx-signup-stage__lead { margin-top: var(--space-3); }
.cbx-prose { max-width: 68ch; font-size: 18px; line-height: 1.7; }
.cbx-prose > * + * { margin-top: 1em; }
.cbx-prose li + li { margin-top: .4em; }

/* Body copy on cards: a touch larger and looser on phones, where it's read at arm's length. */
@media (max-width: 640px) {
  .cbx { font-size: 17px; line-height: 1.65; }
  .cbx-service-card p, .cbx-photo-card p, .cbx-pub-card p, .cbx-age-card p, .cbx-steps p { font-size: 16px; line-height: 1.6; }
  .cbx-team-card p { font-size: 14.5px; line-height: 1.5; }
  .cbx-event-meta { font-size: 16px; line-height: 1.5; }
  .cbx-field .cbx-help { font-size: 14px; line-height: 20px; }
  .cbx-quote blockquote, .cbx-testimony blockquote { font-size: 17px; line-height: 1.6; }
  .cbx-faq summary { font-size: 17px; line-height: 1.45; padding: var(--space-4); }
  .cbx-faq details > div { padding: 0 var(--space-4) var(--space-4); line-height: 1.65; }
  .cbx-contact-cards span { font-size: 14px; }
}

/* =====================================================================
   2. Touch targets and touch behaviour
   ===================================================================== */
.cbx-btn, .cbx-chip, .cbx-check span, .cbx-menu-btn, .cbx-faq summary, .cbx-video { touch-action: manipulation; }
.cbx-chip { min-height: 44px; }
.cbx-event-card .cbx-btn { min-height: 44px; }
.cbx-footer ul a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.cbx-footer ul { gap: 0; }
@media (max-width: 640px) {
  .cbx-footer__grid { gap: var(--space-5); }
  .cbx-footer__grid > div:first-child { padding-bottom: var(--space-2); }
  .cbx-footer { padding-bottom: calc(var(--space-6) + 76px + env(safe-area-inset-bottom, 0px)); }   /* room for the action bar */
}

/* Hover effects only where there is a real pointer; touch gets a press instead. */
@media (hover: none) {
  .cbx-service-card:hover, .cbx-photo-card:hover, .cbx-polaroid:hover, .cbx-team-card:hover { transform: rotate(var(--tilt, 0deg)) translateY(var(--lift, 0)); box-shadow: none; }
  .cbx-photo-card:hover, .cbx-service-card:hover { transform: none; }
  .cbx-photo-card:hover .cbx-photo-card__img img, .cbx-highlight:hover img, .cbx-gallery a:hover img { transform: none; }
  .cbx-team-card:hover img { filter: grayscale(1) contrast(1.05); }
  .cbx-team-card:focus-within img, .cbx-team-card.is-in-view img { filter: none; }
}

/* =====================================================================
   3. Header and menu
   ===================================================================== */
.cbx-header { view-transition-name: cbx-header; transition: box-shadow var(--dur-base) ease-out, translate 360ms var(--ease-out), background-color var(--dur-base) ease-out; }
.cbx-header__inner { min-height: var(--header-h); transition: min-height 300ms var(--ease-out); }
.cbx-header.is-scrolled { box-shadow: var(--shadow-sm); }
@media (min-width: 641px) { .cbx-header.is-scrolled { --header-h: 64px; } .cbx-header__logo img { transition: height 300ms var(--ease-out); } .cbx-header.is-scrolled .cbx-header__logo img { height: 38px; } }
.cbx-header.is-hidden { translate: 0 -100%; }
.cbx-nav__cta { display: none; }

/* Menu button: a hamburger that turns into a cross. */
.cbx-menu-btn { align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px 10px 14px; cursor: pointer; }
.cbx-menu-btn__icon { position: relative; width: 18px; height: 12px; }
.cbx-menu-btn__icon::before, .cbx-menu-btn__icon::after, .cbx-menu-btn__icon i { content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 320ms var(--ease-out), opacity 200ms ease-out, top 320ms var(--ease-out); }
.cbx-menu-btn__icon::before { top: 0; }
.cbx-menu-btn__icon i { top: 5px; }
.cbx-menu-btn__icon::after { top: 10px; }
.cbx-menu-btn[aria-expanded="true"] .cbx-menu-btn__icon::before { top: 5px; transform: rotate(45deg); }
.cbx-menu-btn[aria-expanded="true"] .cbx-menu-btn__icon::after { top: 5px; transform: rotate(-45deg); }
.cbx-menu-btn[aria-expanded="true"] .cbx-menu-btn__icon i { opacity: 0; transform: scaleX(.2); }

@media (max-width: 1180px) {
  /* The nav becomes a full-screen sheet under the header. It is always in the DOM
     so it can animate; visibility keeps it out of the tab order while closed. */
  #cbx-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
    z-index: var(--z-dropdown);
    background: var(--surface);
    overflow-y: auto; overscroll-behavior: contain;
    padding: var(--space-5) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    margin: 0;
    visibility: hidden; opacity: 0; translate: 0 -12px;
    transition: opacity 260ms ease-out, translate 420ms var(--ease-out), visibility 0s linear 420ms;
  }
  .cbx-menu-open #cbx-nav { visibility: visible; opacity: 1; translate: 0 0; transition: opacity 260ms ease-out, translate 420ms var(--ease-out), visibility 0s; }
  .cbx-nav, .cbx-menu-open .cbx-nav {
    display: grid; gap: 0; position: static; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .cbx-nav li { border-bottom: 1px solid var(--border); }
  .cbx-nav a, .cbx-menu-open .cbx-nav a {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 60px; padding: var(--space-3) 0;
    font: 800 clamp(22px, 2vw + 16px, 28px)/1.2 var(--font-display);
    border-bottom: 0;
  }
  .cbx-nav a::after { content: "→"; font-size: .8em; color: var(--link); opacity: .7; transition: translate 300ms var(--ease-out); }
  .cbx-nav a:active::after { translate: 4px 0; }
  .cbx-nav a[aria-current="page"] { color: var(--link); }
  .cbx-nav__cta { display: flex; width: 100%; margin-top: var(--space-6); min-height: 56px; font-size: 18px; }
  body.cbx-menu-open { overflow: hidden; }
  .cbx-menu-open .cbx-header { translate: none; box-shadow: none; }   /* any translate would trap the fixed sheet inside the header */
}
@media (max-width: 640px) {
  .cbx-header__logo img { height: 36px; }
  .cbx-header__logo { display: flex; align-items: center; min-height: 44px; }
  .cbx-header__inner { gap: var(--space-4); }
}

/* =====================================================================
   4. Phone layouts
   ===================================================================== */
.cbx-section { padding-block: clamp(56px, 7vw + 28px, 96px); }
.cbx-section--tight { padding-top: 0; }
.cbx-section--tight-bottom { padding-bottom: 0; }
.cbx-section__head { margin-bottom: clamp(28px, 3vw + 16px, 48px); }

@media (max-width: 640px) {
  /* Home hero: shorter, so the first buttons sit in the first screen. */
  .cbx-hero { padding: var(--space-6) 0 var(--space-7); }
  .cbx-hero__grid { gap: var(--space-6); }
  .cbx-hero__actions { margin-top: var(--space-5); }
  .cbx-hero .cbx-cutout-stage { max-width: 340px; }
  .cbx-hero > .cbx-deco { display: none; }

  /* Inner page heroes */
  .cbx-photo-hero__inner { padding-block: var(--space-6) 0; gap: var(--space-4); }
  .cbx-photo-hero__text { padding-bottom: var(--space-4); }
  .cbx-photo-hero__figure { min-height: 220px; max-width: 320px; }
  .cbx-photo-hero__figure .cbx-cutout { max-height: 260px; }
  .cbx-photo-hero__figure .cbx-sticker { font-size: 14px; padding: 6px 13px; }

  /* Marquee and stats */
  .cbx-marquee__track { font-size: 20px; line-height: 26px; gap: var(--space-5); }
  .cbx-marquee__track span { gap: var(--space-5); }
  .cbx-marquee { padding: 10px 0; }
  .cbx-stats { padding: var(--space-6) 0; }
  .cbx-stats__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-4); }
  .cbx-stats__list li:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* Age cards: cut-out sits top right, text and button get the full width. */
  .cbx-card-grid--roomy { row-gap: var(--space-8); padding-top: var(--space-6); }
  .cbx-age-card--figure { min-height: 0; padding: var(--space-5); }
  .cbx-age-card--figure > :not(.cbx-age-card__cutout) { max-width: none; }
  .cbx-age-card--figure > .cbx-badge, .cbx-age-card--figure > .cbx-age-card__ages { max-width: 56%; }
  .cbx-age-card--figure > .cbx-age-card__ages { margin-bottom: 52px; }
  .cbx-age-card__cutout { top: -32px; bottom: auto; right: 8px; height: 188px; max-width: 44%; object-position: top right; }
  .cbx-age-card--figure .cbx-btn { width: 100%; }

  /* Collage: a little shorter */
  .cbx-collage { min-height: 330px; }

  /* Highlight cards */
  .cbx-highlight { min-height: 300px; }
  .cbx-highlight--feature { min-height: 420px; }
  .cbx-highlight__body { padding: var(--space-4); }

  /* Gallery: two columns of photos instead of one long column */
  .cbx-gallery { columns: 2; column-gap: 10px; }
  .cbx-gallery a { margin-bottom: 10px; border-radius: 12px; }
  .cbx-video-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .cbx-video__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }

  /* CTA band */
  .cbx-cta { padding: var(--space-6) var(--space-5); }
  .cbx-cta--figure { padding-bottom: 236px; }
  .cbx-cta__cutout { height: 250px; }
  .cbx-cta .cbx-btn { width: 100%; }
  .cbx-cta > .cbx-deco { width: 64px !important; height: 64px !important; left: auto !important; right: -14px !important; top: -26px !important; }

  /* Forms */
  .cbx-form { padding: var(--space-5) var(--space-4); gap: var(--space-4); }
  .cbx-split { gap: var(--space-6); }
  .cbx-enquiry-figure__art { height: 210px; }

  /* Sign-up page: keep decorations away from the title */
  .cbx-signup-stage { padding-block: var(--space-6) var(--space-8); }
  .cbx-signup-stage > .cbx-deco { display: none; }
  .cbx-signup__set legend { font-size: 20px; }

  /* Steps, team, chips */
  .cbx-steps li { padding: var(--space-6) var(--space-4) var(--space-4); }
  .cbx-team { gap: var(--space-5) var(--space-3); }
  .cbx-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scroll-padding-inline: var(--gutter); }
  .cbx-chips::-webkit-scrollbar { display: none; }
  .cbx-chip { flex: 0 0 auto; }
  .cbx-section__head--row .cbx-btn { min-height: 44px; }
}

/* ---------- Swipe rails: rows of cards become a horizontal, snapping strip on phones ---------- */
@media (max-width: 640px) {
  .cbx-rail {
    display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: var(--space-4);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter) 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cbx-rail::-webkit-scrollbar { display: none; }
  .cbx-rail > * { flex: 0 0 min(84%, 340px); scroll-snap-align: start; min-width: 0; }
  .cbx-rail.cbx-testimonies > * { padding-top: 20px; }
  .cbx-rail.cbx-card-grid--roomy { padding-top: var(--space-7); }
  .cbx-rail-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-2); }
  .cbx-rail-dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .cbx-rail-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong); opacity: .5; transition: width 360ms var(--ease-out), opacity 200ms ease-out, background-color 200ms ease-out; }
  .cbx-rail-dots button[aria-current="true"]::before { width: 22px; opacity: 1; background: var(--action); }
}
@media (min-width: 641px) { .cbx-rail-dots { display: none; } }

/* ---------- Phone action bar ---------- */
.cbx-mbar { display: none; }
@media (max-width: 640px) {
  .cbx-mbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: calc(var(--z-header) + 1);
    display: flex; gap: 8px; padding: 8px;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
    border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-lg);
    translate: 0 calc(100% + 32px); opacity: 0; pointer-events: none;
    transition: translate 460ms var(--ease-out), opacity 240ms ease-out;
  }
  .cbx-mbar.is-shown { translate: 0 0; opacity: 1; pointer-events: auto; }
  .cbx-mbar .cbx-btn { flex: 1; min-height: 48px; padding: 10px 14px; font-size: 16px; }
  .cbx-mbar .cbx-btn--outline { background: var(--surface-raised); }
  .cbx-mbar svg { width: 20px; height: 20px; }
  .cbx-menu-open .cbx-mbar, .cbx-modal-open .cbx-mbar { translate: 0 calc(100% + 32px); opacity: 0; }
}

/* ---------- Pop-ups: a bottom sheet on phones ---------- */
.cbx-modal__panel { overscroll-behavior: contain; }
@media (max-width: 640px) {
  .cbx-modal { place-items: end stretch; padding: 0; }
  .cbx-modal__panel { width: 100%; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface-raised); }
  .cbx-modal__panel::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--border-strong); opacity: .5; margin: 10px auto 0; }
  .cbx-modal__panel .cbx-form { border-radius: 0; }
}

/* ---------- Lightbox on phones ---------- */
.cbx-lightbox__count { position: absolute; top: 22px; left: 50%; translate: -50% 0; font: 800 14px/20px var(--font-body); color: var(--cream-50); opacity: .8; font-variant-numeric: tabular-nums; }
.cbx-lightbox__stage { touch-action: pan-y pinch-zoom; }
.cbx-lightbox__stage img { max-height: calc(100dvh - 150px); user-select: none; -webkit-user-drag: none; }
@media (max-width: 640px) {
  .cbx-lightbox { padding: 64px 0 96px; }
  .cbx-lightbox__stage img { border-radius: 0; max-height: calc(100dvh - 170px); }
  .cbx-lightbox__btn--prev, .cbx-lightbox__btn--next { top: auto; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; }
  .cbx-lightbox__btn--prev { left: calc(50% - 72px); }
  .cbx-lightbox__btn--next { right: calc(50% - 72px); }
  .cbx-lightbox__stage iframe, .cbx-lightbox__stage video { width: 100vw; max-width: 100vw; border-radius: 0; }
}

/* ---------- FAQ: a plus that turns into a cross ---------- */
.cbx-faq summary::after, .cbx-faq details[open] summary::after { content: "+"; transition: rotate 360ms var(--ease-out); flex: 0 0 auto; }
.cbx-faq details[open] summary::after { rotate: 45deg; }
.cbx-faq details { transition: box-shadow var(--dur-base) ease-out, border-color var(--dur-base) ease-out; }
.cbx-faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cbx-faq details > div { overflow: hidden; }

/* =====================================================================
   5. Motion — only when the device allows it
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 180ms ease-out both cbx-vt-out; }
  ::view-transition-new(root) { animation: 360ms var(--ease-out) both cbx-vt-in; }
  @keyframes cbx-vt-out { to { opacity: 0; } }
  @keyframes cbx-vt-in { from { opacity: 0; translate: 0 10px; } }

  /* Buttons: a springy press, a small lift on hover */
  .cbx-btn { transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out, scale 360ms var(--ease-spring), translate 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
  .cbx-btn:active { transform: none; scale: .96; transition-duration: 80ms; }
  @media (hover: hover) {
    .cbx-btn--primary:hover, .cbx-btn--sun:hover, .cbx-btn--light:hover { translate: 0 -2px; box-shadow: 0 8px 18px rgba(35, 26, 31, .16); }
    .cbx-photo-card, .cbx-service-card, .cbx-event-card, .cbx-pub-card { transition: box-shadow 360ms var(--ease-out), transform 420ms var(--ease-out), translate 420ms var(--ease-out); }
    .cbx-event-card:hover, .cbx-pub-card:hover { translate: 0 -4px; box-shadow: var(--shadow-md); }
    .cbx-photo-card__img img, .cbx-highlight img, .cbx-gallery img { transition: transform 700ms var(--ease-out); }
    .cbx-team-card, .cbx-polaroid { transition: transform 460ms var(--ease-spring), box-shadow 360ms var(--ease-out); }
  }
  /* Touch: cards sink a little under the finger */
  @media (hover: none) {
    .cbx-photo-card, .cbx-event-card, .cbx-highlight, .cbx-pub-card, .cbx-service-card, .cbx-video, .cbx-gallery a, .cbx-team-card { transition: scale 300ms var(--ease-out); }
    .cbx-photo-card:active, .cbx-event-card:active, .cbx-highlight:active, .cbx-pub-card:active, .cbx-service-card:active, .cbx-video:active, .cbx-gallery a:active { scale: .975; transition-duration: 120ms; }
  }
  .cbx-chip, .cbx-check span { transition: background-color 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out, scale 300ms var(--ease-spring); }
  .cbx-chip:active, .cbx-check span:active { scale: .94; }
  .cbx-input, .cbx-select, .cbx-textarea { transition: border-color 200ms ease-out, box-shadow 260ms var(--ease-out); }
  .cbx-input:focus, .cbx-select:focus, .cbx-textarea:focus { box-shadow: 0 0 0 6px rgba(10, 107, 108, .12); }

  /* Page entrance: hero text rises, the cut-out pops up, stickers land with a bounce */
  .cbx-js .cbx-hero__grid > div:first-child > *,
  .cbx-js .cbx-photo-hero__text > *,
  .cbx-js .cbx-signup-stage__intro > *,
  .cbx-js .cbx-page-hero .cbx-wrap > * { animation: cbx-rise 760ms var(--ease-out) both; }
  .cbx-js .cbx-hero__grid > div:first-child > :nth-child(2), .cbx-js .cbx-photo-hero__text > :nth-child(2), .cbx-js .cbx-signup-stage__intro > :nth-child(2), .cbx-js .cbx-page-hero .cbx-wrap > :nth-child(2) { animation-delay: 70ms; }
  .cbx-js .cbx-hero__grid > div:first-child > :nth-child(3), .cbx-js .cbx-photo-hero__text > :nth-child(3), .cbx-js .cbx-signup-stage__intro > :nth-child(3), .cbx-js .cbx-page-hero .cbx-wrap > :nth-child(3) { animation-delay: 140ms; }
  .cbx-js .cbx-hero__grid > div:first-child > :nth-child(4), .cbx-js .cbx-photo-hero__text > :nth-child(4) { animation-delay: 210ms; }
  .cbx-js .cbx-hero__grid > div:first-child > :nth-child(5) { animation-delay: 280ms; }
  .cbx-js .cbx-cutout-stage__shape, .cbx-js .cbx-photo-hero__blob { animation: cbx-grow 900ms var(--ease-out) both; animation-delay: 120ms; }
  .cbx-js .cbx-cutout-stage__shape--b { animation-delay: 60ms; }
  .cbx-js .cbx-cutout-stage__shape--c { animation: cbx-pop 700ms var(--ease-spring) both; animation-delay: 380ms; }
  .cbx-js .cbx-cutout-stage .cbx-cutout, .cbx-js .cbx-photo-hero__figure .cbx-cutout { animation: cbx-cutout-in 1000ms var(--ease-out) both; animation-delay: 200ms; }
  .cbx-js .cbx-cutout-stage .cbx-sticker, .cbx-js .cbx-photo-hero__figure .cbx-sticker, .cbx-js .cbx-signup-stage__sticker { animation: cbx-sticker-in 700ms var(--ease-spring) both; animation-delay: 620ms; }
  .cbx-js .cbx-cutout-stage .cbx-sticker + .cbx-sticker, .cbx-js .cbx-photo-hero__figure .cbx-sticker + .cbx-sticker { animation-delay: 760ms; }
  .cbx-js .cbx-signup-stage__form { animation: cbx-rise 900ms var(--ease-out) both; animation-delay: 160ms; }
  @keyframes cbx-rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
  @keyframes cbx-grow { from { opacity: 0; scale: .86; } to { opacity: 1; scale: 1; } }
  @keyframes cbx-pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
  @keyframes cbx-cutout-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
  @keyframes cbx-sticker-in { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }

  /* Gentle float on the hero cut-out once it has landed */
  .cbx-js .cbx-cutout-stage__shape--c { animation: cbx-pop 700ms var(--ease-spring) 380ms both, cbx-float 6s ease-in-out 1.2s infinite; }
  @keyframes cbx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

  /* Scroll reveal: main.js tags blocks with data-reveal and adds .is-in when they enter the screen.
     Uses the individual translate/scale properties so tilted cards keep their rotation. */
  .cbx-js [data-reveal] { transition: opacity 720ms var(--ease-out), translate 820ms var(--ease-out), scale 820ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .cbx-js [data-reveal]:not(.is-in) { opacity: 0; translate: 0 28px; }
  .cbx-js [data-reveal="fade"]:not(.is-in) { translate: none; }
  .cbx-js [data-reveal="pop"]:not(.is-in) { translate: 0 16px; scale: .94; }
  .cbx-js [data-reveal="side"]:not(.is-in) { translate: 32px 0; }
  .cbx-reveal-all [data-reveal] { opacity: 1 !important; translate: none !important; scale: none !important; }

  /* Pop-ups and menus */
  .cbx-modal:not([hidden]) .cbx-modal__backdrop, .cbx-lightbox:not([hidden]) { animation: cbx-fade 260ms ease-out both; }
  .cbx-modal:not([hidden]) .cbx-modal__panel { animation: cbx-panel-in 460ms var(--ease-out) both; }
  .cbx-modal.is-closing .cbx-modal__backdrop, .cbx-lightbox.is-closing { animation: cbx-fade 220ms ease-in reverse both; }
  .cbx-modal.is-closing .cbx-modal__panel { animation: cbx-panel-out 240ms ease-in both; }
  .cbx-lightbox:not([hidden]) .cbx-lightbox__stage > :first-child { animation: cbx-zoom-in 420ms var(--ease-out) both; }
  @keyframes cbx-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cbx-panel-in { from { opacity: 0; translate: 0 24px; scale: .97; } }
  @keyframes cbx-panel-out { to { opacity: 0; translate: 0 16px; scale: .98; } }
  @keyframes cbx-zoom-in { from { opacity: 0; scale: .94; } }
  @media (max-width: 640px) {
    @keyframes cbx-panel-in { from { translate: 0 100%; } }
    @keyframes cbx-panel-out { to { translate: 0 100%; } }
  }
  @media (max-width: 1180px) {
    .cbx-menu-open .cbx-nav li { animation: cbx-rise 520ms var(--ease-out) both; }
    .cbx-menu-open .cbx-nav li:nth-child(2) { animation-delay: 40ms; }
    .cbx-menu-open .cbx-nav li:nth-child(3) { animation-delay: 80ms; }
    .cbx-menu-open .cbx-nav li:nth-child(4) { animation-delay: 120ms; }
    .cbx-menu-open .cbx-nav li:nth-child(5) { animation-delay: 160ms; }
    .cbx-menu-open .cbx-nav li:nth-child(6) { animation-delay: 200ms; }
    .cbx-menu-open .cbx-nav li:nth-child(7) { animation-delay: 240ms; }
    .cbx-menu-open .cbx-nav li:nth-child(n+8), .cbx-menu-open .cbx-nav__cta { animation: cbx-rise 520ms var(--ease-out) 280ms both; }
  }

  /* Hero photo drifts slower than the page (where scroll-driven animation is supported) */
  @supports (animation-timeline: scroll()) {
    .cbx-photo-hero__bg { animation: cbx-parallax linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
    @keyframes cbx-parallax { to { translate: 0 120px; scale: 1.08; } }
  }
}

@media print {
  [data-reveal] { opacity: 1 !important; translate: none !important; }
  .cbx-mbar, .cbx-menu-btn, .cbx-modal, .cbx-lightbox { display: none !important; }
}

/* =====================================================================
   v0.7 — centred hero cut-outs, footer credit
   ===================================================================== */
/* The cut-out stands in the middle of its yellow card (the card spans the right 78% of the figure). */
.cbx-photo-hero__figure .cbx-cutout { right: auto; left: 61%; transform: translateX(-50%); max-width: 74%; object-fit: contain; object-position: bottom center; }
@media (max-width: 900px) {
  .cbx-photo-hero__figure { margin-inline: auto; }
  .cbx-photo-hero__blob { left: 11%; right: 11%; width: auto; }
  .cbx-photo-hero__figure .cbx-cutout { left: 50%; }
}

.cbx-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); }
.cbx-footer__credit { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cbx-footer__credit a { color: inherit; text-decoration: none; font-size: inherit; }
.cbx-footer__credit a:hover { text-decoration: underline; }

/* =====================================================================
   v0.9 — arriving from the launch page: the red cover with the white
   logo opens up as a shrinking circle to reveal the home page.
   ===================================================================== */
html.cbx-arriving::before, html.cbx-arriving::after { content: ""; position: fixed; z-index: 2147483000; pointer-events: none; }
html.cbx-arriving::before { inset: 0; background: var(--red-600); clip-path: circle(150% at 50% 50%); }
html.cbx-arriving::after { left: 50%; top: 50%; width: 150px; height: 201px; margin: -100px 0 0 -75px; background: url("../images/logo/cbx-mark-white.svg") center / contain no-repeat; }
html.cbx-arriving body { overflow: hidden; }
html.cbx-arrived::before { animation: cbx-arrive-open 1000ms cubic-bezier(.65, 0, .35, 1) forwards; }
html.cbx-arrived::after { animation: cbx-arrive-mark 600ms cubic-bezier(.55, 0, .9, .3) forwards; }
@keyframes cbx-arrive-open { to { clip-path: circle(0% at 50% 50%); } }
@keyframes cbx-arrive-mark { 30% { scale: 1.12; } to { scale: .2; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html.cbx-arrived::before, html.cbx-arrived::after { animation: cbx-arrive-fade 250ms ease-out forwards; }
  @keyframes cbx-arrive-fade { to { opacity: 0; } }
}
