/* ============================================================
   WILDMAN - Resource archives and single posts
   Ported from the design prototype's four archive routes and
   four single-post routes, which each share one shape.
   ============================================================ */

/* Archive head -------------------------------------------------- */

.wm-rindex__head {
  padding: clamp(60px, 8vw, 110px) var(--wm-gutter) clamp(34px, 4vw, 52px);
  border-bottom: 1px solid var(--wm-border);
  background: linear-gradient(180deg, rgba(12, 86, 191, .1), transparent 76%);
}
.wm-rindex__title {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-extrabold);
  font-size: clamp(30px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--wm-text);
  margin-top: 20px;
}
.wm-rindex__lead {
  font-family: var(--wm-font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  color: var(--wm-text-secondary);
  margin-top: 18px;
  max-width: 56ch;
}
.wm-rindex__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.wm-rindex__filter {
  font-family: var(--wm-font-heading);
  font-size: 13px;
  font-weight: var(--wm-weight-semibold);
  padding: 8px 16px;
  border-radius: var(--wm-radius-pill);
  border: 1px solid var(--wm-border);
  background: rgba(255, 255, 255, .03);
  color: var(--wm-text-secondary);
  transition: border-color var(--wm-transition), background var(--wm-transition), color var(--wm-transition);
}
.wm-rindex__filter:hover { border-color: var(--wm-border-hover); color: var(--wm-text); }
.wm-rindex__filter.is-active { background: var(--wm-blue); border-color: var(--wm-blue); color: #fff; }

/* Archive body -------------------------------------------------- */

.wm-rindex__body { padding: clamp(44px, 6vw, 80px) var(--wm-gutter) clamp(70px, 9vw, 120px); }
.wm-rindex__note {
  font-family: var(--wm-font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--wm-text-dark-secondary);
  max-width: 62ch;
  margin-bottom: clamp(26px, 3.2vw, 40px);
}

/* Featured card ------------------------------------------------- */

.wm-rfeature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  background: #fff;
  border: 1px solid var(--wm-border-light);
  border-radius: var(--wm-radius-lg);
  box-shadow: var(--wm-shadow-card);
  overflow: hidden;
  margin-bottom: clamp(16px, 2vw, 22px);
}
.wm-rfeature__media { position: relative; min-height: 250px; background: #e9eef4; }
.wm-rfeature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-rfeature__body { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.wm-rfeature__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wm-rfeature__tag {
  font-family: var(--wm-font-heading);
  font-size: 10px;
  font-weight: var(--wm-weight-semibold);
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: var(--wm-radius-pill);
  background: var(--wm-blue);
  color: #fff;
}
.wm-rfeature__date {
  font-family: var(--wm-font-body);
  font-size: 13px;
  color: var(--wm-text-dark-secondary);
}
.wm-rfeature__title {
  font-family: var(--wm-font-heading);
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: var(--wm-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--wm-text-dark);
  margin-top: 16px;
}
.wm-rfeature__title a { color: inherit; }
.wm-rfeature__excerpt {
  font-family: var(--wm-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--wm-text-dark-secondary);
  margin-top: 10px;
  max-width: 56ch;
}
.wm-rfeature__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-family: var(--wm-font-heading);
  font-size: 14px;
  font-weight: var(--wm-weight-semibold);
  color: var(--wm-blue);
  align-self: flex-start;
}
.wm-rfeature__more:hover { color: var(--wm-text-dark); }

/* Card grid ------------------------------------------------------ */

.wm-rindex__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr));
  gap: clamp(16px, 2vw, 22px);
}

