/* ============================================================
   news.css. News & Insights page chrome.
   Layered on top of design-system.css + site.css. Reuses the
   locked tokens (--fyv-gradient, --surface, --border, --text,
   --text-sec, --fyv-teal) so it inherits the white-dominant
   variant with no new design language. Scoped to .news-* only,
   so no other page is affected.
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.news-hero {
  padding: 88px 0 0;
  position: relative;
}
.news-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.news-hero .eyebrow::before {
  content: '';
  width: 26px; height: 2px;
  background: var(--fyv-gradient);
  border-radius: 1px;
}
.news-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 16px;
  max-width: 20ch;
  text-wrap: balance;
}
.news-hero h1 .grad {
  background: var(--fyv-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}
.news-hero .news-sub {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.55;
  color: var(--text-body);
  max-width: 54ch;
  margin: 0;
}

/* Hairline brand band closing the hero */
.news-band {
  margin: 56px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.news-band .lead {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--text);
}
.news-band .lead em {
  font-style: italic;
  background: var(--fyv-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.news-band .stamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-sec);
}

/* ── Filter bar ───────────────────────────────────────────── */
.news-controls {
  position: sticky;
  top: var(--news-nav-h, 61px);
  z-index: 20;
  margin: 0 0 8px;
  padding: 20px 0 16px;
  background: linear-gradient(var(--bg) 72%, transparent);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.news-filter {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sec);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.news-filter:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface);
}
.news-filter[aria-pressed="true"] {
  color: #fff;
  border-color: transparent;
  background: var(--fyv-gradient);
}
.news-filter:focus-visible {
  outline: 2px solid var(--fyv-teal);
  outline-offset: 2px;
}
.news-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-sec);
}

/* ── Card grid ────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 8px 0 16px;
}
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 26px 22px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--fyv-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.news-card:hover {
  background: var(--raised);
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.news-card:hover::before { opacity: 0.9; }

.news-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.news-card .type-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pill-text);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 4px 10px;
}
.news-card .type-pill .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--fyv-teal);
}
/* Marks the most recent item within its category (Company News / Report /
   Industry Intel), one per type, computed against the full unfiltered list.
   A soft breathing ring on the existing brand dot, not a hard blink. */
.news-card .type-pill .dot.is-latest {
  animation: news-dot-live 2.2s ease-in-out infinite;
}
@keyframes news-dot-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(34, 211, 238, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .news-card .type-pill .dot.is-latest {
    animation: none;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3);
  }
}
.news-card .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-sec);
  white-space: nowrap;
}
.news-card h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
.news-card .summary {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
  flex: 1;
}
.news-card .read {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.news-card .read .src {
  color: var(--text-sec);
  font-weight: 400;
  font-size: 0.82rem;
}
.news-card .read .arrow {
  background: var(--fyv-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.2s ease;
}
.news-card:hover .read .arrow { transform: translateX(3px); }

/* ── Empty state ──────────────────────────────────────────── */
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-sec);
}
.news-empty .big {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 8px;
}

/* ── Newsletter band ──────────────────────────────────────── */
.news-signup {
  margin: 36px 0 8px;
  padding: 36px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 44px;
  align-items: center;
}
.news-signup::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--fyv-gradient);
}
.news-signup .copy h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 12px;
  max-width: 18ch;
}
.news-signup .copy h2 em {
  font-style: italic;
  background: var(--fyv-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.news-signup .copy p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0 0 14px;
  max-width: 48ch;
}
.news-signup .consent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--text-sec);
  max-width: 50ch;
}
.news-signup .form-host {
  min-height: 720px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.news-signup .form-host iframe {
  width: 100%;
  height: 760px;
  border: 0;
  display: block;
}

/* ── Bottom spacing ───────────────────────────────────────── */
.news-page-foot-space { height: 24px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
  .news-hero { padding: 56px 0 0; }
  .news-grid { grid-template-columns: 1fr; }
  .news-signup { grid-template-columns: 1fr; gap: 24px; padding: 28px 26px; }
  .news-controls { top: var(--news-nav-h, 61px); }
}
@media (max-width: 640px) {
  .news-hero h1 { font-size: 2.1rem; }
  .news-controls { gap: 8px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .news-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card::before, .news-card .read .arrow, .news-filter { transition: none; }
  .news-card:hover { transform: none; }
}

/* ── Tokens + utilities (added in polish pass) ────────────── */
:root { --news-nav-h: 61px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* In-progress state for an owned item that is not yet linked */
.news-card .soon {
  align-self: flex-start;
  margin-top: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  background: var(--hairline-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
}

/* ── Loading skeleton ─────────────────────────────────────── */
.news-skel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.news-skel .skel-line {
  height: 12px;
  border-radius: 6px;
  background: var(--raised);
  animation: news-shimmer 1.4s ease-in-out infinite;
}
.news-skel .skel-pill { width: 96px; height: 22px; border-radius: 999px; }
.news-skel .skel-title { width: 85%; height: 20px; }
.news-skel .skel-body { width: 100%; }
.news-skel .skel-body.short { width: 60%; }
@keyframes news-shimmer { 0% { opacity: 0.5; } 50% { opacity: 0.95; } 100% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .news-skel .skel-line { animation: none; } }

/* ── Mobile filter scroll hint ────────────────────────────── */
@media (max-width: 640px) {
  .news-controls { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
}

/* ── Hero two-column + animated waveform ──────────────────── */
.news-hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}
.news-hero-visual {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 12px;
  overflow: hidden;
}
.news-hero-visual::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--fyv-gradient);
}
.news-wave { width: 100%; height: 138px; display: block; cursor: crosshair; }
.news-wave-labels { position: relative; height: 16px; margin-top: 8px; }
.news-wave-labels span {
  position: absolute;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sec);
}

/* ── Card rise-in reveal (replays on filter change) ───────── */
@keyframes news-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-grid .news-card { animation: news-rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) backwards; }

@media (prefers-reduced-motion: reduce) {
  .news-grid .news-card { animation: none; }
}

/* ── Hero responsive ──────────────────────────────────────── */
@media (max-width: 980px) {
  .news-hero-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .news-wave { height: 104px; }
}
