/**
 * KB Studio — Core styles (design tokens, nav, base typography, buttons, containers).
 * Split out of custom.css 2026-07-24 so these stay render-blocking on the homepage
 * while the rest of custom.css loads async there (mobile LCP fix). Loads on every
 * page BEFORE custom.css — order preserved from the original single file.
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    --kb-purple: #33006c;
    --kb-purple-light: #4a0099;
    --kb-purple-dark: #240049;
    --kb-teal: #00d4fa;      /* brand secondary — decorative, on dark/purple ONLY (poor contrast on white) */
    --kb-cyan: #009edb;      /* interactive cyan — links, eyebrows, ticks on light backgrounds */
    --kb-gold: #f59e0b;      /* restricted: testimonial quote glyph + draft notes only */
    --kb-dark: #111;
    --kb-text: #333;
    --kb-gray: #666;
    --kb-gray-light: #999;
    --kb-light: #f8f8fc;
    --kb-white: #ffffff;
    --kb-purple-tint: #f5f0ff;  /* panels, chips, soft fills (v1.1) */
    --kb-line: #e8e5ec;         /* borders, dividers (v1.1) */
    --kb-gradient: linear-gradient(135deg, #33006c 0%, #4a0099 100%);
    --kb-gradient-dark: linear-gradient(135deg, #240049 0%, #33006c 100%);
    --kb-gradient-gold: linear-gradient(135deg, #d4a574 0%, #c9956a 100%);
    --kb-shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.08);
    --kb-shadow-md: 0 15px 40px rgba(51, 0, 108, 0.15);
    --kb-shadow-lg: 0 25px 80px rgba(51, 0, 108, 0.1);
    --kb-radius-sm: 8px;
    --kb-radius-md: 12px;
    --kb-radius-lg: 18px;
    --kb-radius-full: 50px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

/* Header bar */
.site-header {
    /* Translucent + blur so content dissolves under the sticky bar instead of
       hard-cutting at its edge (2026-08-13 redesign). Solid colour is the
       fallback wherever backdrop-filter is unsupported. */
    background: var(--kb-purple-dark) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 34px -22px rgba(26, 0, 53, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
    .site-header {
        background: rgba(26, 0, 53, 0.88) !important;
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}

.site-header .inside-header {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px !important;
}

/* Logo — left */
.site-header .site-logo {
    flex-shrink: 0;
}

.site-header .header-image {
    width: 176px !important;
    transition: opacity 0.3s ease;
}

.site-header .header-image:hover {
    opacity: 0.85;
}

/* Nav — right, inline with header */
#site-navigation {
    margin-left: auto;
}

.main-navigation .inside-navigation {
    padding: 0 !important;
}

.main-navigation .inside-navigation.grid-container {
    max-width: none;
}

/* Nav links */
.main-navigation .main-nav ul {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-navigation .main-nav ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-weight: 500 !important;
    font-size: 17px !important;
    padding: 10px 20px !important;
    transition: color 0.25s ease;
    position: relative;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus {
    color: #fff !important;
    background: none !important;
}

/* Hover underline, same bar the active item uses */
.main-navigation .main-nav ul li:not(.kb-nav-cta) > a:hover::after,
.main-navigation .main-nav ul li:not(.kb-nav-cta) > a:focus::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--kb-teal);
    border-radius: 2px;
}

/* "Book a call" nav button (injected by kb_studio_nav_cta) */
.main-navigation .main-nav ul li.kb-nav-cta {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.main-navigation .main-nav ul li.kb-nav-cta > a {
    background: #fff !important;
    color: var(--kb-purple) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    padding: 12px 20px !important;
    border-radius: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.main-navigation .main-nav ul li.kb-nav-cta > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.45);
    color: var(--kb-purple) !important;
}

.main-navigation .main-nav ul li.kb-nav-cta > a::after {
    display: none !important;
}

@media (max-width: 768px) {
    .main-navigation .main-nav ul li.kb-nav-cta {
        margin: 8px 20px 12px;
    }
    .main-navigation .main-nav ul li.kb-nav-cta > a {
        display: block;
        text-align: center;
    }
}

/* Active page — white text + underline bar */
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current_page_item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
    color: #fff !important;
}

.main-navigation .main-nav ul li.current-menu-item > a::after,
.main-navigation .main-nav ul li.current_page_item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--kb-teal);
    border-radius: 2px;
}


