/* ==========================================================================
   News & activities — hero with figures and milestones, category filter,
   alternating timeline of news cards
   Shared pieces (empty state) live in content-shared.css; filter chips, arrow link and
   card effects are canonical components.
   Index: hero · stats · milestones · filter bar · timeline · news card
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.news-hero {
  position: relative;
  z-index: 2;
  padding-block: var(--sp-8) var(--sp-10);
  background: var(--surface);
  box-shadow: var(--sh-xs);
}
.news-hero__inner {
  --container: var(--container-80);
  display: grid;
  gap: var(--sp-8);
  align-items: start;
}
.news-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
  min-width: 0;
}
.news-hero__eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) .375rem;
  padding: var(--sp-1) var(--sp-4);
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--navy);
  background: var(--gray);
  border-radius: var(--r-16);
}
.news-hero__eyebrow-dot {
  width: var(--sp-2);
  height: var(--sp-2);
  border-radius: 50%;
  background: var(--burgundy);
}
.news-hero__eyebrow-sep { color: var(--text-muted); }
.news-hero__title {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: -.0275em;
  color: var(--navy);
}
.news-hero__lead {
  max-width: 52rem;
  font-size: var(--fs-16);
  line-height: 1.625;
  color: var(--text);
  text-wrap: pretty;
}
@media (prefers-reduced-motion: no-preference) {
  .news-hero__text > * { animation: rise-in var(--t-slow) var(--ease) both; }
  .news-hero__text > :nth-child(2) { animation-delay: 120ms; }
  .news-hero__text > :nth-child(3) { animation-delay: 240ms; }
  .news-hero__text > :nth-child(4) { animation-delay: 360ms; }
}

/* ---- Stats: always three tiles in one row ------------------------------------ */
.news-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  width: 100%;
  max-width: 42rem;
  padding-block-start: var(--sp-4);
}
.news-stats__item {
  --stat: var(--burgundy);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
  background: var(--gray);
  border-radius: var(--r-12);
}
.news-stats__item--navy { --stat: var(--navy); }
.news-stats__item--teal { --stat: var(--teal); }
.news-stats__value {
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: 1.5;
  color: var(--stat);
}
.news-stats__label { font-size: var(--fs-12); line-height: 1.5; color: var(--text); }
.news-stats__value.count { justify-items: center; }

/* ---- Milestones panel -------------------------------------------------------- */
.milestones { padding: var(--sp-6); background: var(--gray); border-radius: var(--r-12); }
.milestones__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block-end: var(--sp-4);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy);
}
.milestones__title .icon { font-size: 1.25rem; }
.milestones__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
/* the rail runs behind the dots */
.milestones__list::before {
  content: "";
  position: absolute;
  inset-block: var(--sp-2);
  inset-inline-start: calc(.625rem - 1px);
  width: 2px;
  background: var(--line);
}
.milestones__item {
  --dot: var(--burgundy);
  --ink-year: var(--burgundy);
  position: relative;
  padding-inline-start: 2.25rem;
}
.milestones__item::before {
  content: "";
  position: absolute;
  inset-block-start: .125rem;
  inset-inline-start: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--surface) 0 3px, var(--dot) 3.5px);
  box-shadow: 0 0 0 4px var(--gray), var(--sh-xs);
}
.milestones__item--navy { --dot: var(--navy); --ink-year: var(--navy); }
.milestones__item--teal { --dot: var(--teal); --ink-year: var(--teal); }
.milestones__item--amber { --dot: var(--amber); --ink-year: var(--amber-ink); }
.milestones__year {
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-year);
}
.milestones__text {
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  .milestones { animation: rise-in var(--t-slow) var(--ease) 360ms both; }
  .milestones__item { animation: rise-in var(--t-slow) var(--ease) both; }
  .milestones__item:nth-child(1) { animation-delay: 480ms; }
  .milestones__item:nth-child(2) { animation-delay: 600ms; }
  .milestones__item:nth-child(3) { animation-delay: 720ms; }
  .milestones__item:nth-child(4) { animation-delay: 840ms; }
}

/* ---- Filter bar ---------------------------------------------------------------- */
.news-filter {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-2);
  background: var(--surface);
  box-shadow: var(--sh-xs);
}
.news-filter__inner {
  --container: var(--container-80);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}
.news-filter__chips { justify-content: flex-start; gap: var(--sp-1); }
/* the colour of each category: text, and the dot while the chip is not pressed */
.news-chip--all { --chip-ink: var(--navy); }
.news-chip--all, .news-chip--all[aria-pressed="true"] { font-weight: 400; }
.news-chip--amber { --chip-ink: var(--amber-ink); --chip-dot: var(--amber); }
.news-chip--navy { --chip-ink: var(--navy); }
.news-chip--teal { --chip-ink: var(--teal); }
.news-chip--bronze { --chip-ink: var(--bronze); }
.news-filter__order {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--text);
}
.news-filter__order .icon { font-size: .9375rem; }

/* ---- Timeline -------------------------------------------------------------------
   Phones: rail and date markers at the start edge, cards beside them.
   From 60rem: central rail, cards alternate between the two sides. */
