/* =====================================================================
   News — page styles (after css/base.css).
   Sections: banner entrance · latest coverage (ScrollMagic: cards rise
   in turn, clippings drift in their frames) · by publication (logo
   tiles on the Home grid; ScrollMagic drifts the rail) · archive (the
   Home "Solaris in the news" press index, with filters).
   Motion is driven by js/news.js; every rule here is a resting state
   that reads fine without JS / with reduced motion.
   ===================================================================== */

/* ---------- banner: the title rises from a mask, the photo settles ---------- */
.hero__ln {
  display: block;
  overflow: hidden;
  /* room for descenders and the italic overhang */
  padding: 0 0.12em 0.1em 0;
  margin-bottom: -0.1em;
}

.hero__ln > span {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__img {
    animation: nwSettle 2.6s var(--ease) both;
  }

  .hero .crumbs {
    animation: nwRise 0.9s var(--ease) 0.15s both;
  }

  .hero__ln > span {
    animation: nwLine 1.2s var(--ease) 0.3s both;
  }

  .hero__sub {
    animation: nwRise 1s var(--ease) 0.7s both;
  }
}

@keyframes nwSettle {
  from {
    scale: 1.12;
  }
  to {
    scale: 1;
  }
}

@keyframes nwRise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nwLine {
  from {
    transform: translate3d(0, 110%, 0);
  }
  to {
    transform: none;
  }
}

/* ---------- latest coverage ---------- */
.nlatest {
  background: #FFFFFF;
}

.nlatest__head {
  align-items: flex-end;
}

/* beside the heading: a short line and a link down to the archive */
.nlatest__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 360px;
}

.nlatest__aside p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

.nlatest__more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.nlatest__more span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.45s var(--ease);
}

.nlatest__more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nlatest__more:hover {
  color: var(--accent);
}

.nlatest__more:hover span {
  border-color: var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  transform: translateY(3px);
}

.nlatest__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* a lead story: the clipping on a mat, then publication, date, headline */
.nfeat {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(36, 26, 18, 0.07);
  border-radius: 22px;
  background: var(--bg-card);
  transition: border-color 0.4s ease, box-shadow 0.5s ease;
}

.nfeat:hover {
  border-color: rgba(241, 89, 34, 0.35);
  box-shadow: 0 30px 56px -36px rgba(90, 45, 20, 0.5);
}

.nfeat__media {
  position: relative;
  display: block;
  margin: 12px 12px 0;
  aspect-ratio: 296 / 211;
  overflow: hidden;
  border-radius: 14px;
  background: #EFE6DA;
}

/* no oversize/drift here (unlike a photo, cropping any of a press
   clipping risks cutting off the publication's own masthead) - these
   thumbnails are pre-cropped by the news team to this exact 296:211
   frame already, so object-fit: cover has nothing to crop at rest;
   the drift (--drift, news.js) is left unused for this reason */
.nfeat__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.9s var(--ease);
}

.nfeat:hover .nfeat__media img {
  scale: 1.05;
}

.nfeat__kind {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.nfeat__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.nfeat__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.nfeat__meta b {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.nfeat__title {
  flex: 1;
  padding-right: 40px;
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.32;
  color: var(--ink);
}

.nfeat__proj {
  font-size: 12px;
  color: var(--text-muted);
}

.nfeat__go,
.nrow__go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.45s var(--ease);
}

.nfeat__go {
  position: absolute;
  right: 20px;
  bottom: 22px;
}

.nfeat__go svg,
.nrow__go svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nfeat:hover .nfeat__go,
.nrow__link:hover .nrow__go {
  border-color: var(--accent);
  background: var(--accent);
  color: #FFFFFF;
}

/* the play icon is filled, not stroked */
.nfeat__go svg path[d^="M8 5.5"],
.nrow__go svg path[d^="M8 5.5"] {
  fill: currentColor;
  stroke: none;
}

/* ---------- by publication ---------- */
.npubs {
  --cell: 64px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 8vw, 104px) 0;
  background:
    radial-gradient(ellipse 60% 80% at 92% 0%, rgba(214, 181, 128, 0.26), transparent 70%),
    radial-gradient(ellipse 55% 80% at 0% 100%, rgba(214, 181, 128, 0.18), transparent 70%),
    linear-gradient(180deg, #F4ECDF 0%, #FBF8F2 50%, #F6EFE4 100%);
}

/* the Home "values" grid: fine orange lines with lights running along them */
.npubs__field {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(241, 89, 34, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 89, 34, 0.09) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 25%, transparent 82%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 25%, transparent 82%);
  pointer-events: none;
}

