/* ChatterBox theme layer: page-level pieces not in the design system's components
   (skip link, mobile menu, modal, hero art, prose). Tokens only, no raw colours. */

body.cbx { margin: 0; overflow-x: clip; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cbx-skip:focus { position: fixed !important; top: var(--space-2); left: var(--space-2); width: auto; height: auto; clip: auto; z-index: var(--z-overlay); background: var(--surface-raised); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
:where(.cbx) img { max-width: 100%; height: auto; }

/* Mobile menu */
@media (max-width: 1180px) {
  .cbx-menu-open .cbx-nav {
    display: grid; gap: var(--space-2);
    position: absolute; left: 0; right: 0; top: 100%;
    z-index: var(--z-dropdown);
    background: var(--surface-raised);
    padding: var(--space-4) var(--space-6) var(--space-6);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .cbx-menu-open .cbx-nav a { display: block; padding: var(--space-3) 0; }
  .cbx-header { position: sticky; }
  .cbx-header__inner { position: relative; }
}

/* Hero art: speech-bubble shapes, optional photo in the big bubble */
.cbx-hero__slab { position: absolute; inset: 4% 10% 18% 4%; background: var(--brand); overflow: hidden; display: grid; place-items: center; }
.cbx-hero__slab img { width: 100%; height: 100%; object-fit: cover; }
.cbx-hero__sun { position: absolute; right: 0; top: 0; width: 38%; height: 30%; background: var(--accent-sun); }
.cbx-hero__teal { position: absolute; right: 4%; bottom: 0; width: 36%; aspect-ratio: 1; border-radius: 50%; background: var(--accent-teal); }
.cbx-typing { display: flex; gap: var(--space-4); }
.cbx-typing i { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); }
@media (prefers-reduced-motion: no-preference) {
  .cbx-typing i { animation: cbx-typing 1.4s ease-in-out infinite; }
  .cbx-typing i:nth-child(2) { animation-delay: .16s; }
  .cbx-typing i:nth-child(3) { animation-delay: .32s; }
}
@keyframes cbx-typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
@media (max-width: 900px) { .cbx-hero__art { max-width: 420px; width: 100%; margin: 0 auto; } }

/* Split section: text beside a form */
.cbx-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.cbx-split__title { font: 800 38px/44px var(--font-display); letter-spacing: -.01em; }
.cbx-split__text { margin-top: var(--space-3); color: var(--ink-muted); font-size: 19px; line-height: 30px; }
.cbx-form__title { font: 800 24px/30px var(--font-display); }
@media (max-width: 900px) { .cbx-split { grid-template-columns: 1fr; } }
.cbx-section--tight { padding-top: 0; }
.cbx-footer__about { margin-top: var(--space-4); font-size: 15px; line-height: 24px; max-width: 32ch; }

/* Modal (enquiry pop-up) */
.cbx-modal { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: var(--space-4); }
.cbx-modal[hidden] { display: none; }
.cbx-modal__backdrop { position: absolute; inset: 0; background: rgba(35, 26, 31, .6); }
.cbx-modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cbx-modal__panel .cbx-form { box-shadow: none; }
.cbx-modal__close { position: absolute; top: var(--space-3); right: var(--space-3); width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface-raised); color: var(--ink); font: 800 22px/1 var(--font-body); cursor: pointer; z-index: 1; }
body.cbx-modal-open { overflow: hidden; }

/* Editor content */
.cbx-prose { max-width: 760px; }
.cbx-prose > * + * { margin-top: var(--space-4); }
.cbx-prose h2 { font: 800 30px/36px var(--font-display); margin-top: var(--space-7); }
.cbx-prose h3 { font: 800 24px/30px var(--font-display); margin-top: var(--space-6); }
.cbx-prose ul, .cbx-prose ol { padding-left: 1.2em; }
.cbx-prose img { border-radius: var(--radius-lg); }

/* Programme page */
.cbx-split--top { align-items: start; }
.cbx-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cbx-prose h2:first-of-type { margin-top: var(--space-5); }

/* ---------- v0.2 page layer ---------- */
.cbx-hero--photo { position: relative; overflow: hidden; padding-bottom: var(--space-8); }
.cbx-hero--photo .cbx-hero__grid { grid-template-columns: 1fr 1fr; }
.cbx-hero__title em { font-style: normal; color: var(--brand); }
.cbx-hero__faces { display: flex; align-items: center; margin-top: var(--space-6); }
.cbx-hero__faces img { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--surface); object-fit: cover; margin-left: -12px; }
.cbx-hero__faces img:first-child { margin-left: 0; }
.cbx-hero__faces span { margin-left: var(--space-3); font: 700 14px/20px var(--font-body); color: var(--ink-muted); max-width: 22ch; }
@media (max-width: 900px) { .cbx-hero--photo .cbx-hero__grid { grid-template-columns: 1fr; } .cbx-cutout-stage { max-width: 460px; width: 100%; margin: 0 auto; } }

