/* Canopi · Blog post page — dark editorial */
:root {
  --bg: #0A0F1F;
  --bg-2: #0F1629;
  --ink: #F8FAFC;
  --ink-2: #E2E8F0;
  --mute: #94A3B8;
  --mute-2: #64748B;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.04);
  --teal: #5EEAD4;
  --teal-2: #14B8A6;
  --orange: #F97316;
  --orange-2: #FB923C;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.serif { font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Reading-progress bar ---------- */
.read-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--teal-2), var(--orange));
  z-index: 200; transition: width .1s linear;
}

/* ---------- Nav ---------- */
.bp-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,15,31,.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.bp-nav-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
}
.bp-logo {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.bp-logo svg { color: var(--ink); }
.bp-nav-links {
  display: flex; gap: 36px; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--mute);
  letter-spacing: .2px;
}
.bp-nav-links a { text-decoration: none; transition: color .18s; }
.bp-nav-links a:hover, .bp-nav-links a.active { color: var(--ink); }
.bp-nav-cta {
  background: linear-gradient(135deg, var(--teal-2), #0D9488);
  color: var(--bg) !important;
  padding: 9px 18px; border-radius: 6px;
  font-weight: 600; transition: transform .18s, box-shadow .18s;
}
.bp-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(94,234,212,.25);
}
@media (max-width: 760px) {
  .bp-nav-links { display: none; }
}

/* ---------- Header ---------- */
.bp-header {
  position: relative; padding: 80px 32px 56px;
  overflow: hidden;
}
.bp-header::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(94,234,212,.10) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(249,115,22,.08) 0%, transparent 60%);
  pointer-events: none;
}
.bp-header::after {
  content: ''; position: absolute; inset: 0; opacity: .25;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.bp-header-inner {
  max-width: 880px; margin: 0 auto; position: relative;
}
.bp-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--mute); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: .3px;
  margin-bottom: 36px;
  transition: color .18s, gap .18s;
}
.bp-back:hover { color: var(--teal); gap: 10px; }
.bp-back::before { content: '←'; font-size: 16px; }