.npubs__pulse {
  position: absolute;
  box-shadow: 0 0 8px 1px rgba(241, 89, 34, 0.35);
  animation: var(--dur, 12s) linear var(--delay, 0s) infinite;
  will-change: transform;
}

.npubs__pulse--h {
  top: calc(var(--row) * var(--cell));
  left: 0;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 89, 34, 0), rgba(241, 89, 34, 0.95), rgba(241, 89, 34, 0));
  animation-name: nwPulseX;
}

.npubs__pulse--v {
  top: 0;
  left: calc(var(--col) * var(--cell));
  width: 1px;
  height: 180px;
  background: linear-gradient(180deg, rgba(241, 89, 34, 0), rgba(241, 89, 34, 0.95), rgba(241, 89, 34, 0));
  animation-name: nwPulseY;
}

.npubs.is-offscreen .npubs__pulse {
  animation-play-state: paused;
}

@keyframes nwPulseX {
  from {
    transform: translateX(-200px);
  }
  to {
    transform: translateX(100vw);
  }
}

@keyframes nwPulseY {
  from {
    transform: translateY(-200px);
  }
  to {
    transform: translateY(600px);
  }
}

.npubs__title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  color: var(--ink);
}

.npubs__title em {
  font-style: italic;
  color: var(--accent);
}

/* phones: the rail swipes; wide screens: it drifts with the scroll */
.npubs__viewport {
  margin-top: clamp(32px, 4vw, 48px);
  overflow-x: auto;
  scrollbar-width: none;
}

.npubs__viewport::-webkit-scrollbar {
  display: none;
}

.npubs__rail {
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  display: flex;
  gap: 14px;
  width: max-content;
  padding: 6px var(--edge) 10px;
  transform: translate3d(calc(var(--x, 0) * -1px), 0, 0);
  will-change: transform;
}

.npubs.is-drift .npubs__viewport {
  overflow: visible;
}

.npub {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 172px;
  height: 120px;
  border: 1px solid rgba(36, 26, 18, 0.08);
  border-radius: 18px;
  background: #FFFFFF;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.35s ease, box-shadow 0.45s ease, transform 0.5s var(--ease);
}

.npub:hover {
  border-color: rgba(241, 89, 34, 0.35);
  box-shadow: 0 22px 40px -28px rgba(90, 45, 20, 0.5);
  transform: translateY(-4px);
}

.npub[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 22px 40px -28px rgba(90, 45, 20, 0.5);
}

.npub__logo {
  display: grid;
  place-items: center;
  height: 52px;
}

.npub__logo img {
  max-width: 136px;
  max-height: 50px;
  object-fit: contain;
}

.npub__count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.npub[aria-pressed="true"] .npub__count {
  color: var(--accent);
}

/* ---------- archive ---------- */
/* the filter bar: one white panel — project tabs on top (orange underline
   on the active one), search + year below */
.ntools {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(36, 26, 18, 0.08);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 24px 50px -40px rgba(90, 45, 20, 0.45);
}

.ntabs {
  display: flex;
  gap: 4px;
  padding: 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.ntabs::-webkit-scrollbar {
  display: none;
}

.ntab {
  position: relative;
  flex: none;
  padding: 20px 14px 18px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.ntab sup {
  margin-left: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  vertical-align: 0.5em;
  color: var(--accent);
  opacity: 0.75;
}

.ntab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}

.ntab:hover {
  color: var(--ink);
}

.ntab.is-active {
  color: var(--ink);
}

.ntab.is-active::after {
  transform: scaleX(1);
}

.ntools__row {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(244, 236, 223, 0.35), rgba(255, 255, 255, 0));
}

