/* Home hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  padding-top: 0;
  background: #000;
  overflow: hidden;
}

.hero__desktop,
.hero__phone {
  height: 100%;
}

.hero__desktop {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.hero__phone {
  display: none;
}

.hero__trail {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.trail-stamp {
  position: absolute;
  width: 245px;
  height: 170px;
  margin: -85px 0 0 -122.5px;
  object-fit: cover;
  pointer-events: none;
  border-radius: 0;
  will-change: transform, opacity;
}

.hero__wordmark-wrap {
  position: absolute;
  left: 224px;
  top: 379px;
  width: 993px;
  z-index: 2;
  pointer-events: none;
}

.hero__wordmark {
  width: 993px;
  max-width: none;
  height: auto;
  transform: scale(0.7);
  transform-origin: 40% 50%;
}

.hero.is-ready .hero__wordmark {
  transform: scale(1);
  transition: transform 0.9s var(--ease-spring) 0.4s;
}

.hero__mask {
  display: none;
}

.hero__tagline {
  position: absolute;
  left: 475px;
  top: 790px;
  bottom: auto;
  width: 490px;
  max-width: 490px;
  margin: 0;
  transform: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.32px;
  line-height: 19.2px;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  z-index: 3;
}

.hero__firstname,
.hero__lastname {
  margin: 0;
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -2px;
  line-height: 0.9;
}

.hero__slides {
  width: 200px;
  height: 130px;
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}

.hero__slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.hero__slides img.is-on {
  opacity: 1;
}

@media (max-width: 1199px) {
  .hero {
    padding: 80px var(--gutter) 24px;
    display: flex;
    flex-direction: column;
  }

  .hero__desktop {
    display: none;
  }

  .hero__phone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    width: 100%;
  }

  .hero__phone .hero__tagline {
    position: absolute;
    left: 0;
    top: auto;
    right: auto;
    bottom: 24px;
    width: min(330px, 100%);
    font-size: 13px;
    letter-spacing: -0.13px;
    line-height: 1.2;
    text-align: left;
  }
}

@media (max-width: 809px) {
  .hero__firstname,
  .hero__lastname {
    font-size: 48px;
    letter-spacing: -1.6px;
  }
}

/* Selected work */
.works {
  padding-top: 100px;
  padding-bottom: 40px;
}

.works__title {
  margin: 0 0 48px;
  font-size: 80px;
  font-weight: 500;
  letter-spacing: -2.4px;
  line-height: 72px;
}

.works-row {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 80px;
}

.tile {
  display: block;
  min-width: 0;
}

.tile--sm {
  flex: 0 0 31%;
}

.tile--lg {
  flex: 1 1 69%;
}

.tile__media {
  overflow: hidden;
  background: var(--hero);
  border-radius: 0;
}

.tile--sm .tile__media {
  aspect-ratio: 416 / 314;
}

.tile--lg .tile__media {
  aspect-ratio: 880 / 665;
}

.tile--gif .tile__media {
  aspect-ratio: 880 / 538;
}

.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transform-origin: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile:hover .tile__media img {
  transform: scale(1.21);
}

.tile__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
}

.tile__title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1em;
}

.tile__label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--muted);
}

.see-more {
  display: none;
}

@media (max-width: 1199px) {
  .works__title {
    font-size: 48px;
    letter-spacing: -1.6px;
    line-height: 1;
  }

  .works-row {
    flex-direction: column;
    gap: 48px;
    margin-bottom: 48px;
  }

  .tile--sm,
  .tile--lg {
    flex: 1 1 auto;
    width: 100%;
  }

  .tile--sm .tile__media,
  .tile--lg .tile__media,
  .tile--gif .tile__media {
    aspect-ratio: 350 / 265;
  }

  .tile__title {
    font-size: 20px;
  }
}

/* About — centered 750px column, text then photo stacked */
.story {
  padding-top: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story__col {
  width: min(750px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding-top: 60px;
}

.story__title {
  width: 100%;
  margin: 0;
  font-size: 60px;
  font-weight: 500;
  letter-spacing: -1.8px;
  line-height: 54px;
  text-align: center;
}

.story__stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.chapter {
  width: 100%;
}

.chapter h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.18px;
  line-height: 30.6px;
}

.chapter p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.18px;
  line-height: 30.6px;
  color: var(--body);
}

.chapter p + p {
  margin-top: 16px;
}

.chapter__photo {
  overflow: hidden;
  flex: none;
}

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

.chapter__photo--portrait {
  width: 347px;
  height: 486px;
  max-width: 100%;
}

.chapter__photo--square {
  width: 513px;
  height: 508px;
  max-width: 100%;
}

.lists {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 40px;
}

.lists h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.13px;
  line-height: 15.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.lists ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lists li {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.13px;
  line-height: 15.6px;
  text-transform: uppercase;
}

.lists .dim {
  color: rgba(255, 255, 255, 0.2);
}

