/* FlexCap blog styles. Mirrors the React site's tokens (client/src/index.css)
   so the static blog pages look like the rest of flexcapfinance.ca. */
:root {
  --navy: #0a1b3b;
  --navy-deep: #06152e;
  --navy-card: #102b4f;
  --green: #28c785;
  --aqua: #6cd2c0;
  --pale: #eaf7f1;
  --mist: #f5f8f7;
  --muted: #657381;
  --line: #d9e5e4;
  --footer-text: #d7e2e8;
  --footer-muted: #b8c8d5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: #ffffff;
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, .font-heading { font-family: "Manrope", Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.container-custom { width: min(1180px, calc(100% - 48px)); margin-left: auto; margin-right: auto; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: 80px;
  border-bottom: 1px solid #e7eeee;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
}
.site-header .bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .logo img { height: 40px; width: auto; }
.nav-desktop { display: none; align-items: center; gap: 24px; font-size: 13px; font-weight: 700; color: #516270; }
.nav-desktop a { transition: color .15s; }
.nav-desktop a:hover { color: var(--green); }
.nav-desktop a[aria-current="page"] { color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: none; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.header-phone:hover { color: var(--green); }
.header-phone svg { width: 14px; height: 14px; color: var(--green); }
.btn-apply {
  display: none; align-items: center; gap: 8px; border-radius: 6px; background: var(--navy);
  padding: 10px 16px; font-family: "Manrope", Arial, sans-serif; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: #fff; transition: transform .15s, background .15s;
}
.btn-apply:hover { transform: translateY(-2px); background: var(--navy-card); }
.btn-apply svg { width: 14px; height: 14px; color: var(--green); }
.mobile-menu { position: static; }
.mobile-menu summary {
  list-style: none; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 20px; height: 20px; }
.mobile-menu nav {
  position: absolute; top: 80px; left: 0; right: 0; border-bottom: 1px solid var(--line); background: #fff;
  padding: 20px 24px; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1);
  display: flex; flex-direction: column; gap: 16px; font-size: 14px; font-weight: 700;
}
.mobile-menu nav a { padding: 8px 0; }
.mobile-menu nav a:hover { color: var(--green); }
.mobile-menu nav .mobile-apply {
  margin-top: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 6px;
  background: var(--green); padding: 12px 16px; font-family: "Manrope", Arial, sans-serif; font-size: 12px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--navy);
}
@media (min-width: 640px) { .btn-apply { display: inline-flex; } }
@media (min-width: 1280px) {
  .nav-desktop, .header-phone { display: flex; }
  .mobile-menu { display: none; }
}

/* ---- hero band ---- */
.blog-hero {
  background-color: var(--navy-deep); color: #fff; padding: 64px 0 56px;
  background-image:
    linear-gradient(rgba(108, 210, 192, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 210, 192, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
}
.eyebrow { font-family: "Manrope", Arial, sans-serif; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--aqua); }
.blog-hero h1 { margin: 16px 0 0; max-width: 900px; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; font-weight: 800; text-wrap: balance; }
.blog-hero .lede { margin: 18px 0 0; max-width: 680px; font-size: 17px; line-height: 1.65; color: var(--footer-muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--footer-muted); }
.crumbs a:hover { color: var(--green); }
.post-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--footer-muted); }

/* ---- blog index ---- */
.post-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding: 56px 0 72px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(10, 27, 59, 0.08); }
.post-card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--mist); }
.post-card .body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.post-card time { font-size: 13px; color: var(--muted); }
.post-card h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 800; }
.post-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.post-card .more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-family: "Manrope", Arial, sans-serif; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); }
.post-card .more svg { width: 14px; height: 14px; color: var(--green); }

/* ---- single post ---- */
.post-cover { width: min(1000px, calc(100% - 48px)); margin: -1px auto 0; padding-top: 40px; }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--mist); }
.article { width: min(720px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 24px; font-size: 18px; line-height: 1.75; color: #22324a; }
.article > * + * { margin-top: 1.1em; }
.article p, .article ul, .article ol, .article blockquote, .article table, .article figure { margin-bottom: 0; }
.article h2 { margin: 1.9em 0 0; font-size: 28px; line-height: 1.25; font-weight: 800; color: var(--navy); text-wrap: balance; }
.article h3 { margin: 1.6em 0 0; font-size: 21px; line-height: 1.3; font-weight: 800; color: var(--navy); }
.article a { color: #138a5a; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article a:hover { color: var(--navy); }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: .4em; }
.article strong { color: var(--navy); }
.article blockquote { border-left: 4px solid var(--green); background: var(--pale); margin-left: 0; margin-right: 0; padding: 16px 20px; border-radius: 0 8px 8px 0; }
.article figure { margin-left: 0; margin-right: 0; }
.article figure img { border-radius: 8px; }
.article figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.article .table-wrap { overflow-x: auto; }
.article table { border-collapse: collapse; width: 100%; font-size: 16px; }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--mist); font-family: "Manrope", Arial, sans-serif; }

.post-cta { width: min(720px, calc(100% - 48px)); margin: 24px auto 72px; border-radius: 10px; background: var(--pale); border: 1px solid #cdebdd; padding: 28px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.post-cta h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 800; }
.post-cta p { margin: 6px 0 0; color: var(--muted); }
.post-cta .call { display: inline-flex; align-items: center; gap: 8px; border-radius: 6px; background: var(--navy); color: #fff; padding: 12px 18px; font-family: "Manrope", Arial, sans-serif; font-weight: 800; font-size: 14px; }
.post-cta .call:hover { background: var(--navy-card); }
.post-cta .call svg { width: 16px; height: 16px; color: var(--green); }

.empty { padding: 72px 0; color: var(--muted); }

/* ---- footer ---- */
.site-footer { background: var(--navy-deep); color: #fff; }
.footer-grid { display: grid; gap: 40px; padding: 56px 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr .8fr .9fr; } }
.footer-grid .logo img { height: 44px; width: auto; }
.footer-tagline { margin: 20px 0 0; max-width: 384px; font-size: 14px; line-height: 1.625; color: var(--footer-muted); }
.footer-label { margin: 0; font-family: "Manrope", Arial, sans-serif; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--aqua); }
.footer-label.follow { margin-top: 28px; }
.socials { margin-top: 16px; display: flex; gap: 12px; }
.socials a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); color: var(--footer-text); transition: color .15s, border-color .15s; }
.socials a:hover { color: var(--green); border-color: var(--green); }
.socials svg { width: 18px; height: 18px; }
.footer-links { margin-top: 20px; display: grid; gap: 12px; font-size: 14px; font-weight: 600; color: var(--footer-text); }
.footer-links a { width: fit-content; }
.footer-links a:hover { color: var(--green); }
.footer-contact { margin-top: 20px; display: grid; gap: 12px; font-size: 14px; color: var(--footer-text); }
.footer-contact .big { font-family: "Manrope", Arial, sans-serif; font-size: 20px; font-weight: 800; color: #fff; }
.footer-contact a:hover { color: var(--green); }
.footer-contact .mail { font-weight: 600; }
.footer-contact address, .footer-contact p { margin: 0; font-style: normal; line-height: 1.625; color: var(--footer-muted); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container-custom { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; font-size: 11px; color: #8091a1; }
@media (min-width: 768px) { .footer-bottom .container-custom { flex-direction: row; justify-content: space-between; align-items: center; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
