/* =====================================================================
   BLOG (blog/ and blog/post.html): featured post, filters, cards and the article layout.
   Loaded after base.css and components.css. Built from: blog.css.
   ===================================================================== */

/* ======================== from blog.css ======================== */
/* Blog listing (blog.html) and article template (blog-post.html).
   Builds on pages-04.css: p4-hero, p4-sec, p4-cases / p4-case cards, p4-rise reveals.
   Headings are scoped under #main because style.css sets a global #main h2 size and colour. */

.bl-btn-ghost { color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); }
.bl-btn-ghost:hover, .bl-btn-ghost:focus-visible { background: #fff; border-color: #fff; color: var(--ink); }

/* =================== LISTING =================== */

/* featured "latest insight": image left, copy right */
.bl-feat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); border-radius: var(--r-lg); overflow: hidden; background: #fff;
  border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.bl-feat:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -40px rgba(12, 27, 58, .5); }
.bl-feat__img { position: relative; min-height: 320px; overflow: hidden; background: #06173F; }
.bl-feat__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.bl-feat:hover .bl-feat__img img { transform: scale(1.05); }
.bl-feat__body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(24px, 3.4vw, 52px); }
.bl-feat__k { margin: 0; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--o4-red); }
.bl-feat .p4-case__meta { margin: 0; }
.bl-feat .p4-case__meta b { color: var(--ink); font-weight: 700; }
#main .bl-feat h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.2rem); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
.bl-feat__body > p:not([class]) { margin: 0; color: var(--muted); line-height: 1.65; }
.bl-feat .o4-link { margin-top: 6px; }
.p4-case__meta i { font-style: normal; margin: 0 4px; opacity: .6; }

/* topic filters */
.bl-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(40px, 5vw, 64px) 0 clamp(22px, 3vw, 32px); }
.bl-filters:empty { display: none; }
.bl-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.bl-chip span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--muted); font-size: .76rem; text-align: center; }
.bl-chip:hover { border-color: rgba(46, 94, 180, .4); color: var(--blue); }
.bl-chip[aria-pressed="true"] { background: #06173F; border-color: #06173F; color: #fff; }
.bl-chip[aria-pressed="true"] span { background: var(--o4-red); color: #fff; }

/* card grid: three across */
.bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-grid .p4-case[hidden] { display: none; }
#main .bl-grid .p4-case h3 { font-size: clamp(1.1rem, 1rem + .35vw, 1.32rem); }
.bl-grid .p4-case__body > p:not(.p4-case__meta) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-empty { margin: 8px 0 0; padding: 28px; border-radius: var(--r-md); border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.bl-empty a { color: var(--blue); font-weight: 600; }

/* =================== ARTICLE =================== */

/* hero: single column, extra room at the bottom for the cover image to overlap */
.bl-hero { padding-bottom: clamp(120px, 16vw, 200px); }
.bl-hero__in { max-width: 960px; }
#main .bl-hero h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem); }
.bl-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; color: var(--o4-text-2); font-size: .9rem; }
.bl-hero__meta span + span::before { content: "\00b7"; margin-right: 18px; opacity: .6; }
.bl-pill { padding: 6px 12px; border-radius: 999px; background: var(--o4-red); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.bl-pill:hover { color: #fff; filter: brightness(1.08); }
.bl-hero__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; }
.bl-byline { display: flex; align-items: center; gap: 12px; }
.bl-byline:empty { display: none; }
.bl-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #2E5EB4, #FF1F5A); color: #fff; font-weight: 700; font-size: .92rem; letter-spacing: .04em; }
.bl-byline small { display: block; font-size: .76rem; color: var(--o4-text-2); }
.bl-byline b { color: #fff; font-weight: 600; }

/* cover image, pulled up over the hero */
.bl-cover-wrap { position: relative; z-index: 2; margin-top: calc(-1 * clamp(90px, 12vw, 160px)); }
.bl-cover { margin: 0; aspect-ratio: 21 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0B2259; box-shadow: 0 50px 90px -50px rgba(6, 23, 63, .8); }
.bl-cover img { width: 100%; height: 100%; object-fit: cover; }

/* body: sticky "On this page" + share on the left, the article on the right */
.bl-article { padding-block: clamp(48px, 6vw, 88px) clamp(56px, 7vw, 100px); background: #fff; }
.bl-article__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.bl-aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 28px; }
.bl-aside__h { margin: 0 0 12px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bl-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.bl-toc a { display: flex; gap: 10px; margin-left: -2px; padding: 8px 0 8px 14px; border-left: 2px solid transparent; color: var(--muted); font-size: .92rem; line-height: 1.4; text-decoration: none; transition: color .2s, border-color .2s; }
.bl-toc a span { font-family: var(--o4-hud); font-size: .76rem; padding-top: 2px; opacity: .7; }
.bl-toc a:hover { color: var(--ink); }
.bl-toc a.is-on { color: var(--ink); font-weight: 600; border-left-color: var(--o4-red); }
.bl-toc a.is-on span { color: var(--o4-red); opacity: 1; }

.bl-share { display: flex; gap: 8px; }
.bl-share a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: background .2s, color .2s, border-color .2s, transform .2s; }
.bl-share a:hover { background: #06173F; border-color: #06173F; color: #fff; transform: translateY(-2px); }
.bl-share a.is-copied { background: #159a5e; border-color: #159a5e; color: #fff; }

/* article typography */
.bl-main { max-width: 760px; }
.bl-prose { color: var(--ink); font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); line-height: 1.8; }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose > p:first-child { font-size: 1.15em; line-height: 1.7; color: var(--ink); }
.bl-prose p { margin: 0 0 1.2em; }
#main .bl-prose h2 { scroll-margin-top: 110px; margin: 1.9em 0 .6em; font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 1.15rem + .9vw, 1.9rem); line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.bl-prose ul { margin: 0 0 1.4em; padding: 0; list-style: none; }
.bl-prose li { position: relative; margin: 0 0 .7em; padding-left: 26px; }
.bl-prose li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--o4-red); box-shadow: 0 0 0 4px rgba(255, 31, 90, .14); }
.bl-prose strong { color: var(--ink); font-weight: 700; }
.bl-prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.bl-prose blockquote { margin: 1.8em 0; padding: 22px 26px; border-left: 4px solid var(--o4-red); border-radius: 0 16px 16px 0; background: var(--mist);
  font-family: var(--display); font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); font-weight: 600; line-height: 1.45; }
.bl-prose blockquote p { margin: 0; }

/* FAQs */
.bl-faq { margin-top: 2.4em; }
.bl-faq details { border-bottom: 1px solid var(--line); }
.bl-faq summary { position: relative; padding: 18px 40px 18px 0; font-weight: 700; cursor: pointer; list-style: none; }
.bl-faq summary::-webkit-details-marker { display: none; }
.bl-faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; color: var(--o4-red); transition: rotate .25s; }
.bl-faq details[open] summary::after { rotate: 45deg; }
.bl-faq details p { margin: 0 0 18px; color: var(--muted); }

/* closing share bar + previous / next */
.bl-share-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding: 22px 24px; border-radius: 18px; background: var(--mist); }
.bl-share-end p { margin: 0; color: var(--ink); }
.bl-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.bl-pager:empty { display: none; }
.bl-pager__a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: #fff;
  text-decoration: none; color: var(--ink); transition: border-color .25s, box-shadow .25s, transform .25s; }
