/* =====================================================================
   Blog (EN + AR) — design F "Orbit"
   purple poster hero with the featured post as a giant poster card (ink
   reveal on hover / scroll) · crossing tapes · category chips (kit filters)
   · post grid with hover ink · poster pagination · newsletter ticket.
   Bootstrap-safe class names (bl- prefix). Logical properties throughout.
   ===================================================================== */

/* ---------- HERO ---------- */
.bl-hero .ph__copy .eyebrow { color: var(--b2-lite); }
.bl-hero .ph__title--long { font-size: clamp(40px, 6.9vw, 104px); line-height: .9; }
:root:lang(ar) .bl-hero .ph__title--long { font-size: clamp(34px, 5.6vw, 80px); line-height: 1.25; }
.bl-hero .ph__title em { color: var(--b2-on-deep); }
.bl-hero .ph__lead { max-width: 34em; }
.bl-hero__grid { align-items: center; }

.bl-feat { position: relative; z-index: 3; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: clamp(22px, 2.4vw, 32px); overflow: hidden; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .7); transform: rotate(calc(2deg * var(--dir))); transition: transform .8s var(--ease); --fg: var(--ink); --fg-2: var(--ink-2); --acc: var(--b1-accent); }
.bl-feat:hover { transform: rotate(0deg) translateY(-4px); }
.bl-feat:has(.bl-feat__title a:focus-visible) { outline: 3px solid var(--b2); outline-offset: 4px; }
.bl-feat__media { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: var(--deep-2); }
.bl-feat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.bl-feat:hover .bl-feat__media img { transform: scale(1.05); }
/* the ink layer tints the cover purple; a soft-edged hole follows the pointer (or grows with scroll on touch) and reveals the real colours */
.bl-feat__ink { position: absolute; inset: 0; background: linear-gradient(160deg, var(--b1-solid), var(--deep)); mix-blend-mode: multiply; opacity: .92; pointer-events: none;
  -webkit-mask: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #0000 0, #0000 calc(var(--rad, 0) * 1% - 6%), #000 calc(var(--rad, 0) * 1% + 6%));
  mask: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #0000 0, #0000 calc(var(--rad, 0) * 1% - 6%), #000 calc(var(--rad, 0) * 1% + 6%)); }
html:not(.js) .bl-feat__ink { display: none; }
.bl-feat__tag { position: absolute; inset-inline-end: 14px; top: 14px; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--b2); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
:root:lang(ar) .bl-feat__tag { letter-spacing: 0; text-transform: none; }
.bl-feat__body { display: grid; gap: 10px; padding: clamp(18px, 2vw, 26px); }
.bl-feat__title { font: 400 clamp(24px, 2.3vw, 36px)/1 var(--f-display); text-transform: var(--display-case); letter-spacing: .005em; }
:root:lang(ar) .bl-feat__title { font-weight: 800; font-size: clamp(21px, 1.9vw, 28px); line-height: 1.45; }
.bl-feat__title a { text-decoration: none; }
.bl-feat__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bl-feat__title a:focus-visible { outline: 0; }

.bl-badge { position: absolute; inset-inline-start: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 6px 14px -8px rgb(0 0 0 / .5); }
:root:lang(ar) .bl-badge { letter-spacing: 0; text-transform: none; font-size: 12px; }

/* ---------- TAPES ---------- */
.bl-tapes { margin-block: -8px -18px; z-index: 2; }

/* ---------- POSTS ---------- */
.bl-list { padding-top: calc(var(--sec) * .8); }
.bl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-bottom: clamp(20px, 2.6vw, 34px); }
.bl-bar__title { font-size: clamp(34px, 4.4vw, 64px); }
:root:lang(ar) .bl-bar__title { font-weight: 800; line-height: 1.3; }
.bl-filters { margin-bottom: 0; }
.bl-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.bl-post { position: relative; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .55s var(--ease), box-shadow .4s; isolation: isolate; }
.bl-post:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--line), 0 30px 46px -30px color-mix(in oklab, var(--ink) 60%, transparent); }
.bl-post:has(.bl-post__title a:focus-visible) { outline: 3px solid var(--acc); outline-offset: 3px; }
.bl-post__media { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream-2); }
.bl-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.bl-post:hover .bl-post__media img { transform: scale(1.06); }
/* hover ink: a purple flood grows from where the pointer entered */
.bl-post__ink { position: absolute; inset: 0; background: var(--b1-solid); mix-blend-mode: multiply; opacity: .78; clip-path: circle(0% at var(--x, 50%) var(--y, 100%)); transition: clip-path .7s var(--ease); pointer-events: none; }
.bl-post:hover .bl-post__ink { clip-path: circle(150% at var(--x, 50%) var(--y, 100%)); }
.bl-post__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.bl-post__cat { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--b1-ink); }
:root:lang(ar) .bl-post__cat { letter-spacing: 0; text-transform: none; font-size: 13px; }
.bl-post__title { font-size: clamp(18px, 1.35vw, 21px); font-weight: 700; line-height: 1.28; letter-spacing: -.012em; }
:root:lang(ar) .bl-post__title { letter-spacing: 0; line-height: 1.6; font-size: clamp(17px, 1.3vw, 19.5px); }
.bl-post__title a { text-decoration: none; background: linear-gradient(currentColor 0 0) left 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), color .3s; }
[dir="rtl"] .bl-post__title a { background-position: right 100%; }
.bl-post:hover .bl-post__title a { background-size: 100% 2px; color: var(--b1-ink); }
.bl-post__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bl-post__title a:focus-visible { outline: 0; }
.bl-post__excerpt { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
:root:lang(ar) .bl-post__excerpt { line-height: 1.85; }
.bl-post__foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.bl-post__by { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.bl-post__by i { color: var(--b1-ink); }
.bl-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in oklab, var(--b2) 18%, var(--paper)); color: var(--ink); font-size: 12px; font-weight: 700; margin-inline-start: auto; }
.bl-chip i { color: var(--b2-ink); }
.bl-feat .bl-post__foot { border-top-color: var(--line); }

