/* ==========================================================================
   ZCL design system
   Brand: yellow #ffcd0c + grey #666. Charcoal carries text; yellow is the accent.
   ========================================================================== */

:root {
  --zcl-yellow: #ffcd0c;
  --zcl-yellow-deep: #f0b800;
  --zcl-yellow-soft: #fff5cc;
  --zcl-grey: #666666;
  --zcl-charcoal: #232323;
  --zcl-ink: #1a1a1a;
  --zcl-text: #3b3b3b;
  --zcl-muted: #666666;
  --zcl-bg: #f6f5f1;
  --zcl-surface: #ffffff;
  --zcl-line: #e4e1d8;

  --zcl-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --zcl-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --zcl-brand: "Raleway", "Barlow", sans-serif;

  --zcl-radius: 8px;
  --zcl-radius-sm: 6px;
  --zcl-ease: cubic-bezier(.2, .7, .2, 1);
  --zcl-nav-h: 78px;
}

/* ---------- Base ---------- */

/* Crossfade between pages instead of a hard cut (browsers without support just navigate). */
@view-transition { navigation: auto; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--zcl-nav-h);
  overflow-x: clip;
}

body {
  font-family: var(--zcl-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--zcl-text);
  background: var(--zcl-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, h5 {
  font-family: var(--zcl-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--zcl-ink);
}

p { margin-bottom: 1.15rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* The image pipeline wraps images in <picture>; let the <img> lay out as if it weren't there. */
picture { display: contents; }
::selection { background: var(--zcl-yellow); color: var(--zcl-ink); }

:focus-visible {
  outline: 3px solid var(--zcl-yellow-deep);
  outline-offset: 3px;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill { fill: currentColor; stroke: none; }

/* Wider side margins on phones than Bootstrap's 12px. */
@media (max-width: 575.98px) {
  .container { --bs-gutter-x: 2.5rem; }
}

/* ---------- Navbar ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--zcl-yellow);
  transition: box-shadow .3s var(--zcl-ease);
}

.site-nav.is-scrolled { box-shadow: 0 8px 28px rgba(26, 26, 26, .14); }

.site-nav .navbar {
  min-height: var(--zcl-nav-h);
  padding: 0;
}

/* Full nav height so the brand row stays put when the mobile menu expands below it. */
.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: var(--zcl-nav-h);
  text-decoration: none;
  color: var(--zcl-grey);
}

.brand img { width: 46px; height: auto; }

.brand-name {
  font-family: var(--zcl-brand);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Tagline is sized relative to the company name and justified to match its width exactly. */
.brand-name small {
  display: block;
  margin-top: .35rem;
  font-family: var(--zcl-body);
  font-size: .66em;
  font-weight: 600;
  letter-spacing: .13em;
  white-space: nowrap;
  text-align: justify;
  text-align-last: justify;
  color: var(--zcl-grey);
}

.site-nav .nav-link {
  position: relative;
  margin: 0 0 0 1.9rem;
  padding: .5rem 0 !important;
  font-family: var(--zcl-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--zcl-ink) !important;
}

.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .15rem;
  height: 3px;
  background: var(--zcl-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--zcl-ease);
}

.site-nav .nav-link:hover::after,
.site-nav .nav-link.active::after { transform: scaleX(1); }

.nav-toggle {
  display: grid;
  gap: 5px;
  padding: .6rem;
  border: 0;
  background: none;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--zcl-ink);
  transition: transform .3s var(--zcl-ease), opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 991.98px) {
  /* Padding sits on the list, not .navbar-collapse: Bootstrap animates that element's height,
     and padding on it can't collapse, so the menu would jump at the start and end. */
  .site-nav .navbar-nav { padding: .25rem 0 1.5rem; }

  .site-nav .nav-link {
    margin: 0;
    padding: .85rem 0 !important;
    border-top: 1px solid rgba(26, 26, 26, .12);
  }

  .site-nav .nav-link::after { display: none; }
  .site-nav .nav-link.active { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
}

/* On phones the name scales with the viewport so the brand and menu button always share one line.
   Everything in .brand-name is em-based, so its width is ~16em. */
@media (max-width: 575.98px) {
  .brand { gap: .6rem; }
  .brand img { width: 40px; }
  .brand-name { font-size: clamp(.6rem, 6.2vw - 9.5px, 1.1rem); }
}

/* ---------- Buttons & links ---------- */

.btn-zcl {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .95rem 1.7rem;
  border: 2px solid transparent;
  border-radius: var(--zcl-radius-sm);
  font-family: var(--zcl-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--zcl-ease), color .25s var(--zcl-ease), border-color .25s var(--zcl-ease),
    transform .25s var(--zcl-ease);
}

.btn-zcl .icon { transition: transform .25s var(--zcl-ease); }
.btn-zcl:hover .icon { transform: translateX(4px); }
.btn-zcl:hover { transform: translateY(-2px); }
.btn-back:hover .icon { transform: translateX(-4px); }

.btn-yellow { border-color: var(--zcl-yellow); background: var(--zcl-yellow); color: var(--zcl-ink); }
.btn-yellow:hover { background: var(--zcl-ink); color: var(--zcl-yellow); }

.btn-dark { border-color: var(--zcl-ink); background: var(--zcl-ink); color: #fff; }
.btn-dark:hover { background: #fff; color: var(--zcl-ink); }

.btn-outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { background: #fff; border-color: #fff; color: var(--zcl-ink); }

.btn-outline-dark { border-color: var(--zcl-ink); color: var(--zcl-ink); }
.btn-outline-dark:hover { background: var(--zcl-ink); color: #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding-bottom: .3rem;
  border-bottom: 3px solid var(--zcl-yellow);
  font-family: var(--zcl-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--zcl-ink);
}

.link-arrow .icon { transition: transform .25s var(--zcl-ease); }
.link-arrow:hover { color: var(--zcl-ink); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Sections & type helpers ---------- */

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-white { background: var(--zcl-surface); }
.section-yellow { background: var(--zcl-yellow); color: var(--zcl-ink); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--zcl-muted);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--zcl-yellow);
}

.on-dark .eyebrow { color: var(--zcl-yellow); }
.section-yellow .eyebrow { color: rgba(26, 26, 26, .7); }
.section-yellow .eyebrow::before { background: var(--zcl-ink); }

.h-display {
  margin-bottom: 1.4rem;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
}

.lead-zcl {
  max-width: 62ch;
  font-size: 1.2rem;
  color: var(--zcl-muted);
}

.prose p { max-width: 68ch; }

.section-head { max-width: 760px; margin-bottom: 3rem; }

/* Text that fills its column all the way to the right margin. */
.text-full .prose p,
.text-full .lead-zcl { max-width: none; }

.section-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: 3rem;
}

.section-head-split .h-display { margin-bottom: 0; }

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--zcl-nav-h));
  overflow: hidden;
  background: var(--zcl-ink);
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img,
.page-header-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, .92) 0%, rgba(20, 20, 20, .72) 42%, rgba(20, 20, 20, .18) 100%),
    linear-gradient(0deg, rgba(20, 20, 20, .55) 0%, rgba(20, 20, 20, 0) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 5rem 0 7rem;
}

