@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Brand colours from docs/brand/logo/README.md */
:root {
  --ink: #14161c;
  --paper: #f4f1ea;
  --ground: #fbfaf7;
  --robin: #e4572e;
  --robin-text: #b83a18;
  --text-2: #45484f;
  --text-3: #5a5d66;
  --line: #d2cbbb;
  --line-soft: #e2dcce;
  --sheet: #e9e3d6;
  /* Same meaning as the green dot in the app's binder mode; white text 5.4:1 */
  --missing: #1e7a45;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--ink); }
a:not(.nav-cta):hover { color: var(--robin-text); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--robin-text);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, p, figure, ol { margin: 0; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--ground);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; color: var(--ground); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Type */

.disp { font-family: var(--display); letter-spacing: -0.02em; }

.h-hero {
  font-stretch: 82%;
  font-variation-settings: 'opsz' 96;
  font-weight: 800;
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.92;
}

.h-section {
  font-stretch: 88%;
  font-weight: 750;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1;
}

.h-feature, .h-final {
  font-stretch: 82%;
  font-variation-settings: 'opsz' 96;
  font-weight: 800;
  line-height: 0.95;
}
.h-feature { font-size: clamp(38px, 5vw, 68px); }
.h-final { font-size: clamp(44px, 6vw, 88px); max-width: 11em; }

.h-item { font-weight: 700; font-size: 26px; line-height: 1.15; }
.h-small { font-weight: 700; font-size: 21px; line-height: 1.2; }
.h-small-lg { font-weight: 700; font-size: 22px; line-height: 1.2; }

.lead { font-size: 20px; color: var(--text-2); max-width: 32em; }
.body-lg { font-size: 19px; color: var(--text-2); }
.body { font-size: 17px; color: var(--text-2); }
.body-sm { font-size: 16px; line-height: 1.5; color: var(--text-2); }
.note { font-size: 15px; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

.stack-xs, .stack-sm, .stack-md, .stack-lg, .stack-xl { display: flex; flex-direction: column; }
.stack-xs { gap: 8px; }
.stack-sm { gap: 14px; }
.stack-md { gap: 18px; }
.stack-lg { gap: 26px; }
.stack-xl { gap: 56px; }
.narrow { max-width: 760px; }
.center { display: flex; justify-content: center; }

/* Sections */

.band { padding: 112px 0; }
.band-paper { background: var(--paper); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
}
.logo img { display: block; height: 32px; width: auto; }
.navlinks { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.navlinks a { text-decoration: none; }
.nav-cta {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--ground) !important;
  font-weight: 600;
}
.nav-cta:hover { background: #2a2d36; }

/* Store buttons */

.stores { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.stores-center { justify-content: center; }
/* Official badges, unaltered; Apple asks for clear space of a quarter of the badge height */
.store-badge { display: block; border-radius: 9px; }
.store-badge img { display: block; height: 56px; width: auto; }

/* Hero */

.hero { overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}

.stage { position: relative; height: 640px; }
.fan {
  position: absolute;
  width: 236px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 48px -20px rgba(20, 22, 28, 0.45);
}
.fan-left { left: 0; top: 150px; transform: rotate(-11deg); }
.fan-right { right: 0; top: 120px; transform: rotate(9deg); }

.phone {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 300px;
  height: 620px;
  padding: 12px;
  border-radius: 46px;
  background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(20, 22, 28, 0.55);
}
.phone-static { position: relative; left: auto; top: auto; transform: none; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; }
.screen-scan { background: #23262e; }

.scan-title {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--ground);
  font-weight: 600;
  font-size: 14px;
}
.scan-card {
  position: absolute;
  left: 50%;
  top: 70px;
  width: 196px;
  height: auto;
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 9px;
}
.corner { position: absolute; width: 30px; height: 30px; border: 0 solid var(--robin); }
.corner.tl { left: 34px; top: 58px; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: 10px; }
.corner.tr { right: 34px; top: 58px; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: 10px; }
.corner.bl { left: 34px; top: 336px; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: 10px; }
.corner.br { right: 34px; top: 336px; border-right-width: 4px; border-bottom-width: 4px; border-bottom-right-radius: 10px; }

.result {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  border-radius: 26px;
  background: var(--paper);
}
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 21px; }
.result-meta { font-size: 13px; color: var(--text-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-center { justify-content: center; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid #c9c3b6; }
.chip-dark { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.result-btn {
  margin-top: 4px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--robin);
  font-weight: 700;
  font-size: 15px;
}

/* Steps */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 0; list-style: none; }
.step-num { font-weight: 800; font-size: 56px; line-height: 1; color: var(--robin); }

/* Binder mode */

.binder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 64px;
  align-items: center;
}
.binder-figure { display: flex; flex-direction: column; gap: 18px; }

.sheet {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 20px 24px 14px;
  border-radius: 18px;
  background: var(--sheet);
}
.holes { display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.holes span { width: 16px; height: 16px; border-radius: 50%; background: var(--ground); box-shadow: inset 0 1px 2px rgba(20, 22, 28, 0.3); }
.pockets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pocket { position: relative; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.55); }
.pocket img { display: block; width: 100%; height: auto; aspect-ratio: 400 / 550; border-radius: 6px; }

.hit, .ptag, .miss { opacity: 0; }
.hit { position: absolute; inset: 3px; border: 2.5px solid var(--robin); border-radius: 9px; }
.ptag {
  position: absolute;
  left: 50%;
  bottom: -11px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ground);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ptag.top { background: var(--robin); border-color: var(--robin); }
.miss {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--missing);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(20, 22, 28, 0.35);
}

.sheet[data-scanned] .hit,
.sheet[data-scanned] .ptag,
.sheet[data-scanned] .miss { opacity: 1; }
.sheet[data-scanned] .hit { animation: fade 0.35s ease both; }
.sheet[data-scanned] .ptag, .sheet[data-scanned] .miss { animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.sheet[data-scanned] .pocket:nth-child(2) > span { animation-delay: 60ms; }
.sheet[data-scanned] .pocket:nth-child(3) > span { animation-delay: 120ms; }
.sheet[data-scanned] .pocket:nth-child(4) > span { animation-delay: 180ms; }
.sheet[data-scanned] .pocket:nth-child(5) > span { animation-delay: 240ms; }
.sheet[data-scanned] .pocket:nth-child(6) > span { animation-delay: 300ms; }
.sheet[data-scanned] .pocket:nth-child(7) > span { animation-delay: 360ms; }
.sheet[data-scanned] .pocket:nth-child(8) > span { animation-delay: 420ms; }
.sheet[data-scanned] .pocket:nth-child(9) > span { animation-delay: 480ms; }

.sweep {
  display: none;
  position: absolute;
  left: 44px;
  right: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--robin);
}
.sheet[data-scanning] .sweep { display: block; animation: sweep 0.9s ease-in-out both; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateX(-50%) scale(0.85); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes sweep { from { top: 16px; } to { top: calc(100% - 18px); } }

.binder-caption { display: flex; flex-direction: column; gap: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.legend li { display: flex; align-items: center; gap: 8px; }
.key { width: 14px; height: 14px; border-radius: 50%; }
.key-top { background: var(--robin); }
.key-miss { background: var(--missing); }

.badge {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--robin);
  font-size: 14px;
  font-weight: 700;
}
.page-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.page-sum { font-weight: 800; font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; }

.btn {
  align-self: flex-start;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--ground); }
.btn[hidden] { display: none; }

/* Recognition pipeline */

.tech { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; padding: 0; list-style: none; }
.tile {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--paper);
}
.tile img { display: block; height: auto; }
.tile .tilted { width: 104px; border-radius: 6px; transform: rotate(-12deg); }
.tile .flat { width: 118px; border-radius: 6px; }
.detect-box { position: absolute; width: 132px; height: 168px; border: 2.5px dashed var(--robin); border-radius: 10px; transform: rotate(-12deg); }
.tile-row { gap: 10px; padding: 0 14px; }
.tile-row .mini { width: 58px; border-radius: 4px; }
.vector { display: grid; grid-template-columns: repeat(6, 10px); gap: 4px; }
.vector i { height: 10px; border-radius: 2px; }
.v0 { background: var(--ink); }
.v1 { background: #c9c3b6; }
.v2 { background: var(--robin); }
.v3 { background: #6b6e77; }
.tile-col { flex-direction: column; gap: 12px; }
.ocr { position: relative; width: 198px; height: 40px; overflow: hidden; border-radius: 6px; background: #fff; }
.ocr img { position: absolute; left: 0; top: -757px; width: 594px; max-width: none; }
.ocr-box { position: absolute; left: 3px; top: 3px; width: 162px; height: 32px; border: 2px solid var(--robin); border-radius: 4px; }
.token { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; font-weight: 700; }
.tile-dark {
  gap: 12px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--ground);
}
.tile .result-thumb { flex: 0 0 auto; width: 58px; border-radius: 4px; }
.result-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.result-name { font-weight: 700; font-size: 18px; line-height: 1.15; }
.tile-meta { font-size: 13px; line-height: 1.35; color: #c9cbd1; }
.tile-price { margin-top: 4px; font-weight: 700; font-size: 22px; color: var(--robin); font-variant-numeric: tabular-nums; }
.step-label { font-size: 14px; font-weight: 700; color: var(--robin-text); }

.figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-top: 48px;
  border-top: 1px solid var(--line-soft);
}
.fig { font-weight: 800; font-size: 52px; line-height: 1.05; letter-spacing: -0.03em; }

/* Collection */

.coll-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
  align-items: center;
}
.screen-light {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 44px 16px 16px;
  background: var(--paper);
}
.app-title { font-weight: 800; font-size: 26px; }
.value-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: #fff; }
.value-label { font-size: 12px; color: var(--text-3); }
.value-sum { font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.spark { display: block; width: 100%; height: 40px; }
.spark polyline { fill: none; stroke: var(--robin); stroke-width: 2.5; stroke-linejoin: round; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles img { display: block; width: 100%; height: auto; border-radius: 5px; }
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 36px; }

/* Final call to action */

.band-final { padding: 120px 0; overflow: hidden; }
.final { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.final .lead { margin: 0 auto; }
.final-fan { display: flex; justify-content: center; margin-bottom: 8px; }
.final-fan img { display: block; height: auto; border-radius: 8px; box-shadow: 0 18px 36px -18px rgba(20, 22, 28, 0.5); }
.final-fan img:nth-child(1) { width: 120px; transform: rotate(-8deg) translateX(18px); }
.final-fan img:nth-child(2) { width: 132px; position: relative; z-index: 1; }
.final-fan img:nth-child(3) { width: 120px; transform: rotate(8deg) translateX(-18px); }

/* Footer */

.footer { border-top: 1px solid var(--line-soft); padding: 48px 0 56px; font-size: 15px; color: var(--text-3); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-row img { display: block; height: 24px; width: auto; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: var(--text-3); }
.fine { max-width: 64em; line-height: 1.5; }

/* Legal pages */

.legal { max-width: 720px; padding-top: 48px; padding-bottom: 96px; }
.legal h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.02em; margin-bottom: 32px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 40px 0 12px; }
.legal p, .legal ul { margin: 0 0 14px; color: var(--text-2); }
.legal address { font-style: normal; color: var(--text-2); margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[data-scanned] .hit, .sheet[data-scanned] .ptag, .sheet[data-scanned] .miss, .sheet[data-scanning] .sweep { animation: none; }
}

@media (max-width: 980px) {
  .wrap { padding: 0 16px; }
  .band { padding: 80px 0; }
  .hero-grid, .binder-grid, .coll-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-grid { padding-top: 32px; }
  .tech { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .figs { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feat { grid-template-columns: minmax(0, 1fr); }
  .stack-xl { gap: 40px; }
  .hide-sm { display: none; }
  .stage { height: 560px; }
  .fan { width: 170px; }
  .phone:not(.phone-static) { transform: translateX(-50%) scale(0.88); transform-origin: top center; }
}

@media (max-width: 520px) {
  .tech { grid-template-columns: minmax(0, 1fr); }
  .sheet { grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 14px 12px 20px 8px; }
  .holes span { width: 10px; height: 10px; }
  .pockets { gap: 8px; }
  .pocket { padding: 4px; }
  .ptag, .miss { font-size: 11px; padding: 2px 6px; }
  .store-badge img { height: 48px; }
  .sweep { left: 26px; right: 12px; }
}