/* ---------- PAGINATION (live pages and links) ---------- */
.bl-pager { margin-top: clamp(30px, 4vw, 54px); display: grid; justify-items: center; gap: 14px; }
.bl-pager__info { font-size: 14px; color: var(--fg-2); }
.bl-pager__info strong { font: 400 1.35em/1 var(--f-num); color: var(--fg); }
.bl-pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bl-pager__list li > a, .bl-pager__list li > span { min-width: 50px; height: 50px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font: 400 22px/1 var(--f-num); text-decoration: none; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--rule); transition: background-color .3s, color .3s, transform .4s var(--ease); }
.bl-pager__list li > a:hover { background: var(--ink); color: var(--cream); box-shadow: none; transform: translateY(-3px); }
.bl-pager__list .is-current > span { background: var(--b2); color: var(--ink); box-shadow: none; transform: scale(1.12); }
.bl-pager__list .is-dots > span { box-shadow: none; min-width: 30px; }
.bl-pager__list .is-off > span { opacity: .35; }
.bl-pager__arrow i { font-size: 18px; }
[dir="rtl"] .bl-pager__arrow i::before { transform: scaleX(-1); display: inline-block; }
.bl-note { margin-top: 18px; text-align: center; font-size: 15px; color: var(--fg-2); }
.bl-note a { color: var(--b1-ink); font-weight: 700; }

/* ---------- NEWSLETTER ticket ---------- */
.bl-news { overflow: clip; }
.bl-news .marq { top: 50%; }
.bl-ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); background: var(--paper); color: var(--ink); border-radius: clamp(26px, 3vw, 40px); --fg: var(--ink); --fg-2: var(--ink-2); --acc: var(--b1-accent); --cut: 22px;
  -webkit-mask: radial-gradient(circle var(--cut) at var(--tx, 66%) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--cut) at var(--tx, 66%) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--cut) at var(--tx, 66%) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--cut) at var(--tx, 66%) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
[dir="rtl"] .bl-ticket { --tx: 34%; }
.bl-ticket__main { display: grid; gap: 18px; justify-items: start; padding: clamp(26px, 4.4vw, 64px); }
.bl-ticket__title { font-size: clamp(2.3rem, 5vw, 5rem); }
.bl-ticket__p { font-size: clamp(16px, 1.3vw, 19px); max-width: 40ch; color: var(--ink-2); }
.bl-ticket__stub { position: relative; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 28px 20px; border-inline-start: 2px dashed color-mix(in oklab, var(--ink) 25%, transparent); background: color-mix(in oklab, var(--b2) 10%, var(--paper)); text-align: center; overflow: hidden; }
.bl-ticket__num { position: relative; font: 400 clamp(110px, 13vw, 210px)/.82 var(--f-num); color: transparent; -webkit-text-stroke: 2px var(--ink); direction: ltr; }
.bl-ticket__num::after { content: attr(data-n); position: absolute; inset: 0; color: var(--deep); -webkit-text-stroke: 0; clip-path: inset(calc((1 - var(--fill, 1)) * 100%) 0 0 0); }
.bl-ticket__lab { font: 400 clamp(18px, 1.6vw, 24px)/1.1 var(--f-display); text-transform: var(--display-case); max-width: 12ch; }
:root:lang(ar) .bl-ticket__lab { font-weight: 800; line-height: 1.45; }
.bl-ticket__ico { position: absolute; inset-inline-end: 16px; top: 16px; font-size: 22px; color: var(--b2-ink); transform: rotate(calc(12deg * var(--dir))); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1023px) {
  .bl-feat { max-width: 640px; transform: none; }
  .bl-pager__list { gap: 4px; }
  .bl-pager__list li > a, .bl-pager__list li > span { min-width: 44px; height: 44px; font-size: 19px; padding: 0 6px; }
}
@media (max-width: 767px) {
  .bl-bar { display: grid; }
  .bl-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--g)); padding-inline: var(--g); }
  .bl-filters::-webkit-scrollbar { display: none; }
  .bl-filters .filter { flex: none; }
  .bl-ticket { grid-template-columns: 1fr; --tx: 0; -webkit-mask: none; mask: none; }
  .bl-ticket__stub { border-inline-start: 0; border-top: 2px dashed color-mix(in oklab, var(--ink) 25%, transparent); grid-row: 1; padding: 22px 16px 18px; grid-template-columns: auto 1fr; justify-items: start; text-align: start; column-gap: 14px; align-items: end; }
  .bl-ticket__stub { border-top: 0; border-bottom: 2px dashed color-mix(in oklab, var(--ink) 25%, transparent); }
  .bl-ticket__num { font-size: clamp(84px, 26vw, 120px); }
  .bl-pager__list li > a, .bl-pager__list li > span { min-width: 44px; height: 44px; font-size: 19px; }
  .bl-post__body { padding: 16px 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-feat, .bl-feat:hover, .bl-post:hover { transform: none; }
}
