:root {
  --cab-ink: var(--wp--custom--cab--ink, #111);
  --cab-paper: var(--wp--custom--cab--paper, #fff);
  --cab-muted: var(--wp--custom--cab--muted, #777);
  --cab-muted-mobile: var(--wp--custom--cab--muted-mobile, #666);
  --cab-font-family: var(--wp--custom--cab--font-family, "TeX Gyre Heros", "Nimbus Sans", Helvetica, Arial, sans-serif);
  --cab-brand-font-family: var(--wp--custom--cab--brand-font-family, Inter, sans-serif);
  --cab-gutter: var(--wp--custom--cab--gutter, clamp(0.75rem, 1vw, 1.5rem));
  --cab-sidebar: clamp(15rem, 20.33vw, 28rem);
  --cab-header-height: clamp(6.5rem, 9vw, 10rem);
  --cab-composition-space-1: var(--wp--custom--cab--composition-space-1, clamp(1.5rem, 2.25vw, 3.6rem));
  --cab-composition-space-2: var(--wp--custom--cab--composition-space-2, clamp(2.6rem, 3.6vw, 5.2rem));
  --cab-composition-space-3: var(--wp--custom--cab--composition-space-3, clamp(3.8rem, 5vw, 7rem));
  --cab-composition-space-4: var(--wp--custom--cab--composition-space-4, clamp(5rem, 6.8vw, 9.5rem));
}

*, *::before, *::after { box-sizing: border-box; }

html { color: var(--cab-ink); background: var(--cab-paper); }
html, body { max-width: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--cab-font-family); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cab-site {
  width: min(100%, 160rem);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  margin-inline: auto;
}

.cab-header {
  min-height: var(--cab-header-height);
  display: grid;
  grid-template-columns: var(--cab-sidebar) 1fr;
  align-items: start;
  padding: var(--cab-gutter);
}

.cab-brand {
  width: max-content;
  font-family: var(--cab-brand-font-family);
  font-size: var(--wp--custom--cab--brand-size, clamp(3rem, 5.2vw, 5.75rem));
  font-weight: var(--wp--custom--cab--brand-weight, 700);
  line-height: var(--wp--custom--cab--brand-line-height, 0.85);
  letter-spacing: var(--wp--custom--cab--brand-letter-spacing, -0.065em);
}

.cab-primary { justify-self: center; font-size: var(--wp--custom--cab--navigation-size, clamp(0.85rem, 1vw, 1.2rem)); text-align: center; text-transform: uppercase; }
.cab-primary ul { display: flex; gap: 0.35rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.cab-primary--stacked ul { display: block; }
.cab-primary .current-menu-item > a,
.cab-primary .current-menu-ancestor > a,
.cab-primary .current_page_item > a,
.cab-primary .current_page_ancestor > a { text-decoration: underline; text-underline-offset: 0.15em; }
.cab-menu-toggle { display: none; }

.cab-mobile-projects { display: none; }

@media (min-width: 901px) {
  .cab-header > .cab-brand { visibility: hidden; }
}

.cab-shell { min-width: 0; }
.cab-main { min-height: 60vh; display: grid; grid-template-columns: var(--cab-sidebar) minmax(0, 1fr); gap: var(--cab-gutter); padding: 0 var(--cab-gutter); }
.cab-context {
  position: sticky;
  top: var(--cab-gutter);
  align-self: start;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100svh - (2 * var(--cab-gutter)));
  margin-top: calc(-1 * var(--cab-header-height) + var(--cab-gutter));
  overflow: hidden;
}
.cab-context-brand {
  width: max-content;
  font-family: var(--cab-brand-font-family);
  font-size: var(--wp--custom--cab--brand-size, clamp(3rem, 5.2vw, 5.75rem));
  font-weight: var(--wp--custom--cab--brand-weight, 700);
  line-height: var(--wp--custom--cab--brand-line-height, 0.85);
  letter-spacing: var(--wp--custom--cab--brand-letter-spacing, -0.065em);
}
.cab-context-nav { min-height: 0; overflow-y: auto; padding-top: clamp(7rem, 8vw, 10rem); scrollbar-width: thin; }
body.admin-bar .cab-context {
  top: calc(32px + var(--cab-gutter));
  height: calc(100svh - 32px - (2 * var(--cab-gutter)));
}
.cab-context ul, .cab-section-list { margin: 0; padding: 0; list-style: none; text-transform: uppercase; }
.cab-context-menu,
.cab-section-list,
.cab-research-link { font-size: var(--wp--custom--cab--context-size, clamp(0.9rem, 1vw, 1.15rem)); line-height: 1.15; }
.cab-context .current > a, .cab-context .current_page_item > a { text-decoration: underline; text-underline-offset: 0.15em; }
.cab-research-link { margin: 0; text-transform: uppercase; }
.cab-research-item { margin-top: clamp(3.5rem, 5vw, 6rem); }
.cab-tagline { align-self: end; max-width: 12ch; margin: 0; font-size: var(--wp--custom--cab--tagline-size, clamp(1.5rem, 2vw, 2.35rem)); font-weight: 700; line-height: 1.3; }

.cab-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cab-gutter);
}
.cab-project-column { min-width: 0; }
.cab-project-card { margin: 0 0 var(--cab-gutter); }
.cab-project-card a:hover,
.cab-project-card a:focus-visible { text-decoration: none; }
.cab-project-card img { display: block; width: 100%; }
.cab-project-card--block img { aspect-ratio: 4 / 3; object-fit: cover; }
.cab-project-card--fit img { aspect-ratio: 4 / 3; object-fit: contain; }
.cab-project-card--full img { height: auto; object-fit: contain; }
.cab-project-card h2 {
  min-height: 1em;
  margin: 0.3rem 0 0;
  color: var(--cab-muted);
  font-size: var(--wp--custom--cab--card-size, clamp(0.5rem, 0.58vw, 0.7rem));
  font-weight: 400;
  line-height: 1;
  text-align: left;
  opacity: 1;
  transition: opacity 160ms ease;
}
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .cab-project-card h2 { opacity: 0; }
  .cab-project-card:hover h2,
  .cab-project-card:focus-within h2 { opacity: 1; }
}
.cab-project-spacer { height: var(--cab-spacer-legacy, 0); }
.cab-project-spacer--1 { height: var(--cab-composition-space-1); }
.cab-project-spacer--2 { height: var(--cab-composition-space-2); }
.cab-project-spacer--3 { height: var(--cab-composition-space-3); }
.cab-project-spacer--4 { height: var(--cab-composition-space-4); }

/* The same three image behaviours are available per image in Gutenberg. */
.wp-block-image.is-style-cab-block img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wp-block-image.is-style-cab-fit img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.wp-block-image.is-style-cab-full img { width: 100%; height: auto; object-fit: contain; }

.cab-intro {
  position: fixed;
  z-index: 200000;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cab-ink);
  background: var(--cab-paper);
  text-decoration: none;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 720ms cubic-bezier(0.76, 0, 0.24, 1);
}
.cab-intro:hover,
.cab-intro:focus-visible { text-decoration: none; }
.cab-intro[hidden] { display: none; }
.cab-intro-seen .cab-intro { display: none; }
.cab-intro:focus,
#cab-front-content:focus { outline: none; }
.cab-intro.is-leaving { transform: translateY(-100%); }
.cab-intro__word {
  font-family: var(--cab-brand-font-family);
  font-size: var(--wp--custom--cab--intro-size, clamp(9rem, 31vw, 36rem));
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: -0.075em;
  transform: translateX(-0.035em);
  user-select: none;
}
body.cab-intro-active { overflow: hidden; }

