/* News archive — typographic list + hover image rails */

.page-news {
  background: var(--color-bg);
  color: var(--color-text);
}

.news-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--internal-page-top) clamp(1.25rem, 4vw, 4rem) 0;
}

.news-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.8rem, 5vw, 4.5rem);
  align-items: end;
  min-height: min(28vh, 260px);
  border-bottom: 1px solid rgba(10, 10, 10, 0.12);
  padding-bottom: clamp(2rem, 5vh, 3.4rem);
}

.news-kicker,
.news-title,
.news-intro,
.news-list,
.news-list * {
  text-transform: uppercase;
}

.news-kicker {
  font-size: var(--type-xs);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-normal);
  color: rgba(10, 10, 10, 0.54);
}

.news-title {
  max-width: 12ch;
  margin-top: clamp(0.7rem, 1.8vh, 1.2rem);
  font-size: clamp(2rem, 5.6vw, 3.8rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: var(--tracking-tight);
}

.news-intro {
  max-width: 52ch;
  font-size: var(--type-base);
  line-height: 1.7;
  letter-spacing: var(--tracking-normal);
  color: rgba(10, 10, 10, 0.68);
}

.news-editorial {
  display: block;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-top: clamp(2.2rem, 5vh, 4rem);
  padding-bottom: calc(var(--base-space) * 10);
}

.news-article-list {
  width: 100%;
  min-width: 0;
}

.news-article-item {
  position: relative;
  overflow: hidden;
  transition: opacity 0.35s var(--transition-timing);
}

.news-editorial.has-active-rail .news-article-item:not(.is-active),
.news-article-list:hover .news-article-item:not(:hover):not(.is-active) {
  opacity: 0.42;
}

.page-news a.news-article-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.38rem;
  align-items: center;
  min-height: 0;
  min-width: 0;
  padding: clamp(0.95rem, 2.2vh, 1.45rem) 0 0.85rem;
  overflow: hidden;
}

.page-news .news-article-title.ap-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 100%;
  min-width: 0;
  line-height: 0.95;
  max-height: calc(2 * 0.95em);
  padding: 0;
  padding-bottom: 0;
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 2.15rem);
  transform: none;
  contain: paint;
}

.page-news .news-article-item.is-active .news-article-title.ap-name,
.page-news a.news-article-link:hover .news-article-title.ap-name {
  transform: none;
}

.page-news .news-article-meta.ap-info {
  opacity: 1;
  transform: none;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.page-news .news-image-rail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transition:
    max-height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-news .news-article-item:hover > .news-image-rail,
.page-news .news-article-item:focus-within > .news-image-rail,
.page-news .news-article-item.is-active > .news-image-rail,
.page-news .news-image-rail.is-active {
  max-height: 13.5rem;
  opacity: 1;
  margin: 0 0 1.1rem;
  pointer-events: auto;
}

.page-news .news-image-rail:focus-visible {
  outline: 1px solid rgba(10, 10, 10, 0.45);
  outline-offset: -1px;
}

.page-news .news-image-rail.is-dragging {
  cursor: grabbing;
}

.page-news .news-image-rail__track {
  display: flex;
  gap: clamp(0.65rem, 1.3vw, 1rem);
  height: clamp(8.4rem, 16vw, 13.5rem);
  width: max-content;
  will-change: transform;
}

.page-news .news-rail__figure {
  flex: 0 0 auto;
  width: clamp(13.8rem, 28vw, 22.5rem);
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #ebe7df;
}

.page-news .news-hover-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: var(--object-position, 50% 50%);
  filter: saturate(0.92) contrast(0.98);
  pointer-events: none;
}

@media (max-width: 700px) {
  .news-main {
    padding-top: var(--internal-page-top-mobile);
    padding-bottom: 0;
  }

  .news-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .news-editorial {
    padding-bottom: calc(var(--base-space) * 8);
  }

  .page-news .news-article-meta.ap-info {
    white-space: normal;
  }

  .page-news .news-image-rail__track {
    height: 10.2rem;
  }

  .page-news .news-article-item:hover > .news-image-rail,
  .page-news .news-article-item:focus-within > .news-image-rail,
  .page-news .news-article-item.is-active > .news-image-rail,
  .page-news .news-image-rail.is-active {
    max-height: 10.2rem;
  }

  .page-news .news-rail__figure {
    width: clamp(12.5rem, 68vw, 18.5rem);
  }
}

@media (hover: none) {
  .page-news .news-article-item.is-active > .news-image-rail,
  .page-news .news-image-rail.is-active {
    max-height: 10.2rem;
    opacity: 1;
    margin: 0 0 1rem;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-news .news-image-rail,
  .page-news .news-article-item,
  .page-news .news-image-rail__track,
  .page-news .news-article-title.ap-name {
    transition: none;
  }

  .page-news .news-article-item.is-active .news-article-title.ap-name,
  .page-news a.news-article-link:hover .news-article-title.ap-name {
    transform: none;
  }
}
