/* =============================================================
   BriskCoders — Blog
   Covers blog.html (listing) and every blog-*.html article page.
   Every rule is prefixed .bl- (listing) or .bp- (post) so nothing
   here can reach another page. Colours, type and spacing come
   from css/styles.css, so the blog inherits the site brand.
   ============================================================= */
.bg-cream { background: var(--cream); }

/* ===== Listing: hero ========================================== */
.bl-hero {
  position: relative; overflow: hidden;
  padding: clamp(32px, 4.5vw, 56px) var(--gutter) clamp(30px, 4vw, 48px);
  background:
    radial-gradient(820px 380px at 50% -16%, #FFE3BF 0%, rgba(255, 227, 191, 0) 72%),
    linear-gradient(180deg, #FFFBF4 0%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
}
.bl-hero-in { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.bl-hero .crumbs { justify-content: center; }
.bl-hero h1 {
  margin: 0; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(32px, 4.8vw, 60px); line-height: 1.07; letter-spacing: -0.035em; max-width: 17ch;
}
.bl-hero h1 em { font-style: normal; color: var(--link); }
.bl-hero .lead { max-width: 58ch; }

/* ===== Listing: category filter =============================== */
.bl-filter { border-bottom: 1px solid var(--line); background: var(--white); position: relative; }
.bl-filter-in { max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter); display: flex; gap: 9px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.bl-filter-in::-webkit-scrollbar { display: none; }
.bl-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 17px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); color: var(--ink-2);
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.bl-chip:hover { border-color: var(--ink); color: var(--ink); }
.bl-chip .bl-n { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.bl-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.bl-chip[aria-pressed="true"] .bl-n { color: var(--orange); }

/* ===== Listing: featured post ================================= */
.bl-feat {
  display: grid; grid-template-columns: 1.08fr 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 80px -56px rgba(80, 35, 0, .6);
}
@media (max-width: 860px) { .bl-feat { grid-template-columns: 1fr; } }
.bl-feat-media { position: relative; min-height: 260px; background: var(--cream); }
.bl-feat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) { .bl-feat-media { aspect-ratio: 16 / 9; min-height: 0; } }
.bl-feat-body { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.bl-feat-body h2 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.18; letter-spacing: -0.025em; }
.bl-feat-body h2 a { color: inherit; text-decoration: none; }
.bl-feat-body h2 a:hover { color: var(--link); }
.bl-feat-body p { margin: 0; font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.62; color: var(--ink-2); }

/* ===== Shared post meta ======================================= */
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--ink-3); }
.bl-cat { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8A4A00; background: var(--peach); border-radius: 999px; padding: 5px 12px; }
.bl-feat .bl-cat { background: var(--orange); color: var(--ink); }
.bl-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); flex: none; }

.bl-more { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--link); text-decoration: none; width: fit-content; }
.bl-more .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.bl-more:hover { color: var(--link-hover, var(--ink)); }
.bl-more:hover .ic { transform: translateX(4px); }

/* ===== Listing: grid ========================================== */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
@media (max-width: 1020px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .bl-grid { grid-template-columns: 1fr; } }

.bl-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.bl-card:hover { transform: translateY(-5px); box-shadow: 0 36px 72px -48px rgba(80, 35, 0, .66); }
.bl-card[hidden] { display: none; }
.bl-card-media { aspect-ratio: 16 / 9; background: var(--cream); border-bottom: 1px solid var(--line); overflow: hidden; }
.bl-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.bl-card:hover .bl-card-media img { transform: scale(1.04); }
.bl-card-body { padding: clamp(18px, 2vw, 24px); display: flex; flex-direction: column; gap: 11px; flex: 1; }
.bl-card h3 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.26; letter-spacing: -0.02em; }
.bl-card h3 a { color: inherit; text-decoration: none; }
.bl-card h3 a:hover { color: var(--link); }
.bl-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.bl-card .bl-more { margin-top: auto; padding-top: 6px; }

