/* ============================================================
   THE BLOG - "Commerce, Rewritten" (blog/ and blog/<slug>/)

   Editorial pages in the site's own light identity: it inherits the whole
   token contract from home.css (body.home-v3 - warm white, Geist, ink
   accent, --card-lift elevation, no outlines on content surfaces) and only
   adds what an essay needs and the marketing pages do not: a reading
   measure, a long-form rhythm, the pull quote, the sourced-quote and the
   numbered source list.

   Content is VERBATIM from Gentika_Blog_Editorial_Lineup_2026.docx - the
   pages are generated from it, so nothing here should ever restate copy.
   ============================================================ */

/* ---------- shared shell ---------- */
body[data-page="blog"] .band { padding-block: clamp(56px, 7vw, 96px); }
body[data-page="blog"] .band.page-first { padding-top: clamp(84px, 10vw, 132px); }

/* ============================================================
   INDEX - the line-up, as a ruled editorial grid

   The reference the founders picked (tryprofound.com/blog) is a newspaper
   lattice rather than a card wall: a left-aligned masthead over faint
   column guides, then cells divided by hairlines, each carrying a meta row
   at the top and its headline anchored at the BOTTOM, with air between.
   Same structure here, in this site's light identity: ink hairlines on the
   warm page instead of white-on-black.
   ============================================================ */
body[data-page="blog"] .bx-masthead {
  position: relative;
  padding-block: clamp(70px, 9vw, 118px) clamp(46px, 6vw, 74px);
  overflow: hidden;
}
/* the faint column guides that run behind the masthead */
body[data-page="blog"] .bx-masthead::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to right, transparent 0 calc(25% - 1px),
    color-mix(in srgb, var(--ink) 7%, transparent) calc(25% - 1px) 25%);
  pointer-events: none;
}
body[data-page="blog"] .bx-rule-col { position: relative; z-index: 1; }
body[data-page="blog"] .bx-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
body[data-page="blog"] .bx-masthead-title {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: var(--ink);
  max-width: 16ch;
  margin-bottom: 22px;
}
body[data-page="blog"] .bx-masthead-deck {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 54ch;
}
body[data-page="blog"] .bx-note {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* the lattice */
body[data-page="blog"] .bx-grid-sec { padding-bottom: clamp(80px, 10vw, 132px); }
body[data-page="blog"] .bx-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
body[data-page="blog"] .bx-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
body[data-page="blog"] .bx-cell a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 288px;
  padding: 22px 26px 28px;
  text-decoration: none;
  transition: background 0.25s ease;
}
body[data-page="blog"] .bx-cell a:hover { background: rgba(23, 23, 26, 0.028); }
body[data-page="blog"] .bx-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
body[data-page="blog"] .bx-meta-l { color: var(--ink-2); white-space: nowrap; }
body[data-page="blog"] .bx-meta-r { text-align: right; }
body[data-page="blog"] .bx-read { white-space: nowrap; }
body[data-page="blog"] .bx-meta-r i { font-style: normal; padding: 0 7px; color: var(--line-2); }
/* the headline sits at the FOOT of its cell, with the air above it */
body[data-page="blog"] .bx-cell-body { margin-top: auto; padding-top: 54px; }
body[data-page="blog"] .bx-cell h2 {
  font-size: clamp(1.28rem, 1.75vw, 1.62rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.16;
  color: var(--ink);
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
body[data-page="blog"] .bx-cell p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* the opening essay takes the full measure: the series is ordered, and the
   first piece is the thesis the other nine argue from */
body[data-page="blog"] .bx-cell--lead { grid-column: 1 / -1; }
body[data-page="blog"] .bx-cell--lead a { min-height: 320px; padding-bottom: 34px; }
body[data-page="blog"] .bx-cell--lead .bx-cell-body { padding-top: 64px; }
body[data-page="blog"] .bx-cell--lead h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  letter-spacing: -0.032em;
  line-height: 1.06;
  max-width: 20ch;
  margin-bottom: 14px;
}
body[data-page="blog"] .bx-cell--lead p {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 62ch;
  -webkit-line-clamp: 3;
}
/* and the closing essay takes the last row whole, so the lattice never ends
   on a half-open row */
body[data-page="blog"] .bx-cell--close { grid-column: 1 / -1; }
body[data-page="blog"] .bx-cell--close a { min-height: 252px; }
body[data-page="blog"] .bx-cell--close h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1.1;
  max-width: 28ch;
}
body[data-page="blog"] .bx-cell--close p { max-width: 62ch; }

