/* =============================================================================
   SECTION — BLOG LISTING
   Hero, category filter, one featured post, then a three-up grid.

   The cards reuse the attraction-card proportions from things-to-do.css in
   spirit but not in code: those are photo-first tiles with text burned over
   the image, these are editorial cards where the headline has to be readable
   at a glance and the excerpt matters. Different job, different component.
   ========================================================================== */

/* ---- category filter ----
   Real links, not buttons. Each one is a URL Laravel can route and Google can
   crawl; a JS-only filter would hide every category from search entirely. */
.bl-filter{
  background:var(--cream);
  border-bottom:1px solid rgba(40,52,38,.12);
  padding-block:clamp(16px,1.8vw,24px);
}
.bl-filter-in{
  display:flex;flex-wrap:wrap;justify-content:center;
  gap:var(--space-xs) var(--space-sm);
}
.bl-chip{
  display:inline-block;
  padding:9px 18px;
  border:1px solid rgba(40,52,38,.22);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:11.5px;font-weight:var(--fw-bold);
  letter-spacing:.13em;text-transform:uppercase;
  color:#3c4738;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
.bl-chip:hover{background:#eae5d9;border-color:rgba(40,52,38,.4)}
.bl-chip[aria-current="page"]{
  background:var(--rust-deep);border-color:var(--rust-deep);color:var(--white);
}
.bl-chip:focus-visible{outline:2px solid var(--rust-deep);outline-offset:3px}

/* ---- the posts band ---- */
.bl-posts{
  background:var(--cream);
  color:var(--ink);
  padding-block:clamp(40px,4.8vw,78px);
}

/* ---- featured post ---- */
.bl-feature{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  gap:clamp(22px,3.2vw,52px);
  align-items:center;
  padding-bottom:clamp(36px,4.2vw,62px);
  margin-bottom:clamp(36px,4.2vw,62px);
  border-bottom:1px solid rgba(40,52,38,.16);
}
.bl-feature-media{
  position:relative;
  aspect-ratio:16/10;
  border-radius:var(--r-card);
  overflow:hidden;
  background:var(--forest-deep);
}
.bl-feature-media img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
  transition:transform 1.2s var(--ease-out);
}
.bl-feature:hover .bl-feature-media img{transform:scale(1.04)}
.bl-tag{
  display:inline-block;
  font-family:var(--font-body);
  font-size:10.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:var(--rust-deep);
}
.bl-feature h2{
  margin:var(--space-sm) 0 0;
  font-family:var(--font-display);
  font-size:clamp(26px,2.9vw,42px);
  line-height:1.12;
  font-weight:var(--fw-medium);
  letter-spacing:-.012em;
  color:#153d31;
  text-wrap:balance;
}
.bl-feature:hover h2{color:var(--rust-deep)}
.bl-feature h2 a{transition:color .3s ease}
.bl-excerpt{
  margin:clamp(12px,1.3vw,17px) 0 0;
  max-width:52ch;
  font-family:var(--font-body);
  font-size:clamp(15px,1.12vw,17px);
  line-height:var(--lh-body);
  color:#4a5547;
}
.bl-meta{
  display:flex;align-items:center;gap:var(--space-sm);
  margin:clamp(14px,1.6vw,20px) 0 0;
  font-family:var(--font-body);
  font-size:12.5px;
  color:var(--ink-soft);
}
.bl-meta i{display:block;width:3px;height:3px;border-radius:var(--r-round);background:currentColor;opacity:.6}

/* ---- the grid ---- */
.bl-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(22px,2.8vw,40px) clamp(18px,2.2vw,32px);
}
/* The card was written as a subgrid spanning 4 rows. It has FIVE children -
   media, tag, headline, excerpt, meta - so the fifth had nowhere to go and
   the excerpt and the meta line rendered on top of each other. Worse, an
   alignment test still passed: they were perfectly aligned, just in the same
   place.

   Subgrid also couples the grid to the post count, because the parent has to
   declare every row and Laravel decides how many cards there are. Flex does
   the same job here without that coupling: a reserved two-line headline keeps
   the excerpts starting level, and the excerpt absorbing the slack pins every
   meta line to the bottom of its card whatever the copy does. */
.bl-card{
  display:flex;
  flex-direction:column;
}
.bl-card > .bl-card-media{flex:0 0 auto}
.bl-card .bl-excerpt{flex:1 1 auto}
.bl-card-media{
  position:relative;
  aspect-ratio:3/2;
  border-radius:var(--r-card);
  overflow:hidden;
  background:var(--forest-deep);
  margin-bottom:var(--space-md);
}
.bl-card-media img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
  transition:transform 1.2s var(--ease-out);
}
.bl-card:hover .bl-card-media img{transform:scale(1.05)}
.bl-card h3{
  margin:var(--space-xs) 0 0;
  font-family:var(--font-display);
  font-size:clamp(18px,1.5vw,23px);
  line-height:1.24;
  font-weight:var(--fw-medium);
  color:#14231a;
  transition:color .3s ease;
  /* two lines reserved so a one-line headline does not pull its excerpt up
     past the two-line ones beside it. In lh, so it follows whatever
     line-height actually wins rather than a number copied from above. */
  min-height:calc(2 * 1.24em);   /* fallback */
  min-height:2lh;
}
.bl-card:hover h3{color:var(--rust-deep)}
.bl-card .bl-excerpt{
  margin-top:var(--space-xs);
  font-size:clamp(13.5px,1vw,15px);
}
/* align-self:end is left over from the subgrid version, where it meant
   "bottom of the row". In a column flex it means the CROSS axis, so it
   shoved every meta line to the right-hand edge. The excerpt growing
   already pins this to the bottom; nothing else is needed. */
