:root {
  --paper: #f7f6f2;
  --ink: #171717;
  --muted: #68665f;
  --line: #d9d5cb;
  --accent: #6f7a67;
  --focus: #374b63;
}

@font-face {
  font-family: "Brother Signature";
  src: url("fonts/brother-signature.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 88px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.site-footer p {
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
}

.primary-nav,
.intro p,
.section-heading,
.project-card span,
.site-footer,
.agency-content {
  color: var(--muted);
}

.primary-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.primary-nav a,
.instagram-link,
.site-footer a {
  text-underline-offset: 4px;
}

.primary-nav a:hover,
.instagram-link:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.intro {
  display: grid;
  align-content: end;
  min-height: clamp(520px, 62vw, 820px);
  padding: 44px clamp(18px, 4vw, 56px) 52px;
  border-bottom: 1px solid var(--line);
}

.intro-location {
  margin: 0 0 18px;
  font-size: 14px;
}

.intro h1 {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(44px, 8.2vw, 132px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-logo-title {
  justify-self: center;
  width: min(46vw, 460px);
}

.intro-logo-title img {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.intro-copy {
  justify-self: center;
  max-width: 780px;
  margin-top: 28px;
  color: var(--muted);
  text-align: center;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.45;
}

.intro-copy p {
  margin: 0;
}

.intro-copy p + p {
  margin-top: 14px;
}

.intro-copy .intro-welcome {
  color: var(--ink);
  font-family: "Brother Signature", "Brush Script MT", cursive;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
}

.intro-copy .intro-signature {
  margin-top: 24px;
  color: var(--ink);
  font-family: "Brother Signature", "Brush Script MT", cursive;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
}

.project-section {
  padding: 34px clamp(18px, 4vw, 56px) 56px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  font-size: 14px;
}

.section-heading h2,
.agency h2,
.press > h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.filter {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.filter:hover,
.filter.is-active {
  border-color: var(--ink);
  color: var(--ink);
}

.filter:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(16px, 2.4vw, 34px);
}

.project-card {
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-card.is-hidden {
  display: none;
}

.project-card a {
  display: grid;
  gap: 10px;
}

.project-card img,
.project-gallery {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #dedbd2;
}

.project-card img {
  object-fit: cover;
  filter: saturate(0.78);
  transition: filter 220ms ease, transform 220ms ease;
}

.project-gallery {
  position: relative;
  overflow: hidden;
}

.project-gallery img {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  animation: gallery-fade 16s infinite;
}

.project-gallery img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery img:nth-child(3) {
  animation-delay: 8s;
}

.project-gallery img:nth-child(4) {
  animation-delay: 12s;
}

.project-gallery.is-two img {
  animation: gallery-fade-two 8s infinite;
}

.project-gallery.is-two img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery.is-three img {
  animation: gallery-fade-three 12s infinite;
}

.project-gallery.is-three img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery.is-three img:nth-child(3) {
  animation-delay: 8s;
}

.project-gallery.is-five img {
  animation: gallery-fade-five 20s infinite;
}

.project-gallery.is-five img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery.is-five img:nth-child(3) {
  animation-delay: 8s;
}

.project-gallery.is-five img:nth-child(4) {
  animation-delay: 12s;
}

.project-gallery.is-five img:nth-child(5) {
  animation-delay: 16s;
}

.project-gallery.is-six img {
  animation: gallery-fade-six 24s infinite;
}

.project-gallery.is-six img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery.is-six img:nth-child(3) {
  animation-delay: 8s;
}

.project-gallery.is-six img:nth-child(4) {
  animation-delay: 12s;
}

.project-gallery.is-six img:nth-child(5) {
  animation-delay: 16s;
}

.project-gallery.is-six img:nth-child(6) {
  animation-delay: 20s;
}

.project-gallery.is-eight img {
  animation: gallery-fade-eight 32s infinite;
}

.project-gallery.is-eight img:nth-child(2) {
  animation-delay: 4s;
}

.project-gallery.is-eight img:nth-child(3) {
  animation-delay: 8s;
}

.project-gallery.is-eight img:nth-child(4) {
  animation-delay: 12s;
}

.project-gallery.is-eight img:nth-child(5) {
  animation-delay: 16s;
}

.project-gallery.is-eight img:nth-child(6) {
  animation-delay: 20s;
}

.project-gallery.is-eight img:nth-child(7) {
  animation-delay: 24s;
}

.project-gallery.is-eight img:nth-child(8) {
  animation-delay: 28s;
}

.project-card a:hover img,
.project-card a:hover .project-gallery img {
  filter: saturate(1);
  transform: translateY(-2px);
}

@keyframes gallery-fade {
  0%,
  24% {
    opacity: 1;
  }

  28%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes gallery-fade-two {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  95% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes gallery-fade-three {
  0%,
  30% {
    opacity: 1;
  }

  34%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes gallery-fade-five {
  0%,
  20% {
    opacity: 1;
  }

  24%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes gallery-fade-six {
  0%,
  16.666% {
    opacity: 1;
  }

  20.666%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes gallery-fade-eight {
  0%,
  12.5% {
    opacity: 1;
  }

  16.5%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.project-card span {
  font-size: 15px;
}

.project-card.is-large {
  grid-column: span 2;
}

.project-card.is-large img,
.project-card.is-large .project-gallery {
  aspect-ratio: 16 / 10;
}

.project-card.is-tall {
  grid-row: span 2;
}

.project-card.is-tall img,
.project-card.is-tall .project-gallery {
  aspect-ratio: 3 / 5;
}

.project-card.is-bahia-exterior {
  grid-column: 1;
}

.project-card.is-bahia-interior {
  grid-column: 2;
}

.agency,
.press {
  display: grid;
  grid-template-columns: minmax(160px, 0.6fr) minmax(0, 1.4fr);
  gap: 28px;
  padding: 56px clamp(18px, 4vw, 56px) 72px;
  border-top: 1px solid var(--line);
}

.agency-content {
  display: grid;
  gap: 34px;
  max-width: 1040px;
  font-family: "Avenir Next Condensed", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}

.agency-quote {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-family: "Brother Signature", "Brush Script MT", cursive;
}

.agency-quote p {
  margin: 0;
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.15;
}

.agency-quote cite {
  display: block;
  margin-top: 12px;
  font-size: clamp(18px, 1.5vw, 21px);
  font-style: normal;
  text-align: right;
}

.founders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.founder-profile {
  display: grid;
  gap: 12px;
}

.founder-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
  object-fit: cover;
  object-position: center top;
}

.founder-profile p,
.founder-profile h3 {
  margin: 0;
}

.founder-label {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.founder-profile h3 {
  color: var(--ink);
  font-family: "Brother Signature", "Brush Script MT", cursive;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.1;
}

.founder-profile p:not(.founder-label) {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.4;
}

.press-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.press-article {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.press-copy {
  display: grid;
  gap: 8px;
}

.press-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.press-copy h3 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.12;
}

.press-images,
.press-stade-images,
.press-office-images {
  display: grid;
  grid-template-columns: minmax(120px, 0.48fr) minmax(150px, 0.62fr);
  align-items: start;
  gap: 12px;
}

.press-images img,
.press-stade-images img,
.press-office-images img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 28px;
  padding: 28px clamp(18px, 4vw, 56px) 34px;
  border-top: 1px solid var(--line);
}

.site-footer p,
.site-footer address {
  margin: 0;
}

.site-footer address {
  font-style: normal;
}

.contact-details {
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.reviews-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

.reviews-link:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.architect-order-logo {
  justify-self: end;
  width: min(230px, 100%);
  height: auto;
  margin-top: 2px;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.instagram-link img {
  width: 18px;
  height: 18px;
}

@media (max-width: 960px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .press-images,
  .press-stade-images,
  .press-office-images {
    grid-template-columns: 1fr;
  }

  .press-list {
    grid-template-columns: 1fr;
  }

  .founders {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .architect-order-logo {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .section-heading,
  .agency,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .site-header {
    justify-content: center;
    gap: 18px;
    min-height: auto;
  }

  .primary-nav,
  .filters {
    justify-content: center;
  }

  .intro {
    min-height: 340px;
  }

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

  .project-card.is-large,
  .project-card.is-tall,
  .project-card.is-bahia-exterior,
  .project-card.is-bahia-interior {
    grid-column: auto;
    grid-row: auto;
  }

  .project-card img,
  .project-gallery,
  .project-card.is-large img,
  .project-card.is-large .project-gallery,
  .project-card.is-tall img,
  .project-card.is-tall .project-gallery {
    aspect-ratio: 4 / 5;
  }

}
