@font-face {
  font-family: Bricolage Grotesque;
  src: url("../assets/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Courier Prime;
  src: url("../assets/fonts/courier-prime-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Courier Prime;
  src: url("../assets/fonts/courier-prime-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F7F5F0;
  --ink: #0E0E0E;
  --amber: #F5A524;
  --amber-text: #8A5100;
  --muted: #4A4740;
  --rule: #6B675E;
  --mono: "Courier Prime", "Courier New", monospace;
  --display: "Bricolage Grotesque", Arial, sans-serif;
  --enter: cubic-bezier(.2, .8, .2, 1);
  --inset: 44px;
  --band: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--amber);
  background-image: url("../assets/img/grain.svg"), radial-gradient(ellipse at 50% 20%, transparent 55%, #75430010);
  font: 16px / 1.5 var(--mono);
}
::selection { color: var(--ink); background: var(--amber); }
p, h1, h2, dl, dd, figure { margin: 0; }
a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip {
  position: fixed;
  z-index: 20;
  inset: calc(var(--band) + 8px) auto auto 12px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper);
  transform: translateX(calc(-100% - 24px));
}
.skip:focus { transform: none; }
.printer-band {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--band);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding-inline: 28px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  white-space: nowrap;
}
.printer-band :focus-visible { outline-color: var(--amber); }
.printer-band ::selection { color: var(--ink); }
.profile { text-decoration: none; gap: .6ch; }
.profile span { text-decoration: underline; text-underline-offset: .15em; }
.profile:hover span { text-decoration-thickness: 3px; }
.printer-status { color: var(--amber); }
.contact { justify-self: end; }

.printer-slot { overflow: clip; padding-bottom: 120px; }
.receipt {
  --surface: url("../assets/img/grain.svg"), var(--paper);
  width: 520px;
  margin-inline: auto;
  background: var(--surface);
  box-shadow: 0 0 22px #66390024;
  position: relative;
}
.receipt::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 12px;
  background: var(--paper);
  mask: url("../assets/img/tear.svg") left top / 24px 12px round no-repeat;
}
.masthead { padding: 56px var(--inset) 20px; }
h1, .project h2, .note-headline, .zero, .receipt-footer p, .missing h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.03em;
}
h1 { font-size: 84px; line-height: .9; letter-spacing: -.045em; }
.mast-line { display: block; position: relative; }
.mast-line > [data-print] { display: block; width: max-content; }
.mast-arrow { font-family: Arial, sans-serif; font-weight: 400; }
.masthead p { margin-top: 21px; }
.tear-rule { margin-top: 21px; height: 1px; background: repeating-linear-gradient(90deg, var(--rule) 0 5px, transparent 5px 21px); }
main { scroll-margin-top: calc(var(--band) + 4px); }
main:focus-visible { outline-offset: -3px; }
.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 36px var(--inset) 28px;
  scroll-margin-top: var(--band);
}
.radar { padding-top: 28px; padding-bottom: 20px; }
.first100 { padding-top: 28px; }
.bites { padding-bottom: 36px; }
.project-heading, .heading-line {
  display: grid;
  align-items: baseline;
  column-gap: 10px;
}
.project-heading { grid-template-columns: max-content minmax(0, 1fr); }
.heading-line { grid-template-columns: max-content minmax(12px, 1fr) max-content; }
.project h2 { font-size: 36px; line-height: 1; }
.project h2 a {
  position: relative;
  isolation: isolate;
  text-underline-offset: .09em;
}
.project h2 a::before {
  content: "";
  position: absolute;
  inset: 49% -3px 14%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--enter);
  z-index: -1;
}
.project h2 a:hover::before { transform: scaleX(1); }
.project-number { font-size: 13px; }
.leader {
  border-bottom: 2px dotted var(--ink);
  transform-origin: left;
  margin-bottom: 5px;
}
.project-status { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-glyph { display: inline-block; white-space: pre; }
.project-media { margin-top: 8px; position: relative; }
picture, img { display: block; }
img { width: 100%; height: auto; }
.framed { border: 1px solid var(--ink); }
.tests, .note-copy { font-size: 14px; color: var(--muted); }
#test-count { display: inline-block; min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.project-link { font-size: 15px; }
.radar-note {
  grid-area: 4 / 1;
  position: absolute;
  top: 8px;
  right: calc(100% + var(--inset) + clamp(14px, 3.2vw, 36px));
  width: clamp(94px, calc((100vw - 520px) / 2 - 54px), 304px);
}
.note-label { display: block; font-size: 13px; font-weight: 400; letter-spacing: .1em; }
.note-headline { margin-block: 6px 12px; font-size: clamp(18px, calc(3.5vw - 8px), 34px); line-height: 1.05; }

.carousel-slot { position: relative; margin: 12px -28px 0; }
.carousel { --rail-pad: 28px; --slide-width: 250px; position: relative; }
.rail {
  display: flex;
  gap: 12px;
  padding: 4px var(--rail-pad) 8px;
  overflow: auto hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: var(--rail-pad);
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 var(--rail-pad), #000 calc(100% - 44px), transparent);
  cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: none; }
.carousel:has(.rail:focus-visible)::after { content: ""; position: absolute; inset: 0 0 53px; border: 2px solid var(--ink); pointer-events: none; }
.rail.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.slide { flex: 0 0 var(--slide-width); scroll-snap-align: start; }
.slide:last-child { margin-inline-end: calc(100% - var(--slide-width)); }
.slide-visual {
  position: relative;
  border: 1px solid var(--ink);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  transform-origin: left center;
}
.slide img, .slide video { aspect-ratio: 4 / 5; object-fit: cover; }
.slide img { -webkit-user-drag: none; }
.slide video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 200ms var(--enter); }
.slide video.is-playing { opacity: 1; }
.carousel.is-ready .slide-visual { transition: transform 300ms var(--enter), opacity 300ms var(--enter); }
.carousel.is-ready .slide:not(.is-active) .slide-visual { transform: scale(.94); opacity: .6; }
.slide figcaption { margin-top: 6px; font-size: 12px; line-height: 1.3; letter-spacing: .04em; }
.carousel-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin: 4px var(--rail-pad) 0;
  border-top: 1px dotted var(--rule);
  padding-top: 4px;
  text-align: center;
  font-size: 14px;
  letter-spacing: .08em;
}
.carousel-controls button {
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font: 20px / 1 var(--mono);
  cursor: pointer;
}
.carousel-controls button[aria-disabled="true"] { color: var(--muted); cursor: default; }
.carousel-controls button:not([aria-disabled="true"]):hover { background: var(--amber); }
.carousel-controls button:focus-visible { outline-offset: -2px; }

