/* ChatterBox Academy — component styles.
   The same file ships in the WordPress theme as assets/css/cbx-components.css.
   Every value is a token: change tokens.json, not this file. */

.cbx, .cbx * { box-sizing: border-box; }
.cbx {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 28px;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
.cbx h1, .cbx h2, .cbx h3, .cbx h4 { font-family: var(--font-display); color: var(--ink); margin: 0; }
.cbx p { margin: 0; }
.cbx :where(a:not([class])) { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cbx :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cbx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 640px) { .cbx-wrap { padding: 0 var(--space-4); } }

/* ---------- Eyebrow ---------- */
.cbx-eyebrow {
  display: inline-block;
  font: 800 13px/16px var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: var(--space-3);
}

/* ---------- Buttons ---------- */
.cbx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px;
  padding: 14px var(--space-5);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font: 800 16px/20px var(--font-body);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.cbx-btn:active { transform: translateY(1px); }
.cbx-btn--primary { background: var(--action); color: var(--on-action); }
.cbx-btn--primary:hover { background: var(--action-hover); }
.cbx-btn--outline { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.cbx-btn--outline:hover { border-color: var(--ink); }
.cbx-btn--sun { background: var(--accent-sun); color: var(--on-accent); }
.cbx-btn--sun:hover { background: #ffd76e; }
.cbx-btn--light { background: var(--white); color: var(--red-700); }
.cbx-btn--lg { min-height: 56px; padding: 16px var(--space-6); font-size: 18px; }
.cbx-btn--block { width: 100%; }
@media (max-width: 640px) { .cbx-btn--lg { width: 100%; } }

/* ---------- Badges (age groups) ---------- */
.cbx-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font: 800 13px/20px var(--font-body);
  letter-spacing: .02em;
}
.cbx-badge--junior { background: var(--accent-sun); color: var(--on-accent); }
.cbx-badge--intermediate { background: var(--accent-teal); color: var(--on-accent); }
.cbx-badge--senior { background: var(--red-600); color: var(--white); }
.cbx-badge--neutral { background: var(--surface-sunken); color: var(--ink); }

/* ---------- Speech-bubble shape (the logo's silhouette) ---------- */
.cbx-bubble { border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; }
.cbx-bubble--right { border-radius: var(--radius-xl) var(--radius-xl) 0 var(--radius-xl); }

/* ---------- Header ---------- */
.cbx-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}
.cbx-header__inner { display: flex; align-items: center; gap: var(--space-6); min-height: 76px; }
.cbx-header__logo img { display: block; height: 44px; width: auto; }
.cbx-header__inner > nav { margin-left: auto; }
.cbx-nav { display: flex; gap: var(--space-5); margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.cbx-nav a { font: 700 16px/20px var(--font-body); color: var(--ink); text-decoration: none; white-space: nowrap; padding: var(--space-2) 0; border-bottom: 3px solid transparent; }
.cbx-nav a:hover, .cbx-nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.cbx-menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--border-strong); border-radius: var(--radius-pill); padding: 10px 16px; font: 800 15px/20px var(--font-body); color: var(--ink); }
@media (max-width: 1180px) {
  .cbx-nav, .cbx-header__cta { display: none; }
  .cbx-menu-btn { display: inline-flex; }
}

/* ---------- Home hero ---------- */
.cbx-hero { padding: var(--space-8) 0 var(--space-9); background: var(--surface); overflow: hidden; }
.cbx-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-7); align-items: center; }
.cbx-hero__title { font: 900 68px/72px var(--font-display); letter-spacing: -.02em; }
.cbx-hero__title em { font-style: normal; color: var(--brand); }
.cbx-hero__lead { font: 500 19px/30px var(--font-body); color: var(--ink-muted); margin-top: var(--space-5); max-width: 34ch; }
.cbx-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.cbx-hero__art { position: relative; aspect-ratio: 1 / 1; }
.cbx-hero__art .cbx-bubble { position: absolute; }
@media (max-width: 900px) { .cbx-hero__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cbx-hero__title { font-size: 44px; line-height: 48px; } }

