@font-face {
  font-family: "Bebas Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 75%;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Bebas Neue";
  src: url("assets/bebas-neue.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

.home-hero .portrait-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#home-positioning {
  position: absolute;
  z-index: 3;
  left: 5%;
  bottom: 18%;
  width: 30%;
  margin: 0;
  color: #f7f4ef;
  font: 700 clamp(29px, 3.1vw, 56px)/1.04 "Bebas Neue", "Bebas Fallback", "Arial Narrow", sans-serif;
  text-shadow: 0 2px 8px #000b, 0 1px 2px #000;
}

#home-positioning span {
  display: block;
  white-space: nowrap;
}

.cover-page .home-hero .cover-navigation {
  height: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  justify-items: center;
  font-size: clamp(13px, 1.13vw, 17px);
  line-height: 1.15;
}

.home-hero .cover-navigation a:nth-child(n) {
  grid-row: auto;
  grid-column: auto;
  display: block;
  min-width: 0;
  min-height: 44px;
  width: auto;
  border: 0;
  white-space: normal;
  text-align: center;
}

.home-hero .cover-navigation a:is(:first-child, :nth-child(4), :last-child) {
  grid-column: 1 / -1;
}

.cover-page .home-hero .cover-navigation a span {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 9px 13px;
  background: #f7f4ef;
  color: #141414;
  text-shadow: none;
  clip-path: polygon(0.5% 2%, 12% 0, 32% 1.5%, 59% 0, 78% 1.5%, 99% 0,
    100% 25%, 99% 54%, 100% 76%, 99.5% 98%, 79% 100%, 66% 98%, 43% 100%,
    23% 98%, 0 100%, 0.8% 72%, 0 44%);
  transform: rotate(var(--tilt));
  transition: transform 150ms ease;
}

.cover-page .home-hero .cover-navigation .home-contact span {
  background: #c81a13;
  color: #fff;
}

.home-hero .cover-navigation a:focus-visible,
.home-project:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.home-hero .cover-navigation a:is(:hover, :focus-visible) {
  filter: drop-shadow(0 4px 5px #0008);
}

.cover-page .home-hero .cover-navigation a:nth-child(n):is(:hover, :focus-visible) span {
  animation-name: none;
  color: #141414;
}

.cover-page .home-hero .cover-navigation a.home-contact:is(:hover, :focus-visible) span {
  color: #fff;
}

.home-work {
  max-width: 1540px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 100px) 5% clamp(60px, 9vw, 120px);
  color: #f7f4ef;
}

.home-work h2 {
  margin: 0 0 clamp(24px, 4vw, 52px);
  font: 700 clamp(38px, 6vw, 84px)/1 "Bebas Neue", "Bebas Fallback", "Arial Narrow", sans-serif;
}

.home-work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 56px) clamp(18px, 3vw, 44px);
  align-items: start;
}

.home-project {
  display: block;
  grid-column: span 7;
  color: inherit;
  text-decoration: none;
}

.home-project:nth-child(2) {
  grid-column: 9 / -1;
  margin-top: 12%;
}

.home-project:nth-child(3) {
  grid-column: 2 / span 3;
}

.home-project:nth-child(4) {
  grid-column: 6 / -1;
  margin-top: 8%;
}

.home-project-wide {
  grid-column: 2 / -2;
}

.home-project img {
  display: block;
  width: 100%;
  height: auto;
  background: #242424;
}

.home-caption {
  padding-top: 12px;
}

.home-caption h3,
.home-caption p {
  margin: 0;
  font: 400 15px/1.4 Arial, sans-serif;
}

.home-caption p {
  color: #c6c1ba;
  font-size: 12px;
}

.home-project:is(:hover, :focus-visible) h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 901px) and (max-height: 730px) {
  .cover-page .home-hero .cover-navigation {
    top: calc(var(--home-logo-width) * 1.5 + 30px);
    gap: 7px 10px;
  }
}

@media (max-width: 900px) {
  .cover-page .home-hero {
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #101010;
  }

  .cover-page .home-hero .portrait-photo {
    position: relative;
    inset: auto;
    height: clamp(605px, 165vw, 790px);
  }

  .cover-page .home-hero::after {
    height: clamp(605px, 165vw, 790px);
    background: linear-gradient(180deg, #0004, transparent 30%, transparent 77%, #101010);
  }

  .cover-page .home-hero .foreground-wheel {
    top: calc(clamp(605px, 165vw, 790px) - 66px);
    bottom: auto;
    transform: none;
    clip-path: inset(-100% -100% 52% -100%);
  }

  #home-positioning {
    position: relative;
    inset: auto;
    width: min(100%, 570px);
    max-width: none;
    box-sizing: border-box;
    margin: -115px auto 0;
    padding: 0 16px;
    min-height: 64px;
    display: grid;
    align-content: center;
    text-align: center;
    font-size: clamp(30px, 5.8vw, 48px);
  }

  .cover-page .home-hero .cover-navigation {
    position: relative;
    inset: auto;
    z-index: 3;
    width: min(92%, 480px);
    margin: 7px auto 0;
    padding: 4px 0 20px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px 9px;
    font-size: 13px;
  }

  .cover-page .home-hero .cover-navigation a:nth-child(n) {
    grid-column: span 2;
    width: 100%;
  }

  .cover-page .home-hero .cover-navigation a:last-child {
    grid-column: 3 / span 2;
  }

  .cover-page .home-hero .cover-navigation a span {
    padding: 7px 5px;
  }
}

@media (max-width: 375px) {
  .cover-page .home-hero .cover-navigation a[href="storefronts.html"] span {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .home-work-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .home-work-grid .home-project:nth-child(n) {
    grid-column: 1;
    margin: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-intro .cover-restored-logo {
    animation: monogram-wipe 800ms ease-out both;
  }

  .cover-page.home-intro .home-hero .cover-navigation a:nth-child(n) span {
    animation: label-entrance 350ms cubic-bezier(.34, 1.56, .64, 1)
      calc(800ms + var(--order) * 80ms) backwards;
  }

  .cover-page .home-hero .cover-navigation a:nth-child(n):is(:hover, :focus-visible) span {
    transform: translateY(-3px) rotate(0);
  }

  .home-project.is-pending img {
    opacity: 0;
    transform: translateY(20px);
  }

  .home-project.is-revealed img {
    transition: opacity 500ms ease, transform 500ms ease;
    transition-delay: calc(var(--order) * 60ms);
  }
}

@keyframes monogram-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes label-entrance {
  from {
    opacity: 0;
    transform: translateY(-12px) rotate(calc(var(--tilt) + 6deg)) scale(1.15);
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt));
  }
}
