/* c2me-ui — hand-rolled design layer (tokens + motion), no page builder dependency
   Brand CI: deep teal #0F3A3D / turquoise #5DBFC9 (LOCKED) */

:root {
  --c2me-teal: #0F3A3D;
  --c2me-turquoise: #5DBFC9;
  --c2me-mid: #3A95A0;
  --c2me-ice: #E8F4F5;
  --c2me-mist: #F7FBFC;
  --c2me-ink: #374151;
  --c2me-ink-soft: #4B5563;
  --c2me-ink-muted: #6B7280;
  --c2me-line: #dbeef0;
  --c2me-radius-card: 12px;
  --c2me-radius-btn: 8px;
  --c2me-shadow-card: 0 1px 3px rgba(15, 58, 61, 0.08);
  --c2me-shadow-lift: 0 8px 24px rgba(15, 58, 61, 0.14);
  --c2me-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* smooth anchor scrolling (disabled for reduced-motion below) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- scroll reveal ----------
   Hidden state only applies once JS marks <html class="c2me-js">,
   so content stays visible without JS (SEO / no-JS safety). */
html.c2me-js .c2me-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--c2me-ease), transform 0.6s var(--c2me-ease);
  will-change: opacity, transform;
}
html.c2me-js .c2me-reveal.c2me-in {
  opacity: 1;
  transform: none;
}
/* stagger helpers: apply to siblings inside a card row */
html.c2me-js .c2me-reveal[data-delay="1"] { transition-delay: 0.08s; }
html.c2me-js .c2me-reveal[data-delay="2"] { transition-delay: 0.16s; }
html.c2me-js .c2me-reveal[data-delay="3"] { transition-delay: 0.24s; }
html.c2me-js .c2me-reveal[data-delay="4"] { transition-delay: 0.32s; }

/* card hover lift (shared) */
.c2me-card {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  box-shadow: var(--c2me-shadow-card);
  border-radius: var(--c2me-radius-card);
}
.c2me-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--c2me-shadow-lift);
}

/* stat number */
.c2me-stat-num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--c2me-teal);
  line-height: 1.1;
}

/* reduced motion: show everything immediately, no movement */
@media (prefers-reduced-motion: reduce) {
  html.c2me-js .c2me-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .c2me-card, .c2me-card:hover {
    transform: none;
    transition: none;
  }
}

/* ============================================================
   cui-* — hand-rolled page component system (v2 redesign layer)
   Fluid type & spacing via clamp() — no breakpoint jumps.
   ============================================================ */

/* kill Avada #main padding on redesigned pages so bands touch header/footer */
.page-id-7 #main, .page-id-53 #main, .page-id-59 #main,
.page-id-60 #main, .page-id-61 #main { padding-top: 0 !important; padding-bottom: 0 !important; }

/* full-bleed band + inner wrap */
.cui-section { width: 100%; padding: clamp(52px, 9vw, 104px) clamp(20px, 4vw, 40px); }
.cui-section--dark  { background: var(--c2me-teal); color: #cfe4e3; }
.cui-section--mist  { background: var(--c2me-mist); }
.cui-section--white { background: #ffffff; }
.cui-section--tight { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); }
.cui-wrap { max-width: 1160px; margin: 0 auto; }
.cui-wrap--narrow { max-width: 820px; }

/* typography */
.cui-eyebrow { display: inline-block; background: var(--c2me-ice); color: var(--c2me-teal);
  padding: 6px 16px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }
.cui-section--dark .cui-eyebrow { background: var(--c2me-turquoise); }
.cui-h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.12; font-weight: 800;
  color: var(--c2me-teal); margin: 0 0 18px; }
.cui-section--dark .cui-h1 { color: #ffffff; }
.cui-h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.18; font-weight: 800;
  color: var(--c2me-teal); margin: 0 0 16px; }
.cui-section--dark .cui-h2 { color: #ffffff; }
.cui-lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; color: var(--c2me-ink);
  max-width: 70ch; }