/* ---------- Inner page hero ---------- */
.cbx-page-hero { background: var(--red-600); color: var(--white); padding: var(--space-8) 0; }
.cbx-page-hero .cbx-eyebrow { color: var(--white); opacity: .9; }
.cbx-page-hero h1 { color: var(--white); font: 900 52px/58px var(--font-display); letter-spacing: -.015em; max-width: 18ch; }
.cbx-page-hero p { font: 500 19px/30px var(--font-body); margin-top: var(--space-4); max-width: 46ch; }
.cbx-page-hero .cbx-btn { margin-top: var(--space-5); }
.cbx-page-hero--sun { background: var(--accent-sun); color: var(--on-accent); }
.cbx-page-hero--sun h1, .cbx-page-hero--sun .cbx-eyebrow { color: var(--on-accent); }
.cbx-page-hero--teal { background: var(--accent-teal); color: var(--on-accent); }
.cbx-page-hero--teal h1, .cbx-page-hero--teal .cbx-eyebrow { color: var(--on-accent); }
@media (max-width: 640px) { .cbx-page-hero h1 { font-size: 36px; line-height: 42px; } }

/* ---------- Section ---------- */
.cbx-section { padding: var(--space-9) 0; }
.cbx-section--sunken { background: var(--surface-sunken); }
.cbx-section__head { text-align: center; max-width: 640px; margin: 0 auto var(--space-7); }
.cbx-section__head h2 { font: 800 38px/44px var(--font-display); letter-spacing: -.01em; }
.cbx-section__head p { color: var(--ink-muted); margin-top: var(--space-3); font-size: 19px; line-height: 30px; }
@media (max-width: 640px) { .cbx-section { padding: var(--space-8) 0; } .cbx-section__head h2 { font-size: 30px; line-height: 36px; } }

/* ---------- Centred card grid: a short last row centres ---------- */
.cbx-card-grid { --cols: 4; --gap: var(--space-6); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.cbx-card-grid > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.cbx-card-grid--3 { --cols: 3; }
.cbx-card-grid--2 { --cols: 2; }
@media (max-width: 1080px) { .cbx-card-grid { --cols: 2; --gap: var(--space-5); } }
@media (max-width: 640px) { .cbx-card-grid { --cols: 1; } }

/* ---------- Service card ---------- */
.cbx-service-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--dur-base) ease-out, transform var(--dur-base) ease-out;
}
.cbx-service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cbx-service-card__icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0;
  background: var(--red-100); color: var(--red-700);
}
.cbx-service-card__icon svg { width: 28px; height: 28px; }
.cbx-service-card h3 { font: 800 24px/30px var(--font-display); }
.cbx-service-card p { font-size: 15px; line-height: 24px; color: var(--ink-muted); flex: 1; }
.cbx-service-card__link { color: var(--link); font-weight: 800; font-size: 15px; text-decoration: none; }
.cbx-service-card__link::after { content: " →"; }

/* ---------- Age-group card ---------- */
.cbx-age-card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0;
  color: var(--ink);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.cbx-age-card--junior { background: var(--sun-100); }
.cbx-age-card--intermediate { background: var(--teal-100); }
.cbx-age-card--senior { background: var(--red-100); }
.cbx-age-card .cbx-badge { align-self: flex-start; }
.cbx-age-card__ages { font: 900 30px/36px var(--font-display); }
.cbx-age-card h3 { font: 800 24px/30px var(--font-display); }
.cbx-age-card p { font-size: 15px; line-height: 24px; flex: 1; }

