@font-face {
  font-family: Quicksand;
  src: url("assets/quicksand-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Quicksand;
  src: url("assets/quicksand-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #141412;
  --surface: #1d1c19;
  --raised: #26241f;
  --ink: #f3eee3;
  --muted: #c3bdb1;
  --line: #4d4840;
  --accent: #ddbc87;
  --accent-hover: #f0d7aa;
  --accent-ink: #1b1813;
  --cream: #fff7e8;
  --gutter: clamp(20px, 4.8vw, 84px);
  --header-height: 80px;
  color: var(--ink);
  background: var(--paper);
  font: 400 16px/1.55 Quicksand, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
[id] { scroll-margin-top: calc(var(--header-height) + 22px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  color: var(--accent-ink);
  background: var(--accent);
}

.section-width {
  width: min(calc(100% - 2 * var(--gutter)), 1320px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  background: var(--paper);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(calc(100% - 2 * var(--gutter)), 1490px);
  min-height: var(--header-height);
  margin-inline: auto;
  gap: 32px;
}

.brand { display: inline-block; }
.brand img { width: clamp(170px, 18vw, 226px); height: auto; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 44px);
  font-size: .875rem;
  font-weight: 700;
}

.primary-nav > a:not(.button):hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.menu-toggle { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.button span { font-size: 1rem; }
.header-cta { color: var(--accent); border-color: #8a7658; }
.header-cta:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(510px, 69vh, 780px);
  width: min(calc(100% - clamp(28px, 4vw, 62px)), 1580px);
  margin-inline: auto;
  color: var(--cream);
  background: #25241c;
}

.hero-images, .hero-picture, .hero::after {
  position: absolute;
  inset: 0;
}

.hero-images, .hero::after { z-index: -1; }
.hero-images { overflow: hidden; }
.hero-picture { opacity: 0; transition: opacity .75s ease; }
.hero-picture.is-current { opacity: 1; z-index: 1; }

.hero-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 52%;
  transform: scale(1.055);
}

.hero::after {
  content: "";
  background:
    linear-gradient(90deg, rgb(14 13 11 / 80%), rgb(14 13 11 / 48%) 34%, transparent 78%),
    linear-gradient(0deg, rgb(14 13 11 / 62%), transparent 50%);
}

.hero-content {
  max-width: 780px;
  padding: 50px clamp(30px, 6vw, 102px) clamp(108px, 10vw, 146px);
}

.hero h1 {
  font-size: clamp(3.7rem, 7vw, 7.1rem);
  line-height: .98;
  letter-spacing: -.059em;
}

.hero p {
  max-width: 29rem;
  margin-block: 25px 27px;
  color: #f4f1e6;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.hero-cta {
  color: var(--accent-ink);
  background: var(--accent);
}

.hero-cta:hover { background: var(--accent-hover); }
.hero-showcase {
  position: absolute;
  right: clamp(20px, 3vw, 54px);
  bottom: clamp(18px, 2.5vw, 40px);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: clamp(13px, 2vw, 27px);
  max-width: calc(100% - 40px);
  padding: 8px 10px 8px 17px;
  border: 1px solid rgb(249 246 236 / 32%);
  color: var(--cream);
  background: rgb(20 18 14 / 84%);
}

.hero-controls { display: flex; align-items: center; gap: 5px; }
.hero-controls .round-button { width: 38px; height: 38px; border-color: rgb(249 246 236 / 36%); }
.hero-controls .round-button:hover { border-color: var(--accent); }
.hero-position { margin-right: 6px; font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.playback-icon { width: 8px; height: 11px; border-inline: 2px solid currentColor; }

#showcase-playback[data-paused="true"] .playback-icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border: solid transparent;
  border-width: 6px 0 6px 9px;
  border-left-color: currentColor;
}

.hero-credit {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 4px 0;
  border: 0;
  color: var(--cream);
  background: transparent;
  font-size: .86rem;
  font-weight: 700;
  text-align: left;
}

.hero-credit:hover { color: var(--accent-hover); }

.work { padding-block: clamp(64px, 8vw, 117px); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 43px);
}

h2 {
  font-size: clamp(2.6rem, 4.9vw, 5rem);
  line-height: 1.04;
  letter-spacing: -.058em;
}

.work-count {
  margin-top: 9px;
  color: var(--muted);
  font-size: .86rem;
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 3px;
}

.work-filters button {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: .81rem;
}

.work-filters button:hover { border-color: var(--accent); color: var(--accent); }
.work-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(27px, 3.6vw, 52px) clamp(14px, 2vw, 29px);
}

.project { grid-column: span 2; min-width: 0; }
.project-grid[data-filtered="false"] .project:nth-child(-n + 4) { grid-column: span 3; }

.project-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
}

.project-visual {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--raised);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .36s ease;
}

