/* Shared styles for every page: base, nav, footer, blog, and the mobile layer.
   Page bodies keep their original inline styles; the mobile rules at the bottom
   override those with !important because inline styles can't be beaten otherwise. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F5F7FB; color: #141B2D; font-family: 'Hanken Grotesk', system-ui, sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.cw-page { max-width: 1180px; margin: 0 auto; background: #F5F7FB; min-height: 100vh; overflow-x: clip; }
.cw-skip { position: absolute; left: -9999px; }
.cw-skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 10px 14px; border-radius: 8px; }

/* ---------- nav ---------- */
.cw-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 40px; position: sticky; top: 0; z-index: 50;
  background: rgba(245,247,251,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,103,185,.12);
}
.cw-brand { display: flex; align-items: center; gap: 12px; }
.cw-logo {
  width: 40px; height: 40px; border-radius: 11px; background: #0067B9; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-family: 'Newsreader', serif; font-weight: 700; font-size: 18px;
}
.cw-logo--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.cw-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.cw-brand-name { font-family: 'Newsreader', serif; font-weight: 600; font-size: 18px; color: #0067B9; }
.cw-brand-sub { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8792A6; font-weight: 600; }
.cw-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; color: #2D3748; white-space: nowrap; }
.cw-links a:hover { color: #0067B9; }
.cw-links a[aria-current="page"] { color: #0067B9; font-weight: 700; }
.cw-phone { color: #0067B9 !important; font-weight: 700; }
.cw-cta { background: #D86C45; color: #fff !important; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.cw-cta:hover { background: #C55D38; }
.cw-menu-toggle, .cw-menu-btn { display: none; }

/* ---------- footer ---------- */
.cw-footer {
  padding: 34px 40px; background: #0067B9; color: #EAF4FC; font-size: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
}
.cw-footer-brand { display: flex; align-items: center; gap: 10px; font-family: 'Newsreader', serif; font-size: 16px; color: #fff; }
.cw-footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #DCEDFA; }
.cw-footer-links a:hover { color: #fff; }
.cw-footer-meta { color: #CBE3F7; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.cw-footer-meta a { color: #DCEDFA; }

/* ---------- blog ---------- */
.blog-head { padding: 64px 40px 36px; text-align: center; }
.blog-eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #C2552E; font-weight: 700; }
.blog-head h1 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 46px; line-height: 1.1; margin: 10px 0 16px; color: #18213A; letter-spacing: -.5px; }
.blog-head p { font-size: 18px; line-height: 1.6; color: #465267; max-width: 620px; margin: 0 auto; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; padding: 0 40px 64px; }
.blog-card {
  display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 20px; padding: 28px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(19,41,77,.12); }
.blog-card-meta { font-size: 13px; color: #6B778D; font-weight: 600; }
.blog-card-meta .cat { color: #C2552E; text-transform: uppercase; letter-spacing: .08em; }
.blog-card h2 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 24px; line-height: 1.2; margin: 0; color: #18213A; }
.blog-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #58647A; }
.blog-card .more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 14px; color: #0067B9; }
.blog-empty { text-align: center; color: #6B778D; padding: 20px 40px 80px; }

.post { max-width: 760px; margin: 0 auto; padding: 56px 40px 24px; }
.post-crumbs { font-size: 14px; color: #6B778D; margin-bottom: 18px; }
.post-crumbs a { color: #0067B9; font-weight: 600; }
.post h1 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 44px; line-height: 1.12; margin: 0 0 14px; color: #18213A; letter-spacing: -.4px; }
.post-meta { font-size: 14.5px; color: #6B778D; margin-bottom: 30px; }
.post-body { font-size: 18.5px; line-height: 1.72; color: #2D3748; }
.post-body > * + * { margin-top: 1.05em; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 0; }
.post-body h2 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 30px; line-height: 1.2; color: #18213A; margin: 1.7em 0 0; }
.post-body h3 { font-size: 21px; font-weight: 700; color: #18213A; margin: 1.4em 0 0; }
.post-body a { color: #0067B9; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .4em; }
.post-body strong { color: #18213A; }
.post-body blockquote { margin-left: 0; padding: 16px 22px; background: #E6F0F9; border-left: 4px solid #0067B9; border-radius: 0 12px 12px 0; color: #2D3748; }
.post-body blockquote > :first-child { margin-top: 0; }
.post-body img { border-radius: 16px; height: auto; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 16px; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #DCE3EE; }
.post-body th { color: #18213A; }
.post-cta {
  margin: 44px 0 0; background: #0067B9; color: #fff; border-radius: 20px; padding: 30px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.post-cta h2 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 26px; margin: 0 0 6px; }
.post-cta p { margin: 0; color: #EAF4FC; font-size: 16px; line-height: 1.5; }
.post-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.post-cta-btns a { padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.post-cta-btns .primary { background: #D86C45; color: #fff; }
.post-cta-btns .secondary { border: 2px solid rgba(255,255,255,.35); color: #fff; }
.post-related { max-width: 1180px; margin: 0 auto; }
.post-related h2 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 28px; color: #18213A; padding: 40px 40px 18px; margin: 0; }

/* ---------- mobile layer ---------- */
@media (max-width: 960px) {
  .cw-nav { padding: 14px 20px; }
  .cw-menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 11px; border-radius: 10px; cursor: pointer; background: #E3EFF9;
  }
  .cw-menu-btn span { display: block; height: 2px; background: #0067B9; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .cw-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px;
    background: #F5F7FB; border-bottom: 1px solid rgba(0,103,185,.12); box-shadow: 0 16px 30px rgba(19,41,77,.10);
    font-size: 17px;
  }
  .cw-links a { padding: 13px 4px; border-bottom: 1px solid rgba(0,103,185,.08); }
  .cw-links .cw-cta { margin-top: 12px; text-align: center; border-bottom: 0; padding: 14px; }
  .cw-menu-toggle:checked ~ .cw-links { display: flex; }
  .cw-menu-toggle:checked + .cw-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .cw-menu-toggle:checked + .cw-menu-btn span:nth-child(2) { opacity: 0; }
  .cw-menu-toggle:checked + .cw-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 760px) {
  /* Original page sections use inline grids and 40px side padding. */
  .cw-main [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .cw-main [style*="repeat(4"], .cw-main [style*="repeat(5"], .cw-main [style*="repeat(3"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cw-main [style*="grid-template-columns:1fr 1fr;gap:14px"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cw-main [style*="grid-template-columns:auto 1fr"] { grid-template-columns: auto minmax(0, 1fr) !important; gap: 16px !important; padding: 22px !important; }
  /* founder card (photo + bio): stack instead of squeezing the bio */
  .cw-main [style*="grid-template-columns:auto 1fr"][style*="align-items:center"] { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
  .cw-main [style*="width:180px;height:180px"] { width: 140px !important; height: 140px !important; }
  .cw-main [style*="grid-template-columns"] > * { min-width: 0; }
  .cw-main [style*="40px;"], .cw-main [style*="40px\""] { padding-left: 20px !important; padding-right: 20px !important; }
  .cw-main [style*="display:flex"][style*="gap"] { flex-wrap: wrap; }
  .cw-main [style*="column-count"], .cw-main [style*="columns:"] { column-count: 1 !important; columns: 1 !important; }
  .cw-main h1 { font-size: clamp(34px, 9vw, 44px) !important; }
  .cw-main h2 { font-size: clamp(26px, 7vw, 32px) !important; }
  .cw-main img[style*="height:420px"] { height: 260px !important; }
  .cw-main [style*="left:-18px"] { left: 12px !important; }
  .cw-main iframe { max-width: 100%; }

  .cw-footer { flex-direction: column; align-items: flex-start; padding: 30px 20px; }
  .cw-footer-meta { text-align: left; }

  .blog-head { padding: 44px 20px 28px; }
  .blog-head h1 { font-size: 36px; }
  .blog-grid { grid-template-columns: 1fr; padding: 0 20px 48px; }
  .post { padding: 36px 20px 16px; }
  .post h1 { font-size: 34px; }
  .post-body { font-size: 17.5px; }
  .post-body h2 { font-size: 26px; }
  .post-related h2 { padding: 32px 20px 14px; }
  .post-body table { display: block; overflow-x: auto; }
}

/* ---------- blog images + local block ---------- */
.post-hero { margin: 0 0 30px; }
.post-hero img { width: 100%; height: auto; display: block; border-radius: 20px; }
.post-body figure { margin: 1.6em 0 0; }
.post-body figure img { width: 100%; display: block; border-radius: 16px; border: 1px solid #DCE3EE; }
.post-body figcaption { font-size: 14.5px; color: #6B778D; margin-top: 8px; line-height: 1.5; }
.blog-card-img { width: calc(100% + 56px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -28px -28px 6px; border-radius: 20px 20px 0 0; display: block; }
.post-local { margin: 44px 0 0; padding: 26px 28px; background: #E6F0F9; border-radius: 20px; }
.post-local h2 { font-family: 'Newsreader', serif; font-weight: 600; font-size: 24px; margin: 0 0 8px; color: #18213A; }
.post-local p { margin: 0; font-size: 16.5px; line-height: 1.65; color: #2D3748; }
.post-local a { color: #0067B9; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.post-local + .post-cta { margin-top: 18px; }
.cw-footer .cw-logo { background: #fff; color: #0067B9; }
