/*
Theme Name:   MBI Compliance (Kadence Child)
Theme URI:    https://mbicompliance.com
Description:  Child theme of Kadence for MBI Compliance. Brand colours, fonts, header and footer, page layouts and the Case Studies post type.
Author:       MBI Compliance
Template:     kadence
Version:      1.0.0
License:      GNU General Public License v2 or later
Text Domain:  mbi-child
*/

/* ---------- Brand tokens (override Kadence global palette) ---------- */
:root {
  --mbi-purple: #6A00E6;
  --mbi-purple-deep: #4a10a8;
  --mbi-orange: #FF9D00;
  --mbi-black: #121212;
  --mbi-light: #E9E9F2;
  --mbi-paper: #F7F7FB;
  --mbi-muted: #4d4b5c;
  --mbi-line: #d3d2e2;

  --global-palette1: #6A00E6;
  --global-palette2: #4a10a8;
  --global-palette3: #121212;
  --global-palette4: #2b2938;
  --global-palette5: #4d4b5c;
  --global-palette6: #d3d2e2;
  --global-palette7: #E9E9F2;
  --global-palette8: #F7F7FB;
  --global-palette9: #ffffff;
  --global-palette-highlight: #6A00E6;
  --global-palette-highlight-alt: #4a10a8;
  --global-palette-btn-bg: #FF9D00;
  --global-palette-btn-bg-hover: #e68d00;
  --global-palette-btn: #121212;
  --global-palette-btn-hover: #121212;

  --mbi-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mbi-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --global-heading-font-family: var(--mbi-display);
  --global-body-font-family: var(--mbi-body);
}

body { font-family: var(--mbi-body); color: var(--mbi-black); background: var(--mbi-paper); }
h1, h2, h3, h4, h5, h6, .entry-title { font-family: var(--mbi-display); letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
a { color: var(--mbi-purple); }
:focus-visible { outline: 3px solid var(--mbi-orange); outline-offset: 3px; }

/* ---------- Header (Kadence header builder) ---------- */
#masthead, #masthead .site-header-row-container-inner, .site-main-header-wrap .site-header-row-container-inner { background: var(--mbi-purple) !important; }
#masthead .site-branding img, #masthead .custom-logo { max-height: 52px; width: auto; }
#masthead .header-navigation .header-menu-container ul li.menu-item > a { color: #fff; font-family: var(--mbi-body); font-weight: 500; }
#masthead .header-navigation .header-menu-container ul li.menu-item > a:hover { background: rgba(255,255,255,0.14); color: #fff; }
#masthead .header-navigation .header-menu-container ul li.current-menu-item > a,
#masthead .header-navigation .header-menu-container ul li.current_page_item > a { color: #fff; box-shadow: inset 0 -3px 0 var(--mbi-orange); }
#masthead .menu-toggle-open, #masthead .mobile-toggle-open-container button { color: #fff; }
/* Contact item in the menu styled as a button: add CSS class "mbi-menu-cta" to that menu item */
#masthead .header-navigation li.mbi-menu-cta > a { background: var(--mbi-orange); color: var(--mbi-black) !important; border-radius: 8px; font-weight: 700; margin-left: 8px; }
#masthead .header-navigation li.mbi-menu-cta > a:hover { filter: brightness(1.07); background: var(--mbi-orange); }

/* ---------- MBI pages: full width, no default title ---------- */
body.mbi-page .entry-hero, body.mbi-page .entry-header, body.mbi-page .page-hero-section { display: none; }
body.mbi-page .content-container, body.mbi-page .site-container { max-width: none; padding: 0; }
body.mbi-page .content-area { margin: 0; }
body.mbi-page .entry-content-wrap { padding: 0; }
body.mbi-page .entry-content { margin: 0; }
body.mbi-page .single-content { margin: 0; }
body.mbi-page .single-content > * { margin-block-start: 0; }

.mbi-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; box-sizing: border-box; }
.mbi-eyebrow { font: 600 0.75rem/1 var(--mbi-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mbi-purple); margin: 0 0 12px; }

