@font-face {
  /* The captured Jost asset is a variable font covering the site's weights. */
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/jost-92zatbhpnqw73otd4g.woff2") format("woff2");
}

@font-face {
  /* The captured italic Jost asset is the matching variable face. */
  font-family: "Jost";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/jost-92zutbhpnqw73oht4d4h.woff2") format("woff2");
}

@font-face {
  /* The captured Playfair Display asset is a variable font covering the site's weights. */
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/playfairdisplay-nufid-vyszvivyub_rj3ij__anpxdtzyga.woff2") format("woff2");
}

@font-face {
  /* The captured italic Playfair Display asset is the matching variable face. */
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/playfairdisplay-nufkd-vyszvivyub_rj3ij__anpxdtnogkk7.woff2") format("woff2");
}

/* Colours, sizes and spacing below are measured from the live site's computed styles. */
:root {
  --paper: #f9f7f1;
  --heading: #424b3d;
  --text: #515151;
  --home-text: #474747;
  --perspective-text: #333333;
  --menu-text: #33373d;
  --olive: #434b3e;
  --olive-heading: #d7ce7f;
  --olive-text: #bab79d;
  --rule: #000000;
  --font-body: "Jost", sans-serif;
  --font-display: "Playfair Display", serif;
  --content-gutter: clamp(20px, 3.45vw, 50px);
  --column-gap: clamp(20px, 4.8vw, 69px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  font-synthesis: none;
}

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

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Header */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  height: 104px;
  padding: 36px var(--content-gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
}

.brand-morgan {
  font-family: var(--font-display);
  font-size: 48px;
  font-style: italic;
  font-weight: 500;
  line-height: 48px;
}

.brand-architecture {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 4px;
  line-height: 16px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 30px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 4px;
  line-height: 20px;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 53px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000000;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 28px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  content: "";
  transition: transform 180ms ease, background-color 180ms ease;
}

.menu-icon {
  position: relative;
  top: -3px;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  top: 8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  top: 0;
  height: 3px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  top: 0;
  height: 3px;
  transform: rotate(-45deg);
}

main {
  width: calc(100% - (var(--content-gutter) * 2));
  margin: 0 auto;
}

/* Shared type */

h1,
h2,
h3 {
  color: var(--heading);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}

h1 {
  font-size: 30px;
  line-height: 30px;
}

.lead {
  color: var(--heading);
  font-style: italic;
  font-weight: 700;
}

/* Home */

.home-page {
  margin-bottom: 32px;
  text-align: center;
}

.home-carousel {
  position: relative;
  aspect-ratio: 1340 / 762;
  overflow: hidden;
  background: #ddd9c9;
}

.home-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 3000ms ease;
}

.home-slide.is-active {
  opacity: 1;
}

.home-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-intro {
  max-width: 791px;
  margin: 35px auto 0;
  color: var(--home-text);
}

.home-intro p + p {
  margin-top: 20px;
}

.home-intro .lead:first-child {
  line-height: 18px;
}

.home-intro .lead:last-child {
  color: var(--home-text);
}

/* Projects index */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 39px;
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  text-decoration: none;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px;
  background: rgb(255 255 255 / 61%);
  color: #000000;
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
}

.project-card:hover .project-card-title,
.project-card:focus-visible .project-card-title {
  opacity: 1;
  visibility: visible;
}

/* About and Perspective */

.split-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--column-gap);
  align-items: start;
  padding-bottom: 38px;
  font-size: 16px;
}

.page-title {
  margin-bottom: 19px;
}

.split-intro .copy p {
  margin-bottom: 22px;
}

.split-intro .copy p:last-child {
  margin-bottom: 0;
}

.split-intro .copy .lead {
  margin-bottom: 20px;
}

.perspective-intro .lead {
  font-weight: 600;
}

.perspective-intro .copy p:not(.lead) {
  color: var(--perspective-text);
}

.split-intro figure {
  margin-top: 50px;
}

