/* =========================================================
   Jory&Co — News & Insights page
   Builds on main.css (tokens, .news-grid / .insight cards, ticker-box, footer, nav)
   Figma: Design AW (Updated) › News & Insights_A (7183:12049)
   ========================================================= */

.page-news .main { background: var(--black); }

/* ---------- shared bits ---------- */
[data-lines] .line { display: block; overflow: hidden; padding: .16em .08em .26em; margin: -.16em -.08em -.26em; }
[data-lines] .line + .line { margin-top: -.42em; } /* adjoining line margins collapse (-.26 vs -.16): restore the full overlap so a multi-line heading keeps its height */
[data-lines] { display: flow-root; }
[data-lines] .line__inner { display: block; will-change: transform, opacity; }
html.js .ph__title { visibility: hidden; }

/* ---------- Page header ---------- */
.ph { position: relative; padding: 257px 20px 0; }
.ph .hero__bar { position: absolute; }
.ph__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ph__title { margin: 0; font-weight: 600; font-size: clamp(48px, 6.25vw, 90px); line-height: 1; letter-spacing: -0.03em; }

/* ---------- Filters ---------- */
.nw { margin-top: 200px; }
.nw__filters { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.nw__topics { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; }
.nw__opt { padding: 0; border: 0; background: none; cursor: pointer; color: var(--white); opacity: .5; transition: color .3s ease, opacity .3s ease; }
.nw__opt:hover, .nw__opt:focus-visible { opacity: 1; color: var(--new-green); }
.nw__opt.is-on { opacity: 1; color: var(--new-green); }
.nw__clear { padding: 0; border: 0; background: none; color: var(--white); cursor: pointer; }
.nw__clear[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.nw__grid { margin-top: 20px; row-gap: 50px; }
.nw__grid .insight:not(.is-shown) { display: none; }
.nw__empty { margin: 50px 0 0; font-size: 17px; opacity: .6; }

/* ---------- Pagination (Figma: Frame 529) ---------- */
.nw__pages { display: flex; gap: 20px; margin-top: 50px; }
.nw__page {
  width: 70px; height: 70px; border-radius: 50%; border: 1px solid var(--white);
  display: grid; place-items: center; line-height: 1; color: var(--white); opacity: .5;
  transition: opacity .3s ease, color .3s ease, border-color .3s ease, background-color .3s ease;
}
.nw__page.is-current { opacity: 1; }
.nw__page:hover, .nw__page:focus-visible { opacity: 1; color: var(--new-green); border-color: var(--new-green); }

.page-news .ticker-box--cta { margin-top: 200px; }

/* =========================================================
   Branded fallback visuals — used when a post has no image.
   Each one is pure HTML/CSS (tiny, no image request), animates only
   while on screen (.is-live), and holds still for reduced motion.
   ========================================================= */
.fb { position: absolute; inset: 0; overflow: hidden; transition: transform 1.1s var(--ease-out); }
.insight:hover .fb { transform: scale(1.04); }
.fb, .fb * { animation-play-state: paused; }
.fb.is-live, .fb.is-live * { animation-play-state: running; }

/* Orbs — a bright green field with soft, blurred black orbs drifting slowly.
   Orb count, size, position and timing come from inline custom properties. */
.fb--orbs { background: var(--new-green); }
.fb__o {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1;
  border-radius: 50%; background: #000; opacity: var(--o); filter: blur(var(--bl));
  will-change: transform;
  animation: fb-float var(--d) ease-in-out var(--del) infinite alternate;
}
@keyframes fb-float { from { transform: translate(0, 0) scale(1); } to { transform: translate(var(--dx), var(--dy)) scale(1.08); } }
.fb__grain {
  position: absolute; inset: 0; z-index: 1; opacity: .14; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .fb, .fb * { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .ph { padding-top: 140px; }
  .nw, .page-news .ticker-box--cta { margin-top: 120px; }
  .nw__filters { flex-direction: column; align-items: flex-start; }
  .nw__topics { gap: 12px 18px; }
  .nw__page { width: 56px; height: 56px; }
}