/* ---------- Stats band ---------- */
.cbx-stats { background: var(--ink-900); color: var(--cream-50); padding: var(--space-7) 0; }
.cbx-stats__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6) var(--space-8); list-style: none; margin: 0; padding: 0; text-align: center; }
.cbx-stats__num { display: block; font: 900 52px/58px var(--font-display); color: var(--accent-sun); }
.cbx-stats__label { display: block; font: 600 15px/24px var(--font-body); margin-top: var(--space-1); }

/* ---------- Forms ---------- */
.cbx-form { display: grid; gap: var(--space-4); background: var(--surface-raised); padding: var(--space-6); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.cbx-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .cbx-form__row { grid-template-columns: 1fr; } .cbx-form { padding: var(--space-5); } }
.cbx-field { display: grid; gap: 6px; }
.cbx-field label { font: 700 15px/20px var(--font-body); color: var(--ink); }
.cbx-field .cbx-help { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cbx-input, .cbx-select, .cbx-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 16px/22px var(--font-body);
  color: var(--ink);
  background: var(--surface-raised);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.cbx-textarea { min-height: 120px; resize: vertical; }
.cbx-input:focus, .cbx-select:focus, .cbx-textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.cbx-input[aria-invalid="true"] { border-color: var(--danger); }
.cbx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Notices ---------- */
.cbx-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: 15px; line-height: 24px; }
.cbx-notice svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }
.cbx-notice--success { background: var(--teal-100); color: var(--ink); }
.cbx-notice--success svg { color: var(--success); }
.cbx-notice--error { background: var(--red-50); color: var(--ink); border: 2px solid var(--danger); }
.cbx-notice--error svg { color: var(--danger); }

/* ---------- Testimonial ---------- */
.cbx-quote { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.cbx-quote blockquote { margin: 0; padding: var(--space-6); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; font: 500 19px/30px var(--font-body); }
.cbx-quote figcaption { font-size: 15px; line-height: 22px; padding-left: var(--space-2); }
.cbx-quote figcaption strong { display: block; font-weight: 800; }
.cbx-quote figcaption span { color: var(--ink-muted); }

/* ---------- FAQ (native details) ---------- */
.cbx-faq { max-width: 820px; margin: 0 auto; display: grid; gap: var(--space-3); }
.cbx-faq details { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cbx-faq summary { cursor: pointer; list-style: none; padding: var(--space-4) var(--space-5); font: 800 18px/26px var(--font-display); display: flex; justify-content: space-between; gap: var(--space-4); }
.cbx-faq summary::-webkit-details-marker { display: none; }
.cbx-faq summary::after { content: "+"; font-size: 26px; color: var(--link); line-height: 26px; }
.cbx-faq details[open] summary::after { content: "–"; }
.cbx-faq details > div { padding: 0 var(--space-5) var(--space-5); color: var(--ink-muted); }

/* ---------- CTA band ---------- */
.cbx-cta {
  background: var(--red-600); color: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0;
  padding: var(--space-7) var(--space-6);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5);
}
.cbx-cta h2 { color: var(--white); font: 900 38px/44px var(--font-display); }
.cbx-cta p { margin-top: var(--space-2); font-size: 17px; }

/* ---------- Footer ---------- */
.cbx-footer { background: var(--ink-900); color: var(--cream-50); padding: var(--space-8) 0 var(--space-6); }
.cbx-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-6); }
.cbx-footer img { height: 44px; width: auto; display: block; }
.cbx-footer h4 { color: var(--cream-50); font: 800 15px/20px var(--font-body); letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--space-3); }
.cbx-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.cbx-footer a { color: var(--cream-50); text-decoration: none; font-size: 15px; }
.cbx-footer a:hover { text-decoration: underline; }
.cbx-footer__base { border-top: 1px solid rgba(255, 248, 243, .18); margin-top: var(--space-7); padding-top: var(--space-5); font-size: 13px; opacity: .85; }
@media (max-width: 900px) { .cbx-footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .cbx *, .cbx *::before, .cbx *::after { transition: none !important; animation: none !important; }
  .cbx-service-card:hover { transform: none; }
}

