/* ============================================================
   Archive + project pages
   Scoped under .maw-archive / .maw-project so it cannot leak
   into the shop, Woo templates or the existing pages.

   Tokens map onto the live theme (:root in style.css).
   Accent is registration red --reg (#A4161A), not the mockup
   vermillion. Posters use ink, matching the commissions block.
   ============================================================ */

.maw-archive,
.maw-project {
  --maw-bg: var(--paper);
  --maw-ink: var(--ink);
  --maw-accent: var(--reg);
  --maw-mute: var(--grey);
  --maw-rule: var(--rule);
  --maw-plate: var(--frame);
  --maw-plate-light: #EFEDE7;
  --maw-lede: #3A342E;

  color: var(--maw-ink);
  background: transparent;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

.maw-archive h1,
.maw-archive h2,
.maw-archive h3,
.maw-project h1,
.maw-project h2,
.maw-project h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-transform: none;
  margin: 0 0 8px;
}

.maw-archive a,
.maw-project a {
  color: var(--maw-accent);
  text-underline-offset: 3px;
}

.maw-archive a:hover,
.maw-project a:hover {
  color: var(--ink);
}

.maw-archive :focus-visible,
.maw-project :focus-visible {
  outline: 2px solid var(--press);
  outline-offset: 3px;
}

/* ---- shared shell ---------------------------------------- */
.maw-wrap {
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(48px, 7vw, 96px);
}

.maw-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maw-accent);
  margin-bottom: 10px;
}

.maw-archive .btn--block,
.maw-project .btn--block {
  width: 100%;
  text-align: center;
  margin-top: 14px;
}

.maw-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 0;
  background: var(--maw-plate-light);
  color: var(--maw-lede);
  text-decoration: none;
}

.maw-tag:hover {
  color: var(--ink);
}

.maw-tag--outline {
  background: transparent;
  border: 1px solid var(--maw-accent);
  color: var(--maw-accent);
}

.maw-tag--outline:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}

.maw-tag--accent {
  background: transparent;
  border: 1px solid var(--maw-accent);
  color: var(--maw-accent);
}

.maw-tag.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.maw-tag.is-current:hover {
  color: var(--paper);
}

/* Image plate: theme hatch shows through until a real image exists.
   Must be block — these are spans, and aspect-ratio does nothing on inline. */
.maw-plate {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, #E6E3DB 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, #E6E3DB 0 1px, transparent 1px 9px),
    var(--maw-plate-light);
}

.maw-plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.maw-plate__note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maw-mute);
}

/* ---- ARCHIVE INDEX --------------------------------------- */
.maw-archive__head {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 48px;
  align-items: end;
  padding: 34px 0 8px;
}

.maw-archive__head h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  margin: 0 0 10px;
  max-width: 16ch;
  text-align: left;
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.maw-archive__lede {
  margin: 0;
  max-width: 56ch;
  color: var(--maw-lede);
}

.maw-archive__aside {
  border-left: 2px solid var(--maw-accent);
  padding-left: 20px;
  font-size: 15.5px;
  color: var(--maw-lede);
}

.maw-archive__aside strong {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--ink);
}

.maw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 22px 0 0;
  font-size: 12.5px;
}

.maw-filters__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maw-mute);
  margin-right: 4px;
}

.maw-filters a {
  text-decoration: none;
}

.maw-filters__count {
  margin-left: auto;
  color: var(--maw-mute);
  font-family: var(--mono);
  font-size: 11px;
}

.maw-group {
  padding-top: 26px;
}

.maw-group__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 8px;
}

.maw-group__head h2 {
  font-size: 26px;
  margin: 0;
  text-transform: none;
}

.maw-group__head span {
  font-size: 13px;
  color: var(--maw-mute);
}

.maw-row {
  display: grid;
  grid-template-columns: 64px 1.5fr 1fr 90px 120px;
  gap: 18px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--maw-rule);
  text-decoration: none;
  color: inherit;
}

.maw-row:hover {
  background: #FBFAF7;
  color: inherit;
}

.maw-row__plate {
  width: 64px;
  height: 52px;
}

.maw-row__title {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}

.maw-row__sub {
  display: block;
  font-size: 13px;
  color: var(--maw-mute);
}

.maw-row__type {
  font-size: 13px;
  color: var(--maw-lede);
}

.maw-row__years {
  font-size: 13px;
  color: var(--maw-mute);
  font-variant-numeric: tabular-nums;
}

.maw-row__end {
  font-size: 12px;
  text-align: right;
}

.maw-row__count {
  display: block;
  color: var(--maw-mute);
}

.maw-row__action {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  color: var(--maw-accent);
}

.maw-row:hover .maw-row__action {
  color: var(--ink);
}

/* ---- PROJECT (single) ------------------------------------ */
.maw-crumbs {
  padding: 16px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--maw-mute);
}

.maw-crumbs a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  color: inherit;
}