.project-open:hover img { transform: scale(1.025); }

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 88px;
  padding: 14px 0 16px;
}

.project-type {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .075em;
  line-height: 1.4;
  text-transform: uppercase;
}

.project-title {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.2rem, 1.85vw, 1.82rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.project-location {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
}

.project-arrow, .round-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.project-open:hover .project-arrow, .round-button:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}

.studio {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
}

.studio-visual {
  position: relative;
  min-height: 420px;
}

.studio-visual img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

.studio-visual figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  padding: 9px 16px;
  color: var(--cream);
  background: rgb(20 20 18 / 88%);
  font-size: .78rem;
}

.studio-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(30px, 5vw, 76px);
}

.studio-copy p {
  max-width: 36ch;
  margin-top: 19px;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: .875rem;
  font-weight: 700;
}

.text-link:hover { color: var(--accent); }
.studio-copy .text-link { margin-top: 26px; color: var(--accent); }
.studio-copy .text-link:hover { color: var(--accent-hover); }

.architect {
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1fr;
  gap: clamp(30px, 7vw, 110px);
  align-items: center;
  max-width: 1050px;
  padding-block: clamp(64px, 9vw, 134px);
}

.architect-slideshow {
  min-width: 0;
  align-self: start;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.architect-slides {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper);
}

.architect-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 550ms ease;
}

