:root {
  --limestone: #F2F0EA;
  --ivory: #FAF9F5;
  --charcoal: #252725;
  --graphite: #171B19;
  --sage: #8D9788;
  --stone: #C9C5B9;
  --white: #FFFFFF;
  --muted: #4E534E;
  --header-height: 4.5rem;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-height, 4.5rem) + 20px);
}

main > section {
  scroll-margin-top: calc(var(--header-height, 4.5rem) + 28px);
}

html, body { overflow-x: clip; }

body {
  font-family: Manrope, system-ui, sans-serif;
  background: var(--limestone);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--graphite);
  color: var(--white);
  padding: 0.7rem 1rem;
}
.skip-link:focus { top: 1rem; }

.focus-ring:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}
.focus-ring-invert:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 3px;
}

html.is-scroll-locked,
html.is-scroll-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
}
html.is-scroll-locked body { touch-action: none; }
html.is-scroll-locked #galleryModal,
html.is-scroll-locked #galleryModal .modal-panel,
html.is-scroll-locked #mobileMenu {
  touch-action: pan-y;
}

.label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
}

.wordmark {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  line-height: 1;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
}
.brand-logo {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
}
.brand-logo-img { object-fit: contain; }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}
.brand-sub {
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.72;
}
.brand-invert { color: var(--ivory); }

.wordmark-line {
  display: block;
  width: 1.75rem;
  height: 1px;
  margin-top: 0.38rem;
  background: currentColor;
  opacity: 0.55;
}

#siteNav {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  z-index: 70;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 320ms ease, border-color 320ms ease, color 320ms ease;
}
#siteNav.is-solid,
#siteNav.is-menu-open {
  background: rgba(242, 240, 234, 0.92);
  border-color: rgba(37, 39, 37, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#siteNav .brand,
#siteNav .nav-link,
#siteNav .menu-btn { color: var(--white); }
#siteNav.is-solid .brand,
#siteNav.is-menu-open .brand,
#siteNav.is-solid .nav-link,
#siteNav.is-menu-open .nav-link,
#siteNav.is-solid .menu-btn,
#siteNav.is-menu-open .menu-btn { color: var(--charcoal); }
#siteNav .nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
}
#siteNav.is-solid .nav-cta,
#siteNav.is-menu-open .nav-cta {
  border-color: var(--charcoal);
  color: var(--charcoal);
}
#siteNav .nav-cta:hover {
  background: var(--white);
  color: var(--graphite);
}
#siteNav.is-solid .nav-cta:hover,
#siteNav.is-menu-open .nav-cta:hover {
  background: var(--graphite);
  color: var(--white);
}
#navInner { padding-top: 0.72rem; padding-bottom: 0.72rem; transition: padding 280ms ease; }
#siteNav.is-solid #navInner { padding-top: 0.55rem; padding-bottom: 0.55rem; }

.nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 240ms ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { width: 100%; }

#mobileMenu {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: var(--limestone);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 280ms ease;
}
#mobileMenu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#mobileMenu a[aria-current="page"] { font-style: italic; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--white);
  overflow: hidden;
}
.hero-frame.img-frame {
  position: absolute;
  inset: 0;
}
.hero picture {
  display: contents;
}
.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
@media (max-width: 1023px), (orientation: portrait) and (max-width: 1366px) {
  .hero-visual { object-position: 50% 42%; }
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide:not(.hero-visual) {
  transform: scale(1.06);
  transition: opacity 1.8s ease-in-out, transform 8s linear;
}
.hero-slide:not(.hero-visual).is-active { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 27, 25, 0.42) 0%, rgba(23, 27, 25, 0.12) 36%, rgba(23, 27, 25, 0.22) 58%, rgba(23, 27, 25, 0.62) 100%);
}
.hero-title {
  font-size: clamp(2.4rem, 0.7rem + 5.2vw, 5.5rem);
  line-height: 1.14;
  text-wrap: wrap;
}
.hero-reveal-line {
  display: block;
  overflow: hidden;
  padding: 0.18em 0.1em 0.3em 0.04em;
  margin: -0.12em -0.1em -0.22em -0.04em;
}
.hero-reveal-line span {
  display: block;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.35rem;
  background: var(--white);
  color: var(--graphite);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.btn-primary:hover { background: var(--limestone); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.35rem;
  background: var(--graphite);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 200ms ease;
}
.btn-dark:hover { background: var(--charcoal); }
.btn-dark:disabled { opacity: 0.6; cursor: progress; }
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 2px;
  transition: color 200ms ease, border-color 200ms ease;
}
.btn-line:hover { color: var(--sage); border-color: var(--sage); }
.btn-line.btn-line-invert { color: var(--ivory); border-color: var(--ivory); }
.btn-line.btn-line-invert:hover { color: var(--sage); border-color: var(--sage); }
.btn-line.hidden { display: none; }

