:root {
  color-scheme: light;
  --paper: #edf2ff;
  --ink: #182747;
  --blue: #193bb2;
  --blue-dark: #122e91;
  --rule: #a1afd9;
  --muted: #47577b;
  --display: "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.2rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.58 var(--body);
}

h1, h2, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.wrap {
  width: min(calc(100% - clamp(3.5rem, 9vw, 9rem)), 80rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  padding: .6rem .9rem;
  transform: translateY(-150%);
  background: var(--paper);
}

.skip-link:focus { transform: translateY(0); }

.header-inner {
  min-height: 5.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  color: var(--blue);
  font: 700 clamp(1.4rem, 2.8vw, 2rem)/.95 var(--display);
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-inner nav {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 3vw, 2.25rem);
  font-size: .91rem;
  font-weight: 650;
}

.work-link, .header-call {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  min-height: 2.75rem;
  white-space: nowrap;
  text-decoration: none;
}

.header-call {
  justify-content: center;
  min-width: 2.75rem;
  color: var(--blue);
}

.work-link:hover, .header-call:hover {
  text-decoration: underline;
  text-underline-offset: .25em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, min(52%, 34rem, max(28rem, 59svh))) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 6.75vw, 6.5rem);
  padding-top: clamp(1rem, 2vw, 2rem);
}

.hero-photo img {
  width: 100%;
  height: auto;
  background: var(--rule);
}

.hero-photo figcaption {
  padding-top: .55rem;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 650;
}

.hero-copy {
  min-width: 0;
  padding-bottom: 1.5rem;
}

.service {
  margin-bottom: clamp(.95rem, 2vw, 1.5rem);
  color: var(--blue);
  font-size: .77rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1, h2 {
  color: var(--blue);
  font-family: var(--display);
  font-weight: 700;
  line-height: .9;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.6rem, 6vw, 6.5rem);
  letter-spacing: -.015em;
}

h1 em {
  display: block;
  margin-top: .16em;
  color: #146460;
  font: italic 400 .48em/1.12 Georgia, serif;
  letter-spacing: -.04em;
  text-transform: none;
}

.intro {
  max-width: 38ch;
  margin-block: clamp(1.25rem, 3.3vw, 2.15rem) 1.2rem;
  font-size: clamp(1.03rem, 1.45vw, 1.23rem);
  font-weight: 500;
  text-wrap: pretty;
}

.intro strong { color: var(--blue); }
.intro span { white-space: nowrap; }

.call-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  padding: .75rem 1.35rem;
  border-radius: 3rem;
  background: var(--blue);
  color: #fff;
  font-size: .96rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.call-button:hover { background: var(--blue-dark); }

.work { margin-top: clamp(3.3rem, 7vw, 6rem); }

.section-heading {
  margin-bottom: clamp(1.35rem, 3vw, 2.55rem);
  padding-top: .75rem;
  border-top: 1px solid var(--rule);
}

h2 { font-size: clamp(2.75rem, 5.9vw, 5.65rem); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.75rem, 4.2vw, 3.7rem) clamp(.9rem, 2.55vw, 2.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-grid li {
  display: flex;
  grid-column: span 5;
}

.work-grid .project-lead,
.work-grid .project-wide { grid-column: span 7; }

.project {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  text-decoration: none;
}

.project-frame {
  display: block;
  height: clamp(14rem, 31vw, 27rem);
  overflow: hidden;
  background: var(--rule);
}

.project-photo, .viewer-image {
  width: 100%;
  height: 100%;
  transform: rotate(var(--photo-level, 0deg)) scale(var(--photo-scale, 1));
}

.project-photo {
  object-fit: cover;
  object-position: var(--photo-focus, center);
}

[data-treatment="facade"] { --photo-focus: 52% 29%; }

[data-treatment="room"] {
  --photo-focus: 38% 32%;
  --photo-level: -1.3deg;
  --photo-scale: 1.05;
}

[data-treatment="deck"] {
  --photo-focus: 55% 54%;
  --photo-level: -1.05deg;
  --photo-scale: 1.045;
}

[data-treatment="rowhouse"] {
  --photo-focus: 51% 31%;
  --photo-level: -2deg;
  --photo-scale: 1.075;
}

[data-treatment="doorway"] {
  --photo-focus: 59% 44%;
  --photo-level: -2.6deg;
  --photo-scale: 1.085;
}

[data-treatment="storefront"] {
  --photo-focus: 44% 77%;
  --photo-level: 1.4deg;
  --photo-scale: 1.06;
}

.project-caption {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 3rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .95rem;
  font-weight: 650;
  text-wrap: balance;
}

.project:is(:hover, :focus-visible) .project-caption {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.enlarge {
  flex: none;
  width: 1.35rem;
  color: var(--blue);
  text-align: center;
  font-size: 1.45rem;
  line-height: 1;
}

.enlarge::after { content: "+"; }

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(3.5rem, 8vw, 7rem);
  padding-block: clamp(1.35rem, 4vw, 2.5rem);
  border-top: 2px solid var(--blue);
}

.contact h2 { font-size: clamp(2.25rem, 4.8vw, 4.35rem); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: 1.05rem 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .86rem;
}

.footer-inner .wordmark { font-size: 1.25rem; }

html:has(.viewer[open]) { overflow: hidden; }

.viewer {
  width: min(42rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  padding: .75rem;
  border: 1px solid #a1afd9;
  border-radius: .65rem;
  background: #152349;
  color: #eef3ff;
}

.viewer::backdrop { background: rgb(12 22 49 / 88%); }

.viewer-header, .viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.viewer-header { margin-bottom: .7rem; }
.viewer-controls { margin-top: .7rem; }

.viewer h2 {
  color: inherit;
  font: 700 1rem/1.3 var(--body);
  text-transform: none;
}

.viewer button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .25rem .65rem;
  border: 1px solid #a1afd9;
  border-radius: 1.5rem;
  background: transparent;
  color: inherit;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.viewer button:hover { background: #293e76; }
.viewer button:focus-visible { outline-color: var(--paper); }

.viewer-frame {
  overflow: hidden;
  height: clamp(9rem, calc(100vh - 10.5rem), min(53rem, (100vw - 3rem) * 4 / 3));
  height: clamp(9rem, calc(100dvh - 10.5rem), min(53rem, (100vw - 3rem) * 4 / 3));
  background: #0e1834;
}

.viewer-image { object-fit: contain; }

.viewer-count {
  color: #c4d1ff;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 49rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; }
}

@media (max-width: 55rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-photo img {
    max-height: 37rem;
    object-fit: contain;
    background: transparent;
  }

  .hero-photo figcaption {
    padding-top: .4rem;
    text-align: center;
  }

  .hero-copy { padding-bottom: 0; }

  h1 { font-size: clamp(2.9rem, 11.8vw, 5.75rem); }
}

@media (max-width: 42rem) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem .8rem;
  }

  .work-grid li,
  .work-grid .project-wide { grid-column: span 1; }

  .work-grid .project-lead { grid-column: span 2; }

  .project-frame { height: auto; aspect-ratio: 4 / 5; }
  .project-lead .project-frame { aspect-ratio: 10 / 7; }

  .project-photo[data-treatment="storefront"] {
    --photo-scale: 1.34;
    transform-origin: center 88%;
  }

  .contact { flex-direction: column; align-items: flex-start; gap: .9rem; }
}

@media (max-width: 24rem) {
  .header-call span { display: none; }
  .work-link, .header-call { padding-inline: .18rem; }
  .section-heading { font-size: clamp(2.15rem, 11.2vw, 2.75rem); }
  .project-caption { font-size: .87rem; }
}