.architect-slide.is-current { opacity: 1; }
.architect-slide-details { padding: 13px 14px 10px; }
.architect-slide-controls { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.architect-slide-position { margin-right: auto; color: var(--accent); font-size: .875rem; white-space: nowrap; }
.architect-slide-controls button { min-height: 44px; padding: 8px; border: 0; color: var(--ink); background: transparent; font-size: .875rem; }
.architect-slide-controls button:hover { color: var(--accent); background: var(--raised); }

.architect-role {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.architect-copy h2 { font-size: clamp(2.4rem, 4.35vw, 4.8rem); text-wrap: balance; }
.architect-copy > p:not(.architect-role) {
  max-width: 56ch;
  margin-top: 17px;
  color: var(--muted);
}

.studio-copy > p,
.architect-copy > p:not(.architect-role),
.service-grid p,
.contact-copy > p,
#detail-description {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.site-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.site-photo-grid a { display: block; }
.site-photo-grid img { width: 100%; height: auto; border: 1px solid var(--line); }
.site-photo-grid a:hover img { border-color: var(--accent); }
.site-photo-grid figcaption { margin-top: 7px; color: var(--muted); font-size: .85rem; }

.services { padding-block: clamp(40px, 5vw, 76px) clamp(62px, 8.8vw, 131px); border-top: 1px solid var(--line); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.2vw, 48px);
  margin-top: clamp(28px, 4vw, 55px);
}

.service-grid article {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.service-grid h3 {
  margin-bottom: 11px;
  font-size: clamp(1.3rem, 2.35vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.033em;
}

.service-grid p { max-width: 37ch; color: var(--muted); }

.contact {
  padding-block: clamp(62px, 7.7vw, 113px);
  color: var(--ink);
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(34px, 6vw, 94px);
}

.contact-copy p {
  max-width: 35ch;
  margin-block: 22px;
  color: var(--muted);
}

.contact-email { overflow-wrap: anywhere; color: var(--accent); }
.contact-email:hover { color: var(--accent-hover); }

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

.inquiry-form label {
  display: grid;
  gap: 6px;
  color: var(--cream);
  font-size: .85rem;
}

.inquiry-form :is(input, select, textarea) {
  width: 100%;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid #71685b;
  border-radius: 0;
  color: var(--cream);
  background: var(--raised);
  font-size: 1rem;
}

.inquiry-form :is(input, select, textarea):focus-visible {
  outline: 1px solid var(--cream);
  outline-offset: 2px;
}

.inquiry-form textarea { resize: vertical; }
.form-wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.email-button { color: var(--accent-ink); background: var(--accent); }
.email-button:hover { background: var(--accent-hover); }
.form-status { color: var(--muted); font-size: .83rem; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding-block: 28px;
  color: var(--muted);
  font-size: .85rem;
}

.site-footer .brand img { width: 190px; }
.footer-brand { display: grid; gap: 9px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px 26px; }
.footer-links .text-link { color: var(--ink); }
.footer-links .text-link:hover { color: var(--accent); }

.project-dialog {
  width: min(1080px, calc(100% - 36px));
  max-height: min(92dvh, 980px);
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  overscroll-behavior: contain;
}

.project-dialog::backdrop { background: rgb(6 6 5 / 82%); }

.detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(16px, 2.25vw, 29px);
}

.detail-header h2 {
  margin-top: 5px;
  font-size: clamp(1.75rem, 3.4vw, 3.3rem);
  letter-spacing: -.045em;
}

.detail-figure img {
  width: 100%;
  height: clamp(190px, 51dvh, 560px);
  object-fit: contain;
  background: #0b0b0a;
}

.detail-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(17px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.gallery-controls { display: flex; gap: 8px; }
.detail-body { padding: 17px clamp(17px, 3vw, 32px) 28px; }
.detail-description { max-width: 76ch; color: var(--muted); }
.detail-body .text-link { margin-top: 14px; color: var(--accent); }
.detail-body .text-link:hover { color: var(--accent-hover); }
.detail-site-photos { margin-top: 24px; }
.detail-site-photos h3 { color: var(--ink); font-size: 1.3rem; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px clamp(17px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  scrollbar-color: #8a7658 var(--surface);
}

.gallery-thumb {
  flex: 0 0 98px;
  padding: 2px;
  border: 1px solid transparent;
  background: var(--raised);
}

.gallery-thumb img { width: 100%; height: auto; }
.gallery-thumb:hover, .gallery-thumb[aria-pressed="true"] { border-color: var(--accent); }
.gallery-thumb:focus-visible { outline-offset: 1px; }

@media (max-width: 920px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project, .project-grid[data-filtered="false"] .project:nth-child(-n + 4) { grid-column: span 1; }
  .desktop-break { display: none; }
}

@media (max-width: 860px) {
  .hero-content { padding-inline: 34px; }
  .hero h1 { font-size: clamp(3.7rem, 8.2vw, 5.2rem); }
  .studio-copy { padding: 30px; }
  .studio-visual { min-height: 370px; }
}

@media (max-width: 760px) {
  :root { --header-height: 67px; }
  .header-inner { gap: 16px; }
  .brand img { width: 175px; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 0 6px 9px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-size: .875rem;
  }

  .menu-icon {
    display: inline-block;
    width: 15px;
    height: 8px;
    border-block: 1px solid currentColor;
  }

  .primary-nav {
    position: absolute;
    display: none;
    inset: 100% 0 auto;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .site-header.menu-open .primary-nav { display: grid; }
  .primary-nav > a:not(.button) { padding: 12px 0; }
  .primary-nav > .button { width: fit-content; margin-top: 8px; }
  .hero {
    width: calc(100% - 24px);
    min-height: clamp(500px, 75svh, 660px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
  }

  .hero-picture img { object-position: 63% 50%; }
  .hero::after {
    background:
      linear-gradient(0deg, rgb(14 13 11 / 89%), rgb(14 13 11 / 52%) 47%, transparent 80%),
      linear-gradient(90deg, rgb(14 13 11 / 28%), transparent 70%);
  }

  .hero-content { padding: 25px 22px 25px; }
  .hero h1 { font-size: clamp(2.55rem, 10.35vw, 4.6rem); }
  .hero p { max-width: 27ch; margin-block: 16px 20px; }
  .hero-showcase { position: static; max-width: none; margin: 0 12px 13px; padding: 7px 8px 7px 11px; justify-content: space-between; gap: 9px; }
  .hero-controls .round-button { width: 35px; height: 35px; }
  .hero-position { font-size: .69rem; margin-right: 3px; }
  .hero-credit { gap: 7px; font-size: .79rem; line-height: 1.2; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .project, .project-grid[data-filtered="false"] .project:nth-child(-n + 4) { grid-column: 1; }
  .project-visual { height: auto; aspect-ratio: 16 / 9; }
  .project-meta { min-height: 80px; }
  .project-title { font-size: clamp(1.42rem, 5.1vw, 2rem); }
  .studio { grid-template-columns: 1fr; }
  .studio-visual { min-height: 0; aspect-ratio: 4 / 3; }
  .studio-copy { padding: 30px 24px 35px; }
  .architect { grid-template-columns: 1fr; gap: 26px; }
  .architect-slideshow { width: min(100%, 380px); }
  .detail-figure img { height: clamp(178px, 55vw, 380px); }
  .detail-caption { padding-block: 9px; }
  .gallery-thumb { flex-basis: 77px; }
  .service-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .site-footer { flex-wrap: wrap; column-gap: 16px; }
  .footer-brand { flex-basis: 100%; }
}

@media (max-width: 400px) {
  .inquiry-form { grid-template-columns: 1fr; }
  .work-filters button { padding-inline: 11px; }
  .site-photo-grid { grid-template-columns: 1fr; gap: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.arrow {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
}

.arrow::before, .arrow::after {
  content: "";
  grid-area: 1 / 1;
}

.arrow::before {
  width: .75em;
  height: 1px;
  background: currentColor;
}

.arrow::after {
  width: .42em;
  height: .42em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateX(.14em) rotate(45deg);
}

.arrow-ne { rotate: -45deg; }
.arrow-se { rotate: 45deg; }
.arrow-up { rotate: -90deg; }
.arrow-left { rotate: 180deg; }