.split-intro figure img {
  width: 100%;
  aspect-ratio: 401 / 260;
  object-fit: cover;
}

.photo-credit {
  margin-top: 1px;
  font-size: 14px;
  font-style: italic;
  text-align: right;
}

.photo-credit a {
  text-decoration: none;
}

.photo-credit a:hover {
  text-decoration: underline;
}

.olive-band {
  width: calc(100% + (var(--content-gutter) * 2));
  margin-left: calc(var(--content-gutter) * -1);
  background: var(--olive);
  color: var(--olive-text);
  font-size: 16px;
  font-weight: 300;
}

.olive-band .lead {
  color: var(--olive-text);
  font-weight: 600;
  letter-spacing: 0.4px;
}

.bio-band {
  padding: 28px 38px 38px;
}

.bio-band h2 {
  color: var(--olive-heading);
  font-size: 30px;
  line-height: 30px;
}

.bio-credentials {
  margin-top: 6px;
  color: var(--olive-heading);
  line-height: 19px;
}

.bio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--column-gap);
  margin-top: 12px;
}

.bio-grid img {
  width: 100%;
  height: auto;
  margin-top: 2px;
}

.bio-grid > div:nth-child(2) p {
  margin-bottom: 13px;
}

.bio-grid > div:nth-child(2) .wide-gap {
  margin-bottom: 22px;
}

.bio-grid > div:nth-child(3) p {
  margin-bottom: 22px;
}

.bio-grid > div > p:last-child {
  margin-bottom: 0;
}

.olive-band .lead.no-tracking {
  letter-spacing: normal;
}

.bio-grid .licence {
  text-align: justify;
}

.perspective-band {
  padding: 38px var(--content-gutter);
}

.perspective-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--column-gap);
}

.perspective-grid p {
  margin-bottom: 22px;
}

.perspective-grid p.lead {
  margin-bottom: 20px;
}

.perspective-grid p:last-child {
  margin-bottom: 0;
}

.quote {
  align-self: center;
  color: var(--olive-heading);
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.4px;
  line-height: 34px;
  text-align: center;
}

.quote cite {
  display: block;
  margin-top: 34px;
  font-style: inherit;
}

/* Contact */

.contact-page {
  margin-bottom: 40px;
}

.contact-hero {
  width: 100%;
  aspect-ratio: 1340 / 519;
  object-fit: cover;
}

.contact-page h1 {
  margin-top: 40px;
}

.contact-copy {
  max-width: 412px;
  margin-top: 20px;
}

.contact-details {
  margin-top: 20px;
}

.contact-details .contact-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 5px;
}

.contact-details a,
.footer-contact a {
  text-decoration: none;
}

.contact-details a:hover,
.footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Project detail pages */

.project-heading h1 {
  margin-bottom: 5px;
}

.project-location {
  margin-bottom: 12px;
  color: var(--heading);
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  line-height: 20px;
}

.project-gallery {
  display: grid;
  gap: 20px;
}

.project-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}

.project-gallery img {
  width: 100%;
  height: auto;
}

.project-summary {
  display: grid;
  grid-template-columns: 60% 30%;
  justify-content: space-between;
  padding-top: 30px;
  font-size: 17px;
}

.project-summary h2 {
  font-size: 36px;
  font-weight: 600;
  line-height: 22px;
}

.project-summary .description .summary-location {
  margin-top: 12px;
  margin-bottom: 16px;
  color: var(--heading);
  font-size: 24px;
  font-style: italic;
  font-weight: 300;
  line-height: 24px;
}

.project-summary .description p {
  margin-bottom: 22px;
}

.project-summary .description p:last-child {
  margin-bottom: 0;
}

.project-meta {
  padding-top: 46px;
}

.meta-block + .meta-block {
  margin-top: 18px;
}

/* Live-site per-page variations. */
.tanglewood-cabin .project-gallery {
  margin-top: 30px;
}

.bright-bungalow .meta-block:last-child p {
  font-size: 16px;
}

.meta-block h3 {
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 20px;
}