.cab-content { min-width: 0; }
.cab-content > :first-child { margin-top: 0; }
.cab-content--project { font-size: var(--wp--custom--cab--body-size, clamp(0.9rem, 1vw, 1.2rem)); }
.cab-content--project h2 { font-size: var(--wp--custom--cab--heading-size, clamp(1.5rem, 1.7vw, 2.1rem)); }
.cab-content--project > *,
.cab-content--project figure,
.cab-content--project iframe,
.cab-content--project video { max-width: 100%; }
.cab-content--project pre { max-width: 100%; overflow-x: auto; }
.cab-content figure figcaption {
  position: static;
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--cab-muted);
  background: none;
  font-size: var(--wp--custom--cab--caption-size, clamp(0.58rem, 0.65vw, 0.78rem));
  line-height: 1.15;
  text-align: left;
  opacity: 1;
  transition: opacity 160ms ease;
}
.cab-content figure a:hover,
.cab-content figure a:focus-visible { text-decoration: none; }
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .cab-content figure figcaption { opacity: 0; }
  .cab-content figure:hover figcaption,
  .cab-content figure:focus-within figcaption { opacity: 1; }
}
.cab-content--project .wp-lightbox-container > .lightbox-trigger,
.cab-content--office .wp-lightbox-container > .lightbox-trigger { display: none; }
.cab-lightbox-trigger { cursor: zoom-in; }
.cab-breadcrumbs { display: none; }