.lists > :first-child {
  width: 245px;
}

.lists > :nth-child(2) {
  width: 175px;
}

.lists > :nth-child(3) {
  width: 161px;
}

@media (max-width: 1199px) {
  .story {
    padding-top: 80px;
  }

  .story__col {
    padding-top: 24px;
  }

  .story__title {
    font-size: 40px;
    letter-spacing: -1.2px;
    line-height: 1;
  }

  .chapter p,
  .chapter h3 {
    font-size: 16px;
    line-height: 1.45;
  }

  .chapter__photo--portrait,
  .chapter__photo--square {
    width: min(100%, 513px);
    height: auto;
    aspect-ratio: 513 / 508;
  }

  .chapter__photo--portrait {
    aspect-ratio: 347 / 486;
  }

  .lists {
    flex-direction: column;
    gap: 32px;
  }

  .lists > :first-child,
  .lists > :nth-child(2),
  .lists > :nth-child(3) {
    width: auto;
  }
}

/* Projects index */
.listing-hero {
  padding-top: 160px;
  padding-bottom: 80px;
  display: flex;
  justify-content: flex-end;
}

.listing-hero__inner {
  width: min(720px, 58%);
}

.listing-hero h1,
.grid-hero h1 {
  margin: 0 0 28px;
  font-size: 90px;
  font-weight: 500;
  letter-spacing: -3.6px;
  line-height: 81px;
}

.listing-hero p,
.grid-hero p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.13px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
}

.listing {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-bottom: 40px;
}

.listing .tile__media {
  aspect-ratio: 1344 / 1015;
}

.listing .tile--gif .tile__media {
  aspect-ratio: 1344 / 821;
}

@media (max-width: 1199px) {
  .listing-hero {
    padding-top: 100px;
    justify-content: flex-start;
  }

  .listing-hero__inner {
    width: 100%;
  }

  .listing-hero h1,
  .grid-hero h1 {
    font-size: 50px;
    letter-spacing: -2px;
    line-height: 1;
  }
}

/* The Grid */
.grid-hero {
  padding-top: 160px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.grid-hero p {
  text-align: center;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mosaic figure {
  margin: 0;
  aspect-ratio: 336 / 320;
  overflow: hidden;
}

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

@media (max-width: 1199px) {
  .grid-hero {
    align-items: flex-start;
    text-align: left;
    padding-top: 100px;
  }

  .grid-hero p {
    text-align: left;
  }
}

@media (max-width: 809px) {
  .mosaic {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .mosaic figure {
    aspect-ratio: 390 / 520;
  }
}

/* Project detail */
.project-hero {
  padding-top: 160px;
  padding-bottom: 60px;
}

.project-hero h1 {
  margin: 0 0 48px;
  max-width: 80%;
  font-size: 70px;
  font-weight: 400;
  letter-spacing: -2.8px;
  line-height: 0.95;
}

.project-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 50px;
}

.project-meta__desc {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.16px;
}

.project-meta dl {
  margin: 0;
}

.project-meta dt {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--muted);
}

.project-meta dd {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 0 20px;
}

.gallery__full,
.gallery__pair img,
.embed {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
}

.gallery__full img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gallery__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gallery__pair img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  background: var(--hero);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.next-project {
  display: block;
  padding: 180px 0 120px;
  font-size: 90px;
  font-weight: 500;
  letter-spacing: -3.6px;
  line-height: 81px;
  white-space: nowrap;
  transform-origin: left center;
  transition:
    transform 0.45s var(--ease-bounce),
    opacity 0.45s var(--ease-bounce);
}

.next-project:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

@media (max-width: 1199px) {
  .project-hero {
    padding-top: 110px;
  }

  .project-hero h1 {
    max-width: 100%;
    font-size: 38px;
    letter-spacing: -1.52px;
  }

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

  .next-project {
    padding: 80px 0 64px;
    font-size: 50px;
    letter-spacing: -2px;
    line-height: 1;
    white-space: normal;
  }
}

/* 404 */
.page-404 {
  min-height: 70vh;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-404__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.page-404 h1 {
  margin: 0;
  font-size: 270px;
  font-weight: 500;
  letter-spacing: -10.8px;
  line-height: 0.85;
}

.page-404__back {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.13px;
}

.page-404__rule {
  height: 1px;
  background: var(--white);
  margin: 16px 0 18px;
  width: 100%;
  max-width: 1200px;
}

.page-404__caption {
  margin: 0 0 80px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 1199px) {
  .page-404 {
    min-height: auto;
    padding-top: 80px;
    justify-content: flex-start;
  }

  .page-404__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-404 h1 {
    font-size: 50px;
    letter-spacing: -2px;
  }

  .page-404__back {
    background: var(--white);
    color: var(--black);
    border-radius: 50px;
    padding: 10px 16px;
  }

  .page-404__caption {
    text-align: left;
    margin-bottom: 40px;
  }

  .page-404__rule {
    width: 36%;
  }
}