.meta-block a {
  text-decoration: none;
}

.meta-block a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.project-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 73px 0 23px;
  font-size: 14px;
  line-height: 14px;
  text-transform: uppercase;
}

.project-navigation a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.project-navigation a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.project-navigation .next {
  margin-left: auto;
}

.nav-arrow {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.nav-arrow.prev {
  margin: 0 12px 0 6px;
  transform: rotate(135deg);
}

.nav-arrow.next {
  margin: 0 6px 0 12px;
  transform: rotate(-45deg);
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 151px;
  margin: 0 var(--content-gutter);
  border-top: 1px solid var(--rule);
  color: var(--heading);
}

/* The live site shows no rule where an olive band meets the footer. */
main:has(> .olive-band:last-child) + .site-footer {
  border-top-color: transparent;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 22px;
}

.footer-region {
  margin-top: 7px;
  font-size: 16px;
  letter-spacing: 2.1px;
  line-height: 22px;
  text-transform: uppercase;
}

.footer-mark {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 94px;
  font-weight: 500;
  line-height: 70px;
  text-decoration: none;
}

.footer-contact {
  justify-self: end;
  line-height: 18px;
  text-align: right;
}

.footer-contact a {
  display: block;
  margin-top: 5px;
}

/* Project labels stay visible on touch-sized layouts, as on the live site. */
@media (max-width: 1024px) {
  .project-card-title {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 767px) {
  .site-header {
    align-items: center;
    height: 73px;
    padding-top: 0;
  }

  .brand {
    gap: 8px;
  }

  .brand-morgan {
    font-size: 28px;
    line-height: 28px;
  }

  .brand-architecture {
    font-size: 12px;
    letter-spacing: 2px;
    line-height: 12px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    color: var(--menu-text);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 15px 20px;
  }

  .site-nav a[aria-current="page"] {
    color: #000000;
  }

  .home-page {
    margin-bottom: 22px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }

  .split-intro {
    display: block;
    padding-bottom: 21px;
  }

  .page-title {
    font-size: 32px;
    line-height: 32px;
  }

  .split-intro figure {
    margin-top: 30px;
  }

  .split-intro figure + figure {
    margin-top: 31px;
  }

  .olive-band {
    width: calc(100% + (var(--content-gutter) * 2));
  }

  .bio-band {
    padding: 20px var(--content-gutter) 40px;
  }

  .bio-band h2 {
    font-size: 18px;
    line-height: 18px;
  }

  .bio-credentials {
    font-size: 18px;
  }

  .bio-grid,
  .perspective-grid {
    display: block;
  }

  .bio-grid img {
    margin-top: 2px;
    margin-bottom: 20px;
  }

  .bio-grid > div:nth-child(2) {
    margin-bottom: 20px;
  }

  .perspective-band {
    padding: 20px var(--content-gutter) 40px;
  }

  .perspective-grid > div {
    margin-bottom: 20px;
  }

  .contact-page {
    margin-bottom: 50px;
  }

  .contact-page h1 {
    margin-top: 20px;
  }

  .hillside-house .project-location,
  .tanglewood-cabin .project-location {
    font-size: 18px;
    line-height: 18px;
  }

  .bright-bungalow .project-summary .description .summary-location,
  .tanglewood-cabin .project-summary .description .summary-location {
    font-size: 18px;
    line-height: 18px;
  }

  .tanglewood-cabin .project-summary h2 {
    font-size: 32px;
  }

  .project-pair {
    grid-template-columns: 1fr;
  }

  .project-summary {
    display: block;
  }

  .project-meta {
    margin-top: 20px;
    padding-top: 0;
  }

  .project-navigation {
    padding-top: 63px;
  }

  .site-footer {
    display: block;
    min-height: 263px;
    padding: 21px 0 20px;
    text-align: center;
  }

  .footer-mark {
    display: block;
    margin-top: 30px;
  }

  .footer-contact {
    justify-self: auto;
    margin-top: 30px;
    text-align: center;
  }
}

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