/* overflow-x: clip keeps the cards that slide in from the side inside the page width */
.news-feed { padding-block: var(--sp-8) var(--sp-16); overflow-x: clip; background: var(--gray); }
.news-feed__inner { --container: 72rem; }
.news-timeline-wrap {
  --marker: 3rem;
  position: relative;
}
.news-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}
/* the rail runs behind the markers; it draws itself from the top when it comes into view */
.news-timeline__rail {
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(var(--marker) / 2 - 1px);
  width: 2px;
  background: var(--line);
}
.news-timeline__item {
  --accent: var(--burgundy);
  --accent-ink: var(--accent);
  --tag-ink: var(--text-on-dark);
  position: relative;
  display: grid;
  grid-template-columns: var(--marker) minmax(0, 1fr);
  gap: var(--sp-2);
  align-items: start;
}
.news-timeline__item--amber { --accent: var(--amber); --accent-ink: var(--amber-ink); --tag-ink: var(--ink); }
.news-timeline__item--navy { --accent: var(--navy); }
.news-timeline__item--teal { --accent: var(--teal); }
.news-timeline__item--bronze { --accent: var(--bronze); }
.news-timeline__marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .125rem;
  width: var(--marker);
  height: var(--marker);
  margin-block-start: var(--sp-6);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--accent-ink);
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--gray), var(--sh-sm);
}
.news-timeline__dot {
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: var(--accent);
}
.news-timeline__month { display: block; font-size: var(--fs-10); }

/* ---- News card -------------------------------------------------------------------- */
.news-card {
  border: 0;
  border-block-start: 6px solid var(--accent);
  border-radius: var(--r-12);
  box-shadow: var(--sh-sm);
}
.news-card__media { position: relative; aspect-ratio: 520 / 240; background: var(--gray); }
.news-card__tags {
  position: absolute;
  inset-block-start: var(--sp-3);
  inset-inline: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.news-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 1.5rem;
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--tag-ink);
  white-space: nowrap;
  background: var(--accent);
  border-radius: var(--r-full);
  box-shadow: var(--sh-xs);
}
.news-tag .icon { font-size: .75rem; }
.news-tag--place {
  font-weight: 400;
  color: var(--navy);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .4375rem;
  padding: var(--sp-5);
}
.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-3);
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--text);
}
.news-card__date, .news-card__stat { display: inline-flex; align-items: center; gap: var(--sp-1); }
.news-card__meta .icon { font-size: .8125rem; }
.news-card__stat { font-weight: 700; color: var(--accent-ink); }
.news-card__title {
  font-size: var(--fs-16);
  font-weight: 700;
  line-height: 1.75;
  color: var(--navy);
  text-wrap: pretty;
}
.news-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-block-start: auto;
  padding-block-start: var(--sp-2);
}
.news-card__link { min-height: 1.5rem; color: var(--accent-ink); white-space: normal; }
.news-card__chip {
  padding: .125rem var(--sp-2);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  background: var(--gray);
  border-radius: var(--r-4);
}
.news-card__chip--navy { color: var(--navy); }
.news-card__chip--accent { color: var(--accent-ink); }

/* ---- ≥ 640px ------------------------------------------------------------------------ */
@media (min-width: 40rem) {
  .news-timeline-wrap { --marker: 3.5rem; }
  .news-stats { gap: var(--sp-4); }
  .news-stats__item { padding: var(--sp-4); }
  .news-stats__value { font-size: var(--fs-24); }
  .news-timeline__item { gap: var(--sp-5); }
  .news-card__body { padding: var(--sp-6); }
}

/* ---- ≥ 960px: hero in two columns; central rail with alternating cards -------------- */
@media (min-width: 60rem) {
  .news-hero { padding-block: var(--sp-10); }
  .news-hero__inner { grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--sp-16); }
  .news-feed { padding-block-start: var(--sp-10); }
  .news-timeline { gap: var(--sp-10); }
  .news-timeline__rail { inset-inline-start: calc(50% - 1px); }
  .news-timeline__item {
    grid-template-columns: minmax(0, 1fr) var(--marker) minmax(0, 1fr);
    gap: var(--sp-6);
  }
  .news-timeline__marker { grid-column: 2; grid-row: 1; margin-block-start: var(--sp-8); }
  /* the first visible card sits on the far side, the next one on the near side, and so on;
     "of :not([hidden])" keeps the alternation correct while a filter hides items */
  .news-timeline__item > .news-card { grid-column: 3; grid-row: 1; }
  .news-timeline__item:nth-child(even of :not([hidden])) > .news-card { grid-column: 1; }
}

/* ---- Motion -----------------------------------------------------------------------
   Each card slides in from the outer edge of its own side: on the central rail the first
   card sits on the end side and the next on the start side; on phones every card comes from
   the start side (the rail). The markers pop with a small overshoot. */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .news-timeline__item > .news-card[data-reveal]:not(.is-revealed) {
    translate: calc(var(--dir) * -56px) 0;
  }
  .js-ready .news-timeline__marker[data-reveal] {
    transition:
      opacity var(--t-slow) var(--ease-soft),
      filter var(--t-slow) var(--ease-soft),
      translate var(--t-slow) var(--ease-drop),
      scale var(--t-slow) var(--ease-drop);
    transition-delay: var(--reveal-delay, 0ms);
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 60rem) {
  .js-ready .news-timeline__item:nth-child(odd of :not([hidden])) > .news-card[data-reveal]:not(.is-revealed) {
    translate: calc(var(--dir) * 56px) 0;
  }
}

/* ---- LTR (English) --------------------------------------------------------
   i-arrow-left is drawn for RTL; mirror it so "forward" points to the right. */
[dir="ltr"] .icon:not(.icon--back):has(> use[href="#i-arrow-left"]) { scale: -1 1; }