.maw-crumbs a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.maw-project__head {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 18px 0 26px;
  border-bottom: 1.5px solid var(--ink);
}

.maw-project__head h1 {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-align: left;
  text-transform: none;
  line-height: 1.06;
}

.maw-project__lede {
  font-size: 17px;
  max-width: 58ch;
  color: var(--maw-lede);
  text-wrap: pretty;
}

.maw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.maw-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--maw-rule);
  border: 1px solid var(--maw-rule);
}

.maw-facts div {
  background: var(--maw-bg);
  padding: 12px 14px;
}

.maw-facts dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maw-mute);
  margin: 0;
}

.maw-facts dd {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
}

.maw-gallery {
  display: grid;
  gap: 14px;
  padding: 8px 0 30px;
}

.maw-gallery--8 {
  grid-template-columns: repeat(8, 1fr);
}

.maw-gallery--4 {
  grid-template-columns: repeat(4, 1fr);
}

.maw-gallery--2 {
  grid-template-columns: repeat(2, 1fr);
}

.maw-gallery a,
.maw-gallery > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.maw-gallery a:hover {
  color: inherit;
}

.maw-gallery__plate {
  aspect-ratio: 2 / 3;
}

.maw-gallery--4 .maw-gallery__plate,
.maw-gallery--2 .maw-gallery__plate {
  aspect-ratio: 4 / 3;
}

.maw-gallery__title {
  display: block;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 5px;
  line-height: 1.2;
}

.maw-gallery__meta {
  display: block;
  font-size: 11px;
  color: var(--maw-mute);
}

.maw-pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--maw-rule);
}

.maw-pager a {
  text-decoration: none;
  color: inherit;
  max-width: 46%;
}

.maw-pager a:hover {
  color: var(--maw-accent);
}

.maw-pager span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maw-mute);
  margin-bottom: 4px;
}

.maw-pager strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
}

.maw-pager__next {
  text-align: right;
  margin-left: auto;
}

.maw-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 26px 0 8px;
}

.maw-section-head h2 {
  font-size: 24px;
  margin: 0;
  text-transform: none;
}

.maw-section-head span {
  font-size: 13px;
  color: var(--maw-mute);
}

.maw-entry {
  padding: 8px 0 18px;
  max-width: 62ch;
  color: var(--maw-lede);
}

.maw-entry > * + * {
  margin-top: 1.1em;
}

.maw-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1.5px solid var(--maw-rule);
  padding: 26px 0;
}

.maw-cols:has(> .maw-poster:only-child) {
  grid-template-columns: 1fr;
}

.maw-cols > .maw-poster:only-child {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 40px;
  align-items: center;
  padding: 30px 28px;
}

.maw-cols h3 {
  font-size: 19px;
  margin-bottom: 6px;
  text-transform: none;
}

.maw-cols p {
  font-size: 15.5px;
  color: var(--maw-lede);
  margin: 0 0 8px;
}

/* Ink field, matching the homepage commissions block — not a red flood. */
.maw-poster {
  background: var(--ink);
  color: var(--paper);
  padding: 26px;
  border: 1px solid rgba(245, 243, 238, 0.28);
}

.maw-poster strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--paper);
}

.maw-poster p {
  color: #C7C1B7;
  font-size: 15.5px;
  margin: 0 0 16px;
}

.maw-poster .btn {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.maw-poster .btn:hover {
  background: var(--press);
  color: var(--paper);
  border-color: var(--press);
}

.maw-poster--wide {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 40px;
  align-items: center;
  padding: 30px 28px;
  margin-top: 28px;
}

.maw-poster--wide h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 8px;
  color: var(--paper);
  text-transform: none;
}

.maw-poster--wide p {
  margin: 0;
}

/* ---- responsive ------------------------------------------ */
@media (max-width: 900px) {
  .maw-archive__head,
  .maw-project__head,
  .maw-cols,
  .maw-poster--wide,
  .maw-cols > .maw-poster:only-child {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .maw-archive__aside {
    border-left: 0;
    border-top: 2px solid var(--maw-accent);
    padding: 14px 0 0;
  }

  .maw-gallery--8 {
    grid-template-columns: repeat(4, 1fr);
  }

  .maw-archive__head h1 {
    font-size: 34px;
  }

  .maw-project__head h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  .maw-row {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 14px 2px;
  }

  .maw-row__plate {
    width: 56px;
    height: 46px;
  }

  .maw-row__type,
  .maw-row__years {
    grid-column: 2;
    font-size: 12px;
  }

  .maw-row__end {
    grid-column: 2;
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }

  .maw-row__count {
    display: inline;
  }

  .maw-row__action {
    display: inline;
  }

  .maw-gallery--8,
  .maw-gallery--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .maw-pager {
    flex-direction: column;
    gap: 16px;
  }

  .maw-pager a,
  .maw-pager__next {
    max-width: none;
    margin-left: 0;
    text-align: left;
  }

  .maw-filters__count {
    margin-left: 0;
  }
}
