/* ============================================================================
   Present, landing B.
   The app's own look at the size of a window: paper tinted by the hand in use,
   frosted white glass with large radii, the hand's name in big rounded type, and
   ink black for what is pressed. Apple's own fonts on a Mac, no web fonts, so
   nothing moves while the page loads. Only transform, opacity and filter animate.
   ========================================================================= */
:root {
  color-scheme: light;
  --ink: #1d1d21;
  --muted: #55555b;
  --faint: #7c7c85;
  --paper: 244 245 248;
  --shade: 20 31 61;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.16, 1.02, 0.3, 1);
  --glass: rgba(255, 255, 255, 0.52);
  --edge: inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  --lift: 0 1px 2px rgb(var(--shade) / 0.06), 0 10px 26px -8px rgb(var(--shade) / 0.16);
  --gutter: 28px;
  --page: 1180px;
}

* {
  box-sizing: border-box;
}
html {
  background: rgb(var(--paper));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  font: 400 17px/1.5 var(--display);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.55);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

/* ---------- the window's ground: paper tinted by the hand (Backdrop in HomeView) ---------- */
.ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ground i {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  background:
    radial-gradient(circle 62vmax at 22% 8%, rgb(var(--t) / 0.3) 0%, rgb(var(--t) / 0.2) 38%, rgb(var(--t) / 0) 100%),
    rgb(var(--base));
}

/* ---------- top bar ---------- */
.bar {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 650 17px/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
  border-radius: 10px;
}
.brand img {
  display: block;
  border-radius: 7px;
}
.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sound {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.14s var(--ease);
}
.sound svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound .wave {
  fill: none;
}
.sound .off,
.sound[aria-pressed="false"] .on {
  opacity: 0;
}
.sound[aria-pressed="false"] .off {
  opacity: 1;
}
.sound:active {
  transform: scale(0.94);
}

/* ---------- the download button (no build yet: it says so, in place) ---------- */
.get {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 600 14px/1 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -6px rgb(var(--shade) / 0.5);
  transition: transform 0.14s var(--ease);
}
.get.big {
  height: 48px;
  padding: 0 24px 0 20px;
  font-size: 16px;
}
.get:active {
  transform: scale(0.96);
}
.apple {
  width: 15px;
  height: 17px;
  fill: currentColor;
  margin-top: -2px;
}
/* both labels share one cell, so the button keeps one width whichever shows */
.get-face {
  display: grid;
  overflow: hidden;
}
.get-label {
  grid-area: 1 / 1;
  text-align: center;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.get-label.alt {
  opacity: 0;
  transform: translateY(70%);
}
.get.soon .get-label:not(.alt) {
  opacity: 0;
  transform: translateY(-70%);
}
.get.soon .get-label.alt {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */
main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: 56px;
  min-height: min(760px, calc(100svh - 84px));
  padding: 8px 0 64px;
}
h1 {
  margin: 0 0 22px;
  font: 800 clamp(50px, 6.6vw, 94px)/0.96 var(--display);
  letter-spacing: -0.048em;
  text-wrap: balance;
}
.lede {
  margin: 0 0 30px;
  max-width: 31ch;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
  text-wrap: pretty;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 34px;
}
.needs {
  color: var(--faint);
  font: 500 13.5px/1 var(--display);
}
.try {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font: 500 14px/1 var(--display);
}
.try li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.try .plus {
  margin: 0 -3px;
  color: var(--faint);
}
.try .touch,
html.coarse .try .mouse {
  display: none;
}
html.coarse .try .touch {
  display: inline-flex;
}
kbd {
  display: inline-block;
  min-width: 24px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.14);
  color: var(--ink);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0;
  text-align: center;
}

