/* ======================================================================
   Nihul Consulting - blog.css
   ----------------------------------------------------------------------
   Loaded AFTER /site.css on /blog/ and on every /blog/<slug>/ page.
   It adds only what the blog needs and never redefines a spec token.

   Everything here is composed from the approved rebrand spec's own
   primitives (brand/landing-share.html): the .hero shell, the .editorial
   paper band with its parchment texture, .hair hairlines, .filter chips,
   .row hairline rows, .btn, Gloock for display, Geologica for text.

   WHAT IT ADDS
     1  .hero--inner   compact dark shell head for a page that is not the
                       homepage (no 90vh, no contour canvas)
     2  .masthead      the blog index title block inside that shell
     3  .hero--post    the same shell with the post's own hero photograph
                       as its ground, plus .posthead (title, rule, byline)
     4  .row--index    the spec row grown a number, a topic chip, a date
                       and a summary line, for the full 15-post listing
     5  .post-*        the reading band: parchment ground, ivory column,
                       Gloock headings, hairline rules, restyled exhibits
     6  responsive     1024 / 820 / 560, matching site.css's breakpoints

   ASSET PATHS ARE ROOT-RELATIVE so a page two levels deep can use it.
   ====================================================================== */

/* ======================================================================
   1. COMPACT DARK SHELL HEAD (inner pages)
   ====================================================================== */
.hero--inner,
.hero--inner .hero__inner {
  min-height: 0;
}

.hero--inner {
  background: var(--night);
}

/* No contour canvas on inner pages: the ground is a still gradient that
   lands on the same night value the footer uses, so the page reads as one
   continuous dark shell top and bottom. */
.hero--inner .hero__field::before {
  background-image:
    radial-gradient(70% 120% at 76% 8%, rgba(47, 122, 98, 0.42) 0%, rgba(47, 122, 98, 0) 70%),
    radial-gradient(56% 110% at 16% 96%, rgba(32, 92, 74, 0.4) 0%, rgba(32, 92, 74, 0) 74%),
    linear-gradient(168deg, #0d1e19 0%, #143029 52%, #0b1a16 100%);
  background-size: cover;
  filter: none;
}

.hero--inner .hero__scrim {
  background:
    linear-gradient(
      to bottom,
      rgba(8, 18, 15, 0.62) 0px,
      rgba(8, 18, 15, 0.5) 130px,
      rgba(8, 18, 15, 0.28) 62%,
      rgba(14, 31, 26, 0.9) 96%,
      var(--night) 100%
    ),
    linear-gradient(to right, rgba(8, 18, 15, 0.4) 0%, rgba(8, 18, 15, 0) 46%);
}

/* ======================================================================
   2. MASTHEAD (blog index)
   ====================================================================== */
.masthead {
  padding: 92px var(--pad) 76px;
}

.mast__kicker {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.5);
}

.mast__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 17ch;
  color: var(--ivory);
}

.mast__rule {
  margin: 34px 0 26px;
}

.mast__lede {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.66;
  color: var(--muted);
}

.mast__count {
  margin: 26px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.4);
}

/* ======================================================================
   3. POST HEAD (article pages)
   The post's own hero photograph is passed per page as --post-hero, which
   keeps the image reference in the page's own markup rather than hiding it
   in a stylesheet rule keyed on the slug.
   ====================================================================== */
.hero--post .hero__field::before {
  background-image:
    linear-gradient(
      100deg,
      rgba(10, 33, 27, 0.94) 0%,
      rgba(10, 33, 27, 0.72) 50%,
      rgba(10, 33, 27, 0.5) 100%
    ),
    var(--post-hero, none),
    linear-gradient(168deg, #0d1e19 0%, #143029 46%, #0b1a16 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: none;
}

.posthead {
  padding: 86px var(--pad) 64px;
  max-width: 1180px;
}

.posthead__crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.45);
}

.posthead__crumb a {
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.posthead__crumb a:hover {
  color: var(--signal);
  border-bottom-color: rgba(168, 224, 95, 0.5);
}

.posthead__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(31px, 4.1vw, 60px);
  line-height: 1.07;
  letter-spacing: -0.018em;
  max-width: 21ch;
  color: var(--ivory);
}

.posthead__rule {
  margin: 34px 0 20px;
}

.posthead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.55);
}

/* credit and date travel together, so a narrow screen never strands the
   separator dot at the end of a line */
.posthead__by {
  white-space: nowrap;
}

.posthead__tag {
  padding: 5px 11px 4px;
  border: 1px solid rgba(168, 224, 95, 0.42);
  border-radius: 2px;
  color: var(--signal);
  letter-spacing: 0.12em;
}

/* ======================================================================
   4. INDEX ROWS
   The spec row, kept intact, with a number column on the left and a
   summary plus topic chip and date stacked under the title. The hover
   thumbnail keeps its spec position, and .row__main is capped short of
   it so the two never collide.
   ====================================================================== */
.editorial--index {
  padding-top: 96px;
}

.editorial__bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 32px;
}

.editorial__note {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 33, 31, 0.45);
}

/* the index row packs from the left: number column, then the main block. */
.row--index .row__link {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 28px;
  padding: 30px var(--pad) 28px;
}

.row__num {
  position: relative;
  z-index: 2;
  flex: none;
  width: 56px;
  padding-top: 3px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: rgba(28, 33, 31, 0.38);
  transition: color 0.25s ease;
}

.row__link:hover .row__num {
  color: var(--forest);
}

