:root {
  color-scheme: light;
  --ink: #9e2923;
  --paper: #ffffff;
  --muted: #ab4039;
  --rule: #e1c4c1;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
section[id] { scroll-margin-top: 2rem; }
.shell { width: min(100% - 7rem, 82rem); margin-inline: auto; }
.skip { position: absolute; top: 1rem; left: 1rem; z-index: 2; transform: translateY(-180%); background: var(--paper); color: var(--ink); padding: .7rem 1rem; }
.skip:focus { transform: none; }

.header { display: flex; justify-content: space-between; align-items: center; min-height: 5.25rem; border-bottom: 1px solid var(--rule); }
.brand { width: 46px; height: 46px; display: grid; place-items: center; }
.header .brand { width: 66px; height: 66px; flex: 0 0 auto; }
nav { display: flex; gap: clamp(1.25rem, 4vw, 3rem); }
nav a, .hero-link { text-decoration: none; font-size: .92rem; }
nav a:hover { text-decoration: underline; text-underline-offset: .35em; }

.hero { display: grid; grid-template-columns: 1.02fr 1fr; align-items: stretch; gap: clamp(2rem, 6vw, 6rem); padding-block: 2rem 3rem; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding-block: 2rem; }
.hero h1 { width: min(100%, 39rem); }
.hero h1 img { width: 100%; }
.hero-link { border-bottom: 1px solid var(--muted); margin-top: 1.5rem; padding-block: .5rem; }
.hero-link:hover { border-color: var(--ink); }
.hero-photo { min-width: 0; align-self: center; justify-self: end; width: min(100%, 31rem); }
.hero-photo svg { display: block; width: 100%; height: auto; }

.works-inner { padding-block: clamp(3rem, 7vw, 7rem); }
.section-heading { font-size: .9rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: clamp(2rem, 5vw, 5rem); }
.feature { display: grid; grid-template-columns: 1.14fr 1fr; align-items: center; gap: clamp(2rem, 8vw, 8rem); }
.feature + .feature { margin-top: clamp(4.5rem, 10vw, 10rem); }
.feature h3, .about h2, .relief h3 { font: 400 clamp(2.7rem, 6.5vw, 6rem)/.98 var(--serif); letter-spacing: -.065em; }
.feature p, .relief p, .about p { max-width: 39ch; margin-top: 1.4rem; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.feature-photo img { width: 100%; }
.inset { width: min(100%, 23rem); margin-top: clamp(1.75rem, 5vw, 3.5rem); }
.buildings { grid-template-columns: 1fr 1.14fr; }
.relief { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); margin-top: clamp(4rem, 9vw, 9rem); padding-top: 2.25rem; border-top: 1px solid var(--rule); }
.relief h3 { font-size: clamp(2.25rem, 4vw, 4.25rem); }

.gallery { margin-top: clamp(2.5rem, 6vw, 5rem); border-block: 1px solid var(--rule); }
.gallery summary { padding-block: 1.25rem; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.gallery summary:hover { text-decoration: underline; text-underline-offset: .25em; }
.gallery summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.gallery-collapse, .gallery[open] .gallery-expand { display: none; }
.gallery[open] .gallery-collapse { display: inline; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); padding-bottom: 2rem; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: #f8f6f5; }
.gallery-grid figcaption { margin-top: .55rem; font-size: .9rem; }
.gallery-photo { display: block; cursor: zoom-in; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.lightbox::backdrop { background: var(--paper); }
.lightbox-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .65rem;
  width: min(100%, 80rem);
  height: 100%;
  margin-inline: auto;
  padding: max(.65rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right))
    max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
}
.lightbox-close { justify-self: end; }
.lightbox button {
  min-height: 44px;
  padding-inline: .65rem;
  border: 1px solid var(--rule);
  border-radius: .2rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.lightbox button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lightbox button:hover { background: #fbf3f2; }
.lightbox-stage { min-height: 0; touch-action: pan-y pinch-zoom; user-select: none; }
.lightbox-image { width: 100%; height: 100%; object-fit: contain; }
.lightbox-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; }
.lightbox-caption { text-align: center; font-size: .9rem; line-height: 1.35; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); padding-block: clamp(3.5rem, 9vw, 8rem); }
.about p { color: var(--muted); max-width: 49ch; }
.about p:first-child { margin-top: 0; }
.footer { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); border-top: 1px solid var(--rule); padding-block: 2rem; }
.footer-identity { display: flex; align-items: center; gap: .8rem; font-size: .9rem; }
.footer-identity span { display: block; color: var(--muted); }
.footer-contact { display: grid; justify-items: start; gap: .35rem; }
.footer-contact h2 { font-size: 1rem; margin-bottom: .15rem; }
.footer-contact a { color: var(--muted); overflow-wrap: anywhere; text-underline-offset: .25em; }
.footer-contact a:hover { color: var(--ink); }
.studio-address { margin-top: .65rem; font-style: normal; }
.studio-address p { margin-bottom: .2rem; }

@media (max-width: 48rem) {
  .shell { width: calc(100% - 2.5rem); }
  .header { min-height: 4.75rem; }
  .hero, .feature, .relief, .about, .footer { grid-template-columns: 1fr; }
  .hero { gap: 1rem; padding-block: 1rem 2.25rem; }
  .hero-photo { grid-row: 1; justify-self: center; width: min(100%, 22rem, 50svh); }
  .hero-copy { padding-block: .6rem 0; }
  .hero h1 { width: min(100%, 29rem); }
  .hero-link { margin-top: .75rem; }
  .buildings .feature-photo { grid-row: 1; }
  .feature h3 br { display: none; }
  .about { gap: 1.25rem; }
  .footer { gap: 1.25rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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