/* ═══════════════════════════════════════════
   Codemi — Blog / Insight Styles
   Reuses common.css tokens (cream canvas, navy,
   green, Plus Jakarta Sans). Page-specific only.
   ═══════════════════════════════════════════ */

/* ── Intro / hero ── */
.blog-intro { padding: 40px 0 20px; }
.blog-eyebrow {
  display: inline-block;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 8px;
}
.blog-intro h1 {
  font-size: clamp(26px, 3.6vw, 36px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--navy); line-height: 1.12;
  margin-bottom: 8px;
}
.blog-intro p {
  font-size: 16px; color: var(--text-secondary);
  max-width: 720px; line-height: 1.55;
}

/* ── Category filter chips ── */
.blog-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-chip {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--bg-pure); border: 1px solid var(--border); color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-chip:hover { border-color: var(--gray-300); color: var(--text-primary); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.blog-empty { display: none; padding: 48px 0; text-align: center; color: var(--text-tertiary); font-size: 16px; }

/* ── Listing grid ── */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding-bottom: 88px;
}
.blog-card {
  display: flex; flex-direction: column;
  background: var(--bg-pure); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}
.blog-card-cover {
  aspect-ratio: 16 / 9; width: 100%;
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, var(--green-deep) 130%);
  position: relative; flex-shrink: 0;
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--green-deep); background: var(--green-pale);
  border: 1px solid rgba(34,163,63,0.18);
  padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.blog-card h2 {
  font-size: 19px; font-weight: 700; line-height: 1.32;
  color: var(--navy); letter-spacing: -0.01em; margin-bottom: 10px;
}
.blog-card-excerpt {
  font-size: 14.5px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 18px; flex: 1;
}
.blog-meta { font-size: 13px; color: var(--text-tertiary); display: flex; align-items: center; gap: 8px; }
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); }

/* ── Featured (first post, full-width 2-col) ── */
.blog-featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--bg-pure); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit; margin-bottom: 40px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.blog-featured:hover { box-shadow: var(--shadow-lg); border-color: var(--gray-300); }
.blog-featured-cover {
  min-height: 320px;
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 50%, var(--green-deep) 135%);
}
.blog-featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured-body h2 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.2;
  color: var(--navy); letter-spacing: -0.02em; margin: 14px 0 16px;
}
.blog-featured-body .blog-card-excerpt { font-size: 16px; }

/* ═══════════════════════════════
   ARTICLE PAGE
═══════════════════════════════ */
.article { padding: 40px 0 24px; }
.article-wrap { max-width: 760px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: var(--text-tertiary); margin-bottom: 28px; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { margin: 0 8px; color: var(--gray-300); }

.article-header .blog-tag { margin-bottom: 18px; }
.article-header h1 {
  font-size: clamp(30px, 4.5vw, 44px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.03em; color: var(--navy);
  margin-bottom: 20px;
}
.article-byline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.article-byline .author { font-weight: 700; color: var(--text-primary); }
.article-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); }

.article-cover {
  aspect-ratio: 16 / 8; width: 100%; border-radius: var(--radius-lg);
  margin: 32px 0 40px; overflow: hidden;
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, var(--green-deep) 130%);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Prose */
.article-body { font-size: 18px; line-height: 1.78; color: var(--text-secondary); }
.article-body > * + * { margin-top: 24px; }
.article-body h2 {
  font-size: 26px; font-weight: 800; color: var(--navy);
  letter-spacing: -0.02em; line-height: 1.25; margin-top: 44px;
}
.article-body h3 {
  font-size: 20px; font-weight: 700; color: var(--navy);
  margin-top: 32px;
}
.article-body p { color: var(--text-secondary); }
.article-body strong { color: var(--text-primary); font-weight: 700; }
.article-body a { color: var(--green-deep); font-weight: 600; }
.article-body ul, .article-body ol { padding-left: 26px; }
.article-body li { margin-top: 10px; }
.article-body blockquote {
  border-left: 3px solid var(--green); background: var(--bg-alt);
  padding: 20px 28px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 19px; font-style: italic; color: var(--text-primary);
}
.article-body img { border-radius: var(--radius-md); margin: 8px 0; }

/* In-article CTA */
.article-cta {
  margin: 56px auto 0; max-width: 760px;
  background: linear-gradient(150deg, var(--navy) 0%, #1A3A6B 100%);
  border-radius: var(--radius-lg); padding: 40px; text-align: center; color: var(--white);
}
.article-cta h3 { font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 10px; letter-spacing: -0.02em; }
.article-cta p { font-size: 16px; color: rgba(255,255,255,0.7); max-width: 460px; margin: 0 auto 24px; }
.article-cta .btn-demo {
  display: inline-block; padding: 14px 28px; background: var(--green); color: var(--white);
  border-radius: 8px; font-size: 16px; font-weight: 700; text-decoration: none;
  transition: background 0.15s;
}
.article-cta .btn-demo:hover { background: var(--green-light); }

/* Related */
.related { padding: 72px 0 88px; }
.related h2 {
  font-size: 24px; font-weight: 800; color: var(--navy);
  letter-spacing: -0.02em; margin-bottom: 28px; text-align: center;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-cover { min-height: 200px; }
  .blog-featured-body { padding: 32px; }
}
@media (max-width: 600px) {
  .blog-grid, .related-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 17px; }
  .article-cta { padding: 32px 24px; }
}
