/* ==========================================================================
   Caboolture Kids Collective — theme styles
   Design system reproduced from the source Wix site (see content/design-tokens.json)
   ========================================================================== */

/* ---- Self-hosted League Spartan (variable, latin + latin-ext) ---- */
@font-face {
  font-family: 'League Spartan';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/league-spartan-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'League Spartan';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/league-spartan-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ---- */
:root {
  --cream: #FFFBF4;
  --purple: #460C61;
  --nav-purple: #6755D1;
  --lilac: #F6EBFF;
  --orange: #FF5700;
  --white: #FFFFFF;
  --input-grey: #EFF1F2;

  --font-head: 'League Spartan', sans-serif;
  --font-body: Helvetica, Arial, "Helvetica Neue", sans-serif;

  --maxw: 976px; /* inner content ~928px (matches source) after 24px padding */
  --gap: 28px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--purple);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }

.ck-container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.ck-main { padding: 40px 0 64px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--purple); margin: 0 0 .5em; line-height: 1.1; }
.ck-section-title { font-weight: 700; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; text-align: center; }
.ck-page-title { font-weight: 700; font-size: clamp(34px, 6vw, 64px); letter-spacing: -.02em; }
p { margin: 0 0 1.2em; }

/* ==========================================================================
   Header — wordmark + handprint + pill nav
   ========================================================================== */
.ck-header { padding: 28px 0 8px; }
.ck-brand {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; gap: 4px;
}
.ck-wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -.01em;
  line-height: .95;
  margin: 0;
  font-size: clamp(32px, 7vw, 100px);
}
.ck-wordmark .ck-line2 { display: inline-flex; align-items: center; gap: .1em; font-size: .78em; } /* COLLECTIVE smaller than CABOOLTURE KIDS (matches source: 78px vs ~100px) */
.ck-wordmark .ck-handprint { height: 1.1em; width: auto; display: inline-block; }

/* Nav pill — full content width, items spread */
.ck-nav-wrap { margin: 18px 0 0; }
.ck-nav {
  position: relative;
  background: var(--nav-purple);
  border-radius: 999px;
  padding: 12px 32px;
  width: 100%;
}
.ck-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 6px 18px; }
.ck-nav > ul > li { display: flex; align-items: center; } /* fill bar height so hover persists down to the dropdown */
.ck-nav a {
  color: #fff; text-decoration: none; font-family: var(--font-body);
  font-size: 15px; letter-spacing: .01em; padding: 4px 2px; display: inline-block; white-space: nowrap;
}
.ck-nav a:hover, .ck-nav a:focus { text-decoration: underline; }
.ck-nav .current a, .ck-nav a[aria-current="page"],
.ck-nav .current-menu-item > a, .ck-nav .current_page_item > a,
.ck-nav .current-menu-ancestor > a, .ck-nav .current-menu-parent > a { text-decoration: underline; }

/* Dropdown (Service Directories) — full-width panel below the bar, 3-col column-major
   grid (matches source). Positioned against .ck-nav so it spans the full nav width. */
