/* ============================================================
   press.css
   Page-specific styles for the /press/ index page.

   REQUIRES theme.css to be loaded FIRST.
   ============================================================ */

/* Hero rules are shared — see theme.css for .hero / .hero h1 / .hero::before. */

/* ── Layout (sticky year nav + content) ──────────────────── */
.press-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  min-height: 60vh;
}
@media (max-width: 991px) { .press-layout { grid-template-columns: 1fr; } }

/* ── Year nav ────────────────────────────────────────────── */
.year-nav {
  position: sticky;
  top: 92px;
  height: calc(100vh - 92px);
  padding: 40px 0 40px 40px;
  overflow-y: auto;
  border-right: 1px solid var(--color-neutral-30);
  /* Hide scrollbar — content still scrolls, just no visible bar */
  scrollbar-width: none;          /* Firefox */
}
.year-nav::-webkit-scrollbar { display: none; } /* Chrome / Safari / Edge */
.year-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  color: var(--color-neutral-60);
  padding: 8px 20px 8px 0;
  transition: all .25s;
  border-right: 2px solid transparent;
  margin-right: -1px;
}
.year-nav a:hover { color: var(--color-neutral-100); }
.year-nav a.active {
  color: var(--color-accent);
  font-weight: 700;
  border-right-color: var(--color-accent);
}
.year-nav a .yr-count {
  font-weight: 400; font-size: 12px; color: var(--color-neutral-60);
  margin-left: 4px;
}
.year-nav a.active .yr-count { color: var(--color-accent-light); }
.year-nav a.hidden { display: none; }
@media (max-width: 991px) {
  .year-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    height: auto;
    padding: 10px 20px;
    border-right: none;
    border-top: 1px solid var(--color-neutral-30);
    display: flex; gap: 6px;
    overflow-x: auto;
    z-index: 30;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
  }
  .press-content { padding-bottom: 100px; }
  .year-nav a {
    white-space: nowrap;
    padding: 6px 14px;
    border-right: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    flex-shrink: 0;
  }
  .year-nav a.active { border-bottom-color: var(--color-accent); border-right-color: transparent; }
}

/* ── Press content ───────────────────────────────────────── */
/* Right padding matches the .container gutter (40px) so the
   rightmost column doesn't touch the viewport edge on desktop. */
.press-content { padding: 40px 40px 80px 48px; }
@media (max-width: 991px) { .press-content { padding: 32px 20px 60px; } }

.year-section { margin-bottom: 72px; scroll-margin-top: 120px; }
.year-section:last-child { margin-bottom: 20px; }
.year-section.empty { display: none; }
.year-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 44px; line-height: 1;
  color: var(--color-neutral-100);
  margin-bottom: 28px;
  letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: 14px;
}
.year-title .yr-count {
  font-family: var(--font-display); font-weight: 400; font-size: 16px;
  color: var(--color-neutral-60); letter-spacing: 0;
}
@media (max-width: 767px) { .year-title { font-size: 32px; } }

/* ── Press items ─────────────────────────────────────────── */
/* Adaptive column count. Min 420px per item keeps 2 cols on a typical
   MacBook (matching the previous layout) but opens up to 3 cols around
   1680px+ and 5 cols on 4K. Below 991px we collapse to a single column
   since 420px doesn't fit alongside the year-nav at that viewport. */
.press-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 32px; row-gap: 0; }

.press-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--color-neutral-30);
  transition: background .25s ease, padding-left .3s ease;
}
.press-item:last-child { border-bottom: 1px solid var(--color-neutral-30); }
.press-item.is-linked { cursor: pointer; }
.press-item.is-linked:hover {
  padding-left: 12px;
  background: linear-gradient(90deg, var(--color-neutral-20) 0%, transparent 80%);
}
.press-item.is-linked:hover .press-title { color: var(--color-accent); }
.press-item.hidden { display: none; }
.press-arrow { display: none !important; }
@media (max-width: 991px) {
  .press-list { grid-template-columns: 1fr; column-gap: 0; }
}

