/* ── Blog — design system v2 (amber/ink) ──────────────────────────────────── */

/* ── Variables (inherit from index_style.css via landing_base.html) ── */
/* All --ink, --amber, --t-hi etc. already defined globally. */

/* ── Layout wrapper ── */
.bl-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ── Blog hero ── */
.bl-hero {
  padding: clamp(56px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
/* Subtle dot-grid matching landing page hero */
.bl-hero::before {
  content: '';
  position: absolute;
  inset: -10% -5%;
  background-image: radial-gradient(oklch(32% 0.012 255) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 80%);
}
.bl-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2, 8px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
  position: relative;
}
.bl-hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
.bl-hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--t-hi);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  text-wrap: balance;
  position: relative;
}
.bl-hero p {
  font-size: clamp(0.938rem, 2vw, 1.125rem);
  color: var(--t-mid);
  max-width: 54ch;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
}

/* ── Category filter bar ── */
.bl-cats {
  padding: 24px 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--ink-1);
}
.bl-cats::-webkit-scrollbar { display: none; }
.bl-cats-inner {
  display: flex;
  gap: 8px;
  padding: 0 clamp(20px, 4vw, 48px);
  min-width: max-content;
}
.bl-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  border-radius: var(--r-2, 6px);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--t-lo);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.bl-cat-pill:hover {
  border-color: var(--amber-line);
  color: var(--amber);
  background: var(--amber-bg);
}
.bl-cat-pill.active {
  background: var(--amber);
  border-color: var(--amber);
  color: oklch(12% 0.02 68);
}

/* ── Posts grid ── */
/* background removed so it inherits from .landing (dark) or .page-body (light) */
.bl-grid-section { padding: 40px 0 80px; }
.bl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .bl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bl-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Cards ── */
.bl-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--border);
  border-radius: var(--r-3, 10px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.bl-card:hover {
  border-color: var(--amber-line);
  background: var(--ink-2);
}
.bl-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--ink-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.bl-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.bl-card:hover .bl-card-img img { transform: scale(1.04); }
.bl-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-xlo);
  font-size: 32px;
}
.bl-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}
.bl-card-cats {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.bl-card-cat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--amber-lo);
  background: var(--amber-bg); border: 1px solid var(--amber-line);
  padding: 2px var(--s-2, 8px); border-radius: var(--r-1, 3px);
}
.bl-card-title {
  font-size: var(--tx-lg, 1.063rem);
  font-weight: 600;
  color: var(--t-hi);
  line-height: 1.35;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}
.bl-card-excerpt {
  font-size: var(--tx-sm, 0.875rem);
  color: var(--t-mid);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.bl-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 12px; color: var(--t-lo); margin-top: auto;
}
.bl-card-date { display: flex; align-items: center; gap: 5px; }
.bl-card-read {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  color: var(--amber); text-decoration: none;
}
.bl-card-read i { font-size: 10px; transition: transform 0.15s; }
.bl-card:hover .bl-card-read i { transform: translateX(3px); }

/* ── Featured card (first post, full-width row on desktop) ── */
.bl-featured { display: none; }
@media (min-width: 900px) {
  .bl-featured {
    display: flex; flex-direction: row;
    margin-bottom: 28px;
    min-height: 320px;
    border-color: var(--border);
  }
  .bl-featured .bl-card-img {
    aspect-ratio: unset; width: 52%; flex-shrink: 0;
    border-bottom: none; border-right: 1px solid var(--border);
  }
  .bl-featured .bl-card-body { padding: 32px 28px; justify-content: center; }
  .bl-featured .bl-card-title { font-size: 1.375rem; -webkit-line-clamp: 3; }
  .bl-featured .bl-card-excerpt { font-size: 0.9375rem; -webkit-line-clamp: 4; }
}

/* ── Empty state ── */
.bl-empty {
  text-align: center; padding: 80px 16px; grid-column: 1 / -1;
}
.bl-empty-icon {
  width: 64px; height: 64px; border-radius: var(--r-3, 10px);
  background: var(--amber-bg); border: 1px solid var(--amber-line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; color: var(--amber); font-size: 24px;
}
.bl-empty h3 { font-size: 1.125rem; font-weight: 600; color: var(--t-hi); margin: 0 0 8px; }
.bl-empty p  { font-size: 0.875rem; color: var(--t-mid); margin: 0; }

/* ── Pagination ── */
.bl-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 32px 0 16px; flex-wrap: wrap;
}
.bl-page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: var(--r-2, 6px);
  border: 1px solid var(--border);
  background: var(--ink-1);
  color: var(--t-lo);
  font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
}
.bl-page-link:hover { border-color: var(--amber-line); color: var(--amber); background: var(--amber-bg); }
.bl-page-link.active {
  background: var(--amber); border-color: var(--amber); color: oklch(12% 0.02 68);
}
.bl-page-link.disabled { opacity: 0.4; pointer-events: none; }