.hero h1 {
  margin-bottom: 1.6rem;
  font-size: clamp(3.2rem, 8.5vw, 7rem);
  line-height: .92;
  color: #fff;
}

.hero h1 span { color: var(--zcl-yellow); }

.hero-lead {
  max-width: 52ch;
  margin-bottom: 2.6rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: rgba(255, 255, 255, .84);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Phones: compact enough that the hero ends at the bottom of the screen with the browser
   toolbar showing (100svh). Bottom padding still clears the scroll arrow. */
@media (max-width: 575.98px) {
  .hero-content { padding: 2.25rem 0 5.5rem; }
  .hero h1 { margin-bottom: 1.1rem; }
  .hero-lead { margin-bottom: 1.6rem; font-size: 1.05rem; line-height: 1.6; }
  .hero-actions { gap: .6rem; }
  .hero-actions .btn-zcl { padding: .85rem .85rem; font-size: .98rem; letter-spacing: .06em; }
}

/* Very short phone screens (e.g. iPhone SE): drop the scroll arrow and the room kept for it. */
@media (max-width: 575.98px) and (max-height: 640px) {
  .hero-content { padding: 1.75rem 0 2rem; }
  .hero .hero-scroll { display: none; }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font-size: 4rem;
  color: #fff;
  transform: translateX(-50%);
  animation: bob 2.2s ease-in-out infinite;
  transition: color .25s;
}

.hero-scroll:hover { color: var(--zcl-yellow); }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ---------- Home: stats band ---------- */

.stats { background: var(--zcl-yellow); }

.stat {
  padding: 2.4rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--zcl-display);
  font-size: clamp(2.6rem, 5vw, 3.9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--zcl-ink);
}