.cab-content--office {
  min-width: 0;
  font-size: var(--wp--custom--cab--office-size, clamp(1rem, 1.15vw, 1.4rem));
  line-height: 1.45;
}
.cab-content--office h2 { margin-bottom: 0.15rem; font-size: var(--wp--custom--cab--heading-size, clamp(1.55rem, 1.75vw, 2.1rem)); text-align: center; }
.cab-content--office h3 { font-size: clamp(1.4rem, 1.6vw, 1.9rem); }
.cab-content--office > *,
.cab-content--office figure,
.cab-content--office iframe,
.cab-content--office video { max-width: 100%; }
.cab-content--office [id] { scroll-margin-top: 1rem; }

.cab-lightbox[hidden] { display: none; }
.cab-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(2.75rem, 7vw) minmax(0, 1fr) minmax(2.75rem, 7vw);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.94);
  overscroll-behavior: contain;
}
.cab-lightbox-open { overflow: hidden; }
.cab-lightbox__figure {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  max-width: 100%;
  max-height: calc(100svh - 5rem);
  margin: 0;
  place-items: center;
}
.cab-lightbox__image { max-width: 100%; max-height: calc(100svh - 7rem); object-fit: contain; }
.cab-lightbox__caption { margin-top: 0.65rem; font-size: 0.8rem; text-align: center; }
.cab-lightbox__close,
.cab-lightbox__previous,
.cab-lightbox__next {
  z-index: 1;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  cursor: pointer;
}
.cab-lightbox__close { position: absolute; top: 0.75rem; right: 1rem; font-size: 2.5rem; }
.cab-lightbox__previous { grid-column: 1; grid-row: 1; }
.cab-lightbox__next { grid-column: 3; grid-row: 1; }
.cab-lightbox__counter { grid-column: 2; grid-row: 2; margin: 0 0 1rem; font-size: 0.75rem; text-align: center; }
.cab-lightbox button:focus-visible { outline: 2px solid currentColor; outline-offset: 0.25rem; }

.cab-footer {
  min-height: clamp(12rem, 18vw, 22rem);
  display: grid;
  grid-template-columns: 1fr minmax(14rem, 20rem);
  align-items: end;
  padding: clamp(3rem, 5vw, 6rem) var(--cab-gutter) var(--cab-gutter);
}
.cab-contact { justify-self: end; text-align: right; line-height: 1.45; }
.cab-contact strong { display: block; margin-bottom: 1rem; }
.cab-contact address { margin: 0 0 1rem; font-style: normal; }