.ck-nav li.has-children, .ck-nav li.menu-item-has-children { position: static; }
.ck-nav .submenu, .ck-nav .sub-menu {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px;
  background: var(--purple); border-radius: 14px; padding: 16px 28px;
  list-style: none; z-index: 50; box-shadow: 0 12px 30px rgba(70,12,97,.22);
  display: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); gap: 6px 28px;
}
.ck-nav .submenu::before, .ck-nav .sub-menu::before { content: ''; position: absolute; top: -18px; left: 0; right: 0; height: 18px; } /* hover bridge covers the bar's bottom padding + gap so the cursor never leaves the hover zone */
.ck-nav li.has-children:hover .submenu, .ck-nav li.has-children:focus-within .submenu,
.ck-nav li.menu-item-has-children:hover .sub-menu, .ck-nav li.menu-item-has-children:focus-within .sub-menu { display: grid; }
.ck-nav .submenu a, .ck-nav .sub-menu a { padding: 8px 4px; font-size: 15px; color: #fff; text-align: left; white-space: nowrap; }
.ck-nav .submenu a:hover, .ck-nav .sub-menu a:hover { text-decoration: underline; }

/* Mobile nav toggle (CSS-only) */
.ck-nav-toggle { display: none; }
.ck-burger { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.ck-footer { background: var(--lilac); margin-top: 48px; }
.ck-footer .ck-container { padding-top: 22px; padding-bottom: 22px; }
.ck-footer p { margin: 0; color: var(--purple); font-size: 14px; }

/* ==========================================================================
   Buttons / pills
   ========================================================================== */
.ck-btn {
  display: inline-block; font-family: var(--font-body); font-size: 14px;
  padding: 11px 26px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--purple); transition: background .15s, color .15s;
}
.ck-btn--solid { background: var(--purple); color: #fff; }
.ck-btn--solid:hover { background: #350949; }
.ck-btn--outline { background: transparent; color: var(--purple); }
.ck-btn--outline:hover { background: var(--purple); color: #fff; }

/* ==========================================================================
   Home hero (text + image)
   ========================================================================== */
.ck-hero { display: grid; grid-template-columns: 1fr 540px; gap: 36px; align-items: center; margin-top: 8px; }
.ck-hero__text p { color: var(--purple); font-size: 20px; line-height: 1.3; letter-spacing: -.2px; }
.ck-hero__media img { width: 100%; border-radius: 4px; object-fit: cover; }

/* ==========================================================================
   Generic prose blocks
   ========================================================================== */
.ck-prose { max-width: 820px; margin: 0 auto; }
.ck-prose p { color: var(--purple); font-size: 18px; line-height: 1.45; }
.ck-center { text-align: center; }
.ck-intro { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.ck-intro p { color: var(--purple); font-size: 19px; }

/* ==========================================================================
   Service directory card grids
   ========================================================================== */
.ck-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px 38px; margin: 30px 0; }
.ck-card { display: flex; flex-direction: column; }
.ck-card__media { width: 100%; aspect-ratio: 252 / 201; overflow: hidden; border-radius: 4px; background: #eadff5; }
.ck-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ck-card__title { color: var(--purple); font-family: var(--font-body); font-weight: 600; font-size: 17px; margin: 18px 0 14px; line-height: 1.25; }
.ck-card__desc { color: var(--orange); font-size: 16px; line-height: 1.45; margin: 0 0 26px; }
.ck-card__desc a { color: var(--orange); text-decoration: underline; }
.ck-card__btn { margin-top: auto; align-self: flex-start; }
/* Provider page: logo cards show the full logo (no crop) on a lavender tile */
.ck-card--logo .ck-card__media { aspect-ratio: 1.2 / 1; background: #f0e7fb; }
.ck-card--logo .ck-card__media img { object-fit: contain; padding: 16px; }
/* Provider page ("Service Directory") — bigger heading + orange 16px card titles (matches source) */
.ck-provider-title { font-family: var(--font-head); font-weight: 700; color: var(--purple); font-size: clamp(34px, 5vw, 56px); text-align: center; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 30px; }
.ck-cards--provider .ck-card__title { color: var(--orange); font-weight: 400; font-size: 16px; }

/* Index cards (Service Directories landing — image + caption link, centered) */
.ck-index-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 40px; max-width: 760px; margin: 22px auto 0; }
.ck-index-card { text-align: center; text-decoration: none; }
.ck-index-card__media { aspect-ratio: 252/201; overflow: hidden; border-radius: 4px; background: #eadff5; }
.ck-index-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ck-index-card__label { display: block; color: var(--purple); margin-top: 10px; text-decoration: underline; font-size: 16px; }

/* ==========================================================================
   About — feature image (left) + text (right), then partner logo wall band
   ========================================================================== */
.ck-fullbleed { width: 100vw; margin-left: calc(50% - 50vw); }
.ck-about { display: grid; grid-template-columns: minmax(0, 430px) 1fr; gap: 40px; align-items: flex-start; }
.ck-about__media img { width: 100%; border-radius: 4px; }
.ck-about__text { background: var(--lilac); border-radius: 18px; padding: 26px 30px; }
.ck-about__text p { color: var(--purple); font-size: 16px; line-height: 1.55; }
.ck-about__text p:last-child { margin-bottom: 0; }
.ck-partners { background: var(--lilac); padding: 40px 0 52px; margin-top: 44px; }
.ck-partners .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.ck-logos { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; justify-items: center; gap: 44px 60px; margin: 30px 0 0; }
.ck-logos img { max-height: 88px; width: auto; object-fit: contain; }

/* ==========================================================================
   Place-based — lilac intro panel + image-left / text-right sections
   ========================================================================== */
.ck-intro-panel { background: var(--lilac); border-radius: 18px; padding: 24px 30px; margin: 8px 0 12px; }
.ck-intro-panel p { color: var(--purple); font-size: 16px; line-height: 1.5; }
.ck-intro-panel p:last-child { margin-bottom: 0; }
.ck-section { display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: start; margin: 40px 0; }
.ck-section__media img { width: 100%; aspect-ratio: 313 / 303; object-fit: cover; border-radius: 4px; }
.ck-section__body h2 { color: var(--purple); font-family: var(--font-head); font-weight: 700; font-size: clamp(22px, 3vw, 30px); margin: 0 0 .5em; }
.ck-section__body p { color: var(--purple); font-size: 16px; line-height: 1.5; margin: 0; }

/* ==========================================================================
   Get involved — contact form
   ========================================================================== */
.ck-form { max-width: 920px; margin: 18px auto 0; }
.ck-form__lead { color: var(--purple); font-size: 17px; margin-bottom: 30px; }
.ck-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.ck-field { margin-bottom: 30px; display: flex; flex-direction: column; }
.ck-field label { color: var(--purple); font-size: 14px; margin-bottom: 8px; }
.ck-field input, .ck-field textarea {
  font-family: var(--font-body); font-size: 16px; color: var(--purple);
  background: transparent; border: none; border-bottom: 1px solid var(--purple);
  padding: 8px 2px; outline: none;
}
.ck-field textarea { min-height: 90px; resize: vertical; }
.ck-field input:focus, .ck-field textarea:focus { border-bottom-width: 2px; }
.ck-form__actions { text-align: center; margin-top: 18px; }
.ck-form__actions .ck-btn { min-width: 280px; padding: 14px 26px; font-size: 15px; }

/* Contact Form 7 compatibility (CF7 wraps each control in a span) */
.ck-field .wpcf7-form-control-wrap { display: block; }
.ck-field input, .ck-field textarea, .ck-field .wpcf7-form-control { width: 100%; }
.ck-form .wpcf7-spinner { margin: 0 auto; display: block; }
.wpcf7-response-output { border-radius: 8px; border: 1px solid var(--purple); color: var(--purple); padding: 10px 14px; margin: 16px auto 0; max-width: 920px; text-align: center; }
.wpcf7-not-valid-tip { color: #c0392b; font-size: 13px; }
span.wpcf7-list-item { margin: 0; }
button.ck-btn { font-family: var(--font-body); }

/* ==========================================================================
   Entrance animations — text fades up, images zoom in (matches the source's
   "zoom and/or fade" on load/scroll). Applied only when JS adds .ck-anim-on to
   <html> (so no-JS users see content), and disabled for prefers-reduced-motion.
   anim.js adds .ck-in when each element scrolls into view.
   ========================================================================== */
.ck-anim-on .ck-hero__text p,
.ck-anim-on .ck-prose p,
.ck-anim-on .ck-intro p,
.ck-anim-on .ck-intro-panel,
.ck-anim-on h2.ck-section-title,
.ck-anim-on h2.ck-page-title,
.ck-anim-on .ck-provider-title,
.ck-anim-on .ck-form__lead,
.ck-anim-on .ck-form,
.ck-anim-on .ck-index-card,
.ck-anim-on .ck-about__text,
.ck-anim-on .ck-logos,
.ck-anim-on .ck-card__title,
.ck-anim-on .ck-card__desc,
.ck-anim-on .ck-card__btn,
.ck-anim-on .ck-hero__media img,
.ck-anim-on .ck-section__media img,
.ck-anim-on .ck-about__media img {
  opacity: 0;
  transition: opacity .7s ease, transform .8s ease;
  will-change: opacity, transform;
}
/* most text/blocks = pure fade (matches the source's observed FadeIn) */
/* service-directory card text fields = fade + slide up, staggered (per source) */
.ck-anim-on .ck-card__title,
.ck-anim-on .ck-card__desc,
.ck-anim-on .ck-card__btn { transform: translateY(24px); }
.ck-anim-on .ck-card__desc { transition-delay: .08s; }
.ck-anim-on .ck-card__btn { transition-delay: .16s; }
/* prominent standalone images = zoom */
.ck-anim-on .ck-hero__media img,
.ck-anim-on .ck-section__media img,
.ck-anim-on .ck-about__media img { transform: scale(.93); }
/* revealed */
.ck-anim-on .ck-in { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .ck-anim-on .ck-hero__text p, .ck-anim-on .ck-prose p, .ck-anim-on .ck-intro p,
  .ck-anim-on .ck-intro-panel, .ck-anim-on h2.ck-section-title, .ck-anim-on h2.ck-page-title,
  .ck-anim-on .ck-provider-title, .ck-anim-on .ck-form__lead, .ck-anim-on .ck-form,
  .ck-anim-on .ck-index-card, .ck-anim-on .ck-about__text, .ck-anim-on .ck-logos,
  .ck-anim-on .ck-card__title, .ck-anim-on .ck-card__desc, .ck-anim-on .ck-card__btn,
  .ck-anim-on .ck-hero__media img, .ck-anim-on .ck-section__media img, .ck-anim-on .ck-about__media img {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  /* ---- layout stacking ---- */
  .ck-hero { grid-template-columns: 1fr; }
  .ck-hero__media img { max-width: 540px; margin: 0 auto; }
  .ck-about { grid-template-columns: 1fr; }
  .ck-cards { grid-template-columns: repeat(2, 1fr); }
  .ck-section { grid-template-columns: 1fr; gap: 16px; }
  .ck-section__media img { aspect-ratio: 16 / 10; }
  .ck-logos { grid-template-columns: repeat(3, 1fr); }

  /* ---- standard mobile nav: hamburger top-right + collapsible vertical menu ---- */
  .ck-header { padding-top: 56px; position: relative; }
  .ck-nav-wrap { margin-top: 12px; }
  .ck-nav { position: static; background: transparent; padding: 0; width: 100%; }
  .ck-burger {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 12px; right: 16px; width: 44px; height: 44px;
    color: var(--purple); cursor: pointer; font-size: 0; z-index: 30;
  }
  .ck-burger::before { content: "\2630"; font-size: 30px; line-height: 1; }
  .ck-nav-toggle:checked ~ .ck-burger::before { content: "\2715"; font-size: 24px; }
  .ck-nav > ul {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--nav-purple); border-radius: 16px; padding: 8px; width: 100%;
  }
  .ck-nav-toggle:checked ~ ul { display: flex; }
  .ck-nav > ul > li { display: block; }
  .ck-nav a { display: block; color: #fff; padding: 11px 16px; font-size: 16px; white-space: normal; }
  /* sub-menu: indented vertical list under Service Directories (always shown when menu open) */
  .ck-nav .submenu, .ck-nav .sub-menu {
    position: static; display: flex; flex-direction: column; grid-template-rows: none; grid-auto-flow: row;
    background: rgba(255,255,255,.10); border-radius: 10px; box-shadow: none;
    margin: 2px 8px 8px; padding: 4px 0;
  }
  .ck-nav .submenu::before, .ck-nav .sub-menu::before { display: none; }
  .ck-nav .submenu a, .ck-nav .sub-menu a { padding: 9px 26px; font-size: 15px; }
}
@media (max-width: 600px) {
  .ck-main { padding: 24px 0 40px; }
  .ck-cards, .ck-index-cards { grid-template-columns: 1fr; }
  .ck-logos { grid-template-columns: repeat(2, 1fr); }
  .ck-form .row { grid-template-columns: 1fr; gap: 0; }
}
