/* ==========================================================================
   ProcessPlan Blog — blog.css
   Typography and layout for blog index and article pages
   ========================================================================== */

/* ---------- Blog index: post list ---------- */
.post-list {
  display: grid;
  gap: var(--space-6);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.post-card {
  display: block;
  padding: var(--space-8);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.post-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.post-card__meta-divider {
  color: var(--color-text-muted);
}

.post-card__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
  color: var(--color-text);
  text-wrap: pretty;
}

.post-card__excerpt {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

/* ---------- Article page ---------- */
.article {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
}

.article__header {
  margin-bottom: var(--space-12);
}

.article__category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.article__title {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  text-wrap: pretty;
}

.article__lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  text-wrap: pretty;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.article__meta-divider {
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* Article body typography */
.article__body {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.article__body p {
  margin-bottom: var(--space-6);
  text-wrap: pretty;
}

.article__body h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  text-wrap: pretty;
}

.article__body h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  text-wrap: pretty;
}

.article__body ul,
.article__body ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}

.article__body li {
  margin-bottom: var(--space-3);
  line-height: var(--leading-relaxed);
}

.article__body li > strong:first-child {
  color: var(--color-text);
}

.article__body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.article__body a:hover {
  color: var(--color-accent-hover);
}

.article__body strong {
  font-weight: var(--weight-semibold);
}

.article__body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* End-of-article CTA */
.article__cta {
  margin-top: var(--space-16);
  padding: var(--space-10);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-2xl);
  text-align: center;
  color: var(--color-white);
}

.article__cta-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
  color: var(--color-white);
  text-wrap: pretty;
}

.article__cta-description {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-6);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .article__title {
    font-size: var(--text-4xl);
  }

  .article__lead {
    font-size: var(--text-lg);
  }

  .article__body {
    font-size: var(--text-base);
  }

  .article__body h2 {
    font-size: var(--text-2xl);
  }

  .article__body h3 {
    font-size: var(--text-lg);
  }

  .article__cta {
    padding: var(--space-8) var(--space-6);
  }

  .post-card {
    padding: var(--space-6);
  }
}