/* Dropdown menus */
.main-navigation .main-nav ul ul {
    display: block; /* reset the top-level flex so submenu items stack vertically */
    background: #fff !important;
    border: 1px solid rgba(51, 0, 108, 0.08);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(51, 0, 108, 0.12);
    min-width: 210px;
}

.main-navigation .main-nav ul ul li {
    display: block;
    width: 100%;
}

/* Extra specificity (.main-nav + ul ul) so dark text beats the white top-level link color */
.main-navigation .main-nav ul ul li a {
    display: block;
    width: 100%;
    white-space: nowrap;
    color: var(--kb-text) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    border-radius: 8px;
}

.main-navigation .main-nav ul ul li a:hover,
.main-navigation .main-nav ul ul li a:focus {
    background: rgba(51, 0, 108, 0.04) !important;
    color: var(--kb-purple) !important;
}

/* Mobile */
@media (max-width: 768px) {
    .site-header .inside-header {
        padding: 12px 20px !important;
    }

    .menu-toggle {
        color: rgba(255, 255, 255, 0.8) !important;
        /* Theme font: GP's Google Fonts (Montserrat) is dequeued for perf; keep the toggle on-brand */
        font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    }

    .main-navigation .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }

    .main-navigation .main-nav ul li a {
        padding: 14px 20px !important;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .main-navigation .main-nav ul li.current-menu-item > a::after,
    .main-navigation .main-nav ul li.current_page_item > a::after {
        bottom: auto;
        top: 50%;
        left: 0;
        right: auto;
        width: 3px;
        height: 20px;
        transform: translateY(-50%);
    }

    .kb-nav-cta-item {
        margin-left: 0 !important;
        padding: 12px 20px;
    }

    .kb-nav-cta {
        display: block;
        text-align: center;
        padding: 14px 26px !important;
        border-radius: 8px;
    }
}

/* ==========================================================================
   Global Typography
   ========================================================================== */

body,
p,
li,
td,
th,
span,
label,
input,
textarea,
select,
blockquote {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
h1 span, h2 span, h3 span, h4 span,
.main-navigation a,
.menu-item a,
nav a,
.site-title,
.entry-title {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ==========================================================================
   Base Page Styles
   ========================================================================== */

.kb-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--kb-text);
    /* clip (not hidden): hidden turns .kb-page into a scroll container and
       kills position:sticky for the homepage zoom stage. clip clips the same
       horizontal bleed without creating a scroll context. hidden stays first
       as the legacy-browser fallback. */
    overflow-x: hidden;
    overflow-x: clip;
}

.kb-page * {
    box-sizing: border-box;
}

.kb-page img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.kb-page h1,
.kb-page h2,
.kb-page h3,
.kb-page h4 {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--kb-dark);
}

.kb-page h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.6rem);
    margin-bottom: 1.5rem;
}

.kb-page h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.kb-page h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.kb-gradient-text {
    background: var(--kb-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.kb-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--kb-gradient);
    color: white;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    box-shadow: 0 3px 10px rgba(51, 0, 108, 0.22);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.kb-btn-primary svg,
.kb-btn-secondary svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    transition: transform 0.25s ease;
}

.kb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(51, 0, 108, 0.3);
    color: white;
}

.kb-btn-primary:hover svg,
.kb-btn-secondary:hover svg {
    transform: translateX(3px);
}

.kb-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border: 2px solid var(--kb-purple);
    color: var(--kb-purple);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.25s ease;
    background: transparent;
    cursor: pointer;
}

.kb-btn-secondary:hover {
    background: var(--kb-purple);
    color: white;
}

/* ==========================================================================
   Containers
   ========================================================================== */

.kb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.kb-container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.kb-container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
