/* ---------------------------------------------------------------- HERO */
.res-hero {
  display: grid;
  min-height: var(--hero-min-height);
  align-items: end;
  padding: var(--hero-padding-top) var(--hero-padding-inline) var(--hero-padding-bottom);
  background: var(--ink);
  color: var(--paper);
  text-align: left;
}

.res-hero-inner {
  width: min(var(--hero-copy-max), 100%);
  margin: 0;
}

.res-breadcrumb {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.res-hero h1 {
  max-width: none;
  font-size: var(--hero-title-size);
  letter-spacing: var(--hero-title-tracking);
  font-weight: 600;
  line-height: 1.08;
  color: var(--paper);
  text-wrap: balance;
}

.res-hero-lede {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--bone);
  font-size: var(--hero-lede-size);
  font-weight: 400;
  line-height: 1.55;
}

.res-hero-contact {
  margin-top: 20px;
  color: var(--ash-inverse);
  font-size: var(--text-body-sm);
}

.res-hero-contact a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.res-hero-contact a:hover,
.res-hero-contact a:focus-visible {
  color: var(--paper);
}

/* ------------------------------------------------------------ SCAFFOLD */
.res-section {
  padding: var(--section-base) var(--gutter);
}

.res-featured-section {
  padding-top: var(--section-generous);
  padding-bottom: var(--space-8);
}

.res-list-section {
  padding-top: var(--space-12);
}

.res-section-inner {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
}

.res-section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.res-section-head h2 {
  font-size: var(--text-h2);
  line-height: 1.15;
}

.res-section-head p {
  margin-top: 12px;
  color: var(--ash);
  font-size: var(--text-body-lg);
  line-height: 1.55;
}

/* Shared meta line: topic, date, reading time. Wraps cleanly because the
   separators are gaps rather than pseudo elements, so a wrapped line never
   starts with an orphaned slash. */
.res-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  font-family: var(--f-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.res-meta-topic {
  color: var(--brass-deep);
}

.res-meta-date,
.res-meta-time {
  color: var(--ash);
  font-weight: 500;
}

.res-meta-updated {
  color: var(--brass-deep);
  font-weight: 600;
}

.res-more {
  display: inline-block;
  color: var(--brass-deep);
  font-family: var(--f-sans);
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.res-more::after {
  content: "\00a0\2192";
  display: inline-block;
  transition: transform var(--motion-fast) var(--ease-out);
}

/* ------------------------------------------------------------ FEATURED */
.res-featured {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: var(--space-12);
}

.res-featured-link {
  display: block;
  color: inherit;
}

.res-featured-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.res-featured-image {
  display: block;
  width: 100%;
  height: clamp(260px, 34vw, 460px);
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.res-featured-body {
  width: min(820px, 100%);
  margin: 32px auto 0;
  text-align: center;
}

.res-featured .res-meta {
  justify-content: center;
}

.res-featured-title {
  margin-top: 16px;
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.16;
}

.res-featured-standfirst {
  margin-top: 16px;
  color: var(--ash);
  font-size: var(--text-body-lg);
  line-height: 1.6;
}

.res-featured-body .res-more {
  margin-top: 20px;
}

.res-featured-link:hover .res-more::after,
.res-featured-link:focus-visible .res-more::after {
  transform: translateX(4px);
}

/* -------------------------------------------------------------- FILTERS */
.res-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.res-list-head h2 {
  font-size: var(--text-h2);
  line-height: 1.15;
}

.res-count {
  color: var(--ash);
  font-family: var(--f-mono);
  font-size: var(--text-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.res-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.res-filter {
  appearance: none;
  min-height: var(--touch-min);
  padding: 0 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--text-body-sm);
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color var(--motion-fast) var(--ease-out),
    background var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out);
}

.res-filter:hover {
  border-color: var(--ink);
}

.res-filter:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.res-filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------- ARTICLE ROWS */
.res-list {
  display: flex;
  flex-direction: column;
}

.res-article {
  border-bottom: 1px solid var(--hairline);
}

.res-article[hidden] {
  display: none;
}

/* The iwoca row proportion, roughly 1fr image to 2fr text. */
.res-article-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: var(--space-12) 0;
  color: inherit;
}

.res-article-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: calc(var(--focus-ring-offset) * -1);
}

.res-article-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bone);
  aspect-ratio: 16 / 9;
}

.res-article-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.res-article-title {
  margin-top: 12px;
  font-size: clamp(21px, 1.9vw, 27px);
  font-weight: 700;
  line-height: 1.22;
}

.res-article-standfirst {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--ash);
  font-size: var(--text-body);
  line-height: 1.6;
}

.res-article-body .res-more {
  margin-top: 16px;
}

.res-article-link:hover .res-more::after,
.res-article-link:focus-visible .res-more::after {
  transform: translateX(4px);
}

.res-empty {
  margin-top: 40px;
  padding: 44px;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius-lg);
  color: var(--ash);
  font-size: var(--text-body-lg);
  text-align: center;
}

.res-empty[hidden] {
  display: none;
}

.res-loadmore {
  margin-top: 44px;
  text-align: center;
}

.res-loadmore[hidden] {
  display: none;
}

/* --------------------------------------------------------------- SECTORS */
.res-sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.res-sector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--hairline-inverse);
  border-radius: var(--radius-lg);
  background: rgba(244, 239, 230, 0.05);
  color: var(--paper);
  transition:
    background var(--motion-base) var(--ease-out),
    border-color var(--motion-base) var(--ease-out);
}

.res-sector:hover,
.res-sector:focus-visible {
  border-color: var(--brass);
  background: rgba(244, 239, 230, 0.11);
}

.res-sector strong {
  font-size: var(--text-h3);
  font-weight: 700;
}

.res-sector span {
  color: var(--ash-inverse);
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

.res-section-ink {
  background: var(--ink);
  color: var(--paper);
}

.res-section-ink .res-section-head h2 {
  color: var(--paper);
}

.res-section-ink .res-section-head p {
  color: var(--bone);
}

/* ------------------------------------------------------------------ CTA */
.res-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 44px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.res-cta h2 {
  max-width: 22ch;
  font-size: var(--text-h3);
  line-height: 1.25;
}

.res-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------- MOBILE */
@media (max-width: 860px) {
  .res-article-link {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: var(--space-8) 0;
  }
}

@media (max-width: 760px) {
  .res-hero {
    padding: var(--hero-padding-top) var(--hero-padding-inline) var(--hero-padding-bottom);
  }

  .res-featured-body {
    margin-top: 24px;
    text-align: left;
  }

  .res-featured .res-meta {
    justify-content: flex-start;
  }

  .res-cta {
    padding: 32px 24px;
  }

  .res-empty {
    padding: 32px 24px;
  }
}