.cbx-section__head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); text-align: left; max-width: none; }
.cbx-section__head--row h2 { margin: 0; }
.cbx-section--teal { background: var(--teal-100); }
.cbx-section--tight-bottom { padding-bottom: 0; }
.cbx-section--cta { padding-top: var(--space-9); }
.cbx-card-grid--roomy { --gap: var(--space-6); row-gap: var(--space-8); padding-top: var(--space-5); }

.cbx-ticks { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: grid; gap: var(--space-3); }
.cbx-ticks li { position: relative; padding-left: 40px; font-weight: 700; }
.cbx-ticks li::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 10px 10px 10px 0; background: var(--accent-sun); }
.cbx-ticks li::after { content: ""; position: absolute; left: 9px; top: 6px; width: 8px; height: 13px; border: solid var(--ink-900); border-width: 0 3px 3px 0; transform: rotate(45deg); }

.cbx-enquiry-figure__art { position: relative; height: 320px; margin-top: var(--space-5); }
.cbx-enquiry-figure__blob { position: absolute; left: 6%; right: 14%; bottom: 0; height: 74%; background: var(--accent-teal); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; transform: rotate(-3deg); }
.cbx-enquiry-figure__art img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; filter: drop-shadow(0 12px 18px rgba(35, 26, 31, .25)); }
@media (max-width: 900px) { .cbx-enquiry-figure__art { height: 240px; } }

.cbx-cta--figure { position: relative; overflow: visible; padding-right: 38%; min-height: 280px; align-items: center; }
.cbx-cta__cutout { position: absolute; right: 4%; bottom: 0; height: 128%; width: auto; max-width: 40%; object-fit: contain; object-position: bottom; }
.cbx-cta--figure > .cbx-deco { z-index: 0; }
@media (max-width: 640px) { .cbx-cta--figure { padding-right: var(--space-5); padding-bottom: 250px; } .cbx-cta__cutout { height: 270px; max-width: none; right: 50%; transform: translateX(50%); } }

.cbx-photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-7) !important; }

.cbx-age-rows { display: grid; gap: var(--space-9); }
.cbx-age-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.cbx-age-row:nth-child(even) .cbx-age-row__art { order: 2; }
.cbx-age-row__art { position: relative; aspect-ratio: 5 / 4; }
.cbx-age-row__photo { position: absolute; left: 0; top: 0; width: 78%; height: 82%; object-fit: cover; border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; filter: grayscale(.2); }
.cbx-age-row__cut { position: absolute; right: 0; bottom: 0; height: 92%; width: auto; max-width: 50%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 12px 18px rgba(35, 26, 31, .28)); }
.cbx-age-row__art::before { content: ""; position: absolute; right: 2%; bottom: 0; width: 46%; height: 56%; border-radius: 50%; background: var(--accent-sun); }
.cbx-age-row--intermediate .cbx-age-row__art::before { background: var(--accent-teal); }
.cbx-age-row--senior .cbx-age-row__art::before { background: var(--brand); }
@media (max-width: 900px) { .cbx-age-row { grid-template-columns: 1fr; } .cbx-age-row:nth-child(even) .cbx-age-row__art { order: 0; } }

.cbx-event-panel { position: sticky; top: 110px; display: grid; gap: var(--space-4); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-md); }
.cbx-event-panel h3 { font: 800 22px/28px var(--font-display); }
.cbx-empty { display: grid; justify-items: center; gap: var(--space-3); text-align: center; color: var(--ink-muted); padding: var(--space-8) var(--space-5); border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); }

.cbx-values { padding-block: var(--space-6); background: var(--surface); }
.cbx-values__row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4) var(--space-5); }
.cbx-values .cbx-sticker { font-size: 18px; line-height: 24px; padding: 12px 22px; }

