/* News: list rows (homepage #news, /news/) and article pages (/news/<slug>.html).
   Loaded after main-*.css. Markup is generated by tools/news/build-news.mjs. */

/* ---- Banner: page header on /news/ and article pages ----
   Photo on the left, title panel on the right; sits below the solid (fixed) header. */
.news-banner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  margin-top: var(--header-height);
  background-color: var(--color-white);
}
.news-banner-media {
  position: relative;
  min-height: clamp(320px, 28vw, 480px);
  overflow: hidden;
}
.news-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 40%;
}
.news-banner-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) clamp(32px, 5vw, 96px);
}
.news-banner-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-secondary);
}
.news-banner-eyebrow::before {
  content: "";
  flex: none;
  width: 32px;
  height: 2px;
  background-color: var(--color-accent);
}
.news-banner-title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2.75rem, 4.6vw, 4.5rem);
  font-weight: var(--font-weight-light);
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--color-accent);
}
.news-banner-lead {
  max-width: 30em;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--color-secondary);
}
.news-banner + .content-section { padding-top: var(--space-2xl); }
/* Article pages have no banner: start the content just below the fixed header */
.news-detail-section { padding-top: calc(var(--header-height) + var(--space-2xl)); }

/* ---- List rows: headline is the link, stretched over the whole row ---- */
.news-row {
  position: relative;
  display: block;
  padding: var(--space-lg) 0;
  transition: opacity var(--transition-fast);
}
.news-row:first-child { padding-top: 24px; }
.news-row:hover { opacity: .6; }

.news-row .news-meta,
.news-detail-head .news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.news-row .news-date,
.news-detail-head .news-date { min-width: 0; }

.news-row .news-title {
  font-size: clamp(.9375rem, 1.1vw, 1.0625rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.7;
  letter-spacing: .01em;
  color: var(--color-primary);
}
.news-row-link { color: inherit; }
.news-row-link:hover { opacity: 1; }
.news-row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.news-row-link:focus { outline: none; }
.news-row-link:focus-visible::after {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.news-preview {
  margin-top: 8px;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-secondary);
}

/* All News listing */
.news-index {
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--color-light-gray);
}
.news-index .news-row:first-child { padding-top: var(--space-lg); }

/* Rows with a thumbnail (All News listing) */
.news-row-thumb {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
}
.news-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-light-gray);
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.news-row-thumb:hover { opacity: 1; }
.news-row-thumb:hover .news-thumb img { transform: scale(1.04); }
.news-row-thumb:hover .news-row-body { opacity: .6; }
.news-row-body { transition: opacity var(--transition-fast); }

/* ---- Article page ---- */
.news-detail-head {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-light-gray);
}
.news-detail-head .news-meta { margin-bottom: var(--space-md); }
.news-detail-head .news-detail-title {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: var(--font-weight-light);
  line-height: 1.5;
  letter-spacing: .01em;
}
.news-detail-added {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-dark-gray);
}

.news-detail-content h2 {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
  letter-spacing: .01em;
}
.news-detail-content a,
.news-refs a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.news-detail-content a:hover,
.news-refs a:hover { color: var(--color-accent); opacity: 1; }

.news-note {
  margin-top: var(--space-xl);
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-light-gray);
  font-size: var(--text-sm);
  color: var(--color-dark-gray);
}

.news-refs {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-light-gray);
}
.news-refs-title {
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: .02em;
}
.news-refs-list {
  list-style: decimal;
  padding-left: 1.5em;
}
.news-refs-list li {
  margin-bottom: .75em;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-secondary);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .news-row-thumb { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-md); }
}

@media (max-width: 768px) {
  .news-banner { grid-template-columns: minmax(0, 1fr); }
  .news-banner-media { min-height: 0; aspect-ratio: 16 / 9; }
  .news-banner-image { object-position: 70% 40%; }
  .news-banner-text { padding: var(--space-lg) var(--space-md) var(--space-xl); }
  .news-banner-title { font-size: 2.5rem; margin-bottom: var(--space-sm); }
  .news-banner-lead { font-size: var(--text-sm); }
  .news-banner + .content-section { padding-top: var(--space-lg); }
  .news-detail-section { padding-top: calc(var(--header-height) + var(--space-lg)); }
}

@media (max-width: 576px) {
  .news-row { padding: var(--space-md) 0; }
  .news-row-thumb { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
  .news-index .news-row:first-child { padding-top: var(--space-md); }
  .news-detail-head { margin-bottom: var(--space-xl); }
}