.totals { margin-inline: var(--inset); padding-block: 18px 28px; margin-top: 28px; border-top: 2px solid var(--ink); }
.totals dl { display: grid; gap: 4px; margin-top: 8px; font-size: 15px; }
.totals dl > div { display: flex; justify-content: space-between; gap: 8px; }
.zero-row { margin-top: 43px; align-items: end; font-size: 20px; font-weight: 700; line-height: 1.16; }
.zero-row dt { padding-bottom: 8px; }
.zero-frame { display: block; position: relative; }
.zero { display: block; font-size: 96px; line-height: .85; letter-spacing: -.04em; }
.receipt-footer { display: grid; gap: 14px; padding: 28px var(--inset) 54px; }
.barcode {
  height: 24px;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px, var(--ink) 10px 13px, transparent 13px 15px, var(--ink) 15px 16px, transparent 16px 20px);
}
.barcode-scan, .print-scan { position: absolute; opacity: 0; background: var(--amber); pointer-events: none; }
.barcode-scan { inset: 0 auto 0 0; width: 2px; }
.print-scan { inset: 0 0 auto; height: 2px; }
.receipt-footer p { margin-top: 8px; font-size: 34px; line-height: 1.05; }
.receipt-footer a { padding-block: 12px; font-size: 22px; white-space: pre; }
.cta-arrow { display: inline-block; transition: transform 220ms var(--enter); }
.receipt-footer a:hover .cta-arrow { transform: translateX(4px); }
.receipt-footer a:active { transform: translateY(1px); }
.missing { min-height: 100vh; display: grid; place-items: center; padding: 12px; }
.missing main { width: min(100%, 520px); margin: 0; padding: 44px; background: var(--paper); }
.missing h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1; }

@media (max-width: 760px) {
  :root { --inset: 20px; }
  .printer-band {
    grid-template-columns: 1fr auto;
    column-gap: 6px;
    min-height: var(--band);
    padding-inline: clamp(12px, 5vw, 28px);
  }
  .printer-status { grid-column: 1 / -1; grid-row: 2; justify-self: center; margin-top: -12px; padding-bottom: 3px; font-size: 12px; }
  .receipt { width: calc(100% - 24px); }
  h1 { font-size: 56px; }
  .project h2 { font-size: 30px; }
  .heading-line { display: flex; flex-wrap: wrap; justify-content: space-between; row-gap: 0; }
  .leader { display: none; }
  .radar-note {
    grid-area: auto;
    position: static;
    width: auto;
    margin: 5px calc(-1 * var(--inset)) -20px;
    padding: 8px var(--inset) 14px;
    border-top: 1px dotted var(--rule);
  }
  .note-headline { font-size: 28px; }
  .carousel-slot { margin-inline: calc(-1 * var(--inset)); }
  .carousel { --rail-pad: 20px; --slide-width: 210px; }
  .zero-row { font-size: 15px; }
  .zero { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .receipt-footer a:active, .receipt-footer a:hover .cta-arrow { transform: none; }
}
