@font-face {
  font-family: "ABC Diatype";
  src: url("../assets/fonts/ABCDiatype-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cargo Icons";
  src: url("https://static.cargo.site/assets/social/IconFont-Regular-0.9.3.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f1f0eb;
  --intro-bg: #f1f0eb;
  --text: #050505;
  --intro-text: var(--text);
  --muted: var(--text);
  --surface: #050505;
  --glass-pad: 16px;
  --info-gap: 12px;
  --page-pad: 16px;
  --reveal-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  height: 100%;
  overflow: hidden;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  font-family: "ABC Diatype", Arial, sans-serif;
  font-size: 12px;
  font-stretch: 95%;
  font-weight: 400;
  height: 100vh;
  height: 100svh;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
  text-rendering: geometricPrecision;
  word-spacing: -0.05em;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

button {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

h1,
h2,
p {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

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

.site-intro {
  align-self: flex-start;
  background: transparent;
  color: var(--intro-text);
  flex: 0 0 auto;
  max-width: 100%;
  min-height: 0;
  overflow: visible;
  padding: 0;
  position: relative;
  text-wrap: pretty;
  z-index: 10;
}

.intro-shell {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(241, 240, 235, 0.58);
  border-radius: 0 0 24px 0;
  max-width: 100vw;
  overflow: hidden;
  padding: var(--glass-pad);
  position: relative;
  width: max-content;
}

.intro-shell,
.intro-shell a,
.intro-shell button {
  color: var(--intro-text);
}

.intro-trigger {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
  line-height: inherit;
  max-width: 100%;
  padding: 0 0 24px;
  position: relative;
  text-align: left;
  transition: padding-bottom 720ms var(--reveal-ease);
}

.intro-trigger:focus-visible,
.motion-permission:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.intro-headline,
.intro-details,
.intro-collapse {
  color: var(--text);
  font-family: "ABC Diatype", Arial, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  font-kerning: normal;
  font-size: 12px;
  font-stretch: 95%;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-rendering: geometricPrecision;
  word-spacing: -0.05em;
}

.intro-headline {
  display: block;
}

.intro-line {
  display: block;
}

.intro-gap {
  display: block;
  height: 1em;
}

.intro-follow {
  color: var(--intro-text);
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transition: opacity 180ms linear;
  white-space: nowrap;
  will-change: transform;
}

.intro-trigger.is-following .intro-follow {
  opacity: 1;
}

.site-intro.is-expanded .intro-follow,
.site-intro.is-closing .intro-follow {
  opacity: 0;
}

.site-intro.is-expanded .intro-trigger,
.site-intro.is-closing .intro-trigger {
  padding-bottom: var(--info-gap);
}

.intro-details-wrap {
  display: grid;
  grid-template-rows: 0fr;
  pointer-events: none;
  position: static;
  transition:
    grid-template-rows 720ms var(--reveal-ease),
    visibility 0s linear 720ms;
  visibility: hidden;
  width: auto;
}

.site-intro.is-expanded .intro-details-wrap {
  grid-template-rows: 1fr;
  pointer-events: auto;
  transition:
    grid-template-rows 720ms var(--reveal-ease),
    visibility 0s linear;
  visibility: visible;
}

.site-intro.is-closing .intro-details-wrap {
  grid-template-rows: 1fr;
  pointer-events: none;
  transition: none;
  visibility: visible;
}

.intro-details {
  display: grid;
  gap: var(--info-gap);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  width: auto;
}

.detail-reveal {
  transform: translateY(10px);
  transition: transform 640ms var(--reveal-ease);
  transition-delay: calc(var(--reveal-reverse, 0) * 18ms);
}

.site-intro.is-expanded .detail-reveal {
  transform: none;
  transition-delay: calc(70ms + var(--reveal-index, 0) * 28ms);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
  max-width: 100%;
}

.about-links a {
  color: var(--intro-text);
  font-family: "ABC Diatype", "Cargo Icons", Arial, sans-serif;
  white-space: nowrap;
}

.about-links a::first-letter {
  font-family: "ABC Diatype", Arial, sans-serif;
}

.client-list span {
  display: block;
}

.client-list .client-name {
  padding-left: 1.25em;
}

.tool-list span {
  display: block;
}

.tool-list .tool-values {
  max-width: 30em;
  padding-left: 1.25em;
}

.intro-collapse {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
  width: max-content;
}

.intro-collapse:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.copyright {
  bottom: var(--page-pad);
  left: var(--page-pad);
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: auto;
  transform: translateY(4px);
  transition: opacity 220ms linear, transform 480ms var(--reveal-ease);
}

.site-intro.is-expanded .copyright {
  opacity: 1;
  transform: translateY(0);
}

main {
  inset: 0;
  min-height: 0;
  overflow: hidden;
  position: fixed;
  z-index: 0;
}

.work-stage {
  background: var(--bg);
  cursor: crosshair;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  user-select: none;
}

.work-stage:focus-visible {
  outline: none;
}

.video-frame {
  --video-ratio: 1.7778;
  aspect-ratio: var(--video-ratio);
  background: transparent;
  border: 0;
  left: 0;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
  outline: 0;
  cursor: none;
  pointer-events: auto;
  position: absolute;
  top: 0;
  transform: translate3d(var(--page-pad), var(--page-pad), 0);
  transform-origin: 0 0;
  width: min(42vw, 720px, 100%);
  will-change: transform;
  z-index: 2;
}

.video-trail {
  background: transparent;
  border: 0;
  display: block;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  scale: 1;
  transform-origin: 50% 50%;
  will-change: opacity, transform;
  z-index: 1;
}

.work-video {
  background: transparent;
  border: 0;
  display: block;
  height: calc(100% + 2px);
  inset: -1px;
  object-fit: cover;
  outline: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: calc(100% + 2px);
}

.work-video.is-active {
  opacity: 1;
  z-index: 1;
}

.project-label {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: rgba(241, 240, 235, 0.62);
  border-radius: 4px;
  color: var(--text);
  left: 0;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  padding: 4px 6px 5px;
  text-overflow: ellipsis;
  top: 0;
  white-space: nowrap;
  z-index: 4;
}

.work-stage.is-ready .project-label {
  opacity: 1;
}

.video-loading {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: rgba(241, 240, 235, 0.72);
  border-radius: 999px;
  color: var(--text);
  left: 50%;
  opacity: 0;
  padding: 5px 8px 6px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 420ms ease, visibility 0s linear 420ms;
  visibility: hidden;
  z-index: 6;
}

.work-stage.is-loading .video-loading {
  animation: loading-breathe 1.35s ease-in-out infinite;
  transition: visibility 0s linear;
  visibility: visible;
}

@keyframes loading-breathe {
  0%,
  100% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(0.98);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.project-label [data-project-number] {
  color: inherit;
  display: inline-block;
  margin-right: 5px;
}

.motion-permission {
  background: transparent;
  border: 0;
  border-radius: 2px;
  bottom: var(--page-pad);
  color: var(--text);
  cursor: pointer;
  left: 50%;
  padding: 5px 8px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 5;
}

.motion-permission[hidden] {
  display: none;
}

@media (max-width: 760px), (hover: none) {
  .site-intro {
    max-height: 100%;
  }

  .intro-shell {
    -webkit-overflow-scrolling: touch;
    max-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    touch-action: pan-y;
  }

  .intro-shell::-webkit-scrollbar {
    display: none;
  }

  .work-stage {
    touch-action: none;
  }

  .video-frame {
    max-height: 100%;
    max-width: 100%;
    width: min(72vw, 100%);
  }

  .intro-follow {
    display: block;
    font-size: 0.9em;
    margin-top: 8px;
    opacity: 1;
    position: static;
    transform: none !important;
  }

  .site-intro.is-expanded .intro-follow,
  .site-intro.is-closing .intro-follow {
    display: none;
  }

  .intro-trigger {
    padding-bottom: 0;
  }

  .motion-permission {
    bottom: var(--page-pad);
    left: auto;
    min-height: 44px;
    min-width: 44px;
    right: var(--page-pad);
    top: auto;
    transform: none;
  }

  .intro-collapse {
    min-height: 32px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .intro-follow,
  .intro-details-wrap,
  .copyright {
    transition-duration: 0.01ms;
  }

  .detail-reveal {
    filter: none;
    transition-duration: 0.01ms;
    transition-delay: 0ms !important;
  }

  .video-loading {
    transition-duration: 0.01ms;
  }

  .work-stage.is-loading .video-loading {
    animation: none;
    opacity: 1;
  }

}
