/* ==========================================================================
   ADNAN KABIR — blog.css
   Loaded ONLY by blog.html. Every selector here is new or duplicated from
   about.css/case-studies.css/resources.css (never imported directly, per
   the page-isolation rule), so no other page can be affected.

   Ported from the standalone Elementor snippet at
   "WEBSITE DESIGN/FOR ELEMENTOR/BLOG/blog.html", rebuilt on this site's own
   tokens/components instead of its self-contained --d-bg/--paper palette.
   Reuses .hero, .kicker, .chip, .link-arrow, .btn, .ftabs (from
   resources.css's pattern), .briefing (main.js's newsletter handler works
   unmodified via [data-newsletter]), .finale, .footer — plus the featured
   post, the stacked sample card and the post grid, which have no
   equivalent elsewhere.
   ========================================================================== */

/* ---------- Generic section wrapper --------------------------------------
   Duplicated from about.css / case-studies.css / resources.css rather than
   shared, to keep each page's stylesheet independent. */

.page-section {
  padding: var(--section-y) 0;
  border-bottom: 1px solid var(--rule);
}
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head .h2 { margin-bottom: .2em; }

/* ---------- Field Notes hero -------------------------------------------
   Single column below 1024px, 60/40 with the stacked sample card above it
   — the same shape as free-audit.html / case-studies.html / resources.html.
   Duplicated rather than shared so each page's stylesheet stays
   independent. */

.hero--archive {
  min-height: 0;
  padding: clamp(9rem, 20vh, 12rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero--archive .hero__inner { grid-template-columns: minmax(0, 1fr); }
.hero--archive .hero__copy { max-width: 46rem; }
.hero--archive .hero__lede { max-width: 58ch; }

@media (min-width: 1024px) {
  .hero--archive .hero__inner {
    grid-template-columns: 60% 40%;
    column-gap: 0;
  }
  .hero--archive .hero__copy {
    max-width: none;
    padding-right: clamp(2rem, 4vw, 4rem);
  }
  .hero--archive .hero__visual { place-items: center stretch; }
}

.hero__stat {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .6rem;
  color: var(--ink-3);
}
.hero__stat-num { color: var(--accent-text); }

/* ---------- Stacked sample card ---------------------------------------
   Two decorative rotated cards behind a real .report-card, so the hero
   visual reads as a small stack of field notes rather than a single flat
   plate. The back cards are aria-hidden and carry no text.
   .report-card itself is duplicated from free-audit.css. */

.report-card {
  width: 100%;
  max-width: 26rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.report-card__title {
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 700;
  margin: 1.5rem 0 1.75rem;
  text-wrap: pretty;
}
.report-card .redact-lines { margin-bottom: 1.75rem; }
.report-card__foot {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}

.stack {
  position: relative;
  width: 100%; max-width: 22rem;
  height: clamp(20rem, 30vw, 24rem);
  margin-inline: auto;
}
.stack .report-card {
  position: absolute; inset: 1rem auto auto 50%;
  transform: translateX(-50%) rotate(-1deg);
  max-width: 17rem;
  /* Fixed height to match the two decorative cards behind it (they're
     calc(100% - 1rem) of .stack); the title clamps and the footer stays
     pinned to the bottom instead of the card growing past the stack. */
  height: calc(100% - 1rem);
  display: flex;
  flex-direction: column;
}
.stack .report-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  line-height: 1.2em;
}
.stack .report-card__title a {
  transition: color var(--t-fast) linear;
}
.stack .report-card__title a:hover { color: var(--accent-text); }
.stack .report-card__foot { margin-top: auto; }
.scard {
  position: absolute; top: 1rem; left: 50%;
  width: 15rem; height: calc(100% - 1rem);
  margin-left: -7.5rem;
  border-radius: var(--r-md);
  pointer-events: none;
}
.scard--3 { transform: translateX(2.75rem) rotate(7deg); background: var(--rule-2); opacity: .5; }
.scard--2 { transform: translateX(-2.4rem) rotate(-6deg); background: var(--elev-2); opacity: .8; }

.report-card__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.report-card__top .mono + .mono { color: var(--ink-3); }

/* ---------- § Latest — featured post ------------------------------------ */

.feat-post {
  display: grid;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--elev);
}
@media (min-width: 860px) {
  .feat-post { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}

.feat-post__quote-panel {
  position: relative;
  padding: clamp(1.75rem, 4vw, 2.25rem);
  display: flex; flex-direction: column;
  min-height: 20rem;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px),
    var(--bg-2);
  background-size: 34px 34px, 34px 34px, auto;
}
.feat-post__quote {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-top: auto;
  border-top: 1px solid var(--rule-2);
  padding-top: 2rem;
  text-align: center;
}
.feat-post__quote-foot {
  position: relative;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-2);
  display: flex; 
  justify-content: space-between;
  align-items: center;
  color: var(--ink-3);
}