.stat-label {
  margin-top: .55rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, .72);
}

@media (min-width: 768px) {
  .stat + .stat { border-left: 1px solid rgba(26, 26, 26, .16); }
}

@media (max-width: 767.98px) {
  .stat:nth-child(odd) { border-right: 1px solid rgba(26, 26, 26, .16); }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(26, 26, 26, .16); }
}

/* ---------- Framed media (photo with yellow offset block) ----------
   The block sticks out by --frame-offset; the photo is inset by the same amount on that
   side so the block's outer edge lines up with the page margin. */

.media-frame {
  --frame-offset: 1.5rem;
  position: relative;
  margin-right: var(--frame-offset);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: var(--frame-offset) calc(-1 * var(--frame-offset)) calc(-1 * var(--frame-offset)) var(--frame-offset);
  border-radius: var(--zcl-radius);
  background: var(--zcl-yellow);
}

.media-frame.frame-left {
  margin-right: 0;
  margin-left: var(--frame-offset);
}

.media-frame.frame-left::before {
  inset: var(--frame-offset) var(--frame-offset) calc(-1 * var(--frame-offset)) calc(-1 * var(--frame-offset));
}
.media-frame.frame-dark::before { background: var(--zcl-ink); }

.media-frame img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--zcl-radius);
}

.media-frame.portrait img { aspect-ratio: 4 / 5; }
.media-frame.portrait-short { max-width: 420px; }
.media-frame.portrait-short img { aspect-ratio: 10 / 11; object-position: center 25%; }

@media (max-width: 767.98px) {
  .media-frame { --frame-offset: .9rem; }
}

/* ---------- Portfolio country tabs ----------
   Sticks under the navbar so the other country is one click away anywhere in the list. */

.portfolio-tabs {
  position: sticky;
  top: var(--zcl-nav-h);
  z-index: 10;
  display: flex;
  gap: 2.25rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--zcl-line);
  background: var(--zcl-bg);
}

.portfolio-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 0;
  font-family: var(--zcl-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--zcl-muted);
  transition: color .25s var(--zcl-ease);
}

.portfolio-tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--zcl-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--zcl-ease);
}

.portfolio-tabs a:hover,
.portfolio-tabs a.is-active { color: var(--zcl-ink); }
.portfolio-tabs a:hover::after,
.portfolio-tabs a.is-active::after { transform: scaleX(1); }

.portfolio-tab-count {
  min-width: 1.9em;
  padding: .2em .5em;
  border-radius: var(--zcl-radius-sm);
  background: var(--zcl-line);
  font-family: var(--zcl-body);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  text-align: center;
  color: var(--zcl-ink);
  transition: background .25s var(--zcl-ease);
}

.portfolio-tabs a.is-active .portfolio-tab-count { background: var(--zcl-yellow); }

@media (max-width: 575.98px) {
  .portfolio-tabs { gap: 1.5rem; }
  .portfolio-tabs a { font-size: 1.15rem; }
}

/* ---------- Project cards (portfolio and home) ----------
   Hover zooms the photo and underlines the client name in yellow, the site's two hover cues. */

.project-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card:hover { color: inherit; }

.project-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--zcl-radius);
  background: #d9d6ce;
  container-type: inline-size;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--zcl-ease);
}

.project-card:hover .project-card-media > picture > img,
.project-card:hover .project-card-media > img { transform: scale(1.05); }

/* Logo files are 1400x800 canvases with built-in padding, so the chip uses the same 7:4 shape.
   It scales with the card (cqi = % of card width) so it doesn't swamp narrow cards. */
.project-card-logo {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: clamp(72px, 25cqi, 105px);
  aspect-ratio: 7 / 4;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, .08);
  border-radius: var(--zcl-radius-sm);
  background: #fff;
}

