@font-face {
  font-family: "Diatype Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ABCDiatypeMono-Regular.woff2") format("woff2");
}

:root {
  --black: #050505;
  --scroll-units: 27.15;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  color-scheme: dark;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--black);
  margin: 0;
  min-width: 320px;
  overscroll-behavior-y: none;
}

.scrollytelling {
  height: calc(var(--scroll-units) * 100svh);
  position: relative;
}

.viewport {
  background: var(--black);
  height: 100svh;
  overflow: hidden;
  position: sticky;
  top: 0;
  width: 100%;
}

.mosaic {
  height: 100%;
  inset: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

.tile {
  background: #151515;
  border-radius: 10px;
  contain: layout paint;
  left: 0;
  margin: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  transform-origin: 0 0;
  will-change: transform, width, height, opacity, border-radius;
}

.tile img,
.tile video {
  display: block;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.002);
  user-select: none;
  width: 100%;
}

.tile[data-item="eye"] img {
  object-position: 50% 48%;
}

.tile[data-item="hand"] img {
  object-position: 50% 50%;
}

.tile[data-item="gradient"] img {
  object-position: 50% 44%;
}

.tile[data-item="red"] img {
  object-position: 52% 50%;
}

.tile[data-item="bubbles"] img,
.tile[data-item="green"] img {
  object-position: 50% 15%;
}

.timeline {
  display: grid;
  gap: clamp(3px, 0.35vw, 8px);
  grid-template-columns: repeat(96, minmax(1px, 1fr));
  height: 18px;
  left: clamp(12px, 1.1vw, 24px);
  mix-blend-mode: difference;
  pointer-events: none;
  position: fixed;
  right: clamp(12px, 1.1vw, 24px);
  top: 14px;
  z-index: 30;
}

.timeline span {
  background: white;
  height: 17px;
  opacity: 0.22;
  transition: opacity 120ms linear;
  width: 1px;
}

.timeline span.is-active {
  opacity: 1;
}

.brand {
  display: block;
  height: clamp(82px, 8.7vw, 132px);
  left: clamp(16px, 1.2vw, 24px);
  mix-blend-mode: difference;
  pointer-events: auto;
  position: fixed;
  top: clamp(34px, 3vw, 48px);
  width: clamp(62px, 6.5vw, 99px);
  z-index: 31;
}

.brand img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.social-navigation {
  align-items: center;
  display: flex;
  justify-content: space-between;
  left: 20px;
  pointer-events: none;
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 32;
}

.social-cta {
  color: white;
  font-family: "Diatype Mono", monospace;
  font-size: 14px;
  justify-self: start;
  line-height: 21px;
  pointer-events: auto;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  width: max-content;
}

.social-cta::after {
  background: currentColor;
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.contact-cta {
  align-items: center;
  background: white;
  border-radius: 4px;
  color: #0e0f11;
  display: flex;
  font-family: "Diatype Mono", monospace;
  font-size: 14px;
  gap: 6px;
  height: 58px;
  justify-content: center;
  letter-spacing: -0.03em;
  position: fixed;
  right: 20px;
  text-decoration: none;
  text-transform: uppercase;
  top: 48px;
  width: 150px;
  z-index: 33;
}

.contact-cta,
.social-cta {
  transition:
    background-color 300ms ease-out,
    color 300ms ease-out,
    opacity 300ms ease-out;
}

.contact-cta:hover,
.contact-cta:focus-visible {
  background: #0e0f11;
  color: white;
  outline: none;
}

.social-cta:hover,
.social-cta:focus-visible {
  opacity: 0.65;
  outline: none;
}

.scroll-hint {
  align-items: center;
  bottom: 20px;
  color: white;
  display: flex;
  font-family: "Diatype Mono", monospace;
  font-size: 11px;
  gap: 8px;
  letter-spacing: -0.02em;
  margin: 0;
  mix-blend-mode: difference;
  opacity: 0.72;
  pointer-events: none;
  position: fixed;
  right: 20px;
  transition: opacity 240ms ease;
  z-index: 31;
}

body.has-scrolled .scroll-hint {
  opacity: 0;
}

@media (max-width: 767px) {
  .tile {
    border-radius: 8px;
  }

  .timeline {
    gap: 2px;
    grid-template-columns: repeat(48, minmax(1px, 1fr));
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .timeline span {
    height: 12px;
  }

  .timeline span:nth-child(even) {
    display: none;
  }

  .brand {
    height: 66px;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    width: 50px;
  }

  .social-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    left: 20px;
    right: 20px;
    top: 49px;
    transform: none;
  }

  .social-cta {
    font-size: 12px;
    line-height: 18px;
  }

  .social-cta--instagram {
    grid-column: 3;
    justify-self: end;
  }

  .contact-cta {
    bottom: 24px;
    left: 50%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    width: auto;
    min-width: 112px;
    padding: 0 14px;
  }

  .scroll-hint {
    bottom: 12px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline span {
    transition: none;
  }

  .scroll-hint {
    transition: none;
  }

  .contact-cta,
  .social-cta {
    transition: none;
  }
}