.feat-post__body { padding: clamp(1.75rem, 4vw, 2.25rem); display: flex; flex-direction: column; }
.feat-post__tags { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.feat-post__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: pretty;
}
.feat-post__desc { color: var(--ink-2); font-size: .9375rem; margin-bottom: 1.5rem; text-wrap: pretty; }

/* Not links — this is what the post covers, not a set of destinations, so
   each line is a plain item with a leading checkmark rather than an
   arrow-suffixed .link-arrow. */
.feat-post__links { border-top: 1px solid var(--rule); margin-bottom: 1.5rem; }
.feat-post__links li {
  display: flex; align-items: center;
  gap: .75rem;
  min-height: 3rem;
  padding-block: .5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 500;
}
.feat-post__links svg {
  width: 1.05rem; height: 1.05rem; flex: none;
  fill: none;
  stroke: var(--accent-text); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.feat-post__foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.feat-post__meta { color: var(--ink-3); font-size: .8125rem; }

/* ---------- § All Posts — filter tabs & grid ----------------------------- */

.ftabs {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.ftab {
  min-height: 2.5rem;
  padding: .5rem 1rem;
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .6875rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--t-fast) linear, color var(--t-fast) linear, background-color var(--t-fast) linear;
}
.ftab:hover { border-color: var(--accent-line); color: var(--ink); }
.ftab[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }

.post-grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
@media (min-width: 640px)  { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--elev);
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}
.post-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.post-card.is-hidden { display: none; }

.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 1rem;
  background:
    radial-gradient(90% 120% at 100% 0%, var(--accent-soft) 0%, transparent 62%),
    var(--bg-2);
}
.post-card__media .chip { position: absolute; left: 1rem; bottom: 1rem; }
.post-card__no {
  position: absolute; right: 1rem; bottom: 1rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .625rem; letter-spacing: .1em; text-transform: uppercase;
}

.post-card__body { padding: clamp(1.25rem, 3vw, 1.5rem); display: flex; flex-direction: column; flex: 1; }
.post-card__title {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}
.post-card__title a:hover { color: var(--accent-text); }

.post-card__foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
}
.post-card__date { color: var(--ink-3); font-size: .75rem; }
.post-card:hover .post-card__read { color: var(--accent-text); }
.post-card__read {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ink);
  font-weight: 600;
  font-size: .8125rem;
  transition: color var(--t-fast) linear, gap var(--t-med) var(--ease-out);
}
.post-card__read svg {
  flex: none;
  stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.post-card:hover .post-card__read { gap: .6rem; }

/* ---------- Final CTA ------------------------------------------------------
   .finale is shared/frozen; the pre-title note and CTA row are page-scoped.
   Duplicated from resources.css. */

.finale__pre {
  color: var(--ink-3);
  font-size: .9375rem;
  max-width: 52ch;
  text-wrap: pretty;
}
.finale__row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  justify-content: center;
}
.finale__or { color: var(--ink-3); }
@media (max-width: 420px) { .finale__row .btn { width: 100%; } }