/* =====================================================================
   v0.2 — photography, cut-outs and playful elements
   ===================================================================== */

/* ---------- Decorative SVGs (sprite in footer: sparkle, squiggle, dots, quote, play, star) ---------- */
.cbx-deco { position: absolute; pointer-events: none; }
.cbx-deco svg, svg.cbx-deco { display: block; width: 100%; height: 100%; }
.cbx-deco--sun { color: var(--accent-sun); }
.cbx-deco--teal { color: var(--accent-teal); }
.cbx-deco--red { color: var(--brand); }
.cbx-deco--white { color: var(--white); }
.cbx-deco--ink { color: var(--ink-900); }

/* ---------- Squiggle underline on a highlighted word ---------- */
.cbx-squiggle { position: relative; display: inline-block; white-space: nowrap; }
.cbx-squiggle::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .32em;
  background: var(--accent-sun);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c12-8 22 4 34-2s20-6 30 0 22 6 32-2 16-4 20 0' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c12-8 22 4 34-2s20-6 30 0 22 6 32-2 16-4 20 0' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  z-index: -1;
}

/* ---------- Sticker: a tilted label ---------- */
.cbx-sticker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font: 900 15px/20px var(--font-display);
  letter-spacing: .01em;
  background: var(--accent-sun); color: var(--on-accent);
  box-shadow: 0 3px 0 rgba(35, 26, 31, .9);
  transform: rotate(var(--tilt, -6deg));
  white-space: nowrap;
}
.cbx-sticker--teal { background: var(--accent-teal); color: var(--on-accent); }
.cbx-sticker--red { background: var(--red-600); color: var(--white); }
.cbx-sticker--white { background: var(--white); color: var(--red-700); }
.cbx-sticker svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .cbx-sticker--wiggle:hover { animation: cbx-wiggle .5s ease-in-out; }
  @keyframes cbx-wiggle { 0%,100% { transform: rotate(var(--tilt, -6deg)); } 30% { transform: rotate(calc(var(--tilt, -6deg) + 6deg)); } 60% { transform: rotate(calc(var(--tilt, -6deg) - 4deg)); } }
}

/* ---------- Photo hero: tinted photograph behind the page title ---------- */
.cbx-photo-hero { position: relative; isolation: isolate; overflow: hidden; color: var(--white); background: var(--tint-red); }
.cbx-photo-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; filter: grayscale(1) contrast(1.05); }
.cbx-photo-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tint-red); mix-blend-mode: multiply; }
.cbx-photo-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(35, 26, 31, .45), rgba(35, 26, 31, 0) 65%); }
.cbx-photo-hero--teal { background: var(--tint-teal); }
.cbx-photo-hero--teal::before { background: var(--tint-teal); }
.cbx-photo-hero--sun { color: var(--on-accent); background: var(--accent-sun); }
.cbx-photo-hero--sun::before { background: var(--accent-sun); mix-blend-mode: normal; opacity: .9; }
.cbx-photo-hero--sun::after { display: none; }
.cbx-photo-hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-6); align-items: end; min-height: 440px; padding-block: var(--space-8) 0; }
.cbx-photo-hero__text { padding-bottom: var(--space-8); max-width: 640px; }
.cbx-photo-hero .cbx-eyebrow { color: inherit; opacity: .92; }
.cbx-photo-hero h1 { color: inherit; font: 900 56px/60px var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.cbx-photo-hero p { font: 500 19px/30px var(--font-body); margin-top: var(--space-4); max-width: 46ch; }
.cbx-photo-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.cbx-photo-hero__figure { position: relative; align-self: stretch; min-height: 360px; }
.cbx-photo-hero__figure .cbx-cutout { position: absolute; bottom: 0; right: 8%; height: 104%; max-height: 460px; width: auto; filter: drop-shadow(0 12px 24px rgba(35, 26, 31, .35)); }
.cbx-photo-hero__blob { position: absolute; right: 0; bottom: 0; width: 78%; height: 78%; background: var(--accent-sun); border-radius: var(--radius-xl) var(--radius-xl) 0 var(--radius-xl); transform: rotate(-4deg); transform-origin: bottom right; }
.cbx-photo-hero--sun .cbx-photo-hero__blob { background: var(--red-600); }
.cbx-photo-hero__figure .cbx-sticker { position: absolute; z-index: 2; }
.cbx-photo-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 28px; color: var(--surface); }
.cbx-photo-hero__wave svg { width: 100%; height: 100%; display: block; }
@media (max-width: 900px) {
  .cbx-photo-hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .cbx-photo-hero__text { padding-bottom: var(--space-5); }
  .cbx-photo-hero__figure { min-height: 280px; max-width: 420px; width: 100%; margin-left: auto; }
}
@media (max-width: 640px) { .cbx-photo-hero h1 { font-size: 38px; line-height: 42px; } .cbx-photo-hero__figure { min-height: 240px; } .cbx-photo-hero > .cbx-deco { display: none; } }

