/* Blog system styles — loaded alongside legal.css, which provides the :root tokens,
   nav, footer, body base, and the article typography under .legal-wrap. */

/* ── BLOG INDEX HERO ── */
.blog-index-head {
  max-width: 1100px;
  margin: 0 auto;
  padding: 136px 24px 32px;
}
.blog-index-head .legal-eyebrow { margin-bottom: 18px; }
.blog-index-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.blog-index-sub {
  font-size: 16px; color: var(--text-2);
  max-width: 620px; line-height: 1.6;
}

/* ── GRID ── */
.blog-grid-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 24px 90px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.blog-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.blog-card:hover {
  border-color: var(--ember-line);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.blog-card-cat {
  display: inline-flex; align-self: flex-start;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ember-text);
  background: var(--ember-soft);
  border: 1px solid var(--ember-line);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  margin-bottom: 14px;
}
.blog-card h3 {
  font-family: var(--display); font-weight: 500;
  font-size: 21px; line-height: 1.22; letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 9px;
}
.blog-card p {
  font-size: 13.5px; color: var(--text-2); line-height: 1.55;
  margin-bottom: 16px;
}
.blog-card-more {
  margin-top: auto;
  font-size: 13px; font-weight: 500; color: var(--ember-text);
}

/* ── ARTICLE ── */
.blog-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-3); text-decoration: none;
  margin-bottom: 22px;
}
.blog-back:hover { color: var(--text-2); }
.blog-post-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: 13px; color: var(--text-3);
  margin-bottom: 14px;
}
.blog-post-meta .blog-card-cat { margin-bottom: 0; }

/* In-article CTA band */
.blog-cta {
  margin: 36px 0 8px;
  background: var(--ember-soft);
  border: 1px solid var(--ember-line);
  border-radius: var(--r-md);
  padding: 22px 24px;
}
.blog-cta h3 {
  font-family: var(--display); font-weight: 500; font-size: 22px;
  color: var(--text-1); margin-bottom: 6px;
}
.blog-cta p { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.blog-cta .btn { background: var(--ember); color: #fff; border: 1px solid rgba(255,106,44,0.5); }

/* Related links at article foot */
.blog-related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--divider); }
.blog-related h4 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
}
.blog-related ul { list-style: none; display: grid; gap: 8px; }
.blog-related a { color: var(--ember-text); text-decoration: none; font-size: 14px; }
.blog-related a:hover { text-decoration: underline; }

/* ── POPUP OVERLAY ── */
.popup-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(16,14,17,0.8);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.popup-overlay.show { opacity: 1; }
.popup-content {
  background: var(--surface); border: 1px solid var(--line);
  padding: 36px 32px; border-radius: var(--r-xl); max-width: 460px; width: 90%;
  position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform: translateY(20px); transition: transform 0.3s;
}
.popup-overlay.show .popup-content { transform: translateY(0); }
.popup-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--t2); cursor: pointer;
}
.popup-close:hover { color: var(--t1); }
