.category-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: clamp(30px, 3vw, 52px) 4vw;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: var(--ink);
}

.category-hero::after {
  content: "";
  position: absolute;
  right: 4vw;
  bottom: clamp(104px, 13vh, 148px);
  left: 4vw;
  height: 1px;
  background: rgba(197, 149, 52, 0.46);
  pointer-events: none;
}

.category-copy {
  position: relative;
  z-index: 2;
  grid-column: 1 / 8;
  grid-row: 1;
  padding: clamp(36px, 6vh, 70px) 0 18px;
  justify-content: flex-start;
  pointer-events: none;
}

.category-copy h1 {
  max-width: none;
  margin-top: clamp(24px, 4vh, 44px);
  font-size: clamp(68px, 7vw, 116px);
  line-height: 0.9;
}

.category-copy h1 em {
  width: auto;
  margin-top: 0.08em;
  margin-left: clamp(56px, 5.5vw, 94px);
  font-size: 0.62em;
  line-height: 0.96;
  white-space: normal;
}

.category-context {
  width: min(48vw, 700px);
  margin-top: auto;
  padding-bottom: clamp(34px, 5vh, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.62fr);
  gap: clamp(22px, 2.6vw, 42px);
  align-items: end;
}

.category-definition {
  max-width: none;
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
}

.category-note-link {
  display: block;
  padding: 13px 0 11px;
  color: var(--paper);
  font-size: 12px;
  line-height: 1.65;
  text-decoration: none;
  border-top: 1px solid #686a64;
  border-bottom: 1px solid #686a64;
  pointer-events: auto;
  transition: color 220ms ease, border-color 220ms ease, padding-left 220ms ease;
}

.category-note-link span {
  display: block;
  margin-bottom: 6px;
  color: var(--copper);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.category-note-link:hover,
.category-note-link:focus-visible {
  padding-left: 10px;
  color: var(--acid);
  border-color: var(--acid);
}

.category-note-link:focus-visible,
.client-record summary:focus-visible {
  outline: 1px solid var(--copper);
  outline-offset: 5px;
}

.category-count {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 18px;
  border-bottom: 0;
}

.category-visual {
  position: relative;
  z-index: 1;
  grid-column: 8 / -1;
  grid-row: 1;
  min-height: 0;
  padding: 0;
  width: min(100%, 500px);
  justify-self: end;
  align-self: center;
  justify-content: center;
  background: transparent;
}

.category-visual img {
  width: auto;
  height: min(68vh, 620px);
  max-width: 100%;
  max-height: none;
  align-self: center;
  object-fit: contain;
  object-position: center;
}

.category-visual .gallery-caption {
  padding-top: 12px;
  text-align: right;
}

.client-record + .client-record {
  margin-top: clamp(74px, 9vw, 132px);
}

.client-record__heading {
  padding: 25px 0;
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
  gap: 28px;
  align-items: baseline;
  border-bottom: 1px solid #b7b8b0;
}

.client-gallery--pair .gallery-frame,
.client-gallery--single .gallery-frame,
.client-gallery--triple .gallery-frame {
  min-height: 0;
  padding: clamp(14px, 1.6vw, 24px);
}

.client-gallery--pair .gallery-frame img,
.client-gallery--single .gallery-frame img,
.client-gallery--triple .gallery-frame img {
  max-height: none;
}

.client-gallery--single .gallery-item:first-child {
  grid-column: 2 / span 9;
}

.client-gallery .gallery-item {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.client-gallery .gallery-item:hover {
  transform: translateY(-7px);
}

@media (prefers-reduced-motion: reduce) {
  .client-gallery .gallery-item {
    transition: none;
  }

  .client-gallery .gallery-item:hover {
    transform: none;
  }
}

@media (max-width: 820px) {
  .category-hero {
    min-height: 0;
    padding: 40px 20px 48px;
    display: flex;
    overflow: visible;
  }

  .category-hero::after { display: none; }

  .category-copy {
    width: 100%;
    padding: 0;
    display: block;
    pointer-events: auto;
  }

  .category-copy h1 {
    margin-top: 18px;
    font-size: clamp(48px, 15vw, 70px);
    line-height: 0.98;
  }

  .category-copy h1 em {
    margin: 0.16em 0 0;
    font-size: 0.46em;
    line-height: 1.1;
    white-space: normal;
  }

  .category-context {
    width: 100%;
    margin-top: 34px;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .category-count { margin-top: 28px; }

  .category-visual {
    width: 100%;
    margin-top: 34px;
    padding: 0;
    display: block;
  }

  .category-visual img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .client-gallery--single .gallery-item:first-child,
  .client-gallery--pair .gallery-item:nth-child(n),
  .client-gallery--triple .gallery-item:nth-child(n) {
    width: 100%;
    grid-column: auto;
    margin-top: 0;
  }

  .client-gallery--pair .gallery-frame img,
  .client-gallery--single .gallery-frame img,
  .client-gallery--triple .gallery-frame img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

@media (max-width: 360px) {
  .category-hero { padding-right: 16px; padding-left: 16px; }
}