/* ---------- Cut-out stage: a person cut out over tilted brand shapes ---------- */
.cbx-cutout-stage { position: relative; aspect-ratio: 1 / 1.02; max-width: 100%; }
.cbx-cutout-stage__shape { position: absolute; border-radius: var(--radius-xl); }
.cbx-cutout-stage__shape--a { left: 2%; top: 4%; width: 42%; height: 70%; background: var(--accent-teal); border-radius: 36px 36px 36px 120px; transform: rotate(-9deg); }
.cbx-cutout-stage__shape--b { left: 18%; top: 12%; right: 2%; bottom: 0; background: var(--brand); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; transform: rotate(4deg); }
.cbx-cutout-stage__shape--c { right: -2%; top: 0; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--accent-sun); }
.cbx-cutout-stage .cbx-cutout { position: absolute; left: 50%; bottom: 0; transform: translateX(-44%); height: 100%; width: auto; max-width: 92%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 16px 24px rgba(35, 26, 31, .28)); }
.cbx-cutout-stage .cbx-sticker { position: absolute; z-index: 2; }

/* ---------- Marquee band ---------- */
.cbx-marquee-wrap { overflow: hidden; padding-block: 18px; margin-block: -18px; position: relative; z-index: 1; }
.cbx-marquee { overflow: hidden; background: var(--red-600); color: var(--white); padding: 14px 0; transform: rotate(-1.2deg); margin-inline: -16px; }
.cbx-marquee__track { display: flex; gap: var(--space-6); width: max-content; font: 900 26px/32px var(--font-display); letter-spacing: .01em; white-space: nowrap; }
.cbx-marquee__track span { display: inline-flex; align-items: center; gap: var(--space-6); }
.cbx-marquee__track svg { width: 22px; height: 22px; color: var(--accent-sun); }
@media (prefers-reduced-motion: no-preference) {
  .cbx-marquee__track { animation: cbx-marquee 38s linear infinite; }
  @keyframes cbx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}

/* ---------- Polaroid photo ---------- */
.cbx-polaroid { margin: 0; background: var(--white); padding: 12px 12px 14px; border-radius: 14px; box-shadow: 0 10px 28px rgba(35, 26, 31, .14); transform: rotate(var(--tilt, -3deg)); transition: transform var(--dur-base) ease-out; }
.cbx-polaroid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
.cbx-polaroid figcaption { font: 700 14px/20px var(--font-body); color: var(--ink-600); padding-top: 10px; }
.cbx-polaroid:hover { transform: rotate(0deg) scale(1.02); }
.cbx-collage { position: relative; min-height: 460px; }
.cbx-collage .cbx-polaroid { position: absolute; width: 56%; }
.cbx-collage .cbx-polaroid:nth-child(1) { left: 0; top: 4%; --tilt: -6deg; }
.cbx-collage .cbx-polaroid:nth-child(2) { right: 0; top: 0; --tilt: 5deg; width: 48%; }
.cbx-collage .cbx-polaroid:nth-child(3) { left: 24%; bottom: 0; --tilt: -2deg; width: 50%; }
@media (max-width: 640px) { .cbx-collage { min-height: 360px; } }