.project-card-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); }

/* Clients without a logo get their initials instead. */
.project-card-logo.is-text {
  display: grid;
  place-items: center;
  font-family: var(--zcl-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--zcl-ink);
}

.project-card-body { padding-top: 1.1rem; }

.project-card-client {
  margin: 0 0 .3rem;
  font-size: 1.4rem;
  line-height: 1.2;
}

.project-card-client span {
  background: linear-gradient(var(--zcl-yellow), var(--zcl-yellow)) 0 100% / 0 3px no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .3s var(--zcl-ease);
}

.project-card:hover .project-card-client span,
.project-card:focus-visible .project-card-client span { background-size: 100% 3px; }

.project-card-sub {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--zcl-muted);
}

/* ---------- Client logo wall (home) ----------
   Logo files are 1400x800 canvases with built-in padding, so each cell crops in slightly. */

/* Flex rather than grid so a short last row sits centred. */
.client-logos {
  --cols: 7;
  --gap: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-logos li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  aspect-ratio: 7 / 4;
  overflow: hidden;
  border-radius: var(--zcl-radius-sm);
  background: var(--zcl-surface);
  border: 1px solid var(--zcl-line);
}

.client-logos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

@media (max-width: 767.98px) { .client-logos { --cols: 5; } }
@media (max-width: 575.98px) { .client-logos { --cols: 3; --gap: .6rem; } }

/* ---------- Page header (inner pages) ---------- */

/* Every inner page's header is at least as tall as About's (the tallest), with the text
   centred vertically, so headers don't jump in height between pages. */
.page-header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 400px;
  overflow: hidden;
  padding: clamp(2.75rem, 5.5vw, 4rem) 0 clamp(3rem, 5.5vw, 4rem);
  background: var(--zcl-charcoal);
  color: #fff;
}

@media (max-width: 991.98px) { .page-header { min-height: 320px; } }
@media (max-width: 575.98px) { .page-header { min-height: 336px; } }

.page-header-bg {
  position: absolute;
  inset: 0;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 26, 26, .94) 0%, rgba(26, 26, 26, .8) 50%, rgba(26, 26, 26, .55) 100%);
}

.page-header .container { position: relative; z-index: 1; }

.page-header h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  color: #fff;
}

.page-header h1.is-long {
  max-width: 34ch;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}

.page-header-lead {
  max-width: 60ch;
  margin: 1.2rem 0 0;
  font-size: 1.18rem;
  color: rgba(255, 255, 255, .78);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

.crumbs li + li::before {
  content: "/";
  margin-right: .5rem;
  color: rgba(255, 255, 255, .35);
}

.crumbs a { color: var(--zcl-yellow); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Project detail ---------- */

/* Spec-sheet strip, styled after the title block on a construction drawing. */
.project-facts {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 3px solid var(--zcl-ink);
  border-bottom: 1px solid var(--zcl-line);
}

.project-facts > div { padding: 1.1rem 1.5rem 1.3rem; }
.project-facts > div:first-child { padding-left: 0; }
.project-facts > div + div { border-left: 1px solid var(--zcl-line); }

.project-facts dt {
  margin-bottom: .35rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--zcl-muted);
}

.project-facts dd {
  margin: 0;
  font-family: var(--zcl-display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--zcl-ink);
}

@media (max-width: 767.98px) {
  .project-facts { grid-template-columns: 1fr 1fr; }
  .project-facts > .is-client { grid-column: 1 / -1; border-bottom: 1px solid var(--zcl-line); }
  .project-facts > div { padding: .9rem 1rem 1rem; }
  .project-facts > div:first-child,
  .project-facts > .is-client + div { padding-left: 0; border-left: 0; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery a {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--zcl-radius-sm);
  background: #d9d6ce;
}

/* Lead photo layouts (chosen in project.njk from the photo count). The "auto" ones take their
   height from the 4:3 photos sharing their rows. */
.gallery.lead-block a:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery.lead-pair a:first-child { grid-column: span 2; aspect-ratio: auto; }
.gallery.lead-wide a:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
/* Positioned so the photo's own proportions can't stretch the row. */
.gallery.lead-block a:first-child img,
.gallery.lead-pair a:first-child img { position: absolute; inset: 0; }
.gallery.lead-single { grid-template-columns: 1fr; max-width: 900px; }

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--zcl-ease);
}

.gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .35);
  opacity: 0;
  transition: opacity .3s;
}

.gallery-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--zcl-radius-sm);
  background: var(--zcl-yellow);
  font-size: 1.35rem;
  color: var(--zcl-ink);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity .3s, transform .3s var(--zcl-ease);
}

.gallery a:hover img { transform: scale(1.05); }
.gallery a:hover::after { opacity: 1; }
.gallery a:hover .gallery-zoom { opacity: 1; transform: translate(-50%, -50%); }

@media (max-width: 767.98px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .gallery:not(.lead-single) a:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery.is-even a:last-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* Previous / all / next strip under the gallery: the same drawing title block as .project-facts,
   so the page opens and closes with it. */
.project-pager {
  display: grid;
  grid-template-columns: 1fr minmax(0, .7fr) 1fr;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 3px solid var(--zcl-ink);
  border-bottom: 1px solid var(--zcl-line);
}

.pager-cell {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
  padding: 1.1rem 1.5rem 1.3rem;
  color: inherit;
  text-decoration: none;
}

.pager-cell:hover { color: inherit; }
.pager-cell + .pager-cell { border-left: 1px solid var(--zcl-line); }
.pager-cell.is-prev { padding-left: 0; }
.pager-cell.is-all { align-items: center; text-align: center; }
.pager-cell.is-next { align-items: flex-end; padding-right: 0; text-align: right; }

.pager-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--zcl-muted);
}

.pager-label .icon { font-size: .95rem; transition: transform .25s var(--zcl-ease); }
.pager-cell.is-prev:hover .pager-label .icon { transform: translateX(-4px); }
.pager-cell.is-next:hover .pager-label .icon { transform: translateX(4px); }

/* Name underlines in yellow on hover, like the contact links. */
.pager-name {
  align-self: flex-start;
  font-family: var(--zcl-display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--zcl-ink);
  background: linear-gradient(var(--zcl-yellow), var(--zcl-yellow)) 0 100% / 0 3px no-repeat;
  transition: background-size .3s var(--zcl-ease);
}

.pager-cell.is-all .pager-name { align-self: center; }
.pager-cell.is-next .pager-name { align-self: flex-end; background-position: 100% 100%; }
.pager-cell:hover .pager-name { background-size: 100% 3px; }

.pager-sub { font-size: .95rem; line-height: 1.4; color: var(--zcl-muted); }

/* Phone: previous | next side by side, "All projects" as a full-width row beneath. */
@media (max-width: 767.98px) {
  .project-pager { grid-template-columns: 1fr 1fr; }
  .pager-cell { padding: .9rem 1rem 1rem; }
  .pager-cell.is-all {
    grid-column: 1 / -1;
    order: 1;
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    border-top: 1px solid var(--zcl-line);
  }
  .pager-cell.is-next { border-left: 1px solid var(--zcl-line); }
  .pager-name { font-size: 1.15rem; }
  .pager-sub { font-size: .88rem; }
  .pager-label-long { display: none; }
}

/* ---------- About ---------- */

/* Numbered capabilities sitting on a hairline, each marked with a short yellow rule. */
.principles {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--zcl-line);
}

.principle {
  position: relative;
  padding-top: 1.75rem;
  padding-bottom: 1rem;
}

.principle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: calc(var(--bs-gutter-x) * .5);
  width: 48px;
  height: 3px;
  background: var(--zcl-yellow);
  z-index: 1;
}

/* When the items stack (below desktop), each one gets its own hairline. */
@media (max-width: 991.98px) {
  .principles { border-top: 0; }

  .principle::after {
    content: "";
    position: absolute;
    top: -1px;
    left: calc(var(--bs-gutter-x) * .5);
    right: calc(var(--bs-gutter-x) * .5);
    height: 1px;
    background: var(--zcl-line);
  }

  .principle { margin-top: 1rem; }
}

.principle-num {
  margin-bottom: .6rem;
  font-family: var(--zcl-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--zcl-muted);
}

.principle h3 { margin-bottom: .6rem; font-size: 1.45rem; }
.principle p { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--zcl-muted); }