/* ============================================================
   ARTICLE - the reading page
   ============================================================ */
body[data-page="blog"] .bx-col { max-width: 760px; }   /* the measure: ~72ch of Geist at 1.075rem */
body[data-page="blog"] .bx-head { margin-bottom: clamp(30px, 4vw, 44px); }
body[data-page="blog"] .bx-title {
  font-size: clamp(2rem, 3.1vw, 2.9rem);
  line-height: 1.06;
  margin-bottom: 18px;
}
body[data-page="blog"] .bx-deck {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
}

body[data-page="blog"] .bx-body { font-size: 1.075rem; line-height: 1.78; color: var(--ink); }
body[data-page="blog"] .bx-body p { margin-bottom: 1.35em; }
body[data-page="blog"] .bx-body p:last-child { margin-bottom: 0; }
body[data-page="blog"] .bx-body h2 {
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.1em 0 0.75em;
}
body[data-page="blog"] .bx-body h2:first-child { margin-top: 0; }

/* the pulled statement: the essay's own sentence, set as a rule-marked aside */
body[data-page="blog"] .bx-pull {
  margin: 2.2em 0 1.6em;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--ink);
  font-size: 1.32rem;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--ink);
}
/* the attributed quotation - quieter, and it keeps its own quotation marks */
body[data-page="blog"] .bx-quote {
  margin: 0 0 0.6em;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  font-style: italic;
}

body[data-page="blog"] .bx-sources {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
body[data-page="blog"] .bx-sources h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
body[data-page="blog"] .bx-sources ol { list-style: none; display: grid; gap: 11px; }
body[data-page="blog"] .bx-sources li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
/* the docx glues each URL onto the end of its citation - keep the text
   verbatim, but give the link its own line so a citation stays readable */
body[data-page="blog"] .bx-sources a {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: none;
  width: fit-content;
  border-bottom: 1px solid var(--line-2);
}
body[data-page="blog"] .bx-sources a:hover { border-bottom-color: var(--ink); }

/* pager */
body[data-page="blog"] .bx-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 5vw, 60px);
}
body[data-page="blog"] .bx-pager a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 22px;
  border-radius: var(--r);
  background: var(--bg-card);
  box-shadow: var(--card-lift);
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  transition: transform 0.5s var(--spring-soft, cubic-bezier(0.22, 1, 0.36, 1));
}
body[data-page="blog"] .bx-pager a:hover { transform: translateY(-2px); }
body[data-page="blog"] .bx-pager .bx-next { text-align: right; grid-column: 2; }
body[data-page="blog"] .bx-pager span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
body[data-page="blog"] .bx-back { margin-top: 22px; text-align: center; }
body[data-page="blog"] .bx-back a {
  font-size: 0.92rem;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
body[data-page="blog"] .bx-back a:hover { color: var(--ink); border-bottom-color: var(--ink); }

@media (max-width: 860px) {
  body[data-page="blog"] .bx-grid { grid-template-columns: 1fr; }
  body[data-page="blog"] .bx-cell a,
  body[data-page="blog"] .bx-cell--lead a,
  body[data-page="blog"] .bx-cell--close a { min-height: 0; padding: 20px 20px 24px; }
  body[data-page="blog"] .bx-cell-body,
  body[data-page="blog"] .bx-cell--lead .bx-cell-body { padding-top: 30px; }
  body[data-page="blog"] .bx-cell--lead h2,
  body[data-page="blog"] .bx-cell--close h2 { font-size: 1.62rem; }
  body[data-page="blog"] .bx-cell--lead p { font-size: 0.98rem; }
  body[data-page="blog"] .bx-meta { font-size: 10.5px; letter-spacing: 0.05em; }
  body[data-page="blog"] .bx-masthead::after { background-image: none; }
  body[data-page="blog"] .bx-pager { grid-template-columns: 1fr; }
  body[data-page="blog"] .bx-pager .bx-next { grid-column: 1; text-align: left; }
  body[data-page="blog"] .bx-body { font-size: 1.03rem; }
  body[data-page="blog"] .bx-pull { font-size: 1.18rem; padding-left: 18px; }
}

/* on a phone the meta row keeps only what a reader uses: the length */
@media (max-width: 560px) {
  body[data-page="blog"] .bx-meta-r i,
  body[data-page="blog"] .bx-terr { display: none; }
}