.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--stone);
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame.img-editorial-fallback::after {
  content: attr(data-fallback-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: linear-gradient(135deg, #C9C5B9, #8D9788);
}
.img-frame.img-editorial-fallback img { opacity: 0; }

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 700ms ease;
}
.gallery-item .g-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 27, 25, 0);
  transition: background 400ms ease;
}
.gallery-item .g-arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 350ms ease, transform 350ms ease;
}
.gallery-item .g-caption {
  transition: transform 400ms ease;
}
.gallery-item:hover img { transform: scale(1.035); }
.gallery-item:hover .g-overlay { background: rgba(23, 27, 25, 0.28); }
.gallery-item:hover .g-arrow { opacity: 1; transform: translateY(0); }
.gallery-item:hover .g-caption { transform: translateY(-4px); }

.gallery-grid {
  display: grid;
  gap: 0.85rem;
}
.g-cell-1 { aspect-ratio: 16 / 10; }
.g-cell-2 { aspect-ratio: 3 / 4; min-height: 320px; }
.g-cell-3,
.g-cell-4 { aspect-ratio: 4 / 3; }
.g-cell-1 img { object-position: 50% 58%; }
.g-cell-2 img { object-position: 52% 42%; }
.g-cell-3 img { object-position: 50% 50%; }
.g-cell-4 img { object-position: 48% 55%; }
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: 1.3fr 0.95fr 0.88fr;
    grid-template-rows: minmax(260px, 1fr) minmax(260px, 1fr);
    height: min(72vh, 820px);
  }
  .g-cell-1,
  .g-cell-2,
  .g-cell-3,
  .g-cell-4 {
    aspect-ratio: auto;
    min-height: 0;
    height: 100%;
  }
  .g-cell-1 { grid-column: 1 / 3; grid-row: 1; }
  .g-cell-2 { grid-column: 3; grid-row: 1 / 3; }
  .g-cell-3 { grid-column: 1; grid-row: 2; }
  .g-cell-4 { grid-column: 2; grid-row: 2; }
}

.manifesto-visual img {
  object-position: 50% 50%;
}

.service-row {
  border-top: 1px solid rgba(201, 197, 185, 0.9);
  width: 100%;
  text-align: left;
  padding: 1.35rem 0;
  transition: background-color 200ms ease;
}
.service-row:last-of-type { border-bottom: 1px solid rgba(201, 197, 185, 0.9); }
.service-row[aria-expanded="true"] { background: rgba(250, 249, 245, 0.7); }
a.service-row:hover { background: rgba(250, 249, 245, 0.7); }
.service-arrow {
  transition: transform 280ms ease;
}
.service-row[aria-expanded="true"] .service-arrow {
  transform: rotate(45deg);
}

.process-line {
  transform-origin: left center;
}
@media (max-width: 1023px) {
  .process-line {
    transform-origin: top center;
  }
}

[hidden] { display: none !important; }

.project-card-media {
  aspect-ratio: 4 / 3;
}
.project-card-media img {
  transition: transform 700ms ease;
}
.project-card a:hover .project-card-media img { transform: scale(1.035); }
.project-tag {
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--stone);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--stone);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.about-split-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.about-split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 1024px) {
  .about-split-media { aspect-ratio: auto; height: 100%; }
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  border-top: 1px solid var(--stone);
}
.service-cards > li { border-bottom: 1px solid var(--stone); }
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem 0;
}
.service-card-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  color: var(--charcoal);
}
.service-card-icon svg { width: 100%; height: 100%; }
.service-card-title {
  margin-top: 1.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.25;
  transition: color 300ms ease;
}
.service-card-desc {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}
.service-card-arrow {
  margin-top: auto;
  padding-top: 1.75rem;
  font-size: 1.1rem;
  transition: transform 300ms ease;
}
.service-card:hover .service-card-title { color: var(--sage); }
.service-card:hover .service-card-arrow { transform: translateX(6px); }
@media (min-width: 640px) {
  .service-card { padding: 1.75rem 1.5rem; }
}
@media (min-width: 1024px) {
  .service-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 0;
  }
  .service-cards > li {
    border-bottom: 0;
    border-left: 1px solid var(--stone);
  }
  .service-card { padding: 0.25rem 1.25rem 0.5rem; }
  .service-card-title { font-size: 1.1rem; }
}
.project-meta-year {
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid var(--stone);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.filter-chip:hover { border-color: var(--charcoal); }
.filter-chip[aria-current="true"] {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--white);
}

