/* ============================================================
   KEY BRAINS 2 — GLOBAL STYLES
   Extracted from key-brains.html, key-brains-blog.html, key-brains-work.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --kb-black: #0a0a0a;
  --kb-white: #ffffff;
  --kb-blue: #0f62fe;
  --kb-blue-hover: #0043ce;
  --kb-blue-light: #edf5ff;
  --kb-gray-10: #f4f4f4;
  --kb-gray-20: #e0e0e0;
  --kb-gray-30: #c6c6c6;
  --kb-gray-50: #8d8d8d;
  --kb-gray-70: #525252;
  --kb-gray-90: #262626;
  --kb-green: #24a148;
  --kb-teal: #009d9a;
  --kb-purple: #8a3ffc;
  --kb-orange: #f1620a;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--kb-black);
  background: var(--kb-white);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: inline-block; vertical-align: middle; }
button { cursor: pointer; font-family: var(--font); }

/* ── RESET WP WRAPPERS ── */
#page, #content, #primary, #main, main,
.site, .site-content, .content-area,
.entry-content, article, .hfeed,
.wp-site-blocks {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* ── NAV ── */
#kb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--kb-black);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #393939;
}
.admin-bar #kb-nav { top: 32px; }
.kb-nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.kb-nav-logo img { height: 32px; width: auto; }
.kb-nav-links { display: flex; align-items: center; }
.kb-nav-links a,
.kb-nav-item > a {
  color: #c6c6c6;
  font-size: 14px;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
  white-space: nowrap;
  text-decoration: none;
}
.kb-nav-links a:hover,
.kb-nav-item > a:hover,
.kb-nav-links a.active { background: #393939; color: white; }
.kb-nav-links a.active { border-bottom: 2px solid var(--kb-blue); }
.kb-nav-item { position: relative; }
.kb-nav-item > a svg { margin-left: 4px; }
.kb-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  background: #1a1a1a;
  border: 1px solid #393939;
  border-top: 2px solid var(--kb-blue);
  min-width: 180px;
  z-index: 100;
}
.kb-nav-item:hover .kb-dropdown { display: block; }
.kb-dropdown a {
  display: block;
  color: #c6c6c6;
  font-size: 13px;
  padding: 10px 16px;
  border-bottom: 1px solid #2a2a2a;
  transition: background .15s, color .15s;
  height: auto;
}
.kb-dropdown a:last-child { border-bottom: none; }
.kb-dropdown a:hover { background: #393939; color: white; }
.kb-nav-icons { display: flex; align-items: center; }
.kb-nav-search {
  background: none;
  border: none;
  color: #c6c6c6;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.kb-nav-search:hover { background: #393939; color: white; }
.kb-btn-primary {
  background: var(--kb-blue);
  color: white;
  border: none;
  padding: 0 20px;
  height: 48px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 400;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.kb-btn-primary:hover { background: var(--kb-blue-hover); color: white; }

/* ── NAV SPACER ── */
.kb-nav-spacer { height: 48px; }
.admin-bar .kb-nav-spacer { height: 80px; }

/* ── BREADCRUMB ── */
.kb-breadcrumb {
  padding: 10px 48px;
  background: var(--kb-gray-10);
  border-bottom: 1px solid var(--kb-gray-20);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--kb-gray-50);
}
.kb-breadcrumb a { color: var(--kb-blue); }
.kb-breadcrumb a:hover { text-decoration: underline; }
.kb-breadcrumb-sep { color: var(--kb-gray-30); }

/* ── SECTION LABEL ── */
.kb-section-label {
  font-size: 12px;
  color: var(--kb-gray-50);
  padding: 12px 16px;
  border-bottom: 1px solid var(--kb-gray-20);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: var(--font);
  background: white;
}

/* ── BUTTONS ── */
.kb-btn-white {
  background: white;
  color: var(--kb-black);
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.kb-btn-white:hover { background: var(--kb-gray-10); }
.kb-btn-outline-white {
  background: none;
  color: white;
  border: 1px solid rgba(255,255,255,.4);
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
  margin-left: -1px;
}
.kb-btn-outline-white:hover { background: rgba(255,255,255,.08); border-color: white; }
.kb-btn-blue {
  background: var(--kb-blue);
  color: white;
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  border: none;
  cursor: pointer;
}
.kb-btn-blue:hover { background: var(--kb-blue-hover); color: white; }

/* ── CTA STRIP (blue) ── */
.kb-cta-strip {
  background: var(--kb-blue);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.kb-cta-strip h2 { font-size: 30px; font-weight: 300; color: white; margin: 0 0 8px; padding: 0; }
.kb-cta-strip h2 strong { font-weight: 600; }
.kb-cta-strip p { font-size: 14px; color: rgba(255,255,255,.7); max-width: 480px; line-height: 1.7; margin: 0; }
.kb-cta-actions { display: flex; flex-shrink: 0; }

/* ── CTA STRIP (dark) ── */
.kb-cta-strip-dark {
  background: var(--kb-black);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.kb-cta-strip-dark h2 { font-size: 32px; font-weight: 300; color: white; margin: 0 0 8px; padding: 0; }
.kb-cta-strip-dark h2 strong { font-weight: 600; }
.kb-cta-strip-dark p { font-size: 14px; color: rgba(255,255,255,.5); max-width: 480px; line-height: 1.7; margin: 0; }

/* ── FOOTER ── */
#kb-footer {
  background: var(--kb-black);
  color: #c6c6c6;
  padding: 40px 48px 24px;
  border-top: 1px solid #393939;
}
.kb-footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.kb-footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 16px;
  padding: 0;
}
.kb-footer-col a {
  display: block;
  font-size: 12px;
  color: #8d8d8d;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .15s;
}
.kb-footer-col a:hover { color: white; }
.kb-footer-bottom {
  border-top: 1px solid #393939;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kb-footer-logo { display: flex; align-items: center; gap: 8px; }
.kb-footer-logo-mark {
  width: 28px; height: 28px;
  background: var(--kb-blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; color: white;
  clip-path: polygon(10% 0%,90% 0%,100% 10%,100% 90%,90% 100%,10% 100%,0% 90%,0% 10%);
}
.kb-footer-logo-text { color: #8d8d8d; font-size: 12px; }
.kb-footer-legal { display: flex; gap: 16px; }
.kb-footer-legal a { font-size: 11px; color: #8d8d8d; text-decoration: none; }
.kb-footer-legal a:hover { color: white; }

/* ── SEARCH OVERLAY ── */
#kb-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
#kb-search-overlay.active { display: flex; }
.kb-search-box {
  background: white;
  padding: 32px;
  width: 100%;
  max-width: 600px;
  margin: 16px;
}
.kb-search-box input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--kb-blue);
  font-size: 24px;
  font-family: var(--font);
  outline: none;
  padding: 8px 0;
}
.kb-search-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* ── MOBILE BURGER ── */
.kb-burger {
  display: none;
  background: none;
  border: none;
  color: #c6c6c6;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}
#kb-mobile-menu {
  display: none;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-bottom: 1px solid #393939;
  z-index: 999;
  padding: 16px 0;
}
.admin-bar #kb-mobile-menu { top: 80px; }
#kb-mobile-menu.active { display: block; }
#kb-mobile-menu a {
  display: block;
  color: #c6c6c6;
  font-size: 15px;
  padding: 12px 24px;
  border-bottom: 1px solid #2a2a2a;
  text-decoration: none;
  transition: background .15s;
}
#kb-mobile-menu a:hover { background: #393939; color: white; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .kb-cta-strip, .kb-cta-strip-dark { grid-template-columns: 1fr; }
  .kb-footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .kb-nav-links { display: none; }
  .kb-burger { display: flex; }
  .kb-breadcrumb { padding: 10px 16px; }
  .kb-cta-strip, .kb-cta-strip-dark { padding: 40px 16px; }
  .kb-footer-grid { grid-template-columns: 1fr 1fr; }
  #kb-footer { padding: 32px 16px 16px; }
  .kb-cta-actions { flex-direction: column; }
  .kb-btn-outline-white { margin-left: 0; margin-top: -1px; }
}
