/* ============================================================
   blog.css — coment.rest Blog Styles
   Fonts: DM Sans (body) + Playfair Display (headings/stats)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --cream:        #FAF7F2;
  --warm:         #F3EDE3;
  --ink:          #1A1612;
  --ink-light:    #6B5E52;
  --accent:       #C8612A;
  --accent-hover: #A84E1F;
  --accent-soft:  #FDF1EA;
  --green:        #2D6A4F;
  --green-soft:   #EAF4EE;
  --border:       #E8DFD4;
  --radius:       16px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background-color: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ── Progress Bar ───────────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-light);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: var(--warm);
  color: var(--ink);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-light);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--ink-light);
  font-weight: 400;
}

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

.breadcrumb-sep {
  color: var(--border);
  font-size: 16px;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 500;
}

/* ── Article Hero ───────────────────────────────────────────── */
.article-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.article-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.article-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-light);
  flex-wrap: wrap;
}

.article-meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Article Body ───────────────────────────────────────────── */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  font-size: 18px;
  line-height: 1.82;
  font-weight: 300;
  color: var(--ink);
}

.article-body > p:first-child {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.7;
}

.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 52px;
  margin-bottom: 16px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body strong {
  font-weight: 600;
  color: var(--ink);
}

/* ── Callout Box ─────────────────────────────────────────────── */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.callout p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}

/* ── Stat Box ────────────────────────────────────────────────── */
.stat-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}

.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.stat-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-light);
  font-weight: 400;
}

/* ── Article Divider ─────────────────────────────────────────── */
.article-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 48px 0;
}

/* ── CTA Box ─────────────────────────────────────────────────── */
.cta-box {
  max-width: 760px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.cta-box-inner {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
}

.cta-box-inner h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.cta-box-inner p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  font-weight: 300;
  line-height: 1.6;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.cta-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.cta-sub {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ── Related Articles ────────────────────────────────────────── */
.related {
  max-width: 760px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.related h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 97, 42, 0.08);
  color: var(--ink);
}

.related-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.related-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.related-meta {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: auto;
}

/* ── Blog Index ──────────────────────────────────────────────── */
.blog-hero {
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px 64px;
  text-align: center;
}

.blog-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  max-width: 640px;
  margin: 0 auto 16px;
}

.blog-hero p {
  font-size: 18px;
  color: var(--ink-light);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
}

.blog-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* Featured Card */
.featured-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(200, 97, 42, 0.08);
  color: var(--ink);
}

.featured-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.featured-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.featured-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 12px;
}

.featured-excerpt {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 20px;
}

.featured-meta {
  font-size: 13px;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.featured-arrow {
  font-size: 48px;
  color: var(--border);
  line-height: 1;
  font-weight: 300;
  transition: color 0.2s;
}

.featured-card:hover .featured-arrow {
  color: var(--accent);
}

/* Grid Section Label */
.grid-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 97, 42, 0.08);
  color: var(--ink);
}

.card-badge {
  display: inline-block;
  background: var(--warm);
  color: var(--ink-light);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
}

.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.card-excerpt {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.65;
  font-weight: 300;
  flex-grow: 1;
}

.card-meta {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
}

.card-read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px 24px;
  font-size: 14px;
  line-height: 1.6;
}

.footer a {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

.footer a:hover {
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    gap: 4px;
  }

  .nav-links li:nth-child(2) {
    display: none;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-card {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .featured-arrow {
    display: none;
  }

  .stat-box {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .stat-num {
    font-size: 42px;
  }

  .cta-box-inner {
    padding: 36px 24px;
  }
}

@media (max-width: 480px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .nav-links li:nth-child(1) {
    display: none;
  }

  .blog-hero {
    padding: 48px 24px 40px;
  }

  .article-hero {
    padding: 24px 20px 20px;
  }

  .article-body {
    padding: 8px 20px 48px;
    font-size: 17px;
  }

  .article-body h2 {
    font-size: 24px;
    margin-top: 40px;
  }

  .cta-box,
  .related {
    padding: 0 20px;
  }

  .breadcrumb {
    padding: 16px 20px 0;
  }
}