.team-photo { aspect-ratio: 4 / 5; }

.project-facts {
  border-top: 1px solid var(--stone);
}
.project-facts > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--stone);
}
.project-facts dt {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  padding-top: 0.15rem;
}
.project-facts dd {
  font-size: 0.95rem;
  color: var(--charcoal);
}

.project-gallery {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.project-gallery .gallery-item { aspect-ratio: 4 / 3; }
.project-gallery .gallery-item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}
@media (min-width: 1024px) {
  .project-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-gallery .gallery-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .project-gallery .gallery-item:first-child:nth-last-child(2) { grid-row: auto; }
}
.project-gallery .gallery-item:only-child {
  grid-column: 1 / -1;
  grid-row: auto;
  aspect-ratio: 16 / 9;
}

.technical-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--stone);
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(201, 197, 185, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 197, 185, 0.35) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--sage);
  text-align: center;
}

.gallery-slider-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-slider-count {
  margin-right: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gallery-slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stone);
  font-size: 1rem;
  color: var(--charcoal);
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, opacity 250ms ease;
}
.gallery-slider-btn:hover:not(:disabled) {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--ivory);
}
.gallery-slider-btn:disabled { opacity: 0.35; cursor: default; }
.gallery-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 0.85rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery-slider-track::-webkit-scrollbar { display: none; }
.gallery-slider-track .gallery-item {
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .gallery-slider-track { grid-auto-columns: calc((100% - 0.85rem) / 2); }
}
@media (min-width: 1024px) {
  .gallery-slider-track { grid-auto-columns: calc((100% - 1.7rem) / 2.6); }
}
@media (min-width: 768px) {
  .gallery-slider-track--few { grid-auto-columns: 72%; }
  .gallery-slider-track--few .gallery-item { aspect-ratio: 16 / 9; }
}
.gallery-slider-progress {
  position: relative;
  height: 1px;
  margin-top: 1.25rem;
  background: var(--stone);
}
.gallery-slider-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--charcoal);
  transition: width 250ms ease;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--stone);
  background: var(--white);
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.choice:hover { border-color: var(--charcoal); }
.choice input {
  width: 16px;
  height: 16px;
  margin-top: 0.12rem;
  flex-shrink: 0;
  accent-color: var(--graphite);
}
.choice:has(input:checked) {
  border-color: var(--graphite);
  background: var(--limestone);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}
fieldset[aria-invalid="true"] .choice { border-color: rgba(138, 58, 50, 0.45); }

.field {
  width: 100%;
  min-height: 48px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--stone);
  padding: 0.7rem 0;
  color: var(--charcoal);
  font-size: 0.95rem;
}
.field:focus {
  outline: none;
  border-bottom-color: var(--charcoal);
}
.field[aria-invalid="true"] { border-bottom-color: #8a3a32; }
select.field { background: var(--ivory); }

#waFab {
  position: fixed;
  right: calc(1.1rem + env(safe-area-inset-right));
  bottom: calc(1.1rem + env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  background: var(--charcoal);
  color: var(--ivory);
  box-shadow: 0 10px 28px rgba(23, 27, 25, 0.22);
  transition: transform 220ms ease, padding 220ms ease;
}
#waFab:hover { transform: translateY(-2px); }
#waFab .wa-label { display: none; }
@media (min-width: 1024px) {
  #waFab { padding-right: 1.1rem; }
  #waFab .wa-label { display: inline; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
}

.modal-scrim {
  background: rgba(23, 27, 25, 0.62);
}

.hairline { height: 1px; background: var(--stone); }
.rule-sage { height: 1px; background: var(--sage); width: 2.5rem; }

.display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .gallery-item:hover img,
  .project-card a:hover .project-card-media img { transform: none; }
  #waFab:hover { transform: none; }
}
