:root {
  --paper: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #4a4a4a;
  --ink-3: #6b6b6b;
  --rule: #0b0b0b;
  --hair: #e4e4e4;
  --wash: #f4f4f2;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Familjen Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px var(--gutter) 0;
  font-size: 16px;
}

.top a {
  text-decoration: none;
}

.top a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.top {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.top nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 44px;
  padding: 0 20px 0 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-size: 17px;
  font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}

.top nav a:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .top nav a:hover {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
  }
}

.proj {
  padding: clamp(56px, 10vh, 120px) var(--gutter) 0;
}

.p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.p-name {
  margin: 0;
  font-size: min(clamp(48px, 9vw, 144px), calc((100vw - 32px) / var(--em, 6.4)));
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.p-name .tld {
  color: var(--brand);
}

.p-meta {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}

.p-meta b {
  font-weight: 500;
  color: var(--ink);
}

.p-lede {
  margin: clamp(28px, 4vw, 44px) 0 clamp(36px, 5vw, 56px);
  max-width: 34ch;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.shots {
  /* Each screenshot is a window of its own, narrower than the page and centred in it, and the strip of them
     runs past the page's margins to the window's edges, showing the edges of the screenshots on either side
     (only the next one's for the first, and the one before's for the last). */
  --peek: clamp(28px, 8vw, 150px);
  --gap: clamp(12px, 1.6vw, 24px);
  --slide-w: calc(100vw - 2 * var(--gutter) - 2 * var(--peek));
}
.frame {
  position: relative;
  margin: 0 calc(-1 * var(--gutter));
  /* What runs past the page's margins fades out toward the window's edges. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}

.frame-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
  color: var(--ink-3);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #bdbdbd;
}

.track {
  position: relative;
  display: flex;
  gap: var(--gap);
  padding: 4px calc(var(--gutter) + var(--peek));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}

.track::-webkit-scrollbar {
  display: none;
}

/* Only the screenshots themselves are grabbed, not the empty strip beside the first and last. */
@media (hover: hover) and (pointer: fine) {
  .slide {
    cursor: grab;
  }
}

.track.is-dragging {
  scroll-snap-type: none;
  user-select: none;
}

.track.is-grabbing,
.track.is-grabbing .slide {
  cursor: grabbing;
}

.slide {
  flex: 0 0 var(--slide-w);
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  opacity: calc(1 - 0.5 * var(--off, 0));
}

@media (hover: hover) and (pointer: fine) {
  .slide:not(.is-current):hover {
    opacity: max(0.75, calc(1 - 0.5 * var(--off, 0)));
  }
}

.slide img,
.slide video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--wash);
}

.track:focus-visible .slide.is-current {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.count {
  align-self: center;
  margin-right: 8px;
  font-size: 15px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.shots-foot {
  margin-inline: var(--peek);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.cap {
  margin: 0;
  min-height: 1.45em;
  font-size: 16px;
  color: var(--ink-2);
}

.shots-nav {
  display: flex;
  flex: none;
  gap: 8px;
}

.arrow {
  display: inline-grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out), opacity 160ms ease;
}

.arrow svg {
  display: block;
}

.arrow:active {
  transform: scale(0.94);
}

.arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .arrow:not(:disabled):hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(24px, 5vw, 80px);
  margin-top: clamp(44px, 7vh, 80px);
}

.note-col {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.note-col h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.note-col p {
  margin: 0 0 12px;
  max-width: 48ch;
  color: var(--ink-2);
  text-wrap: pretty;
}

.note-col p:last-child {
  margin-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 11px 6px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #cfcfcf;
  font-size: 14px;
  line-height: 1.2;
}

.uses {
  margin-top: clamp(36px, 5vh, 48px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.uses h2 {
  margin: 0 0 clamp(20px, 3vw, 32px);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.uses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(24px, 5vw, 80px);
}

.use-group h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

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

.use-group li {
  position: relative;
  max-width: 52ch;
  margin: 0 0 8px;
  padding-left: 18px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.use-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 0 50% 50% 0;
}

.p-cta {
  margin-top: clamp(40px, 6vh, 64px);
}

.go {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  height: 60px;
  padding: 0 26px 0 28px;
  border-radius: 999px;
  background: var(--brand, var(--ink));
  color: var(--paper);
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}

.go svg {
  width: 0.7em;
  height: 0.7em;
  transition: transform 260ms var(--ease-out);
}

.go:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .go:hover {
    background: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -12px var(--brand, var(--ink));
  }

  .go:hover svg {
    transform: translate(0.12em, -0.12em);
  }

  .go:hover:active {
    transform: translateY(0) scale(0.96);
  }
}

.next {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: clamp(88px, 14vh, 160px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}

.next span {
  font-size: 15px;
  color: var(--ink-3);
}

.next b {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-align: right;
}

.next b i {
  font-style: normal;
  color: var(--next);
}

.next:hover b {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: clamp(64px, 10vh, 120px) var(--gutter) 0;
  padding: 16px 0 28px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-3);
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

.p-head,
.p-meta,
.p-lede,
.shots {
  animation: rise 900ms var(--ease-out) both;
}

.p-meta {
  animation-delay: 60ms;
}

.p-lede {
  animation-delay: 120ms;
}

.shots {
  animation-delay: 200ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@media (max-width: 760px) {
  .notes,
  .uses-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-head .go {
    display: none;
  }

  .p-lede {
    font-size: 20px;
  }

  .go {
    width: 100%;
    height: 56px;
    font-size: 18px;
  }

  .frame-bar {
    height: 36px;
    font-size: 12px;
  }

  .next {
    flex-direction: column;
    gap: 6px;
  }

  .next b {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p-head,
  .p-meta,
  .p-lede,
  .shots {
    animation: none;
  }
}

.go,
.top nav a,
.chips li,
.arrow {
  position: relative;
}
