/* Section introductions keep their title, copy and action on one reading axis. */
.systems .section-heading,
.works .section-heading,
.making-title {
  flex-flow: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(13px, 1.3vw, 23px);
}
.systems .section-heading p {
  max-width: 56ch;
}
#systems .system-figure {
  top: 76px;
}

.enquiry {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-block: clamp(80px, 9.4vw, 174px);
  text-align: center;
}
.enquiry h2 {
  max-width: none;
  font-size: clamp(48px, 6.7vw, 120px);
}
.enquiry p {
  max-width: 45ch;
  margin: 17px auto 0;
  text-wrap: pretty;
}
.enquiry::before,
.enquiry::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4%;
  height: 92%;
  width: min(28%, 530px);
  pointer-events: none;
  background-image: url("media/gate-drawing.webp");
  background-repeat: no-repeat;
  background-size: auto 143%;
  mix-blend-mode: multiply;
  opacity: 0.29;
}
.enquiry::before {
  left: 0;
  background-position: 21% 47%;
  mask-image: linear-gradient(90deg, #000 12%, transparent 98%);
}
.enquiry::after {
  right: 0;
  background-position: 82% 42%;
  mask-image: linear-gradient(270deg, #000 12%, transparent 98%);
}
footer {
  --footer-columns: repeat(12, minmax(0, 1fr));
  --footer-gap: clamp(16px, 2vw, 35px);
  padding-inline: var(--gutter);
  background: var(--ink);
  color: var(--paper);
  --line: #4b5651;
}
.footer-main,
.footer-end {
  display: grid;
  grid-template-columns: var(--footer-columns);
  column-gap: var(--footer-gap);
  align-items: start;
}
.footer-main {
  padding-block: clamp(40px, 4.5vw, 80px) clamp(28px, 3vw, 52px);
  font-size: 14px;
  line-height: 1.5;
}
.footer-signature,
.footer-end > :first-child {
  grid-column: 1 / 7;
}
.footer-contact,
.footer-end > :nth-child(2) {
  grid-column: 7 / 11;
}
.footer-main nav,
.footer-end > :last-child {
  grid-column: 11 / -1;
}
.footer-contact {
  font-style: normal;
}
.footer-main nav,
.contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.contacts {
  margin-top: 12px;
}
.footer-brand {
  display: block;
  width: fit-content;
}
.footer-brand img {
  width: clamp(137px, 12vw, 210px);
  filter: brightness(0) invert(1);
}
.footer-signature p {
  max-width: 32ch;
  margin-top: 18px;
  color: #e0e4dd;
}
.country-ack,
.footer-end {
  font-size: 12px;
  color: #c0cac3;
}
.country-ack {
  max-width: 85ch;
  padding-bottom: 20px;
  text-wrap: pretty;
}
.footer-end {
  border-top: 1px solid var(--line);
  padding-block: 20px;
  align-items: center;
}
.mast:not(.mast-paper).mast-scrolling {
  background: rgb(24 35 33 / 88%);
  backdrop-filter: blur(12px);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .quote-btn,
  .dark-link {
    translate: var(--pull-x, 0px) var(--pull-y, 0px);
    transition:
      translate 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
      color 0.4s,
      background-color 0.4s,
      border-color 0.4s;
  }
  .quote-btn span,
  .dark-link span {
    translate: var(--pull-x, 0px) var(--pull-y, 0px);
    transition: translate 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .text-link {
    position: relative;
  }
  .text-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.55s cubic-bezier(0.22, 0.7, 0.25, 1);
  }
  .text-link:is(:hover, :focus-visible)::after {
    transform: scaleX(1);
    transform-origin: left;
  }
  .text-link:is(:hover, :focus-visible) {
    border-bottom-color: transparent;
  }
  .text-link span {
    transition: transform 0.55s cubic-bezier(0.22, 0.7, 0.25, 1);
  }
  .text-link:is(:hover, :focus-visible) span {
    transform: translate(4px, -2px);
  }
  .hero-controls button {
    transition:
      background-color 0.42s,
      color 0.42s,
      scale 0.55s;
  }
  .hero-controls button:hover {
    scale: 1.07;
  }
}
@media (max-width: 740px) {
  footer {
    --footer-columns: minmax(0, 1fr) 5rem;
  }
  .footer-main {
    row-gap: 28px;
  }
  .footer-signature,
  .footer-end > :first-child {
    grid-column: 1 / -1;
  }
  .footer-contact,
  .footer-end > :nth-child(2) {
    grid-column: 1;
  }
  .footer-main nav,
  .footer-end > :last-child {
    grid-column: 2;
  }
  .footer-main nav,
  .contacts {
    gap: 0;
  }
  .footer-end {
    row-gap: 4px;
    padding-block: 16px;
  }
  .enquiry {
    gap: 22px;
    padding-block: 83px;
  }
  .enquiry::before,
  .enquiry::after {
    width: 16%;
    opacity: 0.16;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero {
    overflow: clip;
  }
  .hero-media,
  .hero .inspect-trigger {
    translate: 0 var(--camera-y, 0px);
  }
  .system-preview-link {
    overflow: hidden;
  }
  .system-preview-link .system-photo {
    scale: 1.035;
    translate: var(--pull-x, 0px) var(--pull-y, 0px);
    transition:
      translate 0.85s cubic-bezier(0.16, 0.7, 0.23, 1),
      scale 0.95s;
  }
  .system-preview-link:hover .system-photo {
    scale: 1.055;
  }
}

/* Sweep beneath the label itself, independently of its larger hit area. */
:where(
  .desk-nav a,
  .family-name,
  .feature-title,
  .work-link h3,
  .work-list h3,
  .footer-main nav a,
  .contacts a,
  .footer-end a
) {
  --underline-width: 0%;
  width: fit-content;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: var(--underline-width) 1px;
  padding-bottom: 0.12em;
  transition: background-size 0.52s cubic-bezier(0.22, 0.7, 0.25, 1);
}
.feature-title {
  display: inline-block;
}
:where(
  .desk-nav a,
  .footer-main nav a,
  .contacts a,
  .footer-end a
):focus-visible,
.family-item:focus-within .family-name,
.family-item:has(details[open]) .family-name,
.feature-link:focus-visible .feature-title,
.work-link:focus-visible h3,
.work-list a:focus-visible h3 {
  --underline-width: 100%;
}
@media (hover: hover) {
  :where(.desk-nav a, .footer-main nav a, .contacts a, .footer-end a):hover,
  .family-item:hover .family-name,
  .feature-link:hover .feature-title,
  .work-link:hover h3,
  .work-list a:hover h3 {
    --underline-width: 100%;
  }
}

/* Size the label before choosing which side of the photographed detail it sits on. */
.hero .inspect-trigger {
  width: max-content;
}
@media (pointer: coarse) {
  /* Keep the photo still during native scrolling. Slides retain their shutter transition. */
  .hero-shot,
  .hero-shot.current {
    transform: none;
  }
  .hero-shot.current {
    animation: none;
  }
  .mast:not(.mast-paper).mast-scrolling {
    background: rgb(24 35 33 / 96%);
    backdrop-filter: none;
  }
  .inspect-tag {
    backdrop-filter: none;
  }
}
@media (any-pointer: coarse) {
  .hero {
    touch-action: pan-y pinch-zoom;
  }
  .hero-controls button {
    width: 44px;
    height: 44px;
    flex: none;
  }
  .hero .inspect-trigger,
  .feature-link,
  .menu-btn,
  .wordmark,
  .file-close,
  .file-views button,
  .quote-btn,
  .desk-nav a {
    min-height: 44px;
  }
  .wordmark,
  .desk-nav a {
    display: inline-flex;
    align-items: center;
  }
  .text-link,
  .file-project,
  .spec-body details p a,
  .contacts a,
  .footer-main nav a,
  .footer-end a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .text-link {
    border-bottom-color: transparent;
    background: linear-gradient(currentColor, currentColor) left calc(50% + .78em) / 100% 1px no-repeat;
  }
  .footer-main nav a {
    align-items: flex-start;
  }
  .file-project,
  .spec-body details p a {
    display: flex;
  }
  .inspect-trigger:active .inspect-tag,
  .hero-controls button:active {
    color: var(--ink);
    background: var(--paper);
  }
  .mobile-nav a:active {
    background: #ffffff1c;
  }
}
@media (max-width: 740px) {
  .mast {
    height: 66px;
  }
  .mast-paper {
    height: 60px;
  }
  .mast-actions {
    gap: clamp(9px, 3vw, 18px);
  }
  .quote-btn {
    white-space: nowrap;
  }
  .hero {
    height: 93svh;
    min-height: 530px;
  }
  .hero-controls {
    gap: 6px;
  }
  .count {
    gap: 4px;
  }
  .hero-copy p {
    text-wrap: pretty;
  }
  .hero-foot {
    gap: 6px;
  }

}
@media (max-width: 365px) {
  .footer-main {
    font-size: 13px;
  }
  .mast .wordmark-shape {
    width: 86px;
  }
  .hero-controls {
    gap: 4px;
  }
  .feature-title {
    font-size: 14px;
  }
  .feature-link {
    gap: 6px;
  }
  .hero-copy {
    margin-bottom: 20px;
  }
  .hero-copy p {
    margin-top: 16px;
  }
  .hero-copy .text-link {
    margin-top: 14px;
  }
}
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .hero {
    height: 100svh;
    min-height: 365px;
  }
  .mast {
    height: 56px;
  }
  .hero h1 {
    width: fit-content;
    font-size: clamp(48px, 8vw, 66px);
  }
  .hero-copy {
    margin-bottom: 12px;
  }
  .hero-copy p {
    max-width: 46ch;
    margin-top: 12px;
    font-size: 15px;
  }
  .hero-copy .text-link {
    margin-top: 10px;
  }
  .hero-foot {
    height: 56px;
  }
}

.gallery-shell {
  position: relative;
}
.gallery-controls {
  display: none;
  gap: 2px;
  align-items: center;
  pointer-events: auto;
}
.gallery-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  touch-action: manipulation;
}
.gallery-controls svg {
  width: 32px;
  height: 32px;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / .75);
  border-radius: 50%;
  background: rgb(17 29 26 / .56);
}
.gallery-controls [aria-disabled="true"] svg {
  opacity: .43;
}
.gallery-controls button:active:not([aria-disabled="true"]) svg {
  background: var(--ink);
}
.gallery-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.gallery-native .photo-gallery {
  display: flex;
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y pinch-zoom;
}
.gallery-native .photo-gallery::-webkit-scrollbar {
  display: none;
}
.gallery-native .gallery-photo {
  position: static;
  flex: 0 0 100%;
  min-width: 0;
  opacity: 1;
  transition: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.gallery-native .gallery-controls,
.gallery-shell:has(:focus-visible) .gallery-controls {
  display: flex;
}
.gallery-native .gallery-guide,
.gallery-shell:has(:focus-visible) .gallery-guide {
  padding: 14px 8px 4px 14px;
  gap: 10px;
  background: linear-gradient(transparent, rgb(12 20 21 / .66));
}

/* The hit targets stay in place; only their colour or directional cue changes. */
.work-toggle,
.inspect-tag,
.spec-body summary {
  transition:
    color var(--feedback-time) ease,
    background-color var(--feedback-time) ease;
}
.gallery-controls svg {
  transition:
    opacity var(--feedback-time) ease,
    background-color var(--feedback-time) ease;
}
.work-list a > span,
.work-link .ne,
.feature-arrow {
  transition: transform 320ms var(--disclosure-ease);
}
@media (hover: hover) and (pointer: fine) {
  .work-list a:hover > span,
  .work-link:hover .ne,
  .feature-link:hover .feature-arrow {
    transform: translate(2px, -2px);
  }
  .spec-body summary:hover {
    background-color: rgb(24 35 33 / 4%);
  }
}
.work-toggle:active,
.spec-body summary:active {
  background-color: rgb(24 35 33 / 8%);
}