.ntools__search {
  position: relative;
  display: block;
  flex: 1;
}

.ntools__search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 17px;
  height: 17px;
  margin-top: -8.5px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.ntools__search input,
.ntools__year select {
  height: 48px;
  border: 1px solid rgba(36, 26, 18, 0.1);
  border-radius: 14px;
  background: var(--bg);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.ntools__search input {
  width: 100%;
  padding: 0 18px 0 48px;
}

.ntools__search input::placeholder {
  color: rgba(59, 42, 30, 0.5);
}

.ntools__year {
  position: relative;
  display: block;
  flex: none;
}

.ntools__year select {
  min-width: 170px;
  padding: 0 46px 0 18px;
  appearance: none;
  -webkit-appearance: none;
  font-weight: 600;
  cursor: pointer;
}

.ntools__year svg {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ntools__search input:hover,
.ntools__year select:hover {
  border-color: rgba(241, 89, 34, 0.3);
}

.ntools__search input:focus,
.ntools__year select:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(241, 89, 34, 0.1);
}

.nstate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 14px;
}

.ncount {
  font-size: 13px;
  color: var(--text-muted);
}

/* the chosen publication, with a clear button */
.nstate__pub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(241, 89, 34, 0.08);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.nstate__pub b {
  font-size: 15px;
  line-height: 1;
}

.nstate__pub[hidden] {
  display: none;
}

/* a story: date | clipping | headline + publication + projects | type | arrow */
.nlist {
  border-top: 1px solid var(--line);
  list-style: none;
}

.nrow {
  border-bottom: 1px solid var(--line);
}

.nrow.is-hidden {
  display: none;
}

.nrow__link {
  display: grid;
  grid-template-columns: 84px 148px minmax(0, 1fr) auto 40px;
  gap: 24px;
  align-items: center;
  padding: 20px 12px;
  transition: background 0.4s ease;
}

.nrow__link:hover {
  background: rgba(241, 89, 34, 0.04);
}

.nrow__date b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
}

.nrow__date span {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nrow__thumb {
  display: block;
  aspect-ratio: 296 / 211;
  overflow: hidden;
  border-radius: 10px;
  background: #EFE6DA;
  box-shadow: 0 10px 22px -16px rgba(90, 45, 20, 0.5);
}

.nrow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.nrow__link:hover .nrow__thumb img {
  transform: scale(1.06);
}

.nrow__txt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.nrow__title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.32;
  color: var(--ink);
}

.nrow__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 12px;
}

.nrow__meta b {
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nrow__meta i {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(36, 26, 18, 0.05);
  font-style: normal;
  color: var(--text-muted);
}

.nrow__kind {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

.nempty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

.nmore {
  margin-top: 36px;
  text-align: center;
}

.nmore[hidden] {
  display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .nlatest__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nlatest__grid .nfeat:last-child {
    display: none;
  }

  .nrow__link {
    grid-template-columns: 72px 132px minmax(0, 1fr) 40px;
  }

  .nrow__kind {
    display: none;
  }
}

@media (max-width: 760px) {
  .nlatest__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nlatest__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nlatest__grid .nfeat:last-child {
    display: flex;
  }

  /* the date moves above the headline, beside the clipping */
  .nrow__link {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas: "thumb date" "thumb txt";
    gap: 6px 16px;
    align-items: start;
    padding: 18px 4px;
  }

  .nrow__thumb {
    grid-area: thumb;
  }

  .nrow__date {
    grid-area: date;
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .nrow__date b,
  .nrow__date span {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .nrow__txt {
    grid-area: txt;
  }

  .nrow__title {
    font-size: 17px;
  }

  .nrow__go {
    display: none;
  }

  .npub {
    width: 168px;
    height: 116px;
  }
}

@media (max-width: 600px) {
  .ntools__row {
    flex-direction: column;
  }

  .ntools__year select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .npubs__pulse {
    display: none;
  }

  .nfeat__media img,
  .nrow__thumb img,
  .npub {
    transition: none;
  }
}
