/* ==========================================================================
   CONTENT TEMPLATES
   ==========================================================================
   Article, project and archive chrome. Anything reusable belongs in style.css
   instead — this file is only for shapes the builder does not produce.
   ========================================================================== */

/* -- The first section under an overlay masthead -------------------------- */
/* Full-bleed sections run underneath the bar by design. Everything else has
   to clear it, or the heading sits behind the logo.                         */

.has-overlay-masthead .section--first:not(.section--bleed) {
  padding-top: calc(var(--section-pad-top) + var(--masthead-h));
}

/* -- Article -------------------------------------------------------------- */

.article__title { margin-top: var(--space-sm); }
.article__date { margin-top: var(--space-md); color: var(--text-faint); }

.article__lead {
  margin-inline: auto;
}

.article__head { padding-bottom: var(--space-xl); }

/* -- Project -------------------------------------------------------------- */

.project__lead .media { --media-ratio: 21 / 9; }

@media (max-width: 800px) {
  .project__lead .media { --media-ratio: 4 / 3; }
}

.project__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.project__standfirst { margin-top: var(--space-md); }

.project__facts {
  display: grid;
  gap: var(--space-md);
  padding-top: var(--space-2xs);
}

.project__fact dt { margin-bottom: var(--space-3xs); }

.project__fact dd {
  margin: 0;
  font-size: var(--text-md);
  color: var(--text);
}

.project__fact a {
  color: inherit;
  text-decoration: none;
  border-bottom: var(--rule-width) solid var(--rule-strong);
}

@media (max-width: 800px) {
  .project__intro { grid-template-columns: minmax(0, 1fr); }

  .project__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: var(--space-md);
    border-top: var(--rule-width) solid var(--rule);
  }
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  align-items: center;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.pagination a,
.pagination span.current,
.pagination span.dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: 0.5rem;
  font-size: var(--text-md);
  text-decoration: none;
  color: var(--text-muted);
  border: var(--rule-width) solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.pagination a:hover {
  color: var(--text-strong);
  border-color: var(--rule-strong);
}

.pagination span.current {
  color: var(--text-strong);
  border-color: var(--text-strong);
}

.pagination svg { width: 1rem; height: 1rem; }

/* -- Search --------------------------------------------------------------- */

.search-form {
  display: flex;
  gap: var(--space-2xs);
  max-width: 30rem;
  margin-top: var(--space-lg);
}

.search-form__input { flex: 1 1 auto; min-width: 0; }

.search-results {
  display: grid;
  gap: 0;
  border-top: var(--rule-width) solid var(--rule);
}

.search-result { border-bottom: var(--rule-width) solid var(--rule); }

.search-result__link {
  display: block;
  padding-block: var(--space-md);
  text-decoration: none;
  transition: padding-left var(--dur) var(--ease-out);
}

.search-result__link:hover { padding-left: var(--space-sm); }
.search-result__link .t-meta { margin-top: var(--space-3xs); }
