/* ==========================================================================
   archive-common.css — atmospheric hero, topic chips, pagination, archive grid
   Extracted from main.css 2026-05-12 css-master refactor. Conditionally
   enqueued via inc/setup.php on is_archive() (covers post-type archives,
   taxonomy archives, author/date/search archives).
   ========================================================================== */

/* ============================================================
   Archive system — atmospheric hero, topic chips, pagination,
   related-CTA grid, search landing/empty state, quick-search
   ============================================================ */

/* --- Archive hero (used on archive.php, home.php, search.php) --- */
.archive-hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.archive-hero__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--gradient-mesh);
  opacity: 0.85;
  z-index: 0;
}

.archive-hero > .site-shell {
  position: relative;
  z-index: 1;
}

.archive-hero .breadcrumb {
  margin-bottom: 1.5rem;
}

.archive-hero__header {
  max-width: 64ch;
}

.archive-hero__header h1 {
  font-size: var(--fs-display);
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0.4rem 0 0.85rem;
  font-weight: 700;
  hyphens: manual;
  overflow-wrap: break-word;
  text-wrap: balance;
}



.archive-hero__lead {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  line-height: 1.55;
  max-width: 60ch;
}

/* Paged archives (page 2+) — compact one-column hero. The .archive-hero--paged
   modifier is set in archive.php when is_paged() is true. Most positioning
   content (sigil, lede, pills, scope band, trust strip, topic pills, body
   intro, "where to next") is suppressed in PHP; this CSS only tightens the
   surviving eyebrow + H1 + paged-meta. Designer-spec 2026-05-11.  */
.archive-hero--paged {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.archive-hero--paged .archive-hero__header h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1.1;
}
.archive-hero__paged-meta {
  margin: 0.6rem 0 0;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Era span inside the paged H1 ("Work / 2011–2017"): same type scale as the
   H1 so the line reads as one phrase, but lighter weight + muted color so
   the noun ("Work") still leads the eye (designer pass 2026-05-12). */
.archive-hero__heading-era {
  font-weight: 400;
  color: var(--color-muted);
  white-space: nowrap;
}
.archive-hero__heading-era-sep {
  margin-inline: 0.15em 0.2em;
  opacity: 0.55;
  font-weight: 300;
}



/* --- Single hero: mesh + display H1 + sigil for service-style singles --- */
.single-hero {
  position: relative;
  margin: 0 calc(-50vw + 50%) clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  isolation: isolate;
}
.single-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
.single-hero > .site-shell {
  position: relative;
  z-index: 1;
}
.single-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}
.single-hero__text h1 {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0.4rem 0 0.65rem;
}
.single-hero__sigil {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  width: 100%;
  margin-inline: auto;
  color: var(--color-accent-strong);
}
@media (max-width: 860px) {
  .single-hero__layout {
    grid-template-columns: 1fr;
  }
  .single-hero__sigil {
    max-width: 160px;
    order: -1;
    margin: 0 0 0.4rem;
  }
}

/* Reading variant — blog posts: same mesh + display H1, but a smaller
   sigil that doesn't compete with body copy and a wider text column. */
.single-hero--reading .single-hero__layout {
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.5fr);
  gap: clamp(1rem, 3vw, 2rem);
}
.single-hero--reading .single-hero__sigil {
  max-width: 140px;
  opacity: 0.85;
}
@media (min-width: 860px) and (max-width: 1100px) {
  .single-hero--reading .single-hero__sigil {
    max-width: 110px;
    opacity: 0.7;
  }
}
.single-hero--reading::before {
  opacity: 0.6;
}

/* .section-tonal — opt-in tonal surface for non-home pages. Home uses
   the body.home nth-of-type rule above; reuse the same token here. */



/* --- Long-form body type system: lede, h2 hairline, pull-quote --- */
.single-entry > .entry-content > p:first-of-type,
.single-entry--article > .entry-content > p:first-of-type {
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.32rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--color-text-strong);
  max-width: 68ch;
  margin-bottom: 1.4rem;
}
.single-entry .entry-content h2,
.single-entry--article .entry-content h2 {
  position: relative;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
}
.single-entry .entry-content h2::before,
.single-entry--article .entry-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(48px, 8vw, 84px);
  height: 3px;
  background: var(--color-gold);
  border-radius: 2px;
}
.single-entry .entry-content > p,
.single-entry--article .entry-content > p {
  max-width: 68ch;
}
/* Pull-quote variant — visually distinct from blockquote (teal-ruled).
   Use class .has-pull-quote on a quote, or .wp-block-pullquote (Gutenberg). */
.entry-content .wp-block-pullquote,
.entry-content blockquote.has-pull-quote {
  margin: 2rem calc(-1 * clamp(0.5rem, 4vw, 2rem));
  padding: 1.6rem 1.8rem;
  border-left: 0;
  border-top: 3px solid var(--color-gold);
  border-bottom: 3px solid var(--color-gold);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.entry-content .wp-block-pullquote :where(p),
.entry-content blockquote.has-pull-quote :where(p) {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--color-text);
  max-width: none;
}
.entry-content .wp-block-pullquote :where(cite),
.entry-content blockquote.has-pull-quote :where(cite) {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}