.bp-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--teal); font-size: 11px; font-weight: 700;
  letter-spacing: 2.4px; text-transform: uppercase;
  margin-bottom: 24px;
}
.bp-eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--teal); opacity: .6;
}
.bp-header h1 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -1.6px;
  margin-bottom: 28px;
}
.bp-dek {
  font-size: 19px; line-height: 1.55;
  color: var(--mute); max-width: 720px;
  margin-bottom: 36px;
}
.bp-meta {
  display: flex; align-items: center; gap: 0;
  flex-wrap: wrap;
  font-size: 13px; color: var(--mute-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  letter-spacing: .3px;
}
.bp-meta > * + *::before {
  content: '·'; margin: 0 14px; color: var(--mute-2); opacity: .6;
}
.bp-meta strong { color: var(--ink-2); font-weight: 600; }
.bp-meta .read-tag {
  color: var(--teal); font-weight: 600;
}

/* ---------- Article body ---------- */
.bp-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px 80px;
}
.bp-article h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 32px; font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.7px;
  margin: 56px 0 22px;
}
.bp-article h2:first-child { margin-top: 0; }
.bp-article h3 {
  font-size: 21px; font-weight: 700;
  color: var(--ink);
  line-height: 1.32;
  letter-spacing: -.2px;
  margin: 40px 0 16px;
}
.bp-article p {
  font-size: 17.5px;
  color: var(--ink-2);
  margin-bottom: 22px;
  line-height: 1.75;
}
.bp-article p:last-child { margin-bottom: 0; }
.bp-article strong {
  color: var(--ink); font-weight: 600;
}
.bp-article em {
  color: var(--teal); font-style: italic;
}
.bp-article ul, .bp-article ol {
  margin: 0 0 22px 4px; padding-left: 0;
  list-style: none;
}
.bp-article li {
  position: relative;
  font-size: 17px; color: var(--ink-2);
  line-height: 1.72;
  padding-left: 26px;
  margin-bottom: 14px;
}
.bp-article ul li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 8px; height: 8px;
  background: var(--teal); border-radius: 2px;
  transform: rotate(45deg);
}
.bp-article ol { counter-reset: bp-counter; }
.bp-article ol li { counter-increment: bp-counter; padding-left: 38px; }
.bp-article ol li::before {
  content: counter(bp-counter, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-size: 12px; font-weight: 700; color: var(--orange);
  letter-spacing: 1px;
  font-feature-settings: "tnum";
}

/* Highlight / pull-quote box */
.bp-article .highlight-box,
.bp-article blockquote {
  position: relative;
  padding: 28px 32px;
  margin: 36px 0;
  background: rgba(94,234,212,.04);
  border: 1px solid rgba(94,234,212,.18);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
}
.bp-article .highlight-box p,
.bp-article blockquote p {
  font-size: 17.5px; line-height: 1.7;
  color: var(--ink); margin: 0;
}
.bp-article .highlight-box p + p { margin-top: 14px; }
.bp-article .highlight-box strong { color: var(--ink); }

/* Stats grid */
.bp-article .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 40px 0;
}
.bp-article .stat-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 22px 22px;
  text-align: left;
  overflow: hidden;
}
.bp-article .stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--teal-2), var(--orange));
}
.bp-article .stat-number {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.bp-article .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: .8px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Tables (if any) */
.bp-article table {
  width: 100%; border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
}
.bp-article th, .bp-article td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.bp-article th {
  font-weight: 700; color: var(--mute);
  font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
}
.bp-article td { color: var(--ink-2); }
.bp-article tr:hover td { background: rgba(255,255,255,.02); }

/* Inline link */
.bp-article a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(94,234,212,.4);
  transition: color .18s, border-color .18s;
}
.bp-article a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ---------- CTA strip after article ---------- */
.bp-cta {
  max-width: 1080px; margin: 0 auto 64px;
  padding: 0 32px;
}
.bp-cta-inner {
  position: relative;
  background: linear-gradient(135deg, rgba(13,148,136,.10), rgba(249,115,22,.06));
  border: 1px solid rgba(94,234,212,.20);
  border-radius: 6px;
  padding: 56px 56px 56px;
  overflow: hidden;
}
.bp-cta-inner::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 3px;
  background: linear-gradient(90deg, var(--teal-2), var(--orange));
  border-radius: 6px 6px 0 0;
}
.bp-cta-eyebrow {
  font-size: 11px; font-weight: 700;
  color: var(--orange);
  letter-spacing: 2.4px; text-transform: uppercase;
  margin-bottom: 18px;
}
.bp-cta h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 32px; font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -.7px;
  max-width: 640px;
  margin-bottom: 14px;
}
.bp-cta p {
  font-size: 16px; color: var(--mute);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.bp-cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.bp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 4px;
  font-size: 14px; font-weight: 600;
  letter-spacing: .2px;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.bp-btn-primary {
  background: linear-gradient(135deg, var(--teal-2), #0D9488);
  color: var(--bg);
  box-shadow: 0 8px 20px rgba(94,234,212,.20);
}
.bp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(94,234,212,.28);
}
.bp-btn-secondary {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.bp-btn-secondary:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
}

/* ---------- Related posts ---------- */
.bp-related {
  max-width: 1080px; margin: 0 auto 64px;
  padding: 0 32px;
}
.bp-related-eyebrow {
  font-size: 11px; font-weight: 700;
  color: var(--teal);
  letter-spacing: 2.4px; text-transform: uppercase;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.bp-related-eyebrow::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.bp-related-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 26px;
  text-decoration: none;
  display: flex; flex-direction: column;
  gap: 14px;
  transition: border-color .18s, transform .18s, background .18s;
}
.bp-related-card:hover {
  border-color: rgba(94,234,212,.30);
  transform: translateY(-2px);
  background: rgba(94,234,212,.02);
}
.bp-related-cat {
  font-size: 10.5px; font-weight: 700;
  color: var(--teal);
  letter-spacing: 1.6px; text-transform: uppercase;
}
.bp-related-card h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px; font-weight: 600;
  color: var(--ink);
  line-height: 1.32;
  letter-spacing: -.3px;
}
.bp-related-meta {
  font-size: 12px; color: var(--mute-2);
  letter-spacing: .3px;
  margin-top: auto;
}
@media (max-width: 760px) {
  .bp-related-grid { grid-template-columns: 1fr; }
  .bp-article .stats-grid { grid-template-columns: 1fr; }
  .bp-cta-inner { padding: 40px 28px; }
}