/* ---------- Hero ---------- */
.mbi-hero { background: var(--mbi-purple); color: #fff; padding-block: clamp(40px, 7vw, 88px); }
.mbi-hero--home { background: linear-gradient(90deg, #6A00E6 15%, rgba(106,0,230,0.15) 100%), url("assets/swirl.jpg") center / cover no-repeat #6A00E6; }
.mbi-hero .mbi-eyebrow { color: var(--mbi-orange); }
.mbi-hero h1 { font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 800; color: #fff; margin: 0 0 20px; max-width: 18ch; }
.mbi-hero--home h1 { max-width: 16ch; }
.mbi-hero p { color: rgba(255,255,255,0.9); font-size: 1.125rem; max-width: 62ch; }
.mbi-hero .mbi-tag { font: 700 1.1rem/1.3 var(--mbi-display); color: var(--mbi-orange); }
.mbi-hero a:not(.wp-block-button__link) { color: #fff; }

/* ---------- Sections ---------- */
.mbi-section { padding-block: clamp(44px, 7vw, 84px); }
.mbi-section--alt { background: var(--mbi-light); }
.mbi-section h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; margin: 0 0 14px; max-width: 24ch; }
.mbi-section h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; }
.mbi-lead { color: var(--mbi-muted); font-size: 1.05rem; max-width: 65ch; margin: 0 0 32px; }
.mbi-muted { color: var(--mbi-muted); }

/* ---------- Buttons ---------- */
.wp-block-button.mbi-btn-primary .wp-block-button__link { background: var(--mbi-orange); color: var(--mbi-black); font: 700 1rem/1 var(--mbi-display); padding: 15px 24px; border-radius: 8px; border: 2px solid transparent; }
.wp-block-button.mbi-btn-primary .wp-block-button__link:hover { filter: brightness(1.07); }
.wp-block-button.mbi-btn-ghost .wp-block-button__link { background: transparent; color: #fff; font: 700 1rem/1 var(--mbi-display); padding: 15px 24px; border-radius: 8px; border: 2px solid #fff; }
.wp-block-button.mbi-btn-ghost .wp-block-button__link:hover { background: rgba(255,255,255,0.12); }
.wp-block-button.mbi-btn-outline .wp-block-button__link { background: transparent; color: var(--mbi-purple); font: 700 1rem/1 var(--mbi-display); padding: 15px 24px; border-radius: 8px; border: 2px solid var(--mbi-purple); }

/* ---------- Problem table ---------- */
.mbi-problems { margin: 0; }
.wp-block-columns + .wp-block-buttons { margin-top: 28px; }
.mbi-problems table { border-collapse: collapse; width: 100%; border-top: 2px solid var(--mbi-black); border-bottom: 0; }
.mbi-problems th { font: 600 0.75rem/1 var(--mbi-body); letter-spacing: 0.12em; text-transform: uppercase; text-align: left; padding: 14px 10px 14px 0; border: 0; border-bottom: 1px solid var(--mbi-line); background: transparent; }
.mbi-problems td { padding: 16px 10px 16px 0; border: 0; border-bottom: 1px solid var(--mbi-line); color: var(--mbi-muted); vertical-align: baseline; }
.mbi-problems td:last-child { font: 700 1rem/1.4 var(--mbi-display); color: var(--mbi-purple); }

/* ---------- Columns used as card grids ---------- */
.mbi-cols { gap: 20px; }
.mbi-cols.wp-block-columns { margin-bottom: 0; }
.mbi-p { border-top: 4px solid var(--mbi-purple); padding-top: 16px; }
.mbi-p h3 { font-size: 1.5rem; }
.mbi-p .mbi-lead-sm { font-weight: 600; margin: 0 0 10px; }
.mbi-p p { color: var(--mbi-muted); font-size: 0.95rem; }
.mbi-card { background: #fff; border: 1px solid var(--mbi-line); border-radius: 12px; padding: 26px; box-sizing: border-box; }
.mbi-card p, .mbi-card li { color: var(--mbi-muted); }
.mbi-card ul { padding-left: 1.1em; margin: 0; }
.mbi-pill { display: inline-block; font: 600 0.72rem/1 var(--mbi-body); letter-spacing: 0.1em; text-transform: uppercase; background: var(--mbi-light); color: var(--mbi-muted); padding: 6px 10px; border-radius: 999px; margin: 0 0 12px; }
.mbi-cred { color: var(--mbi-purple); font-weight: 600; font-size: 0.9rem; }

/* ---------- Steps ---------- */
.mbi-steps { counter-reset: step; }
.mbi-step { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--mbi-line); }
.mbi-step::before { content: counter(step); font: 800 1.9rem/1 var(--mbi-display); color: var(--mbi-orange); }
.mbi-step h3, .mbi-step p { grid-column: 2; margin: 0; }
.mbi-step p { color: var(--mbi-muted); margin-top: 6px; }
.mbi-flow { font: 700 1rem/1.9 var(--mbi-display); }

/* ---------- Quote / names ---------- */
.mbi-quote { font: 700 clamp(1.3rem, 3vw, 1.8rem)/1.3 var(--mbi-display); letter-spacing: -0.02em; max-width: 30ch; border-left: 6px solid var(--mbi-orange); padding-left: 20px; margin: 0; text-wrap: balance; }
.mbi-name { font: 800 2.2rem/1 var(--mbi-display); color: var(--mbi-purple); letter-spacing: -0.03em; margin: 0 0 6px; }

/* ---------- CTA band ---------- */
.mbi-cta { background: var(--mbi-black); color: #fff; padding-block: clamp(40px, 6vw, 64px); }
.mbi-cta h2 { color: #fff; margin: 0 0 20px; }

/* ---------- Case studies (shortcode output) ---------- */
.mbi-case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.mbi-case-grid .mbi-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.mbi-case-grid .mbi-card h4 { font: 600 0.72rem/1 var(--mbi-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mbi-purple); margin: 18px 0 4px; }
.mbi-case-grid .mbi-card p { margin: 0; }
.mbi-case-grid .mbi-card p.mbi-pill { margin-bottom: 12px; }

/* ---------- Contact ---------- */
.mbi-contact-details h3 { font-size: 1rem; margin-bottom: 4px; }
.mbi-contact-details p { margin: 0 0 22px; }

/* ---------- Footer (injected, replaces Kadence footer) ---------- */
#colophon { display: none; }
.mbi-footer { background: var(--mbi-purple); color: #fff; padding-block: 44px; }
.mbi-footer .mbi-wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.mbi-footer img { height: 72px; width: auto; display: block; margin-bottom: 14px; }
.mbi-footer p { color: rgba(255,255,255,0.88); font-size: 0.9rem; margin: 0 0 6px; }
.mbi-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; align-content: flex-start; }
.mbi-footer a { color: #fff; }

@media (max-width: 781px) {
  .mbi-step { grid-template-columns: 40px minmax(0, 1fr); }
  .mbi-problems td, .mbi-problems th { display: block; padding-right: 0; }
  .mbi-problems th { border-bottom: 0; padding-bottom: 4px; }
  .mbi-problems thead { display: none; }
  .mbi-problems td { border-bottom: 0; padding-bottom: 0; }
  .mbi-problems td:last-child { padding-top: 2px; padding-bottom: 16px; border-bottom: 1px solid var(--mbi-line); }
}
@media (prefers-reduced-motion: no-preference) { .wp-block-button__link { transition: filter .15s, background .15s; } }