/* --- Archive sigil: chevron-derived brand glyph in hero right column --- */
.archive-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}

.archive-hero__sigil {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  width: 100%;
  margin-inline: auto;
  color: var(--color-accent-strong);
}

.archive-hero__sigil--about {
  max-width: 280px;
}

.archive-hero__sigil--photo {
  aspect-ratio: 4 / 5;
  max-width: 480px;
  margin: 0;
  padding: 0;
}

.archive-hero__photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(11, 31, 58, 0.18);
}

.about-hero-photo {
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(11, 31, 58, 0.2);
  background: rgba(255, 255, 255, 0.55);
}



.archive-sigil {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(11, 31, 58, 0.10));
}

@keyframes archive-sigil-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes archive-sigil-pulse {
  0%, 100% { opacity: 0.45; r: 80; }
  50% { opacity: 0.85; r: 84; }
}

.archive-sigil__rotor {
  transform-origin: 120px 120px;
  transform-box: view-box;
  animation: archive-sigil-rotate 90s linear infinite;
}

.archive-sigil__halo {
  transform-origin: 120px 120px;
  transform-box: view-box;
  animation: archive-sigil-pulse 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .archive-sigil__rotor,
  .archive-sigil__halo {
    animation: none;
  }
}

@media (max-width: 860px) {
  .archive-hero__layout {
    grid-template-columns: 1fr;
  }
  .archive-hero__sigil {
    max-width: 180px;
    order: -1;
    margin: 0 0 0.4rem;
  }
  .archive-hero__sigil--photo {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    order: -1;
    margin: 0 0 0.9rem;
  }
  .about-hero-photo {
    width: min(100%, 180px);
  }
}



/* --- Topic chips --- */

/* Archive quick-search styles removed 2026-05-12 with the feature flag in
 * archive.php. PHP markup and main.js infrastructure still exist; restore
 * the stylesheet from git history if the feature is reactivated. */

/* --- Archive page content + section transition --- */
.archive-page-content {
  min-width: 0;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Apply card index badges to archive grids (parity with homepage) */
.card-grid-archive,
.card-grid {
  counter-reset: cardidx;
}

body:not(.home) .card-grid > .card .card-thumbnail,
body:not(.home) .card-grid-archive > .card .card-thumbnail {
  position: relative;
}

body:not(.home) .card-grid > .card,
body:not(.home) .card-grid-archive > .card {
  counter-increment: cardidx;
  position: relative;
}

body:not(.home) .card-grid > .card .card-thumbnail::after,
body:not(.home) .card-grid-archive > .card .card-thumbnail::after {
  content: counter(cardidx, decimal-leading-zero);
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  font-family: "Sora", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--color-accent);
  padding: 0.22rem 0.5rem;
  border-radius: 3px;
}

/* ============================================================
   Pagination — canonical treatment (consolidated 2026-05-14)
   ============================================================
   Single source of truth for every archive (blog, services,
   portfolio, downloads, etc.). Previously split across
   archive-common.css (rounded chips) and archive-blog.css
   (squared chips with gold-fill current) — the two ruled each
   other through `!important` and the chip gap was set on the
   wrong element. Now: square chips, navy outline default, gold
   fill on current, hairline separator between "Page N of M"
   status and the chip row.

   Markup contract (rendered by thisismyurl_2026_the_pagination):
     div.archive-pagination.js-archive-pagination          — outer wrapper, top hairline
       nav.navigation.pagination                           — WP-emitted nav
         div.nav-links                                     — flex row
           span.archive-pagination__status                 — "Page 1 of 6" label
           a.page-numbers.prev / span.page-numbers.current / a.page-numbers / span.dots / a.next
   ============================================================ */

/* Outer wrapper: hairline above pagination separates it from the post grid. */
.archive-pagination,
.js-archive-pagination {
  margin-top: 2.5rem;
  padding: 1.25rem 0 0;
  border: 0;
  background: transparent;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
}

/* Chip flex row — the real flex container is .nav-links, not the nav itself. */
.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
}

/* "Page N of M" status label — separated from the chip row by a hairline so
   the eye parses status-then-controls instead of one undifferentiated row. */
.archive-pagination__status {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 1.1rem 0 0.25rem;
  margin-right: 0.25rem;
  border-right: 1px solid var(--color-border);
}

/* Chip baseline — fixed min-width/height so numbers, dots, and Next sit on
   the same grid; Next/Prev grow horizontally via padding. Square corners
   match the /services/ button language. */
.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  box-sizing: border-box;
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  padding: 0 0.85rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.navigation.pagination .page-numbers.prev,
.navigation.pagination .page-numbers.next {
  padding: 0 1.1rem;
}

/* Margin-based arrow gap — a literal space inside `content:` collapses
   under the chip's negative letter-spacing and reads as glued to the word. */