@media (max-width: 900px) {
  :root { --cab-header-height: 6.5rem; }
  html { scroll-padding-top: calc(var(--cab-header-height) + var(--cab-gutter)); }
  .cab-header { position: sticky; z-index: 1000; top: 0; grid-template-columns: 34% 1fr; align-items: start; background: var(--cab-paper); }
  body.admin-bar .cab-header { top: 32px; }
  .cab-brand { font-size: var(--wp--custom--cab--brand-size-mobile, 2.4rem); letter-spacing: -0.05em; }
  .cab-menu-toggle { display: none; }
  .cab-primary { position: absolute; left: 50%; display: block; width: max-content; padding-top: 0; font-size: var(--wp--custom--cab--navigation-size-mobile, 1rem); transform: translateX(-50%); }
  .cab-primary ul { display: block; }
  body.cab-projects-menu-open { overflow: hidden; }
  .cab-mobile-projects {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--cab-gutter);
    background: var(--cab-paper);
  }
  .cab-mobile-projects[hidden] { display: none; }
  .cab-mobile-projects__panel {
    position: relative;
    min-height: calc(100svh - (2 * var(--cab-gutter)));
    display: grid;
    place-items: center;
  }
  .cab-mobile-projects__header {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    display: flex;
  }
  .cab-mobile-projects__close { border: 0; padding: 0 0.15rem; color: inherit; background: transparent; font: inherit; font-size: 2.5rem; line-height: 0.7; cursor: pointer; }
  .cab-mobile-projects nav { width: 100%; }
  .cab-mobile-projects__list { margin: 0; padding: 0; list-style: none; }
  .cab-mobile-projects__list { text-align: center; text-transform: uppercase; }
  .cab-mobile-projects__section { margin: 0.8rem 0; }
  .cab-mobile-projects__section > a { font-size: var(--wp--custom--cab--overlay-size-mobile, 1.25rem); font-weight: 400; }
  .cab-main--projects .cab-context-nav,
  .cab-context--section .cab-context-nav { display: none; }
  .cab-main { display: block; }
  .cab-context { position: static; display: block; height: auto; margin-top: 0; overflow: visible; padding: 0 0 2rem; }
  body.admin-bar .cab-context { top: auto; height: auto; }
  .cab-context-brand { display: none; }
  .cab-context-nav { overflow: visible; padding-top: 0; }
  .cab-context--project { display: none; }
  .cab-context--office { padding-bottom: 1.25rem; }
  .cab-context--office .cab-tagline { display: none; }
  .cab-content--office { font-size: var(--wp--custom--cab--body-size-mobile, 1rem); }
  .cab-content--office h2 { font-size: var(--wp--custom--cab--heading-size-mobile, 1.55rem); text-align: left; }
  .cab-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; margin: 0 0 0.25rem; color: var(--cab-muted-mobile); font-size: 0.68rem; text-transform: uppercase; }
  .cab-breadcrumbs a { text-decoration: underline; text-underline-offset: 0.12em; }
  .cab-context ul { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; font-size: var(--wp--custom--cab--context-size-mobile, 0.75rem); }
  .cab-context .cab-research-item { flex-basis: 100%; margin-top: 1.25rem; }
  .cab-tagline { max-width: 16ch; margin: 2.5rem 0 0; font-size: var(--wp--custom--cab--tagline-size-mobile, 1.35rem); }
  .cab-project-grid { display: block; }
  :root {
    --cab-composition-space-1: var(--wp--custom--cab--composition-space-1-mobile, clamp(0.75rem, 3vw, 1.25rem));
    --cab-composition-space-2: var(--wp--custom--cab--composition-space-2-mobile, clamp(1.25rem, 5vw, 2rem));
    --cab-composition-space-3: var(--wp--custom--cab--composition-space-3-mobile, clamp(1.75rem, 7vw, 2.75rem));
    --cab-composition-space-4: var(--wp--custom--cab--composition-space-4-mobile, clamp(2.25rem, 9vw, 3.5rem));
  }
  .cab-project-card { margin-bottom: 1.5rem; }
  .cab-project-card h2 { min-height: 0; color: var(--cab-muted-mobile); font-size: var(--wp--custom--cab--card-size-mobile, 0.85rem); opacity: 1; }
  .cab-content figure figcaption { color: var(--cab-muted-mobile); font-size: var(--wp--custom--cab--caption-size-mobile, 0.78rem); opacity: 1; }
  .cab-footer { min-height: 14rem; grid-template-columns: 1fr auto; padding-top: 3rem; }
  .cab-brand--footer { align-self: end; }
  .cab-contact { font-size: 0.8rem; }
  .cab-lightbox { grid-template-columns: 3rem minmax(0, 1fr) 3rem; }
  .cab-lightbox__previous,
  .cab-lightbox__next { align-self: end; margin-bottom: 0.5rem; }
  .cab-lightbox__counter { margin-bottom: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cab-intro { transition-duration: 1ms; }
  .cab-project-card h2,
  .cab-content figure figcaption { transition: none; }
}

@media (max-width: 782px) {
  body.admin-bar .cab-header { top: 46px; }
}
