@font-face {
  font-family: DM Sans;
  src: url("dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f0e7;
  --strip: #eae2d4;
  --ink: #29261e;
  --muted: #574e40;
  --rule: #a39787;
  --accent: #823e2b;
  --wine: #3e2823;
  --light: #f8efe2;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --serif: Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: .24em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

h1, h2, p, figure {
  margin: 0;
}

img {
  display: block;
  width: 100%;
}

.shell {
  width: min(100% - 2 * var(--gutter), 88rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 1;
  top: .65rem;
  left: var(--gutter);
  padding: .5rem 1rem;
  transform: translateY(-160%);
  background: var(--wine);
  color: var(--light);
}

.skip:focus {
  transform: none;
  color: var(--light);
}

.demo-strip {
  background: var(--strip);
  color: var(--muted);
  font-size: .79rem;
}

.demo-strip-inner,
.masthead,
.colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1.5rem;
}

.demo-strip-inner > a,
.languages a,
.sections a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.languages,
.sections {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 2.6rem);
}

.languages {
  flex-shrink: 0;
  gap: .18rem;
}

.languages a {
  justify-content: center;
  min-width: 2.4rem;
  text-decoration: none;
}

.languages a[aria-current="true"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

.masthead {
  min-height: 5.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(.6rem, 1.8vw, 1.6rem);
  font: normal 2.75rem/.85 var(--serif);
  letter-spacing: -.075em;
  text-decoration: none;
}

.wordmark span {
  color: var(--muted);
  font: normal .82rem/1.35 var(--sans);
  letter-spacing: 0;
}

.sections {
  font-size: .9rem;
}

.sections a {
  text-decoration: none;
}

.sections a:hover {
  text-decoration: underline;
}

.hero {
  padding-top: clamp(2.4rem, 5.1vw, 5rem);
}

.hero-copy,
.project,
.approach,
.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(.75rem, 2.15vw, 2rem);
}

.hero-copy {
  align-items: end;
  margin-bottom: clamp(1.8rem, 4vw, 3.8rem);
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.052em;
}

h1 {
  grid-column: span 8;
  font-size: clamp(3.2rem, 8.5vw, 8rem);
  line-height: .87;
}

h1 em {
  display: block;
  padding-bottom: .07em;
  color: var(--accent);
  font-weight: inherit;
}

.hero-aside {
  grid-column: 9 / -1;
  max-width: 18rem;
  padding-bottom: .15rem;
  justify-self: end;
}

.hero-aside p,
.project-copy p,
.approach-copy p,
.contact p {
  max-width: 36ch;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.text-link,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: fit-content;
  min-height: 2.75rem;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.text-link {
  margin-top: .75rem;
  border-bottom: 1px solid currentColor;
}

.arrow {
  display: block;
  position: relative;
  flex: 0 0 .87rem;
  width: .87rem;
  height: .87rem;
}

.arrow::before,
.arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  top: 50%;
  inset-inline: 0;
  border-top: 1px solid currentColor;
}

.arrow::after {
  right: 1px;
  top: calc(50% - .21rem + .5px);
  width: .42rem;
  height: .42rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.arrow.down {
  rotate: 90deg;
}

.photo-frame {
  overflow: hidden;
  background: #d3bca5;
}

.photo-frame img {
  height: 100%;
  object-fit: cover;
}

.hero-photo .photo-frame {
  aspect-ratio: 2.35;
}

.hero-photo img {
  object-position: center 54%;
}

figcaption {
  padding-top: .7rem;
  color: var(--muted);
  font-size: .79rem;
}

.hero-photo figcaption {
  display: flex;
  justify-content: space-between;
  gap: .25rem 1rem;
  flex-wrap: wrap;
}

.project,
.approach {
  align-items: center;
  margin-block: clamp(3.8rem, 9.5vw, 9.5rem);
  scroll-margin-top: 1.5rem;
}

.project-photo {
  grid-column: 2 / span 5;
  grid-row: 1;
  align-self: start;
}

.project-photo .photo-frame {
  aspect-ratio: 4 / 4.65;
}

.project-copy {
  grid-column: 8 / -1;
  grid-row: 1;
}

h2 {
  font-size: clamp(2.65rem, 5.1vw, 5.35rem);
  line-height: .96;
}

.project-copy p,
.approach-copy p,
.contact p {
  margin-top: 1.25rem;
}

.approach {
  align-items: start;
  border-top: 1px solid var(--rule);
  padding-top: clamp(2.6rem, 6.5vw, 6rem);
}

.approach-copy {
  grid-column: span 5;
}

.services {
  grid-column: 7 / -1;
}

.services details {
  border-bottom: 1px solid var(--rule);
}

.services details:first-child {
  border-top: 1px solid var(--rule);
}

.services summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  gap: 1rem;
  padding-block: .9rem;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 600;
}

.services summary::-webkit-details-marker {
  display: none;
}

.services summary:hover {
  color: var(--accent);
}

.services details p {
  max-width: 53ch;
  padding: 0 1.6rem 1rem 0;
  color: var(--muted);
  font-size: .94rem;
}

.disclosure {
  display: grid;
  place-items: center;
  flex: 0 0 1.05rem;
  height: 1.05rem;
  color: var(--accent);
}

.disclosure::before,
.disclosure::after {
  content: "";
  grid-area: 1 / 1;
  width: .9rem;
  border-top: 1px solid currentColor;
}

.disclosure::after {
  rotate: 90deg;
}

[open] .disclosure::after {
  visibility: hidden;
}

footer {
  background: var(--wine);
  color: var(--light);
}

footer a:hover {
  color: #f3cfb4;
}

.contact {
  align-items: end;
  padding-block: clamp(3rem, 7vw, 7rem);
  row-gap: 1.45rem;
}

.contact > div {
  grid-column: span 7;
}

.contact-link {
  grid-column: 8 / -1;
  justify-self: end;
  padding: .55rem 1.1rem;
  border: 1px solid #d5b9a7;
}

.colophon {
  padding-block: .5rem;
  border-top: 1px solid #9a7b6e;
  font-size: .8rem;
}

.colophon a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media (max-width: 58rem) {
  .project-photo {
    grid-column: 1 / span 6;
  }
}

@media (max-width: 43rem) {
  .hero-copy,
  .project,
  .approach,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy > *,
  .project > *,
  .approach > *,
  .contact > * {
    grid-column: 1;
  }

  .hero-copy {
    gap: 1.15rem;
  }

  .hero-aside,
  .contact-link {
    justify-self: start;
  }

  .hero-aside {
    max-width: 26rem;
  }

  h1 {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .hero-photo .photo-frame {
    aspect-ratio: 4 / 3;
  }

  .project,
  .approach {
    gap: 1.85rem;
  }

  .project-photo {
    grid-row: 2;
    width: min(91%, 27rem);
    justify-self: end;
  }

  .project-photo .photo-frame {
    aspect-ratio: 4 / 4.3;
  }
}

@media (max-width: 31rem) {
  .masthead {
    align-items: end;
    column-gap: .6rem;
    padding-block: 1.05rem .4rem;
  }

  .wordmark {
    flex-direction: column;
    align-items: start;
    gap: .4rem;
  }

  .sections {
    gap: .75rem;
    text-align: center;
  }

  .demo-strip-inner,
  .colophon {
    column-gap: .55rem;
  }

  .languages a {
    min-width: 1.9rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .text-link .arrow,
  .contact-link .arrow {
    transition: translate 180ms ease-out;
  }

  .text-link:hover .arrow {
    translate: 0 .15rem;
  }

  .contact-link:hover .arrow {
    translate: .15rem 0;
  }

  @supports (animation-timeline: view()) {
    .project-photo img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 55%;
    }

    @keyframes settle {
      from { transform: scale(1.075); }
      to { transform: scale(1); }
    }
  }
}
