/* Project index. */
#documented-orders { scroll-margin-top: var(--header-h); }

.project-filters a,
.case-pagination .page-numbers {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--hj-rule, #ccd8d4);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--hj-bright, #fff);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.project-filters a:hover,
.case-pagination a:hover {
  border-color: var(--hj-accent, #24604f);
  color: var(--hj-accent-hover, #23453e);
  background: var(--hj-subtle, #e9f0eb);
}

.project-filters a[aria-current],
.case-pagination .current {
  border-color: var(--hj-accent, #24604f);
  color: white;
  background: var(--hj-accent, #24604f);
}

.project-filters a:focus-visible,
.case-pagination a:focus-visible {
  outline: 2px solid var(--hj-accent, #24604f);
  outline-offset: 2px;
}

.case-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(24px, 4vw, 48px);
}

.case-pagination .dots {
  min-width: 0;
  padding-inline: 3px;
  border: 0;
  background: transparent;
}

.project-hero--lineup {
  background: radial-gradient(ellipse at 80% 32%, #2c4b3d, #172d26 72%);
}

.project-hero--lineup::before { content: none; }

.project-hero__lineup {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(22px, 4vw, 64px);
  padding-block: calc(var(--header-h) + clamp(30px, 4.8vw, 64px)) clamp(38px, 5.2vw, 74px);
}

.project-hero--lineup .project-hero__copy { padding: 0; }

.project-hero--lineup h1 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 1.1rem + 3.65vw, 4.6rem);
}

.project-hero--lineup p {
  max-width: 45ch;
  color: #d8e7de;
}

.project-hero__lineup figure {
  overflow: hidden;
  border: 1px solid #547164;
  background: #253f35;
}

.project-hero__lineup img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .project-hero__lineup {
    grid-template-columns: minmax(0, 1fr);
    gap: 23px;
    padding-block-end: 32px;
  }
}

.project-cases:not(.project-cases--detail) > #notes {
  padding-block-end: clamp(20px, 3vw, 42px);
  background: var(--hj-paper, #f6f5f1);
}

.project-cases:not(.project-cases--detail) .project-gallery--editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}

.project-cases:not(.project-cases--detail) .project-gallery--editorial > figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  border: 1px solid var(--hj-rule, #d7dfd7);
  background: var(--white);
}

.project-cases:not(.project-cases--detail) .project-field-photo {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--hj-subtle, #e9f0eb);
}

.project-cases:not(.project-cases--detail) .project-field-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.project-cases:not(.project-cases--detail) .project-field-photo img.project-image--portrait {
  object-position: center 55%;
}

.project-cases:not(.project-cases--detail) .project-gallery--editorial > figure:first-child img {
  aspect-ratio: 16 / 9;
  object-position: 54% center;
}

.project-cases:not(.project-cases--detail) .project-gallery--editorial figcaption {
  padding: clamp(12px, 1.5vw, 20px);
  color: var(--ink);
  font-size: clamp(.88rem, .84rem + .17vw, 1.02rem);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.project-cases:not(.project-cases--detail) .project-field-photo :is(.project-field-photo__control, .project-photo-link__control) {
  position: absolute;
  inset: auto 8px 8px auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  color: var(--white);
  border: 1px solid rgb(255 255 255 / .54);
  background: rgb(22 43 37 / .92);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.project-cases:not(.project-cases--detail) .project-field-photo:focus-visible {
  z-index: 1;
  outline: 3px solid var(--hj-accent, #176b57);
  outline-offset: 3px;
}

.project-cases:not(.project-cases--detail) > .project-cta[aria-labelledby] {
  padding-block: clamp(16px, 2.5vw, 34px) clamp(48px, 6vw, 78px);
  border-top: 0;
  background: var(--hj-paper, #f6f5f1);
}

.project-cases:not(.project-cases--detail) .project-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: normal;
  gap: clamp(18px, 3.2vw, 44px);
  padding: clamp(25px, 4vw, 54px);
  border-inline-start: 4px solid var(--hj-accent, #176b57);
  color: var(--white);
  background: linear-gradient(110deg, #162b25, #224539);
}

.project-cases:not(.project-cases--detail) .project-cta__inner h2 {
  font-size: clamp(1.68rem, 1.06rem + 2vw, 2.75rem);
  letter-spacing: -.035em;
}

.project-cases:not(.project-cases--detail) .project-cta__inner p {
  max-width: 55ch;
  margin-block-start: 10px;
  color: #dceae1;
}

.project-cases:not(.project-cases--detail) .project-cta__actions {
  align-items: center;
  gap: 8px clamp(12px, 1.6vw, 20px);
}

.project-cases:not(.project-cases--detail) .project-cta__actions .btn {
  padding-inline: 18px;
  white-space: normal;
}

.project-cases:not(.project-cases--detail) .project-cta__actions .btn-primary {
  border-color: transparent;
  color: #162b25;
  background: var(--hj-light-accent, #b8e4cf);
}

.project-cases:not(.project-cases--detail) .project-cta__actions .btn-primary:is(:hover, :focus-visible) {
  color: #162b25;
  background: #e0f4e8;
}

.project-cases:not(.project-cases--detail) .project-cta__actions .btn-quiet {
  justify-content: start;
  padding-inline: 0;
  border-color: transparent;
  color: #e6f2eb;
  background: transparent;
  text-decoration: underline;
  text-decoration-color: #a6c5b5;
  text-underline-offset: 5px;
}

.project-cases:not(.project-cases--detail) .project-cta__actions .btn-quiet:is(:hover, :focus-visible) {
  color: var(--white);
  text-decoration-color: currentColor;
}

.project-cases:not(.project-cases--detail) :is(.project-cta__actions, .project-photo-dialog) :focus-visible {
  outline-color: #e0f4e8;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid #648173;
  color: #f4f8f5;
  background: #162b25;
  box-shadow: 0 24px 68px rgb(0 0 0 / .34);
}

.project-cases:not(.project-cases--detail) .project-photo-dialog::backdrop {
  background: rgb(12 25 21 / .82);
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__bar {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #648173;
  background: #162b25;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__bar h2 {
  flex: 1 1 240px;
  font-size: clamp(1rem, .9rem + .4vw, 1.18rem);
  line-height: 1.35;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__actions > span {
  min-width: 3.2em;
  text-align: center;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__bar button {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #8aa99c;
  color: var(--white);
  background: #24453a;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__bar button:hover {
  background: #31584b;
}

.project-cases:not(.project-cases--detail) .project-photo-dialog__image {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

@media (min-width: 601px) and (max-width: 899px) {
  .project-cases:not(.project-cases--detail) .project-gallery--editorial {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-cases:not(.project-cases--detail) .project-gallery--editorial > figure:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .project-cases:not(.project-cases--detail) .project-gallery--editorial {
    grid-template-columns: minmax(0, 1.56fr) minmax(0, 1fr);
    grid-auto-rows: clamp(156px, 16vw, 204px);
  }

  .project-cases:not(.project-cases--detail) .project-gallery--editorial > figure:first-child {
    grid-row: span 2;
  }

  .project-cases:not(.project-cases--detail) .project-gallery--editorial > figure:not(:first-child) {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
  }

  .project-cases:not(.project-cases--detail) .project-gallery--editorial .project-field-photo,
  .project-cases:not(.project-cases--detail) .project-gallery--editorial .project-field-photo img {
    height: 100%;
  }

  .project-cases:not(.project-cases--detail) .project-cta__inner {
    grid-template-columns: minmax(0, 1.2fr) auto;
  }
}

@media (max-width: 600px) {
  .project-cases:not(.project-cases--detail) .project-gallery--editorial img.project-image--portrait {
    aspect-ratio: 4 / 5;
  }

  .project-cases:not(.project-cases--detail) .project-cta__actions .btn-primary {
    width: 100%;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-cases:not(.project-cases--detail) .project-field-photo img {
    transition: transform .2s ease-out;
  }

  .project-cases:not(.project-cases--detail) .project-field-photo:is(:hover, :focus-visible) img {
    transform: scale(1.035);
  }
}
