/* /news listing page styles. Mirrors imaginando-3-0/project/Imaginando
   Media.html with the `media-*` selectors renamed to `news-*` and lined up
   with the existing / token system. Shared bits (.filterbar, .nl etc.)
   stay in style.css; this sheet only holds news-specific blocks. */

/* ---------- Compact page header (overrides the default huge .page-head) */

.page-head.news-head {
  padding: 36px 0 28px;
}
.page-head.news-head .crumbs {
  margin-bottom: 18px;
}
.page-head.news-head h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.page-head.news-head .head-grid {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.page-head.news-head .head-grid .lede {
  margin: 12px 0 0;
  max-width: 38ch;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}
/* ---------- Filter bar search input ---------- */

/* The form wrapper just inherits layout from the filterbar row — no
   visual treatment. Hidden `category` input doesn't affect layout. */
.filterbar .search-form { display: flex; }
.filterbar .search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0.5px solid var(--line);
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--fg-dim);
  min-width: 240px;
  font-family: var(--mono);
}
.filterbar .search:focus-within {
  border-color: var(--line-strong);
  color: var(--fg);
}
.filterbar .search svg { flex: none; opacity: 0.6; }
.filterbar .search input {
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  width: 100%;
}

/* ---------- Featured strip ---------- */

.news-page .featured-section { padding: 48px 0 24px; }
.featured {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}
@media (max-width: 1000px) {
  .featured { grid-template-columns: 1fr; }
}

.feat-card {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.3s ease;
}
.feat-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
/* Featured card images are 16:9, same as feed cards — the bigger column
   (1.6fr) just makes the big card's image taller in absolute terms while
   keeping the aspect identical. No min-height anywhere; the body sits
   underneath at its natural height. */
.feat-card .vis {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.feat-card .vis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feat-card .body {
  padding: 28px 28px 30px;
  border-top: 0.5px solid var(--line);
  position: relative;
  z-index: 1;
}
.feat-card .topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.feat-card .topline .badge-prod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
}
.feat-card .topline .pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.feat-card.big h2,
.feat-card.tall h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.feat-card.big h2 em,
.feat-card.tall h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.feat-card .lede {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 60ch;
  text-wrap: pretty;
}
.feat-card .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  gap: 14px;
}
.feat-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-size: 13.5px;
}
.feat-card .read-more::after {
  content: "→";
  font-family: var(--mono);
  transition: transform 0.25s ease;
}
.feat-card:hover .read-more::after { transform: translateX(4px); }

.feat-card .corner-r {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #f4f1ea;
  opacity: 0.7;
  text-transform: uppercase;
}

/* ---------- Feed grid ---------- */

.news-page .feed-section { padding: 48px 0 80px; }
.news-page .sec-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
}
.news-page .sec-head h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
}
.news-page .sec-head h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.news-page .sec-head .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  text-transform: uppercase;
  text-align: right;
}

.feed {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.feed .card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  transition: opacity 0.45s ease, transform 0.3s linear, border-color 0.25s ease, scale 0.3s;
  text-decoration: none;
  color: inherit;
  scale: 1;
}
.feed .card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  scale: 1.02;
}
.feed .card[hidden] { display: none !important; }
.feed .card .vis {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
}
.feed .card .vis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.feed .card .corner-r {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(244, 241, 234, 0.78);
  text-transform: uppercase;
}
.feed .card .body {
  padding: 18px 20px 20px;
  border-top: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.feed .card .topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  text-transform: uppercase;
}
.feed .card .topline .prod {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-dim);
}
.feed .card .topline .prod .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.feed .card h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18.5px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.feed .card h4 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.feed .card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.5;
  text-wrap: pretty;
  flex: 1;
}
.feed .card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.feed .card .row .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--fg);
}
.feed .card .row .read::after {
  content: "→";
  font-family: var(--mono);
  transition: transform 0.25s ease;
  font-size: 13px;
}
.feed .card:hover .row .read::after { transform: translateX(4px); }
.feed .card .row .when {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-faint);
  letter-spacing: 0.05em;
}

@media (max-width: 1100px) {
  .feed .card { grid-column: span 6; }
}
@media (max-width: 680px) {
  .feed .card { grid-column: span 12; }

  /* Pagination: stack the three rows and let the number pills wrap +
     shrink so the row never overflows a narrow viewport. */
  .pagination {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .pagination .pages {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
  }
  .pagination .pages a,
  .pagination .pages span {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }
}

/* ---------- Empty state ---------- */

.feed-section .empty {
  padding: 64px 24px;
  text-align: center;
  border: 0.5px dashed var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.feed-section .empty p {
  margin: 0;
  color: var(--fg-dim);
  max-width: 56ch;
}
.feed-section .empty .empty-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.feed-section .empty .empty-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.feed-section .empty .empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* The sec-head h3 already supports inline `<em>`; the searching variant
   uses serif italics for the query string, matching headlines elsewhere. */
.news-page .sec-head h3 em {
  color: var(--accent);
}

/* ---------- Pagination ---------- */

.pagination {
  position: relative;
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 36px 0;
}
/* Hairlines bleed past the .wrap to the viewport edges so they read as a
   full-width divider, while the labels stay inside the wrap's max-width.
   body has `overflow-x: hidden` so the 100vw pseudo can't cause a
   horizontal scrollbar. */
.pagination::before,
.pagination::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  height: 0;
  margin-left: -50vw;
  border-top: 0.5px solid var(--line);
  pointer-events: none;
}
.pagination::before { top: 0; }
.pagination::after { bottom: 0; }
.pagination .pages {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pagination .pages a,
.pagination .pages span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid var(--line);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pagination .pages a:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}
.pagination .pages .on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.pagination .pages .gap {
  border-color: transparent;
  color: var(--fg-faint);
}
.pagination .pages .disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pagination .summary {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  text-transform: uppercase;
}