.cui-section--dark .cui-lead { color: #cfe4e3; }

/* split hero (text | image), collapses fluidly */
.cui-split { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 56px); align-items: center; }
.cui-split > * { flex: 1 1 380px; min-width: 0; }
.cui-split img { max-width: 100%; height: auto; border-radius: 14px; display: block; }

/* image that overlaps into the next band (de-island trick) */
.cui-overlap { margin-bottom: calc(-1 * clamp(48px, 7vw, 96px)); position: relative; z-index: 2; }
.cui-overlap img { box-shadow: 0 24px 64px rgba(15, 58, 61, 0.35); }
.cui-after-overlap { padding-top: calc(clamp(52px, 9vw, 104px) + clamp(48px, 7vw, 96px)); }

/* responsive card grid */
.cui-grid { display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.cui-card { background: #ffffff; border: 1px solid var(--c2me-line);
  border-radius: var(--c2me-radius-card); padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--c2me-shadow-card);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; }
.cui-card:hover { transform: translateY(-2px); box-shadow: var(--c2me-shadow-lift); }
.cui-card-title { font-weight: 700; color: var(--c2me-teal); font-size: 18px; margin: 0 0 8px; }
.cui-card p { margin: 0; color: var(--c2me-ink-soft); font-size: 15px; line-height: 1.7; }
.cui-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--c2me-ice);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }

/* stat row */
.cui-stats { display: grid; gap: clamp(12px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); text-align: center; }
.cui-stat { padding: clamp(18px, 2.4vw, 28px); border-radius: var(--c2me-radius-card);
  background: rgba(93, 191, 201, 0.08); border: 1px solid var(--c2me-line); }
.cui-section--dark .cui-stat { background: rgba(255, 255, 255, 0.06);
  border-color: rgba(93, 191, 201, 0.25); }
.cui-stat-num { font-size: clamp(30px, 3.6vw, 44px); }
.cui-section--dark .cui-stat-num { color: var(--c2me-turquoise); }
.cui-stat-label { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--c2me-ink-muted); margin-top: 6px; }
.cui-section--dark .cui-stat-label { color: #9bbab8; }

/* buttons */
.cui-btn { display: inline-block; min-height: 44px; padding: 13px 30px; border-radius: var(--c2me-radius-btn);
  background: linear-gradient(135deg, var(--c2me-turquoise), var(--c2me-mid));
  color: #ffffff !important; font-weight: 700; font-size: 16px; text-decoration: none !important;
  transition: filter 0.2s, transform 0.2s; cursor: pointer; }
.cui-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cui-btn--ghost { background: transparent; border: 1.5px solid var(--c2me-turquoise);
  color: var(--c2me-teal) !important; }
.cui-section--dark .cui-btn--ghost { color: #ffffff !important; }

/* accent summary box */
.cui-note { background: var(--c2me-mist); border-left: 4px solid var(--c2me-turquoise);
  border-radius: 8px; padding: 18px 22px; font-size: 15px; line-height: 1.7; color: var(--c2me-ink); }
.cui-section--dark .cui-note { background: rgba(255, 255, 255, 0.06); color: #cfe4e3; }

/* CTA band that flows into the (dark) footer with zero seam */
.cui-cta-band { text-align: center; }
.cui-cta-band .cui-lead { margin-left: auto; margin-right: auto; }

/* ---- v2.1 balance fixes ---- */
/* cards flex so trailing media/figures sit flush at the bottom (equal-height balance) */
.cui-card { display: flex; flex-direction: column; }
.cui-card > :last-child { margin-bottom: 0; }
.cui-card .cui-card-media { margin-top: auto; padding-top: 16px; }

/* exactly-2-per-row grid for 4-item sets (2x2 on desktop, 1-col on phones) */
.cui-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }

/* bio split: fixed portrait rail, content takes the rest */
.cui-split--bio > :first-child { flex: 0 1 300px; text-align: center; }
.cui-split--bio > :last-child { flex: 1 1 480px; }