.navigation.pagination .page-numbers.prev::before,
.navigation.pagination .page-numbers.next::after {
  display: inline-block;
  font-weight: 600;
}
.navigation.pagination .page-numbers.prev::before { content: "←"; margin-right: 0.45em; }
.navigation.pagination .page-numbers.next::after  { content: "→"; margin-left: 0.45em; }

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Current page — gold fill. var(--color-accent-strong) on var(--color-gold)
   = ~5.2:1, WCAG AA. */
.navigation.pagination .page-numbers.current {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-accent-strong);
}

/* Dots — quiet glyph, not a button. */
.navigation.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  min-width: 1.5rem;
  padding: 0 0.25rem;
  color: var(--color-muted);
  cursor: default;
  user-select: none;
  letter-spacing: 0.15em;
}
.navigation.pagination .page-numbers.dots:hover {
  border-color: transparent;
  background: transparent;
  color: var(--color-muted);
}

/* --- Related-archive grid (Keep Exploring) --- */
.archive-related {
  margin-top: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
  padding-top: clamp(2.5rem, 4vw, 3.5rem);
  border-top: 2px solid var(--color-gold);
}

.archive-related .section-heading {
  margin-bottom: 1.75rem;
  border-bottom: 0;
  padding-bottom: 0;
}

.archive-related .section-heading h2,
.archive-related .section-heading h3 {
  margin: 0;
  font-size: clamp(1.25rem, 0.9rem + 1vw, 1.6rem);
  letter-spacing: -0.015em;
}

.archive-related__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  border: 0;
  overflow: visible;
}

.archive-related__item {
  margin: 0;
  border: 1px solid var(--color-border);
  background: #ffffff;
  position: relative;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.archive-related__item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: var(--color-gold);
  transition: height 0.18s ease;
  z-index: 1;
  pointer-events: none;
}

.archive-related__item:hover,
.archive-related__item:focus-within {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 31, 58, 0.08);
}

.archive-related__item:hover::before,
.archive-related__item:focus-within::before {
  height: 4px;
}

.archive-related__item:last-child {
  border-right: 1px solid var(--color-border);
}

@media (max-width: 860px) {
  .archive-related__grid {
    grid-template-columns: 1fr;
  }
}

.archive-related__item a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.6rem 1.6rem;
  text-decoration: none;
  color: var(--color-text);
  height: 100%;
  position: relative;
}

.archive-related__title {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text-strong);
  transition: color 0.15s ease;
}

.archive-related__item a:hover .archive-related__title,
.archive-related__item a:focus-visible .archive-related__title {
  color: var(--color-accent);
}

.archive-related__desc {
  display: block;
  font-size: 0.93rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-top: 0.5rem;
  grid-column: 1;
  max-width: 44ch;
}

.archive-related__arrow {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  transition: transform 0.18s ease, color 0.18s ease;
}

.archive-related__item a:hover .archive-related__arrow,
.archive-related__item a:focus-visible .archive-related__arrow {
  transform: translateX(5px);
  /* --color-gold-text: AA-compliant amber (5.09:1 on white) — WCAG 1.4.11 non-text contrast fix. */
  color: var(--color-gold-text);
}



.archive-related--training .archive-related__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  overflow: clip;
}

.archive-related--training .archive-related__item::before {
  inset: 0 auto 0 0;
  width: 0;
  height: auto;
  transition: width 0.18s ease;
}

.archive-related--training .archive-related__item:hover::before,
.archive-related--training .archive-related__item:focus-within::before {
  width: 4px;
}

/* --- Post Companions (auto-rendered cross-link block) -------------------
   Renders below the article body on blog single posts (linking to a
   companion tool + download from post meta) and on tool / download
   singles (reverse direction, linking to the article that referenced
   the asset). Visual family of .archive-related but tighter — usually
   1-2 items, smaller heading, no horizontal grid. */
.post-companions {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: clamp(2rem, 3vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--color-border);
}

.post-companions__header {
  margin-bottom: 1.25rem;
}

.post-companions__heading {
  margin: 0;
  font-size: clamp(1.15rem, 0.9rem + 0.7vw, 1.4rem);
  letter-spacing: -0.01em;
  font-weight: 700;
}

.post-companions__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.875rem;
}

.post-companions__item {
  position: relative;
}

.post-companions__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.35rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-companions__link:hover,
.post-companions__link:focus-visible {
  border-color: var(--color-accent);
  transform: translateY(-1px);
  outline: none;
}

.post-companions__eyebrow {
  grid-column: 1;
  grid-row: 1;
  font-family: "Sora", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.post-companions__title {
  grid-column: 1;
  grid-row: 2;
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-strong);
  line-height: 1.3;
}

.post-companions__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.15rem;
  color: var(--color-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.post-companions__link:hover .post-companions__arrow,
.post-companions__link:focus-visible .post-companions__arrow {
  color: var(--color-accent);
  transform: translateX(2px);
}