/* ---------- Sign Up page: the form is the hero ---------- */
.cbx-signup-stage { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--space-8) var(--space-9); background: var(--tint-red); color: var(--white); }
.cbx-signup-stage__bg { position: absolute; inset: 0 0 auto; height: 560px; z-index: -2; background-size: cover; background-position: center; filter: grayscale(1); }
.cbx-signup-stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 560px; z-index: -1; background: var(--tint-red); mix-blend-mode: multiply; }
.cbx-signup-stage::after { content: ""; position: absolute; inset: 520px 0 0; z-index: -1; background: var(--surface); border-radius: 50% 50% 0 0 / 60px 60px 0 0; }
.cbx-signup-stage__inner { display: grid; justify-items: center; gap: var(--space-6); }
.cbx-signup-stage__intro { text-align: center; max-width: 720px; }
.cbx-signup-stage__intro .cbx-eyebrow { color: var(--white); }
.cbx-signup-stage h1 { color: var(--white); font: 900 64px/68px var(--font-display); letter-spacing: -.02em; }
.cbx-signup-stage__lead { font: 500 20px/30px var(--font-body); margin-top: var(--space-3); }
.cbx-signup-stage__lead p { margin: 0; }
.cbx-signup-stage__form { position: relative; width: 100%; max-width: 820px; }
.cbx-signup { position: relative; z-index: 2; padding: var(--space-7) var(--space-7) var(--space-6); gap: var(--space-5); border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 0; box-shadow: var(--shadow-lg); color: var(--ink); }
.cbx-signup__head { text-align: center; display: grid; justify-items: center; gap: var(--space-3); }
.cbx-signup__head .cbx-form__title { font: 900 38px/44px var(--font-display); }
.cbx-signup__head p { color: var(--ink-muted); font-size: 18px; }
.cbx-signup__set { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.cbx-signup__set legend { display: flex; align-items: center; gap: var(--space-3); font: 800 22px/28px var(--font-display); margin-bottom: var(--space-3); padding: 0; }
.cbx-signup__set legend span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px 12px 12px 0; background: var(--accent-sun); color: var(--on-accent); font-size: 18px; }
.cbx-signup .cbx-input, .cbx-signup .cbx-select, .cbx-signup .cbx-textarea { min-height: 56px; font-size: 17px; }
.cbx-label { font: 700 15px/20px var(--font-body); }
.cbx-checks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cbx-check { position: relative; }
.cbx-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cbx-check span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; border: 2px solid var(--border-strong); border-radius: var(--radius-pill); font: 700 15px/20px var(--font-body); background: var(--surface-raised); cursor: pointer; }
.cbx-check input:checked + span { background: var(--ink-900); border-color: var(--ink-900); color: var(--cream-50); }
.cbx-check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.cbx-signup-stage__cut { position: absolute; z-index: 1; width: auto; pointer-events: none; }
.cbx-signup-stage__cut--left { left: -230px; top: 160px; height: 520px; }
.cbx-signup-stage__cut--right { right: -260px; top: 520px; height: 380px; }
.cbx-signup-stage__sticker { position: absolute; right: -28px; top: -18px; z-index: 3; font-size: 18px; padding: 10px 20px; }
@media (max-width: 1300px) { .cbx-signup-stage__cut { display: none; } }
@media (max-width: 640px) {
  .cbx-signup-stage h1 { font-size: 42px; line-height: 46px; }
  .cbx-signup { padding: var(--space-6) var(--space-4) var(--space-5); }
  .cbx-signup__head .cbx-form__title { font-size: 28px; line-height: 34px; }
  .cbx-signup-stage__sticker { right: 0; top: -22px; }
}
.cbx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); counter-reset: none; }
.cbx-steps li { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5) var(--space-5); position: relative; }
.cbx-steps b { position: absolute; top: -20px; left: var(--space-5); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px 14px 14px 0; background: var(--red-600); color: var(--white); font: 900 20px/1 var(--font-display); }
.cbx-steps h3 { font: 800 22px/28px var(--font-display); margin-top: var(--space-3); }
.cbx-steps p { color: var(--ink-muted); margin-top: var(--space-2); }
@media (max-width: 900px) { .cbx-steps { grid-template-columns: 1fr; row-gap: var(--space-7); } }

/* Admin bar: keep the sticky header below WordPress's toolbar */
.admin-bar .cbx-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cbx-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .cbx-header { top: 0; } }
.cbx-contact-cards { list-style: none; padding: 0; margin: var(--space-6) 0 0 !important; display: grid; gap: var(--space-3); }
.cbx-contact-cards li { display: grid; gap: 2px; padding: var(--space-4) var(--space-5); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 0; }
.cbx-contact-cards span { font: 800 13px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.cbx-contact-cards a { font: 800 20px/28px var(--font-display); color: var(--ink); text-decoration: none; word-break: break-word; }