/* ---------- Photo service card ---------- */
.cbx-photo-card { position: relative; display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--dur-base) ease-out, transform var(--dur-base) ease-out; }
.cbx-photo-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px) rotate(-.4deg); }
.cbx-photo-card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--red-600); }
.cbx-photo-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-base) ease-out, filter var(--dur-base) ease-out; }
.cbx-photo-card:hover .cbx-photo-card__img img { transform: scale(1.05); }
.cbx-photo-card__body { position: relative; padding: var(--space-6) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.cbx-photo-card__icon { position: absolute; top: -28px; left: var(--space-5); width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0; background: var(--accent-sun); color: var(--on-accent); box-shadow: 0 3px 0 rgba(35, 26, 31, .9); }
.cbx-photo-card__icon svg { width: 28px; height: 28px; }
.cbx-photo-card h3 { font: 800 22px/28px var(--font-display); }
.cbx-photo-card p { font-size: 15px; line-height: 24px; color: var(--ink-muted); flex: 1; }
.cbx-photo-card__link { color: var(--link); font-weight: 800; font-size: 15px; text-decoration: none; }
.cbx-photo-card__link::after { content: ""; position: absolute; inset: 0; }
.cbx-photo-card__link:focus-visible { outline: none; }
.cbx-photo-card:has(.cbx-photo-card__link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Age card with a cut-out peeking out ---------- */
.cbx-age-card--figure { min-height: 320px; overflow: visible; }
.cbx-age-card--figure > :not(.cbx-age-card__cutout) { max-width: 60%; position: relative; z-index: 1; }
.cbx-age-card__cutout { position: absolute; right: 4px; bottom: 0; height: 112%; width: auto; max-width: 46%; object-fit: contain; object-position: bottom right; filter: drop-shadow(0 10px 16px rgba(35, 26, 31, .22)); }

/* ---------- Event card ---------- */
.cbx-event-card { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cbx-event-card__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint-teal); }
.cbx-event-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cbx-date-bubble { position: absolute; left: var(--space-4); top: var(--space-4); display: grid; justify-items: center; min-width: 68px; padding: 8px 10px 10px; background: var(--white); color: var(--ink-900); border-radius: 18px 18px 18px 0; box-shadow: 0 3px 0 rgba(35, 26, 31, .9); text-align: center; }
.cbx-date-bubble b { font: 900 30px/30px var(--font-display); }
.cbx-date-bubble span { font: 800 12px/14px var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--red-700); }
.cbx-event-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.cbx-event-card h3 { font: 800 22px/28px var(--font-display); }
.cbx-event-meta { display: grid; gap: 4px; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.cbx-event-meta span { display: flex; gap: 8px; align-items: flex-start; }
.cbx-event-meta svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; color: var(--link); }
.cbx-event-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-3); }
.cbx-event-card .cbx-btn { min-height: 42px; padding: 10px 18px; font-size: 15px; }