.row__main {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 54ch;
}

.row--index .row__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--forest-deep);
}

.row__link:hover .row--index .row__title,
.row--index .row__link:hover .row__title {
  color: var(--forest);
}

.row__sum {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(28, 33, 31, 0.62);
}

.row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(28, 33, 31, 0.42);
}

.row__tag {
  padding: 4px 9px 3px;
  border: 1px solid var(--hair-ink);
  border-radius: 2px;
  color: rgba(28, 33, 31, 0.62);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.row__link:hover .row__tag {
  border-color: rgba(18, 54, 45, 0.42);
  color: var(--forest-deep);
}

/* ======================================================================
   5. READING BAND (article pages)
   The spec's paper ground and parchment texture, exactly as the editorial
   band builds it, with an ivory column floated on top so a long read sits
   on a slightly brighter surface than the band around it.
   ====================================================================== */
.post {
  position: relative;
  z-index: 4;
  display: block;
  padding: 96px var(--pad) 108px;
  color: var(--ink);
  background: var(--paper-lift);
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("/img/rebrand/paper-texture.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.13;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.post :focus-visible {
  outline-color: var(--forest-deep);
}

.post-body {
  max-width: 74ch;
  margin: 0 auto;
  padding: 62px clamp(24px, 4vw, 68px) 58px;
  background: var(--ivory);
  border: 1px solid var(--hair-ink);
  border-radius: 2px;
  font-size: 17px;
  font-weight: 330;
  line-height: 1.74;
  color: var(--ink);
}

.post-body > p {
  margin: 0 0 24px;
}

.post-body > p:last-child {
  margin-bottom: 0;
}

.post-lead {
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.56;
  font-weight: 300;
  color: var(--forest-deep);
  margin: 0 0 34px !important;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hair-ink);
}

.post-body h2 {
  margin: 54px 0 20px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--forest-deep);
}

.post-body h3 {
  margin: 40px 0 14px;
  font-family: var(--sans);
  font-weight: 550;
  font-size: 19px;
  line-height: 1.3;
  color: var(--forest-deep);
}

.post-body ul,
.post-body ol {
  margin: 0 0 24px;
  padding-left: 22px;
}

.post-body li {
  margin-bottom: 10px;
}

.post-body blockquote {
  margin: 34px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--forest);
  font-size: 19px;
  line-height: 1.6;
  color: var(--forest-deep);
}

/* in-body links: an ink underline that greens on hover, no glyphs */
.post-body a {
  color: var(--forest-deep);
  border-bottom: 1px solid rgba(18, 54, 45, 0.32);
  transition: color 0.22s ease, border-color 0.22s ease;
}

.post-body a:hover {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.post-body strong,
.post-body b {
  font-weight: 550;
}

/* ---------- exhibits ---------- */
.exhibit {
  margin: 48px 0;
  padding: 26px clamp(18px, 2.4vw, 30px) 22px;
  background: var(--paper-lift);
  border: 1px solid var(--hair-ink);
  border-radius: 2px;
}

.exhibit__kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
}

.exhibit__title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.32;
  letter-spacing: -0.008em;
  color: var(--forest-deep);
}

.exhibit__figure {
  margin: 0;
  padding: 16px 0 6px;
  border-top: 1px solid var(--hair-ink);
  border-bottom: 1px solid var(--hair-ink);
}

.exhibit__figure svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--sans);
}

.exhibit__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(28, 33, 31, 0.55);
}

/* ---------- closing CTA row ---------- */
.post-pill-row {
  margin: 46px 0 0 !important;
  padding-top: 34px;
  border-top: 1px solid var(--hair-ink);
}

.post-body .pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  border: 0;
  border-bottom: 0;
  border-radius: 2px;
  background: var(--forest-deep);
  color: var(--ivory);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.25s ease;
}

.post-body .pill:hover {
  background: var(--forest);
  color: var(--ivory);
}

/* ---------- what to read next ---------- */
.postfoot {
  max-width: 74ch;
  margin: 34px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 33, 31, 0.5);
}

.postfoot a {
  border-bottom: 1px solid rgba(18, 54, 45, 0.3);
  color: var(--forest-deep);
  transition: color 0.22s ease, border-color 0.22s ease;
}

.postfoot a:hover {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

/* ======================================================================
   6. RESPONSIVE (site.css breakpoints: 1024 / 820 / 560)
   ====================================================================== */
@media (max-width: 1024px) {
  .row__main {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .masthead {
    padding: 64px var(--pad) 56px;
  }

  .posthead {
    padding: 58px var(--pad) 48px;
  }

  .post {
    padding: 66px var(--pad) 78px;
  }

  .post-body {
    padding: 42px clamp(20px, 5vw, 34px) 40px;
  }

  .editorial--index {
    padding-top: 68px;
  }
}

@media (max-width: 560px) {
  .row--index .row__link {
    flex-wrap: wrap;
    padding: 24px var(--pad) 22px;
  }

  .row__num {
    width: auto;
    padding-top: 0;
    margin-bottom: 2px;
    flex: 0 0 100%;
  }

  .post-body {
    font-size: 16px;
    line-height: 1.7;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    max-width: none;
  }

  .exhibit {
    margin-left: calc(var(--pad) * -0.5);
    margin-right: calc(var(--pad) * -0.5);
  }

  .postfoot {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row__num,
  .row__tag,
  .post-body a,
  .postfoot a,
  .posthead__crumb a {
    transition: none;
  }
}
