/* =====================================================================
   basesite.com/blog — field notes
   Blog index + article pages, in the "Mission-Critical Enterprise"
   language: compact ink header bands, carded post list on paper,
   editorial article measure. Loaded after tokens.css and
   basesite-site.css (which owns nav / footer / buttons / reveals);
   consumes semantic tokens only.
   ===================================================================== */

/* =====================================================================
   INK HEADER BANDS — blog index hero + article header
   ===================================================================== */
.blog-hero,
.post-hero {
  background:
    radial-gradient(1000px 560px at 88% -20%, var(--accent-glow), transparent 65%),
    repeating-linear-gradient(0deg, var(--ink-border) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, var(--ink-border) 0 1px, transparent 1px 64px),
    var(--surface-ink);
  color: var(--on-ink);
  position: relative;
  overflow: clip;
}
.blog-hero .kicker,
.post-hero .kicker { color: var(--on-ink-muted); }
.blog-hero .kicker::before,
.post-hero .kicker::before { background: var(--accent-soft); }

.blog-hero {
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 96px)) 0 clamp(56px, 7vw, 88px);
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.04;
  margin: 18px 0 16px;
  max-width: 20ch;
  color: white;
  text-wrap: balance;
}
.blog-hero .sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-ink-muted);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}

/* =====================================================================
   POST LIST — flat, carded, newest first
   ===================================================================== */
.post-list-section { padding: clamp(56px, 7vw, 96px) 0; }
.post-list {
  display: grid;
  gap: 18px;
  max-width: 880px;
}
.post-card {
  display: block;
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--ghost-border), var(--shadow-ambient-sm);
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 40px);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out);
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--ghost-border), var(--shadow-ambient-md);
  color: inherit;
}
.post-card .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin-bottom: 14px;
}
.post-card .meta .sep { color: var(--on-surface-subtle); }
.post-card h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--on-surface);
  text-wrap: balance;
}
.post-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-surface-muted);
  margin: 0 0 16px;
  max-width: 64ch;
  text-wrap: pretty;
}
.post-card .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.post-card .read .arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}
.post-card:hover .read .arrow { transform: translateX(3px); }

/* =====================================================================
   ARTICLE HEADER — ink band
   ===================================================================== */
.post-hero {
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 92px)) 0 clamp(48px, 6vw, 76px);
}
.post-hero .crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-ink-subtle);
  margin-bottom: 26px;
  transition: color var(--dur-fast) var(--ease-out);
}
.post-hero .crumb:hover { color: var(--on-ink); }
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 18px 0 22px;
  max-width: 24ch;
  color: white;
  text-wrap: balance;
}
.post-hero .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.post-hero .meta .sep { color: var(--on-ink-subtle); }

/* =====================================================================
   ARTICLE BODY — editorial measure on paper
   ===================================================================== */
.article-section { padding: clamp(56px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.article {
  max-width: 68ch;
  margin: 0 auto;
}
.article > p {
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 1.5em;
  text-wrap: pretty;
}
.article > p.lede {
  font-size: 19px;
  line-height: 1.65;
  color: var(--on-surface);
  font-weight: 500;
}
.article h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 2.2em 0 0.7em;
  text-wrap: balance;
}
.article h3 {
  font-size: var(--type-title-size);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-track);
  margin: 1.8em 0 0.6em;
}
.article ul, .article ol {
  margin: 0 0 1.5em;
  padding-left: 1.3em;
  display: grid;
  gap: 0.55em;
  font-size: 17px;
  line-height: 1.65;
}
.article li::marker { color: var(--primary); }
.article strong { font-weight: 650; color: var(--on-surface); }
.article a {
  color: var(--primary);
  border-bottom: 1px solid var(--secondary-container);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.article a:hover { color: var(--primary-hover); border-color: var(--primary-hover); }
.article blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--primary);
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.35;
  color: var(--on-surface);
  text-wrap: balance;
}
.article blockquote p { margin: 0; font: inherit; }
.article hr {
  border: 0;
  height: 1px;
  background: var(--outline-variant);
  opacity: 0.5;
  margin: 2.5em 0;
}
.article figure { margin: 2em 0; }

/* demo video — breaks out a little wider than the text measure */
.article figure.vid {
  width: min(880px, calc(100vw - 40px));
  margin-left: 50%;
  transform: translateX(-50%);
}
.article figure.vid video {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface-ink);
  box-shadow: inset 0 0 0 1px var(--ink-border), var(--shadow-ambient-lg);
}
.article figcaption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin-top: 10px;
}

/* proof strip inside an article — numbers with context at equal weight */
.article .proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 2.2em 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-lowest);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  overflow: hidden;
}
.article .proof .cell {
  padding: 20px 22px;
}
.article .proof .cell + .cell { border-left: 1px solid var(--ghost-border); }
.article .proof .k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin-bottom: 8px;
}
.article .proof .v {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}
.article .proof .v .to {
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-muted);
}
.article .proof .s {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--on-surface-muted);
  margin-top: 6px;
}

/* =====================================================================
   CLOSING CTA — ink card
   ===================================================================== */
.post-cta {
  max-width: 68ch;
  margin: clamp(48px, 6vw, 72px) auto 0;
  background:
    radial-gradient(640px 360px at 90% -30%, var(--accent-glow), transparent 65%),
    var(--surface-ink);
  color: var(--on-ink);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 4vw, 48px);
}
.post-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: white;
  text-wrap: balance;
}
.post-cta p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-ink-muted);
  margin: 0 0 22px;
  max-width: 52ch;
  text-wrap: pretty;
}
.post-cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* prev/next + back links under the article */
.post-foot {
  max-width: 68ch;
  margin: clamp(32px, 4vw, 48px) auto 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
.post-foot a { color: var(--primary); }
.post-foot a:hover { color: var(--primary-hover); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 640px) {
  .article .proof { grid-template-columns: 1fr; }
  .article .proof .cell + .cell {
    border-left: 0;
    border-top: 1px solid var(--ghost-border);
  }
  .post-cta .actions .btn { flex: 1 1 100%; }
}