.press-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .25s;
}
.press-icon svg { width: 18px; height: 18px; }
.press-icon.news  { background: var(--color-neutral-20); color: var(--color-neutral-80); }
.press-icon.award {
  background: linear-gradient(135deg, rgba(0,215,238,.18), rgba(97,0,255,.18));
  color: var(--color-accent);
}
.press-icon.video { background: var(--color-neutral-100); color: #fff; }
.press-item.is-linked:hover .press-icon.news { background: var(--color-neutral-30); }

.press-body { min-width: 0; }
.press-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 17px; line-height: 1.35;
  color: var(--color-neutral-100);
  transition: color .25s;
  margin-bottom: 6px;
}
.press-outlet {
  font-family: var(--font-text); font-size: 14px;
  color: var(--color-neutral-70);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.press-type-tag {
  font-family: var(--font-display); font-weight: 700;
  font-size: 10px; letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius-sm);
  background: var(--color-neutral-20);
  color: var(--color-neutral-80);
}
.press-type-tag.award {
  background: rgba(97,0,255,.08);
  color: var(--color-accent);
}
.press-type-tag.video {
  background: var(--color-neutral-100);
  color: #fff;
}

.press-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: var(--color-neutral-60);
  opacity: .5;
  transition: all .3s ease;
  flex-shrink: 0;
  margin-top: 4px;
}
.press-item:not(.is-linked) .press-arrow { display: none; }

@media (max-width: 767px) {
  .press-list { grid-template-columns: 1fr; column-gap: 0; }
  .press-item {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 18px 0;
  }
  .press-icon { width: 36px; height: 36px; }
  .press-icon svg { width: 15px; height: 15px; }
  .press-title { font-size: 15px; }
  .press-outlet { font-size: 13px; }
  .press-item.is-linked:hover { padding-left: 0; }
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: var(--color-neutral-70);
}
.empty-state h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px;
  color: var(--color-neutral-100);
  margin-bottom: 8px;
}
.empty-state p { font-size: 15px; }
.empty-state.hidden { display: none; }

/* ── YouTube lazy embed (video press items) ──────────────── */
.press-item.is-video-embed {
  /* Override the 3-column grid: drop the arrow, body becomes wider */
  grid-template-columns: 48px 1fr;
}
.press-item.is-video-embed .press-arrow { display: none; }

.yt-embed {
  margin-top: 14px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  position: relative;
}
.yt-embed.playing { background: #000; }

.yt-play {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  aspect-ratio: 16 / 9;
}
.yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .25s ease;
}
.yt-play:hover .yt-thumb { filter: brightness(.7); }

.yt-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.yt-play-icon svg {
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.4));
  opacity: .92;
  transition: transform .25s ease, opacity .25s ease;
}
.yt-play:hover .yt-play-icon svg {
  transform: scale(1.08);
  opacity: 1;
}

.yt-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

@media (max-width: 767px) {
  .press-item.is-video-embed { grid-template-columns: 36px 1fr; }
}


/* ── Related-project chips on press items ─────────────────
   Clickable links to the project detail page, rendered on press
   cards where the press entry's `projects[]` array is populated
   (auto-scraped from the legacy WP pages by fetch-project-press.mjs).

   Text-color and background stay subtle by default so the chip
   reads as metadata, not a CTA. A soft accent on hover makes
   clickability discoverable without screaming. `text-decoration:
   none` because <a> defaults would underline. */
.press-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.press-project-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--color-neutral-80);
  background: var(--color-neutral-20);
  border: 1px solid var(--color-neutral-30);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .25s, border-color .25s, color .25s;
}
.press-project-chip:hover {
  background: var(--color-neutral-30);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
/* When the whole card is clickable (no chips case → outer is <a>),
   a hovered card still gives a subtle cue on the chips even though
   they aren't individually links here. Preserved for visual parity. */
.press-item:hover .press-project-chip {
  background: var(--color-neutral-30);
}