.bl-pager__a:hover { border-color: rgba(255, 31, 90, .45); box-shadow: 0 20px 40px -28px rgba(12, 27, 58, .5); transform: translateY(-3px); }
.bl-pager__a small { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bl-pager__a small::before { content: "\2190\00a0"; }
.bl-pager__a--next { text-align: right; }
.bl-pager__a--next small::before { content: none; }
.bl-pager__a--next small::after { content: "\00a0\2192"; }
.bl-pager__a b { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.35; }

/* more insights */
.bl-more { border-top: 1px solid var(--line); }
.bl-more__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 3vw, 40px); }
#main .bl-more__head .o4-h2 { margin: 0; }
.bl-more + .p4-cta { background: #fff; }

/* =================== RESPONSIVE =================== */
@media (max-width: 1023px) {
  .bl-feat { grid-template-columns: 1fr; }
  .bl-feat__img { min-height: 0; aspect-ratio: 16 / 9; }
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-article__grid { grid-template-columns: 1fr; }
  .bl-aside { position: static; }
  .bl-toc { padding: 18px 20px; border-radius: 16px; background: var(--mist); }
  .bl-toc ol { border-left: 0; }
  .bl-toc a { margin-left: 0; padding-left: 0; border-left: 0; }
  .bl-aside__share { display: none; }   /* the closing share bar covers phones and tablets */
  .bl-main { max-width: none; }
  .bl-more .bl-grid .p4-case:nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  .bl-grid { grid-template-columns: 1fr; }
  .bl-more .bl-grid .p4-case:nth-child(3) { display: flex; }
  .bl-cover { aspect-ratio: 16 / 10; }
  .bl-pager { grid-template-columns: 1fr; }
  .bl-pager__a--next { text-align: left; }
  .bl-more__head { flex-direction: column; align-items: start; }
  .bl-hero__foot { align-items: flex-start; flex-direction: column; }
}
