@font-face {
  font-family: "Rethink Sans";
  src: url("assets/rethink-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter Display";
  src: url("assets/inter-display.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Rethink Sans", sans-serif;
  color: #fafafa;
  background: #000;
  --muted: #ccc;
  --edge: 30px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { margin: 0; }

.inner-page { background: #fafafa; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#contact { scroll-margin-top: 72px; }

button, a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; }
a { text-decoration: none; }

:focus-visible {
  outline: 2px solid #b4c8ff;
  outline-offset: 3px;
}

.cover {
  position: relative;
  isolation: isolate;
  min-height: max(375px, 100svh);
  overflow: clip;
}

.home-mark, .navigation {
  position: fixed;
  z-index: 4;
}

.home-mark {
  inset: 10px auto auto 10px;
  display: block;
  width: 64px;
  height: 64px;
}

.home-mark picture, .home-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand {
  display: block;
  width: 78px;
  margin: 0 auto 18px;
}

.footer-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.navigation {
  inset: 10px 10px auto auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 10px;
  border-radius: 10px;
  background: #121212;
  box-shadow: inset 3px 3px 10px #ffffff40;
}

.navigation a {
  border: 0;
  border-radius: 5px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.navigation a:hover,
.navigation a[aria-current="page"] {
  background: #252525;
  color: #fff;
}

.navigation .work-button {
  color: #0b0b0b;
  background: #fff;
  padding-inline: 15px;
  box-shadow: inset 1px 1px 8px #0005;
}

.navigation .work-button:hover,
.navigation .work-button[aria-current="page"] {
  color: #0b0b0b;
  background: #e8e8e8;
}

.scene, .scene canvas, .scene-shade, .trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene {
  z-index: -1;
  overflow: hidden;
  background: #000 url("assets/hero-poster.webp") center / 100% 100% no-repeat;
}

.scene canvas {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.scene canvas[data-ready="true"] { opacity: 1; }

.scene-shade {
  background: linear-gradient(0deg, #000 0%, #0009 10%, transparent 28%);
}

.scene-link {
  position: absolute;
  inset: 0 0 190px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.scene-marks {
  position: absolute;
  inset: min(250px, 31svh) 50px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  pointer-events: none;
}

.cross, .plus, .motion-icon {
  position: relative;
  width: 15px;
  height: 15px;
}

.cross { transform: rotate(45deg); }

.cross::before, .cross::after,
.plus::before, .plus::after,
.motion-icon::before, .motion-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 2.5px;
  border-radius: 5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.cross::after, .plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.motion-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 16px;
  height: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.motion-button::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.motion-icon::before, .motion-icon::after {
  width: 10px;
  height: 2px;
}

.motion-icon::before { translate: 0 -2px; }
.motion-icon::after { translate: 0 2px; }

.motion-button[data-paused] .motion-icon::before {
  width: 10px;
  height: 11px;
  border-radius: 0;
  clip-path: polygon(15% 0, 100% 50%, 15% 100%);
  translate: 0;
}

.motion-button[data-paused] .motion-icon::after { display: none; }

.intro {
  position: absolute;
  inset: auto auto var(--edge) var(--edge);
  width: min(471px, calc(100% - var(--edge) * 2));
  display: grid;
  gap: 8px;
}

.intro h1, .intro p { margin: 0; }

.intro h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.intro-lead {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.intro-detail, .socials {
  font: 500 14px/20px "Inter Display", sans-serif;
  color: var(--muted);
}

.socials {
  position: absolute;
  inset: auto var(--edge) var(--edge) auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.socials a:hover { color: #fff; }

.socials span {
  display: block;
  width: 55px;
  height: 1px;
  margin-block: 1px;
  background: #fff3;
}

.trail-tile {
  position: absolute;
  width: auto;
  height: auto;
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
  pointer-events: none;
  animation: trail-fade 900ms ease-out both;
}

@keyframes trail-fade {
  from, to {
    opacity: 0;
    filter: blur(10px);
    transform: translate(-50%, -50%) scale(.5);
  }
  15%, 50% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

.work-endcap {
  padding: 0 25px 25px;
  background: #fff;
  color: #161616;
}

.work-endcap a {
  min-height: 500px;
  display: block;
  padding: 27px 15px;
  background: #d3e1f1 url("assets/footer-clouds.webp") 48% 9% / cover;
  font: 500 14px/20px "Inter Display", sans-serif;
  text-align: center;
}

.work-endcap a:hover { text-decoration: underline; }

.direction-arrow {
  position: relative;
  display: inline-block;
  width: .7em;
  height: .7em;
}

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

.direction-arrow::before {
  inset: 0 0 auto auto;
  width: .38em;
  height: .38em;
  border-top: 1px solid;
  border-right: 1px solid;
}

.direction-arrow::after {
  top: calc(50% - .5px);
  left: -10%;
  width: 120%;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
}

.direction-arrow-up { transform: rotate(-45deg); }

.site-footer {
  padding: 32px 20px 26px;
  background: #fafafa;
  color: #343434;
  text-align: center;
  font: 500 14px/20px "Inter Display", sans-serif;
}

.site-footer h2 {
  margin: 0 0 5px;
  color: #151515;
  font-size: 16px;
}

.site-footer p { margin: 0 0 10px; }

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer a:hover { text-decoration: underline; }

@media (min-width: 1920px) {
  .work-endcap a { min-height: 300px; }
}

@media (max-width: 1199px) {
  :root { --edge: 25px; }
  .work-endcap { padding-inline: 15px; }
}

@media (max-width: 809px) {
  .cover { min-height: max(500px, 100svh); }
  .home-mark {
    inset: 7px auto auto 7px;
    z-index: 5;
    width: 29px;
    height: 29px;
  }

  .inner-page .home-mark {
    inset: 8px auto auto 8px;
    z-index: 5;
    display: block;
    mix-blend-mode: normal;
  }

  .navigation {
    inset: 0 0 auto;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    padding: 5px;
    border-radius: 0;
  }

  .navigation a { padding: 8px 5px; }
  .navigation .work-button { padding-inline: 8px; border-radius: 2px; }
  .navigation { padding-inline-start: 40px; }

  .scene-shade {
    background: linear-gradient(0deg, #000 0%, #0008 25%, transparent 42%);
  }

  .scene-link { bottom: 205px; }
  .scene-marks { inset-inline: clamp(24px, 12.8vw, 50px); }

  .intro {
    inset: auto 20px 85px;
    width: min(100% - 40px, 305px);
    margin-inline: auto;
  }

  .socials {
    inset: auto 0 25px;
    justify-content: center;
    align-items: center;
    flex-direction: row;
  }

  .socials span { width: 10px; }

  .work-endcap { padding: 0 10px 10px; }
  .work-endcap a { min-height: 255px; }
}

@media (max-width: 350px) {
  .navigation a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .trail { display: none; }
}