/* The shared card, restyled to the archive routes' own values. */
.wm-rindex__grid .wm-rcard {
  border-radius: var(--wm-radius-lg);
  background: #fff;
  border: 1px solid var(--wm-border-light);
  box-shadow: var(--wm-shadow-card);
  overflow: hidden;
  transition: transform var(--wm-transition-spring), box-shadow var(--wm-transition-spring);
}
.wm-rindex__grid .wm-rcard:hover { transform: translateY(-5px); box-shadow: 0 26px 56px rgba(0, 0, 0, .14); }
.wm-rindex__grid .wm-rcard__media { aspect-ratio: 16 / 10; background: #e9eef4; }
.wm-rindex__grid .wm-rcard__body { padding: clamp(20px, 2.2vw, 26px); gap: 0; }
.wm-rindex__grid .wm-rcard__meta {
  order: -1;
  /* The base card pins its meta line to the card bottom with margin-top:auto.
     Reordered to the top here, that auto margin would soak up the stretched
     card's free space and open a variable gap under the thumbnail. */
  margin-top: 0;
  padding-top: 0;
  font-family: var(--wm-font-body);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--wm-text-dark-secondary);
  margin-bottom: 9px;
}
.wm-rindex__grid .wm-rcard__title {
  font-family: var(--wm-font-heading);
  font-size: 18px;
  font-weight: var(--wm-weight-bold);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--wm-text-dark);
}
.wm-rindex__grid .wm-rcard__excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--wm-text-dark-secondary);
  margin-top: 8px;
}

/* Single post ----------------------------------------------------- */

.wm-post__head {
  padding: clamp(48px, 7vw, 96px) var(--wm-gutter) clamp(30px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(12, 86, 191, .1), transparent 78%);
}
.wm-post__inner { max-width: 800px; margin-inline: auto; }

.wm-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.wm-post__term {
  font-family: var(--wm-font-heading);
  font-size: 10px;
  font-weight: var(--wm-weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--wm-radius-pill);
  background: rgba(12, 86, 191, .18);
  border: 1px solid var(--wm-border-blue);
  color: var(--wm-blue-bright);
}
.wm-post__date { font-family: var(--wm-font-body); font-size: 13px; color: var(--wm-text-muted); }

.wm-post__title {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-extrabold);
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--wm-text);
  margin-top: 18px;
  text-wrap: balance;
}
.wm-post__standfirst {
  font-family: var(--wm-font-body);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--wm-text-secondary);
  margin-top: 20px;
  text-wrap: pretty;
}
.wm-post__byline { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.wm-post__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
}
.wm-post__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-post__author {
  display: block;
  font-family: var(--wm-font-heading);
  font-size: 15px;
  font-weight: var(--wm-weight-semibold);
  color: var(--wm-text);
}
.wm-post__role {
  display: block;
  font-family: var(--wm-font-body);
  font-size: 13px;
  color: var(--wm-text-muted);
  margin-top: 2px;
}

.wm-post__herowrap { padding: 0 var(--wm-gutter); }
.wm-post__hero {
  max-width: 800px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--wm-radius-lg);
  overflow: hidden;
  border: 1px solid var(--wm-border);
  background: #04070d;
}
.wm-post__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wm-post__body { padding: clamp(40px, 5vw, 64px) var(--wm-gutter) clamp(60px, 8vw, 110px); }
.wm-post__prose { max-width: 720px; margin-inline: auto; }
.wm-post__prose > * + * { margin-top: 16px; }
.wm-post__prose p,
.wm-post__prose li {
  font-family: var(--wm-font-body);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.8;
  color: var(--wm-text-secondary);
}
.wm-post__prose h2 {
  font-family: var(--wm-font-heading);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: var(--wm-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--wm-text);
  margin-top: 40px;
}
.wm-post__prose h3 {
  font-family: var(--wm-font-heading);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: var(--wm-weight-semibold);
  color: var(--wm-text);
  margin-top: 32px;
}
.wm-post__prose blockquote {
  margin: 32px 0;
  padding-left: 22px;
  border-left: 3px solid var(--wm-blue);
  font-family: var(--wm-font-heading);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: var(--wm-weight-medium);
  line-height: 1.45;
  color: var(--wm-text);
}
.wm-post__prose a { color: var(--wm-blue-bright); border-bottom: 1px solid rgba(90, 155, 255, .35); }
.wm-post__prose img { max-width: 100%; height: auto; border-radius: var(--wm-radius-card); }

.wm-post__foot {
  max-width: 720px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding-top: clamp(26px, 3vw, 36px);
  border-top: 1px solid var(--wm-border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.wm-post__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wm-font-heading);
  font-size: 15px;
  font-weight: var(--wm-weight-semibold);
  color: var(--wm-text-secondary);
}
.wm-post__back:hover { color: var(--wm-text); }
.wm-post__cta { padding: 15px 27px; }
