/* =============================================================
   TransRisk v3 — press.css
   Press Releases page
============================================================= */


/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */

.press-hero {
  background: var(--color-navy);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}

/* Decorative dot grid — matches other page heroes */
.press-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

.press-hero-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.press-hero-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 14px 0 20px;
}

.press-hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.60);
  line-height: 1.72;
  max-width: 560px;
  margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════
   PRESS RELEASES LIST
═══════════════════════════════════════════════════════════ */

.press-section {
  background: #fff;
  padding: 80px 0 96px;
}

.press-list {
  max-width: 980px;
  margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════
   TIMELINE RAIL

   Releases are grouped under a sticky year marker running down a
   vertical rail. The rail's leading edge fills as the section scrolls
   past, which is the whole point of the effect — done with a CSS
   scroll-driven animation rather than a scroll listener, so it costs
   no JavaScript and no dependency. Browsers without
   `animation-timeline` simply get the rail already filled; nothing is
   missing, it just does not track the scroll.
═══════════════════════════════════════════════════════════ */

.press-timeline {
  position: relative;
}

/* Rail sits at x=9px so it runs through the centre of the 18px dots,
   which start at the left edge of the year column. */
.press-rail {
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--color-border);
  overflow: hidden;
  /* Fades out at both ends so the rail does not collide with the
     section padding. */
  mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.press-rail-fill {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--color-green) 0%, var(--color-green-light) 100%);
  transform-origin: top center;
  transform: scaleY(1); /* the no-support resting state: rail simply filled */
}

@keyframes pressRailFill {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .press-rail-fill {
      animation: pressRailFill linear both;
      animation-timeline: view(block);
      /* Full by the time two-thirds of the timeline has crossed the
         viewport, so the leading edge stays ahead of the reader. */
      animation-range: cover 0% cover 66%;
    }
  }
}

/* ── One year group ── */
.press-era {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}

.press-era:last-child {
  padding-bottom: 0;
}

/* The year rides along beside its cards, the way the reference pins its
   heading. align-self:start is what lets sticky work in a grid cell. */
.press-era-head {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
  display: flex;
  align-items: center;
  gap: 18px;
  /* Above the cards: the rail passes behind the dot. */
  z-index: 2;
}

.press-era-dot {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-green);
  box-shadow: 0 0 0 5px #fff, 0 0 0 8px rgba(0, 133, 64, 0.10);
}

.press-era-year {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-border);
  margin: 0;
  transition: color var(--transition);
}

/* The year the reader is beside picks up the brand green. */
.press-era:hover .press-era-year,
.press-era:focus-within .press-era-year {
  color: var(--color-green);
}

.press-era-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Individual card ──
   The green left accent the card used to carry is gone: the rail is now
   the vertical green line on this page, and two of them side by side
   read as a mistake. The date pill and the hover state keep the card
   unmistakably TransRisk. */
.press-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition:
    transform    var(--transition),
    box-shadow   var(--transition),
    border-color var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.press-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-green);
}

/* Placeholder / coming-soon cards */
.press-card--placeholder {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.press-card--placeholder:hover {
  transform: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Date pill ── */
.press-date {
  display: inline-block;
  background: var(--color-green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Body column ── */
.press-body {
  flex: 1;
  min-width: 0;
}

.press-headline {
  font-size: 1.0rem;
  font-weight: 700;
  line-height: 1.48;
  color: var(--color-text);
  margin: 0 0 10px;
}

.press-headline a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.press-headline a:hover {
  color: var(--color-green-dark);
}

.press-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}


/* Category label above the headline — set by `category` in the release
   frontmatter (src/content/press/*.md). */
.press-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 6px;
}

/* Multi-paragraph releases: only the last paragraph drops its margin. */
.press-excerpt:last-of-type {
  margin-bottom: 0;
}

.press-media {
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.press-media img {
  width: 100%;
  height: auto;
  display: block;
}

.press-empty {
  text-align: center;
  color: var(--color-muted);
}

.press-read-more {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-green-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.press-read-more:hover {
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════
   MEDIA / CONTACT CTA STRIP
═══════════════════════════════════════════════════════════ */

.press-cta-strip {
  max-width: 980px; /* tracks .press-list */
  margin: 56px auto 0;
  padding: 22px 28px;
  background: var(--color-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.press-cta-strip a {
  color: var(--color-green-dark);
  font-weight: 600;
  text-decoration: none;
}

.press-cta-strip a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

/* Below this the 190px year column costs more than it earns, so the year
   becomes a normal heading above its cards and the rail moves in tight. */
@media (max-width: 900px) {
  .press-era {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-left: 34px;
    padding-bottom: 36px;
  }

  .press-era-head {
    position: static;
    gap: 14px;
    margin-left: -34px;
  }

  .press-era-year {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .press-hero {
    padding: 64px 0 56px;
  }

  .press-section {
    padding: 56px 0 72px;
  }

  .press-card {
    flex-direction: column;
    gap: 12px;
    padding: 20px 18px;
  }

  .press-date {
    margin-top: 0;
  }
}