/* ---------- Highlight card (past event) ---------- */
.cbx-highlight { position: relative; display: block; border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; overflow: hidden; min-height: 340px; color: var(--white); text-decoration: none; isolation: isolate; background: var(--ink-900); }
.cbx-highlight img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease-out; }
.cbx-highlight::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(35, 26, 31, 0) 30%, rgba(35, 26, 31, .88) 100%); }
.cbx-highlight:hover img { transform: scale(1.05); }
.cbx-highlight__body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-5); display: grid; gap: var(--space-2); }
.cbx-highlight h3 { color: var(--white); font: 900 26px/32px var(--font-display); }
.cbx-highlight__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.cbx-highlight__meta span { font: 800 13px/18px var(--font-body); background: rgba(255, 248, 243, .18); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: var(--radius-pill); }
.cbx-highlight .cbx-sticker { position: absolute; top: var(--space-4); right: var(--space-4); }
.cbx-highlight--feature { min-height: 460px; }
.cbx-highlight--feature h3 { font-size: 38px; line-height: 44px; }
.cbx-highlight:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Gallery and lightbox ---------- */
.cbx-gallery { columns: 3 260px; column-gap: var(--space-4); }
.cbx-gallery a { display: block; margin-bottom: var(--space-4); border-radius: var(--radius-md); overflow: hidden; break-inside: avoid; position: relative; }
.cbx-gallery img { width: 100%; height: auto; display: block; transition: transform var(--dur-base) ease-out; }
.cbx-gallery a:hover img { transform: scale(1.04); }
.cbx-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-5); }
.cbx-video { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink-900); color: var(--white); text-decoration: none; border: 0; padding: 0; cursor: pointer; width: 100%; font: inherit; text-align: left; }
.cbx-video img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.cbx-video__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--accent-sun); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 4px 0 rgba(35, 26, 31, .9); }
.cbx-video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.cbx-video__title { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-6) var(--space-4) var(--space-3); font: 800 16px/22px var(--font-body); background: linear-gradient(180deg, transparent, rgba(35, 26, 31, .85)); }
.cbx-lightbox { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(20, 14, 17, .92); display: grid; place-items: center; padding: 56px 16px 24px; }
.cbx-lightbox[hidden] { display: none; }
.cbx-lightbox__stage { max-width: min(1100px, 100%); max-height: 100%; display: grid; place-items: center; gap: var(--space-3); color: var(--cream-50); text-align: center; }
.cbx-lightbox__stage img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: var(--radius-md); }
.cbx-lightbox__stage video { max-width: min(1000px, 92vw); max-height: calc(100vh - 140px); border-radius: var(--radius-md); background: #000; }
.cbx-lightbox__stage iframe { width: min(1000px, 92vw); aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-md); background: #000; }
.cbx-lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--white); color: var(--ink-900); font: 900 22px/1 var(--font-body); cursor: pointer; display: grid; place-items: center; }
.cbx-lightbox__btn--close { top: 12px; right: 12px; }
.cbx-lightbox__btn--prev { left: 12px; top: 50%; }
.cbx-lightbox__btn--next { right: 12px; top: 50%; }
.cbx-lightbox__note { max-width: 46ch; background: var(--white); color: var(--ink-900); padding: var(--space-6); border-radius: var(--radius-lg); }

/* ---------- Testimony bubbles ---------- */
.cbx-testimonies { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6) var(--space-5); }
.cbx-testimony { margin: 0; display: grid; gap: var(--space-3); }
.cbx-testimony blockquote { margin: 0; position: relative; padding: var(--space-6) var(--space-5) var(--space-5); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; font: 600 18px/28px var(--font-body); background: var(--sun-100); color: var(--ink); }
.cbx-testimony:nth-child(3n+2) blockquote { background: var(--teal-100); }
.cbx-testimony:nth-child(3n+3) blockquote { background: var(--red-100); }
.cbx-testimony blockquote svg { position: absolute; top: -18px; left: 20px; width: 40px; height: 40px; color: var(--brand); }
.cbx-testimony figcaption { font-size: 15px; line-height: 22px; padding-left: var(--space-2); display: flex; gap: var(--space-3); align-items: center; }
.cbx-testimony__photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 0 2px 0 rgba(35, 26, 31, .9); }
.cbx-testimony__who { display: grid; }
.cbx-testimony figcaption strong { display: block; font-weight: 800; }
.cbx-testimony figcaption span { color: var(--ink-muted); }