/* ---------- the board: the app's Pointer board, live ---------- */
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 0.92;
  max-height: 660px;
  justify-self: end;
  overflow: hidden;
  border-radius: 38px;
  background: var(--glass);
  box-shadow: var(--edge), 0 2px 4px rgb(var(--shade) / 0.05), 0 34px 70px -26px rgb(var(--shade) / 0.32);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
  container-type: inline-size;
  touch-action: manipulation;
}
html.coarse .board {
  /* a finger draws here, so the board does not scroll the page */
  touch-action: none;
}
.board-hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}
.board-hand.enter .hc-press {
  animation: land 0.6s var(--spring) both;
}
@keyframes land {
  from {
    opacity: 0;
    transform: translateY(-22px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.board-name {
  position: absolute;
  z-index: 2;
  left: 34px;
  bottom: 28px;
  margin: 0;
  max-width: calc(100% - 128px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 min(66px, 11.5cqw)/1.05 var(--rounded);
  letter-spacing: -0.035em;
  pointer-events: none;
}
.quick {
  position: absolute;
  z-index: 3;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qh {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgb(var(--shade) / 0.1), 0 4px 10px -4px rgb(var(--shade) / 0.18);
  cursor: pointer;
  transition: transform 0.16s var(--ease);
}
.qh img {
  display: block;
  width: auto;
  height: 36px;
  pointer-events: none;
}
/* the one in use has a ring round it; the ring moves at once, as the app's does */
.qh[aria-checked="true"],
.tile[aria-checked="true"] {
  box-shadow: 0 0 0 2.5px var(--ink), 0 4px 10px -4px rgb(var(--shade) / 0.18);
}
.all {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgb(var(--shade) / 0.5);
  transition: transform 0.16s var(--ease);
}
.all svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.all:active,
.qh:active {
  transform: scale(0.94);
}
@media (hover: hover) and (pointer: fine) {
  .qh:hover {
    transform: translateY(-2px);
  }
}

/* ---------- every hand ---------- */
.hands,
.video {
  padding: 84px 0 8px;
}
.head h2 {
  margin: 0 0 10px;
  font: 800 clamp(36px, 4.2vw, 54px)/1.02 var(--display);
  letter-spacing: -0.04em;
}
.head p {
  max-width: 44ch;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}
.count {
  font-variant-numeric: tabular-nums;
}
.shelf {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.tile img {
  display: block;
  width: auto;
  height: 64%;
  pointer-events: none;
}
.tile:active {
  transform: scale(0.96);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    transform: translateY(-3px);
  }
}

/* ---------- on videos ---------- */
.film {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--edge), 0 2px 4px rgb(var(--shade) / 0.05), 0 40px 80px -30px rgb(var(--shade) / 0.36);
}
.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- close + foot ---------- */
.close {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 110px 0 90px;
  text-align: center;
}
.close-icon {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22.5%;
  box-shadow: 0 14px 30px -12px rgb(var(--shade) / 0.4);
}
.close h2 {
  margin: 8px 0 10px;
  font: 800 46px/1 var(--display);
  letter-spacing: -0.045em;
}
.foot {
  max-width: var(--page);
  margin: 0 auto;
  padding: 26px var(--gutter) 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid rgb(var(--shade) / 0.08);
  color: var(--faint);
  font: 500 13.5px/1 var(--display);
}
.foot nav {
  display: flex;
  gap: 22px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}
.foot a:hover {
  color: var(--ink);
}

/* ---------- the pointer, as a hand on a stick ---------- */
html.hand-on,
html.hand-on * {
  cursor: none !important;
}
html.drawing,
html.drawing * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
.pointer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}
.pointer.shown {
  opacity: 1;
}
/* the fingertip is each arm's top-left corner: turning the arm turns the hand about it */
.hc-arm {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
/* a tap pushes the hand in by a sixth, and its shadow comes in under it (HandFilm.pressed) */
.hc-press {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  filter: drop-shadow(5px 9px 7px rgb(var(--shade) / 0.24));
  transition: transform 85ms var(--ease), filter 85ms var(--ease);
}
.hc-press.down {
  transform: scale(0.83);
  filter: drop-shadow(1px 2px 2px rgb(var(--shade) / 0.26));
  transition-duration: 90ms;
}
.hc-hand {
  position: absolute;
  display: block;
  max-width: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hc-rod {
  position: absolute;
  background: center / 100% 100% no-repeat;
}

/* what the hand leaves on the page: ink that fades, and the rings of taps */
.ink {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
.rings {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}
.ring {
  position: absolute;
  box-sizing: border-box;
  border-style: solid;
  border-radius: 50%;
  transform: scale(0.22);
  box-shadow: 0 0 var(--glow) rgba(255, 255, 255, 0.95), inset 0 0 var(--glow) rgba(255, 255, 255, 0.95);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 70;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(29, 29, 33, 0.86);
  color: #fff;
  font: 600 13.5px/1 var(--display);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- entrance: the words, then the board, then its hand lands ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pitch > * {
    animation: rise 0.7s var(--ease) both;
  }
  .pitch > :nth-child(2) { animation-delay: 60ms; }
  .pitch > :nth-child(3) { animation-delay: 120ms; }
  .pitch > :nth-child(4) { animation-delay: 180ms; }
  .board {
    animation: settle 0.8s var(--spring) 0.1s both;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

/* ---------- a narrower window ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-top: 20px;
  }
  .board {
    justify-self: stretch;
    aspect-ratio: 1.15;
    max-height: none;
  }
  .shelf {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  :root {
    --gutter: 18px;
  }
  body {
    font-size: 16px;
  }
  .bar {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .bar .get {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }
  .sound {
    width: 36px;
    height: 36px;
  }
  .lede {
    font-size: 17.5px;
  }
  .board {
    aspect-ratio: 0.9;
    border-radius: 30px;
  }
  /* the quick hands go along the bottom, the name to the top */
  .quick {
    top: auto;
    right: auto;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 7px;
  }
  .qh {
    width: 44px;
    height: 44px;
  }
  .qh img {
    height: 31px;
  }
  .board-name {
    top: 22px;
    bottom: auto;
    left: 24px;
    max-width: calc(100% - 96px);
    font-size: min(44px, 11cqw);
  }
  .all {
    top: 16px;
    bottom: auto;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .hands,
  .video {
    padding-top: 64px;
  }
  .head p {
    font-size: 16.5px;
  }
  .shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }
  .tile {
    border-radius: 16px;
  }
  .film {
    border-radius: 20px;
  }
  .close {
    padding: 80px 0 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ground i,
  .get-label,
  .hc-press,
  .hc-press.down,
  .qh,
  .tile,
  .toast {
    transition: none;
  }
  .board-hand.enter .hc-press {
    animation: none;
  }
}

/* ---------- the 404 page ---------- */
.ground i.lost {
  opacity: 1;
  --t: 77 191 238;
  --base: 221 238 246;
}
.nowhere {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  gap: 14px;
  text-align: center;
}
.nowhere img {
  width: 70px;
  height: auto;
  transform: rotate(-8deg);
}
.nowhere h1 {
  margin: 10px 0 0;
  font-size: clamp(36px, 6vw, 56px);
}
.nowhere .lede {
  margin: 0 0 10px;
}
.nowhere .get {
  text-decoration: none;
}