/* ---------- Mobile sweep ---------- */
@media (max-width: 760px) {
  .bp-nav-inner { padding: 14px 20px; }
  .bp-logo svg { height: 28px; }
  .bp-nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10,15,31,.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
  }
  .bp-nav-links.open { display: flex; }
  .bp-nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .bp-nav-links a:last-child { border-bottom: none; margin-top: 8px; }
  .bp-nav-cta { text-align: center; padding: 13px 20px; }
  .bp-nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent; border: 1px solid var(--line);
    border-radius: 4px; cursor: pointer;
    color: var(--ink-2);
  }
  .bp-nav-toggle span,
  .bp-nav-toggle span::before,
  .bp-nav-toggle span::after {
    content: ''; display: block;
    width: 18px; height: 2px;
    background: currentColor; border-radius: 1px;
    position: relative;
  }
  .bp-nav-toggle span::before { position: absolute; top: -6px; left: 0; width: 18px; }
  .bp-nav-toggle span::after { position: absolute; top: 6px; left: 0; width: 18px; }

  .bp-header { padding: 48px 20px 36px; }
  .bp-back { margin-bottom: 24px; }
  .bp-header h1 { font-size: clamp(28px, 8vw, 40px); letter-spacing: -1px; margin-bottom: 20px; }
  .bp-dek { font-size: 16.5px; margin-bottom: 28px; }
  .bp-meta {
    flex-direction: column; align-items: flex-start;
    gap: 8px; padding: 16px 0;
  }
  .bp-meta > * + *::before { display: none; }

  .bp-article { padding: 40px 20px 56px; }
  .bp-article h2 { font-size: 26px; margin: 40px 0 16px; }
  .bp-article h3 { font-size: 19px; margin: 32px 0 14px; }
  .bp-article p,
  .bp-article li { font-size: 16.5px; line-height: 1.72; }
  .bp-article .stat-card { padding: 22px 20px; }
  .bp-article .stat-number { font-size: 32px; }
  .bp-article .highlight-box { padding: 22px 22px; margin: 28px -4px; }

  .bp-cta { padding: 0 20px; margin-bottom: 48px; }
  .bp-cta-inner { padding: 36px 24px; }
  .bp-cta h3 { font-size: 25px; }
  .bp-cta p { font-size: 15px; }
  .bp-cta-buttons { flex-direction: column; align-items: stretch; }
  .bp-btn { justify-content: center; padding: 14px 22px; }

  .bp-related { padding: 0 20px; margin-bottom: 48px; }
  .bp-related-card { padding: 24px 22px; }

  .bp-footer { padding: 40px 20px 28px; }
  .bp-footer-inner { flex-direction: column; gap: 20px; }
  .bp-footer-links { gap: 18px 22px; }
}
@media (min-width: 761px) {
  .bp-nav-toggle { display: none; }
}

/* ---------- Footer ---------- */
.bp-footer {
  border-top: 1px solid var(--line);
  padding: 56px 32px 36px;
  background: var(--bg);
}
.bp-footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 32px;
  font-size: 13px; color: var(--mute);
}
.bp-footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.bp-footer-links a { text-decoration: none; color: var(--mute); transition: color .18s; }
.bp-footer-links a:hover { color: var(--ink); }