/* ---------- Team polaroids (tilted, grayscale until hover) ---------- */
.cbx-team { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-5) var(--space-4); }
.cbx-team-card { width: 236px; margin: 0; background: var(--white); border: 1px solid var(--border); padding: 14px 14px 18px; border-radius: 18px; box-shadow: 0 8px 24px rgba(35, 26, 31, .08); transform: rotate(var(--tilt, 0deg)) translateY(var(--lift, 0)); transition: transform var(--dur-base) ease-out, box-shadow var(--dur-base) ease-out; }
.cbx-team-card:nth-child(4n+1) { --tilt: -3.5deg; --lift: 6px; }
.cbx-team-card:nth-child(4n+2) { --tilt: 2.5deg; }
.cbx-team-card:nth-child(4n+3) { --tilt: -1.5deg; --lift: 10px; }
.cbx-team-card:nth-child(4n+4) { --tilt: 3.5deg; --lift: -4px; }
.cbx-team-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; filter: grayscale(1) contrast(1.05); transition: filter var(--dur-base) ease-out; }
.cbx-team-card:hover, .cbx-team-card:focus-within { transform: rotate(0deg) translateY(-4px) scale(1.03); box-shadow: var(--shadow-md); z-index: 1; }
.cbx-team-card:hover img, .cbx-team-card:focus-within img { filter: none; }
.cbx-team-card__role { display: block; margin-top: 12px; font: 600 14px/18px var(--font-body); color: var(--ink-muted); }
.cbx-team-card h3 { font: 800 21px/26px var(--font-display); margin-top: 2px; }
.cbx-team-card p { font-size: 14px; line-height: 21px; color: var(--ink-muted); margin-top: 8px; }
@media (max-width: 640px) { .cbx-team-card { width: calc(50% - 8px); padding: 10px 10px 14px; } .cbx-team-card h3 { font-size: 18px; line-height: 22px; } }

/* ---------- Filter chips ---------- */
.cbx-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-bottom: var(--space-6); }
.cbx-chip { font: 800 15px/20px var(--font-body); padding: 9px 18px; border-radius: var(--radius-pill); border: 2px solid var(--border-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.cbx-chip[aria-pressed="true"] { background: var(--ink-900); color: var(--cream-50); border-color: var(--ink-900); }

/* ---------- Publication card ---------- */
.cbx-pub-card { position: relative; display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cbx-pub-card__cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; isolation: isolate; background: var(--tint-teal); }
.cbx-pub-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); }
.cbx-pub-card__cover::after { content: ""; position: absolute; inset: 0; background: var(--pub-tint, var(--teal-400)); mix-blend-mode: multiply; }
.cbx-pub-card[data-type="guide"] { --pub-tint: var(--accent-sun); }
.cbx-pub-card[data-type="article"] { --pub-tint: var(--brand); }
.cbx-pub-card[data-type="newsletter"] { --pub-tint: var(--accent-teal); }
.cbx-pub-card[data-type="worksheet"] { --pub-tint: var(--ink-600); }
.cbx-pub-card__cover .cbx-sticker { position: absolute; left: var(--space-4); bottom: var(--space-4); z-index: 1; }
.cbx-pub-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.cbx-pub-card h3 { font: 800 21px/27px var(--font-display); }
.cbx-pub-card p { font-size: 15px; line-height: 24px; color: var(--ink-muted); flex: 1; }
.cbx-pub-card__meta { font: 700 13px/18px var(--font-body); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }
.cbx-pub-card[hidden] { display: none; }

/* ---------- Wave divider ---------- */
.cbx-wave { display: block; width: 100%; height: 28px; color: var(--surface-sunken); }

@media (prefers-reduced-motion: reduce) {
  .cbx-polaroid, .cbx-team-card, .cbx-photo-card, .cbx-highlight img { transition: none !important; }
}