.bl-card .bl-meta{margin-top:var(--space-sm)}
.bl-card .bl-cta{margin-top:var(--space-sm)}

/* ---- the grid heading ----
   Not decoration. Without it the page ran h1 -> h3, and the six card
   headlines sat under no section heading at all. */
.bl-grid-head{
  margin:0 0 clamp(20px,2.4vw,32px);
  font-family:var(--font-display);
  font-size:clamp(22px,2.1vw,30px);
  line-height:1.16;
  font-weight:var(--fw-medium);
  letter-spacing:-.01em;
  color:#153d31;
}

/* ---- read button ----
   A real <a>, not a button, because it navigates. The visible label names
   the subject ("Read the waterfall guide") rather than "Read More", and a
   visually-hidden span appends the post title, so every one of the seven
   anchors on this page is unique and descriptive to a crawler and to a
   screen reader reading the links list. */
.bl-cta{margin:clamp(15px,1.7vw,21px) 0 0}
.bl-more{
  display:inline-flex;align-items:center;gap:12px;
  min-height:44px;                     /* a comfortable tap target */
  padding:0 20px;
  border:1px solid rgba(139,55,29,.5);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:11.5px;font-weight:var(--fw-bold);
  letter-spacing:.13em;text-transform:uppercase;
  color:var(--rust-deep);              /* 6.95:1 on the cream ground */
  transition:background .25s ease,border-color .25s ease,color .25s ease;
}
.bl-more svg{
  width:20px;height:8px;flex:0 0 auto;
  stroke:currentColor;stroke-width:1.8;fill:none;
  stroke-linecap:round;stroke-linejoin:round;
  transition:transform .3s var(--ease-out);
}
.bl-more:hover{background:var(--rust-deep);border-color:var(--rust-deep);color:var(--white)}
.bl-more:hover svg{transform:translateX(4px)}
.bl-more:focus-visible{outline:2px solid var(--rust-deep);outline-offset:3px}
/* the featured post gets the solid one - one clear first action on the page */
.bl-feature .bl-more{background:var(--rust-deep);border-color:var(--rust-deep);color:var(--white)}
.bl-feature .bl-more:hover{background:#6f2b17;border-color:#6f2b17}

/* ---- empty state ----
   A blog with no posts yet is the normal first day of a blog, and a bare
   white page reads as broken. */
.bl-empty{
  text-align:center;
  padding:clamp(40px,5vw,72px) var(--space-lg);
  border:1px dashed rgba(40,52,38,.28);
  border-radius:var(--r-card);
}
.bl-empty h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(22px,2.2vw,30px);
  font-weight:var(--fw-medium);
  color:#153d31;
}
.bl-empty p{
  margin:var(--space-sm) auto 0;max-width:46ch;
  font-family:var(--font-body);
  font-size:15px;line-height:1.55;color:var(--ink-soft);
}

/* ---- pagination ---- */
.bl-pages{
  display:flex;align-items:center;justify-content:center;gap:var(--space-xs);
  margin-top:clamp(36px,4.2vw,62px);
  padding-top:clamp(28px,3vw,44px);
  border-top:1px solid rgba(40,52,38,.16);
}
.bl-pages a,.bl-pages span{
  min-width:42px;height:42px;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0 var(--space-sm);
  border:1px solid rgba(40,52,38,.2);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:13px;font-weight:var(--fw-semi);
  color:#3c4738;
  transition:background .25s ease,border-color .25s ease,color .25s ease;
}
.bl-pages a:hover{background:#eae5d9;border-color:rgba(40,52,38,.42)}
.bl-pages [aria-current="page"]{
  background:var(--rust-deep);border-color:var(--rust-deep);color:var(--white);
}
.bl-pages .is-off{opacity:.4;pointer-events:none}
.bl-pages svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}

@media (max-width:980px){
  .bl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bl-feature{grid-template-columns:minmax(0,1fr);gap:var(--space-lg)}
}
@media (max-width:640px){
  .bl-grid{grid-template-columns:minmax(0,1fr)}
  /* stacked, so nothing needs to line up with anything beside it */
  .bl-card h3{min-height:0}
  .bl-card + .bl-card{
    margin-top:clamp(26px,5vw,34px);padding-top:clamp(26px,5vw,34px);
    border-top:1px solid rgba(40,52,38,.14);
  }
}
@media (prefers-reduced-motion:reduce){
  .bl-feature-media img,.bl-card-media img{transition:none}
  .bl-feature:hover .bl-feature-media img,.bl-card:hover .bl-card-media img{transform:none}
  .bl-more svg{transition:none}
  .bl-more:hover svg{transform:none}
}