/* ══════════════════════════════════════════════════════════════════════════════
   Blog post detail page
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Post hero (dark, on-brand) ── */
.blp-hero {
  background: var(--ink-1);
  border-bottom: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0 0;
  position: relative;
}
.blp-hero-inner {
  max-width: 780px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  padding-bottom: clamp(32px, 4vw, 48px);
}
.blp-cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.blp-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--amber-lo);
  background: var(--amber-bg); border: 1px solid var(--amber-line);
  padding: 3px 10px; border-radius: var(--r-1, 3px);
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.blp-cat:hover { background: var(--amber); color: oklch(12% 0.02 68); }
.blp-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--t-hi);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.blp-excerpt {
  font-size: clamp(0.938rem, 2vw, 1.125rem);
  color: var(--t-mid);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 62ch;
}
.blp-meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--t-lo); padding-bottom: 0;
}
.blp-meta i { margin-right: 5px; color: var(--amber); }

/* ── Cover image ── */
.blp-cover {
  width: 100%; max-height: 460px; object-fit: cover; display: block;
  border-block: 1px solid var(--border);
}

/* ── Article body wrapper ── */
.blp-article-wrap {
  max-width: 780px; margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px) clamp(60px, 8vw, 100px);
}
.blp-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--t-lo);
  text-decoration: none; margin-bottom: 36px; transition: color 0.15s;
}
.blp-back:hover { color: var(--amber); }
.blp-back i { font-size: 11px; }

/* ── Rich text content ── */
.blp-body {
  font-size: clamp(0.938rem, 1.5vw, 1.0625rem);
  line-height: 1.82;
  color: var(--t-mid);
}
.blp-body h1, .blp-body h2, .blp-body h3,
.blp-body h4, .blp-body h5, .blp-body h6 {
  font-weight: 700; line-height: 1.25;
  margin: 2.2em 0 0.6em; color: var(--t-hi);
  letter-spacing: -0.02em;
}
.blp-body h1 { font-size: 1.875em; }
.blp-body h2 { font-size: 1.5em; }
.blp-body h3 { font-size: 1.2em; }
.blp-body p  { margin: 0 0 1.3em; }
.blp-body strong { font-weight: 600; color: var(--t-hi); }
.blp-body em { font-style: italic; }
.blp-body a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }
.blp-body a:hover { color: oklch(78% 0.17 68); }
.blp-body ul, .blp-body ol { margin: 0 0 1.3em 1.6em; padding: 0; }
.blp-body li { margin-bottom: 0.4em; color: var(--t-mid); }
.blp-body blockquote {
  border-left: 3px solid var(--amber);
  margin: 1.8em 0; padding: 0.8em 1.4em;
  background: var(--amber-bg);
  border-radius: 0 var(--r-2, 6px) var(--r-2, 6px) 0;
  font-style: italic; color: var(--t-mid);
}
.blp-body pre {
  background: oklch(8% 0.01 255);
  color: var(--t-hi);
  border: 1px solid var(--border);
  border-radius: var(--r-3, 10px);
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  margin: 1.5em 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.blp-body code {
  background: var(--ink-2);
  color: var(--amber);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--r-1, 3px);
  font-size: 0.88em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.blp-body pre code { background: none; color: inherit; border: none; padding: 0; }
.blp-body img {
  max-width: 100%; border-radius: var(--r-3, 10px);
  border: 1px solid var(--border);
  margin: 1.2em 0; display: block;
}
.blp-body hr {
  border: none; border-top: 1px solid var(--border); margin: 2.5em 0;
}
.blp-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.5em 0; font-size: 14px;
  overflow-x: auto; display: block;
}
.blp-body th, .blp-body td {
  border: 1px solid var(--border); padding: 10px 14px; text-align: left;
}
.blp-body th {
  background: var(--ink-2); color: var(--t-hi); font-weight: 600;
}
.blp-body td { color: var(--t-mid); }

/* ── Bottom strip ── */
.blp-footer-strip {
  border-top: 1px solid var(--border);
  padding-top: 28px; margin-top: 48px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.blp-footer-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--t-lo);
  text-decoration: none;
  padding: 9px 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-2, 6px);
  transition: all 0.15s;
}
.blp-footer-back:hover { border-color: var(--amber-line); color: var(--amber); background: var(--amber-bg); }

/* ── Accessibility ── */
.bl-cat-pill:focus-visible,
.bl-page-link:focus-visible,
.blp-footer-back:focus-visible,
.blp-back:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.bl-cat-pill,
.bl-card,
.bl-page-link,
.blp-footer-back,
.blp-back {
  touch-action: manipulation;
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .bl-cat-pill { min-height: 40px; display: inline-flex; align-items: center; }
  .bl-page-link { min-height: 44px; min-width: 44px; }
  .blp-footer-back { min-height: 44px; }
}
