/* Xtate Insights — blog typography, themed with xtate's design tokens.
   Mirrors the bougroup.org blog layout but uses xtate's emerald palette,
   Inter font, and the dark teal gradient from the lander. */

.blog-post {
  background: var(--bg, #f6f8f7);
  color: var(--text, #12211d);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.blog-post .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Dark teal header band — same gradient as the lander hero */
.blog-post .post-header {
  padding: 116px 0 60px;
  background: linear-gradient(135deg, #042725 0%, #0b3d39 55%, #055e46 100%);
  color: #eefbf7;
}

/* ===== Sticky blog nav =====================================================
   Fixed bar that floats transparent over the dark hero band (white logo,
   light links), then transitions to a frosted-white bar (dark logo, green
   CTA) once .scrolled is toggled in by blog-nav.phtml. */
.blog-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.blog-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.blog-nav-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: transform 0.2s;
}

.blog-nav-brand:hover {
  transform: translateY(-1px);
}

.blog-nav-logo {
  height: 48px;
  width: auto;
  display: block;
}

.blog-nav-logo-dark {
  display: none;
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.blog-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(238, 251, 247, 0.82);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.blog-nav-links a:hover {
  color: #fff;
}

.blog-nav-links a.is-active {
  color: #fff;
  font-weight: 600;
}

.blog-nav-cta {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(238, 251, 247, 0.28);
  padding: 8px 16px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.blog-nav-cta svg {
  width: 15px;
  height: 15px;
}

/* Scrolled state — frosted white bar over light article content. */
.blog-nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line, #e6ece9);
  box-shadow: 0 6px 24px rgba(3, 22, 18, 0.06);
}

.blog-nav.scrolled .blog-nav-logo-light {
  display: none;
}

.blog-nav.scrolled .blog-nav-logo-dark {
  display: block;
}

.blog-nav.scrolled .blog-nav-links a {
  color: var(--muted, #66757a);
}

.blog-nav.scrolled .blog-nav-links a:hover,
.blog-nav.scrolled .blog-nav-links a.is-active {
  color: var(--primary-2, #065f46);
}

.blog-nav.scrolled .blog-nav-cta {
  background: var(--primary, #047857);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(4, 120, 87, 0.25);
}

.blog-nav.scrolled .blog-nav-cta:hover {
  background: var(--primary-2, #065f46);
  color: #fff;
}

@media (max-width: 600px) {
  .blog-nav-links { gap: 14px; }
  .blog-nav-links a:not(.blog-nav-cta):not(.is-active) { display: none; }
  .blog-nav-logo { height: 40px; }
}

/* Listing hero eyebrow */
.insights-page .insights-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-soft, #dff4ec);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(238, 251, 247, 0.18);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.insights-page .insights-eyebrow svg {
  width: 15px;
  height: 15px;
}

.blog-post .back-to-insights {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(238, 251, 247, 0.7);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s, transform 0.2s;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.blog-post .back-to-insights:hover {
  color: #fff;
  transform: translateX(-3px);
}

.blog-post .back-to-insights::before {
  content: "←";
  font-size: 16px;
  line-height: 1;
}

.blog-post .post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary-soft, #dff4ec);
  margin-bottom: 16px;
  font-weight: 600;
}

.blog-post .post-meta .post-date {
  color: rgba(238, 251, 247, 0.6);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.blog-post .post-title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 20px;
  color: #eefbf7;
  max-width: 820px;
  letter-spacing: -0.02em;
}

.blog-post .post-title .accent { color: var(--primary, #10b981); }

.blog-post .post-lede {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  color: rgba(238, 251, 247, 0.85);
  max-width: 760px;
  margin: 0 0 24px;
}

.blog-post .post-byline {
  font-size: 14px;
  color: rgba(238, 251, 247, 0.6);
  border-top: 1px solid rgba(238, 251, 247, 0.18);
  padding-top: 16px;
  display: inline-block;
}

.blog-post .post-byline strong {
  color: #fff;
}

.blog-post .post-hero {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 56px;
  overflow: hidden;
  border-radius: 28px;
  background: #042725;
  box-shadow: 0 30px 90px rgba(3, 22, 18, 0.24);
}

.blog-post .post-hero img {
  width: 100%;
  height: clamp(340px, 58vw, 680px);
  display: block;
  object-fit: cover;
}

.blog-post .post-hero figcaption {
  font-size: 12px;
  color: rgba(238, 251, 247, 0.72);
  padding: 12px 24px;
  text-align: right;
}

.blog-post .post-body {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.blog-post .post-body p,
.blog-post .post-body li {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text, #12211d);
  margin-bottom: 22px;
}

.blog-post .post-body h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  margin: 56px 0 20px;
  line-height: 1.25;
  color: var(--text, #12211d);
  letter-spacing: -0.01em;
}

.blog-post .post-body h3 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text, #12211d);
}

.blog-post .post-body a {
  color: var(--primary, #047857);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}

.blog-post .post-body a:hover {
  text-decoration-thickness: 2px;
  color: var(--primary-2, #065f46);
}

.blog-post .post-body ul,
.blog-post .post-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.blog-post .post-body blockquote {
  border-left: 4px solid var(--primary, #047857);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--muted, #66757a);
  font-size: 20px;
}

.blog-post .post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 16px;
}

.blog-post .post-body th,
.blog-post .post-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #e6ece9);
}

.blog-post .post-body th {
  background: var(--surface-2, #f9fbfa);
  font-weight: 700;
}

.blog-post .post-cta {
  background: linear-gradient(135deg, #042725 0%, #055e46 100%);
  color: #fff;
  padding: 60px 0;
  margin-top: 40px;
}

.blog-post .post-cta .container {
  max-width: 820px;
  text-align: center;
}

.blog-post .post-cta h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.blog-post .post-cta p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
  font-size: 18px;
}

.blog-post .post-cta .btn-cta {
  display: inline-block;
  background: #fff;
  color: #042725;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
}

.blog-post .post-cta .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(34, 197, 94, 0.35);
}

/* Insights listing page */
.insights-page {
  background: var(--bg, #f6f8f7);
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.insights-page .insights-header {
  padding: 124px 0 70px;
  text-align: center;
  background: linear-gradient(135deg, #042725 0%, #0b3d39 55%, #055e46 100%);
  color: #fff;
}

.insights-page .insights-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 16px;
  color: #eefbf7;
  letter-spacing: -0.02em;
}

.insights-page .insights-header p {
  font-size: 20px;
  color: rgba(238, 251, 247, 0.85);
  max-width: 640px;
  margin: 0 auto;
}

.insights-page .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.insights-page .insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 56px 0 110px;
}

.insights-page .insight-card {
  position: relative;
  background: var(--surface, #fff);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow, 0 10px 30px rgba(3, 22, 18, 0.06));
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #e6ece9);
}

.insights-page .insight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(3, 22, 18, 0.14);
  border-color: var(--primary-soft, #dff4ec);
}

.insights-page .insight-card a {
  text-decoration: none;
  color: inherit;
  display: contents;
}

.insights-page .insight-card img {
  width: 100%;
  height: 240px;
  background: #042725;
  object-fit: cover;
}

.insights-page .insight-card .card-body {
  padding: 26px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.insights-page .insight-card .card-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary, #047857);
  margin-bottom: 12px;
  font-weight: 600;
}

.insights-page .insight-card h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 12px;
  color: var(--primary-2, #065f46);
  letter-spacing: -0.04em;
}

.insights-page .insight-card p {
  font-size: 15px;
  color: var(--muted, #66757a);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.insights-page .insight-card .card-byline {
  font-size: 13px;
  color: var(--muted, #66757a);
}

.insights-page .insight-card:first-child {
  grid-column: span 2;
  min-height: 520px;
}

.insights-page .insight-card:first-child img {
  height: 100%;
  min-height: 520px;
}

.insights-page .insight-card:first-child .card-body {
  position: absolute;
  inset: auto 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

@media (max-width: 980px) {
  .insights-page .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-post .post-hero {
    width: min(100% - 20px, 1180px);
    margin-top: -20px;
    border-radius: 20px;
  }

  .blog-post .post-hero img {
    height: clamp(260px, 78vw, 420px);
  }

  .insights-page .insights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 34px;
  }

  .insights-page .insight-card:first-child {
    grid-column: auto;
    min-height: auto;
  }

  .insights-page .insight-card:first-child img {
    height: 280px;
    min-height: auto;
  }

  .insights-page .insight-card:first-child .card-body {
    position: static;
    border-radius: 0;
    background: #fff;
    backdrop-filter: none;
  }
}