.quote-block {
  display: grid;
  grid-template-columns: minmax(0, 330px) 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.quote-mark {
  display: block;
  height: 3.4rem;
  font-family: Georgia, serif;
  font-size: 7rem;
  line-height: 1;
  color: var(--zcl-ink);
}

.quote-text {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.65;
  color: var(--zcl-ink);
}

.quote-sign {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.quote-sign::before {
  content: "";
  width: 48px;
  height: 3px;
  background: var(--zcl-ink);
}

.quote-name {
  font-family: var(--zcl-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quote-role {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, .72);
}

@media (max-width: 767.98px) {
  .quote-block { grid-template-columns: 1fr; }
  .quote-block .media-frame { max-width: 300px; }
}

.assoc {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 1.75rem 1.1rem 1.4rem;
  border-radius: var(--zcl-radius);
  background: var(--zcl-surface);
  border: 1px solid var(--zcl-line);
  text-align: center;
}

.assoc img {
  width: 100%;
  height: 96px;
  object-fit: contain;
}

.assoc p {
  margin: 1.1rem 0 0;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--zcl-text);
}

/* ---------- Contact ---------- */

/* Same spec-sheet treatment as .project-facts. */
.contact-list {
  margin: 0;
  border-top: 3px solid var(--zcl-ink);
}

.contact-list > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--zcl-line);
}

.contact-list dt {
  padding-top: .35rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--zcl-muted);
}

.contact-list dd {
  margin: 0;
  font-family: var(--zcl-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--zcl-ink);
}

.contact-list dd.is-address {
  font-family: var(--zcl-body);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(var(--zcl-yellow), var(--zcl-yellow)) 0 100% / 0 3px no-repeat;
  transition: background-size .3s var(--zcl-ease);
}

.contact-list a:hover { color: inherit; background-size: 100% 3px; }

@media (max-width: 575.98px) {
  .contact-list > div { grid-template-columns: 1fr; gap: .2rem; }
  .contact-list dt { padding-top: 0; }
}

.map-card {
  overflow: hidden;
  border-radius: var(--zcl-radius);
  background: #d9d6ce;
}

.map-card iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

@media (max-width: 767.98px) {
  .map-card iframe { height: 280px; }
}

/* ---------- Call-to-action band ----------
   Sits inside a full-width .section-white; the yellow button is the one accent. */

.cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 4rem;
  align-items: center;
}

.cta-band .h-display { margin-bottom: 1rem; }
.cta-band p { max-width: 60ch; margin: 0; color: var(--zcl-muted); }

@media (max-width: 767.98px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn-zcl { justify-self: start; }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: 60vh;
  text-align: center;
}

.not-found-code {
  font-family: var(--zcl-display);
  font-size: clamp(7rem, 22vw, 13rem);
  font-weight: 700;
  line-height: .85;
  color: var(--zcl-yellow);
  -webkit-text-stroke: 3px var(--zcl-ink);
}

/* ---------- Footer ---------- */

.site-footer {
  background: #161616;
  font-size: .98rem;
  color: rgba(255, 255, 255, .66);
}

.footer-main { padding-top: 4.5rem; padding-bottom: 3rem; }

/* Top-aligned with the column headings (the navbar version is centred in the full bar height). */
.site-footer .brand { min-height: 0; margin-bottom: 1.1rem; color: #fff; }
.site-footer .brand-name small { color: rgba(255, 255, 255, .55); }
.site-footer .brand img { filter: brightness(0) invert(1); opacity: .92; }

.footer-blurb { max-width: 34ch; margin: 0; }

/* Three link columns spread across their space, so the last one ends on the right margin
   like the social icons below. On phones, contact details take their own row. */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 2.5rem 2rem;
}

@media (max-width: 575.98px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

.footer-title {
  margin-bottom: 1.1rem;
  font-family: var(--zcl-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a { color: rgba(255, 255, 255, .72); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--zcl-yellow); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .9rem;
}

.social { display: flex; gap: .6rem; }

.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--zcl-radius-sm);
  color: #fff;
  transition: background .25s, border-color .25s, color .25s;
}

.social a:hover { background: var(--zcl-yellow); border-color: var(--zcl-yellow); color: var(--zcl-ink); }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--zcl-ease), transform .9s var(--zcl-ease);
}

.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
