.captioned-project-card .review-project-cover { position: relative; isolation: isolate; }
.captioned-project-card .project-card-facts,
.captioned-project-card .project-card-caption {
  position: absolute;
  inset-inline: clamp(11px, 1.3vw, 18px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
}
.captioned-project-card .project-card-facts {
  inset-block-start: clamp(10px, 1.2vw, 16px);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.captioned-project-card .project-card-caption { inset-block-end: clamp(10px, 1.2vw, 16px); }
.project-card-name { font-size: clamp(16px, 1.45vw, 21px); line-height: 1.2; font-weight: 500; }
.project-card-status {
  border-radius: 2px;
  padding: 4px 7px;
  color: #454b50;
  background: #eef0f2;
  font-size: 12px;
  white-space: nowrap;
}
.project-card-status[data-realized] { color: #355849; background: #e8f0eb; }
.captioned-project-card .review-project-cover::before,
.captioned-project-card .review-project-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}
.captioned-project-card .review-project-cover::before {
  z-index: 1;
  background: rgb(11 15 19 / .28);
  transition: opacity 220ms ease;
}
.captioned-project-card .review-project-cover::after {
  z-index: 1;
  background: linear-gradient(180deg, rgb(9 11 13 / .74), transparent 30%, transparent 54%, rgb(9 11 13 / .92));
}
.project-card-arrow {
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .7);
  color: #fff;
  font: 19px/1 Arial, sans-serif;
  line-height: 1;
  transition: background 220ms ease, color 220ms ease;
}
.captioned-project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.captioned-project-card:is(:hover, :focus-visible) .review-project-cover::before { opacity: 0; }
.captioned-project-card:is(:hover, :focus-visible) .project-card-arrow {
  background: #fff;
  color: #151719;
}
@media (prefers-reduced-motion: reduce) {
  .captioned-project-card .review-project-cover::before, .project-card-arrow { transition: none; }
}

.project-case .project-intro { column-gap: clamp(20px,5vw,79px); row-gap: 16px; }
.project-case .project-intro h1 { grid-column: 1; }
.project-case .project-intro > div { grid-column: 2; grid-row: 1 / span 2; }
.case-facts {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin: 0;
  font-size: 16px;
}
.case-facts dt { color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.case-facts dd { margin: 0; }
.project-case .project-cover { width: fit-content; max-width: min(100%, 960px); margin-inline: auto; }
.project-case .project-cover img {
  width: auto;
  max-width: 100%;
  max-height: min(60svh, 660px);
  object-fit: contain;
}
.case-section > :is(.case-gallery, .case-comparison, .case-plan) { grid-column: 1 / -1; min-width: 0; }
.case-section#plans { scroll-margin-top: 105px; }
.case-section .project-copy { overflow-wrap: anywhere; }
.case-plan { width: min(100%, 820px); margin-inline: auto; }
.case-plan img { height: auto; margin-inline: auto; }
.case-plan figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.case-comparison { --reveal: 50%; width: min(100%, 880px); margin-inline: auto; }
.case-comparison-floor { margin-bottom: 10px; font-size: 16px; font-weight: 600; text-align: center; }
.case-comparison-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: clamp(12px,1.25vw,15px);
}
.case-comparison-labels span:last-child { text-align: end; }
.case-comparison .case-frame {
  width: min(100%, var(--case-image-width));
  max-width: none;
  aspect-ratio: var(--case-ratio);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f8f9fa;
  touch-action: pan-y pinch-zoom;
}
.case-frame > img, .case-frame .comparison-before > img { object-fit: contain; }
.case-frame .comparison-before { background: #f8f9fa; }
.case-frame.comparison-gestures { cursor: ew-resize; user-select: none; }
.case-frame.comparison-gestures :is(.comparison-range, img) { pointer-events: none; }
.case-compare-divider {
  position: absolute;
  top: 50%;
  left: clamp(13px, var(--reveal), calc(100% - 13px));
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid white;
  border-radius: 50%;
  background: #24272b;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.case-compare-divider::before, .case-compare-divider::after {
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  height: 100vmax;
  background: #a52f32;
  content: "";
}
.case-compare-divider::before { bottom: 100%; }
.case-compare-divider::after { top: 100%; }

.case-gallery-controls { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.case-gallery-controls[hidden] { display: none; }
.case-gallery-controls button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-size: 19px;
  cursor: pointer;
}
.case-gallery-controls button:disabled { opacity: .35; cursor: default; }
.case-gallery .case-gallery-track {
  position: relative;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 560px);
  gap: 12px;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  padding-bottom: 9px;
}
.case-gallery-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.case-gallery .case-gallery-track figure { grid-column: auto; min-width: 0; scroll-snap-align: start; }
.case-gallery .case-gallery-track a {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  background: #f4f5f6;
  cursor: zoom-in;
}
.case-gallery .case-gallery-track img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: none;
}
.case-gallery-single .case-gallery-track { grid-auto-columns: min(100%, 860px); }
.case-gallery-single .case-gallery-track a { aspect-ratio: auto; padding: 0; background: none; }
.case-gallery-single .case-gallery-track img { position: static; max-height: min(74svh, 660px); }

#site-footer .footer-contact-row { align-items: start; }
#site-footer .footer-messengers { flex-wrap: wrap; }
#site-footer .footer-messengers .button { min-width: 0; padding-inline: 20px; }
#site-footer .footer-social-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(8px, 1.5vw, 20px); font-size: clamp(12px, 3.3vw, 14px); line-height: 1.5; }
#site-footer .footer-social-links a { line-height: inherit; }
#site-footer .footer-social-links sup { position: relative; top: -.42em; vertical-align: baseline; line-height: 0; font-size: .72em; }
.footer-social-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#site-footer .footer-meta-note { margin: 12px 0 20px; font-size: 12px; line-height: 1.55; color: var(--muted); }
@media (min-width: 761px) {
  #site-footer .footer-navigation { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
}
@media (max-width: 760px) {
  .project-case .project-intro { grid-template-columns: minmax(0,1fr); }
  .project-case .project-intro > div { grid-column: 1; grid-row: auto; }
  .case-gallery .case-gallery-track { grid-auto-columns: 85%; }
  .case-gallery-single .case-gallery-track { grid-auto-columns: 100%; }
}