.bl-empty { display: none; padding: 48px 0; font-size: 16px; color: var(--ink-3); }
.bl-empty.is-on { display: block; }
.bl-empty button { border: 0; background: none; padding: 0; font: inherit; color: var(--link); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ===== Shared CTA ============================================= */
.bl-cta { background: var(--ink); color: var(--white); border-radius: 28px; padding: clamp(28px, 4vw, 52px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.bl-cta-txt { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 11px; }
.bl-cta h2 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(22px, 2.8vw, 34px); line-height: 1.18; letter-spacing: -0.025em; color: var(--white); }
.bl-cta h2 span { color: var(--orange); }
.bl-cta p { margin: 0; font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.62; color: #CFCFCF; max-width: 54ch; }
.bl-cta-act { display: flex; flex-wrap: wrap; gap: 12px; flex: 0 1 auto; max-width: 100%; }
@media (max-width: 620px) {
  /* the two buttons together are wider than a phone, so let the
     row take the full width and stack them */
  .bl-cta { padding: 24px 18px; }
  .bl-cta-act { width: 100%; }
  .bl-cta-act .btn { width: 100%; }
  .bl-cta-reach { gap: 10px 16px; }
}
.bl-cta-mail { display: inline-flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; color: #CFCFCF; text-decoration: none; }
.bl-cta-mail .ic { width: 18px; height: 18px; color: var(--orange); }
.bl-cta-mail:hover { color: var(--white); }
.bl-cta-reach { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 2px; }

/* =============================================================
   Article pages
   ============================================================= */
.bp-head { padding: clamp(28px, 3.6vw, 48px) var(--gutter) 0; background: var(--cream); border-bottom: 1px solid var(--line); }
.bp-head-in { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.bp-head h1 {
  margin: 0; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(28px, 4vw, 48px); line-height: 1.12; letter-spacing: -0.032em;
}
.bp-head .bl-meta { font-size: 14px; }
.bp-sub { margin: 0; font-size: clamp(16.5px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-2); }
.bp-hero { max-width: 1040px; margin: clamp(22px, 3vw, 34px) auto 0; }
.bp-hero img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0; }

/* Article body: one readable column */
.bp-body { padding: clamp(32px, 4vw, 56px) var(--gutter); background: var(--white); }
.bp-article { max-width: 760px; margin: 0 auto; }
.bp-article > *:first-child { margin-top: 0; }
.bp-article p { margin: 0 0 20px; font-size: clamp(16px, 1.25vw, 17.5px); line-height: 1.75; color: var(--ink-2); }
.bp-article p.bp-lead { font-size: clamp(17.5px, 1.5vw, 20px); line-height: 1.65; color: var(--ink); font-weight: 500; margin-bottom: 26px; }
.bp-article h2 {
  margin: clamp(34px, 4vw, 48px) 0 14px; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(22px, 2.3vw, 29px); line-height: 1.22; letter-spacing: -0.025em; color: var(--ink);
  scroll-margin-top: 100px;
}
.bp-article h3 {
  margin: clamp(24px, 2.8vw, 32px) 0 10px; font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink);
}
.bp-article ul, .bp-article ol { margin: 0 0 22px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.bp-article li { position: relative; padding-left: 30px; font-size: clamp(16px, 1.25vw, 17.5px); line-height: 1.65; color: var(--ink-2); }
.bp-article ul > li::before {
  content: ""; position: absolute; left: 6px; top: .62em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange);
}
.bp-article ol { counter-reset: bp; }
.bp-article ol > li { counter-increment: bp; }
.bp-article ol > li::before {
  content: counter(bp); position: absolute; left: 0; top: .05em;
  font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--link);
}
.bp-article li strong { color: var(--ink); }
.bp-article a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.bp-article a:hover { color: var(--ink); }
.bp-article em { font-style: italic; }

.bp-share { max-width: 760px; margin: clamp(30px, 4vw, 44px) auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.bp-share p { margin: 0; font-size: 15px; color: var(--ink-3); }
.bp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-tag { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; text-decoration: none; }
.bp-tag:hover { border-color: var(--ink); color: var(--ink); }

/* Related posts */
.bp-rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
@media (max-width: 900px) { .bp-rel { grid-template-columns: 1fr; } }

/* ===== Section helper used by both ============================ */
.bl-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 clamp(20px, 2.6vw, 30px); }
.bl-sec-head h2 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -0.025em; }
.bl-sec-head p { margin: 0; font-size: 15.5px; color: var(--ink-3); }

 