/* Zappr landing: one headline, one button, the app on a desktop. Values come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--text-base)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }

kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid #334155;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--color-raised);
  font: 500 0.9em/1.3 var(--font-body);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.btn:hover { background: var(--color-accent-deep); }
button.btn { border: 0; font-family: inherit; cursor: pointer; }
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-sm); }
.btn--ghost { background: none; color: var(--color-ink); box-shadow: inset 0 0 0 1.5px var(--color-line); }
.btn--ghost:hover { background: var(--color-raised); }
.meta { color: var(--color-ink-2); font-size: var(--text-sm); text-wrap: balance; }

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
}
.word {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: -0.3rem; /* the icon PNG carries macOS's transparent margin */
  font: 800 1.375rem/1 var(--font-display);
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* ---------- hero ---------- */
.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 4.5vw, 3.5rem);
  text-align: center;
}
.hero h1 {
  margin: 0 auto;
  max-width: 16ch;
  font: 800 var(--text-display)/1 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  color: var(--color-ink-2);
  font-size: var(--text-lede);
  text-wrap: pretty;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: var(--color-raised);
  box-shadow: inset 0 0 0 1px var(--color-line);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
.eyebrow b {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.eyebrow:hover { color: var(--color-ink); }
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.cta__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.cta__buttons form { margin: 0; }

/* ---------- shots ---------- */
.shot { margin: 0; }
.shot figcaption {
  max-width: 30rem;
  margin: 1.1rem auto 0;
  color: var(--color-ink-2);
  text-align: center;
  text-wrap: pretty;
}
.shot figcaption b { color: var(--color-ink); font-weight: 600; }
.shot--hero { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

.pair {
  display: grid;
  gap: clamp(2.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2.5rem);
  max-width: 1240px;
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 0 var(--gutter);
}
@media (min-width: 860px) { .pair { grid-template-columns: 1fr 1fr; } }

/* A Mac desktop drawn to scale: everything inside is sized in cqw, so the scene shrinks like one image. */
.desk {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-shot);
  background: var(--wall);
  box-shadow: var(--shadow-shot);
  isolation: isolate;
}
.menubar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2cqw;
  height: 2.6cqw;
  padding: 0 2cqw;
  background: oklch(100% 0 0 / 0.2);
  backdrop-filter: blur(12px);
  color: oklch(100% 0 0);
  font-size: 1.25cqw;
  line-height: 1;
}
.menubar b { font-weight: 700; }
.menubar .clock { margin-left: auto; font-style: normal; }
.menubar .stop + .clock { margin-left: 0; }
.stop { display: flex; align-items: center; gap: 0.4cqw; margin-left: auto; font-variant-numeric: tabular-nums; }
.stop svg { width: 1.5cqw; height: 1.5cqw; }
.stop circle { fill: oklch(100% 0 0); }
.stop rect { fill: #1e293b; }

.win {
  position: absolute;
  left: 9cqw;
  top: 5.5cqw;
  width: 82cqw;
  border-radius: 1cqw;
  background: oklch(100% 0 0);
  box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.08), 0 2.5cqw 5cqw -1cqw rgb(2 6 23 / 0.6);
}
.win__bar {
  display: flex;
  align-items: center;
  gap: 0.6cqw;
  height: 2.8cqw;
  padding: 0 1.2cqw;
  border-bottom: 1px solid oklch(90% 0 0);
  border-radius: 1cqw 1cqw 0 0;
  background: oklch(96.5% 0 0);
}
.win__bar i { width: 0.95cqw; height: 0.95cqw; border-radius: 50%; background: oklch(66% 0.2 25); }
.win__bar i:nth-child(2) { background: oklch(82% 0.16 85); }
.win__bar i:nth-child(3) { background: oklch(74% 0.17 145); }
.win__body { position: relative; }
.win__body > img { width: 100%; height: auto; border-radius: 0 0 1cqw 1cqw; }

/* Hero: the ⌘⇧4 drag (dims the screen, box grows to the cursor), then the preview slides in. */
.sel {
  position: absolute;
  left: 4.6%;
  top: 13.5%;
  width: 30%;
  height: 22.5%;
  border: 1px solid oklch(100% 0 0 / 0.95);
  box-shadow: 0 0 0 200cqw var(--dim);
  animation: drag 7s var(--ease-out) infinite;
}
.hud {
  position: absolute;
  top: calc(100% + 1.1cqw);
  right: -0.5cqw;
  padding: 0.35cqw 0.7cqw;
  border-radius: 0.5cqw;
  background: var(--hud);
  color: oklch(100% 0 0);
  font-size: 1.1cqw;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cross {
  position: absolute;
  right: -1.3cqw;
  bottom: -1.3cqw;
  width: 2.6cqw;
  height: 2.6cqw;
  fill: none;
  stroke: oklch(10% 0 0);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 1px oklch(100% 0 0)) drop-shadow(0 0 1px oklch(100% 0 0));
}
.preview {
  position: absolute;
  right: 1.5cqw;
  bottom: 1cqw;
  z-index: 3;
  width: 21cqw;
  height: auto;
  animation: slide 7s var(--ease-out) infinite;
}
@keyframes drag {
  0%, 8% { width: 0; height: 0; opacity: 0; }
  10% { width: 0; height: 0; opacity: 1; }
  34%, 42% { width: 30%; height: 22.5%; opacity: 1; }
  43%, 100% { width: 30%; height: 22.5%; opacity: 0; }
}
@keyframes slide {
  0%, 43% { transform: translateX(125%); }
  52%, 88% { transform: none; }
  97%, 100% { transform: translateX(125%); }
}

/* Editor shot: the window snapshot already carries its shadow. */
.desk--center { display: grid; place-items: center; padding-top: 2.6cqw; }
.editor { width: 84cqw; height: auto; }

/* Recording shot sits closer in, the window running off the right edge. */
.desk--rec .win { left: 6cqw; top: 6cqw; width: 104cqw; }

/* Recording: Zappr's thin white outline around the area, the 3-2-1 badge, then the timer in the menu bar. */
.rec {
  position: absolute;
  left: 4.5%;
  top: 11%;
  width: 91%;
  height: 62%;
  border: 0.25cqw solid oklch(100% 0 0 / 0.9);
  box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.3), inset 0 0 0 1px oklch(0% 0 0 / 0.2);
  display: grid;
  place-items: center;
}
.count {
  display: grid;
  place-items: center;
  width: 9cqw;
  height: 9cqw;
  border-radius: 50%;
  background: oklch(10% 0 0 / 0.78);
  color: oklch(100% 0 0);
  font: 600 4.4cqw/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.count[hidden] { display: none; }
.count.pop { animation: pop 250ms cubic-bezier(0.2, 0.9, 0.25, 1); }
@keyframes pop { from { transform: scale(1.18); } }

/* ---------- bench ---------- */
.bench {
  max-width: 820px;
  margin: clamp(5rem, 11vw, 8rem) auto 0;
  padding: 0 var(--gutter);
}
.bench h2 {
  margin: 0;
  font: 800 var(--text-xl)/1.05 var(--font-display);
  letter-spacing: -0.03em;
  text-align: center;
}
.bench__lede {
  max-width: 32rem;
  margin: 1rem auto 2.5rem;
  color: var(--color-ink-2);
  font-size: var(--text-lede);
  text-align: center;
  text-wrap: pretty;
}
.bars { display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.bar {
  display: grid;
  grid-template-columns: 9.5rem 1fr 4.5rem;
  align-items: center;
  gap: 1rem;
  color: var(--color-ink-2);
}
.bar__name { font-weight: 600; white-space: nowrap; }
.bar__track { height: 14px; border-radius: 999px; background: var(--color-line); overflow: hidden; }
.bar__fill { display: block; width: var(--w); height: 100%; border-radius: inherit; background: #475569; }
.bar__value { text-align: right; font-variant-numeric: tabular-nums; }
.bar--zappr { color: var(--color-ink); }
.bar--zappr .bar__fill { background: var(--color-accent); box-shadow: 0 0 16px rgb(103 232 249 / 0.45); }
.bar--zappr .bar__value { color: var(--color-accent); font-weight: 700; }

@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; row-gap: 0.4rem; }
  .bar__track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- show & tell ---------- */
.show {
  max-width: 1240px;
  margin: clamp(5rem, 11vw, 8rem) auto 0;
  padding: 0 var(--gutter);
  scroll-margin-top: 2rem;
}
.show__head { max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.kicker {
  margin: 0 0 0.75rem;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.show h2 {
  margin: 0 auto;
  max-width: 18ch;
  font: 800 var(--text-xl)/1.05 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.show__lede {
  margin: 1rem auto 0;
  color: var(--color-ink-2);
  font-size: var(--text-lede);
  text-wrap: pretty;
}
.show__grid { display: grid; gap: 2rem clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
@media (min-width: 980px) { .show__grid { grid-template-columns: 1.45fr 1fr; } }

/* The scene: the window sits lower to make room for the pill, and the screen glows red while recording. */
.desk--show .win { top: 8cqw; }
.desk--show::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow: inset 0 0 2.4cqw 0.5cqw rgb(255 41 56 / 0.55);
  pointer-events: none;
  opacity: 0;
}
.desk--show.play::after { animation: breathe 2.8s ease-in-out 0.4s infinite alternate; }
@keyframes breathe { from { opacity: 1; } to { opacity: 0.35; } }

.pill {
  position: absolute;
  top: 3.5cqw;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.9cqw;
  height: 3.3cqw;
  padding: 0 0.6cqw 0 1.3cqw;
  border-radius: 999px;
  background: oklch(14% 0.01 260 / 0.9);
  box-shadow: 0 0 0 1px oklch(100% 0 0 / 0.14), 0 0.6cqw 1.6cqw rgb(0 0 0 / 0.4);
  color: oklch(100% 0 0);
  font-size: 1.15cqw;
  white-space: nowrap;
  transform: translate(-50%, -6cqw);
}
.play .pill { animation: drop 10s var(--ease-out) infinite; }
@keyframes drop {
  0% { transform: translate(-50%, -6cqw); }
  5%, 92% { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, -6cqw); }
}
.pill__dot { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--color-ink-red); box-shadow: 0 0 0.5cqw var(--color-ink-red); }
.play .pill__dot { animation: blink 1.4s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: 0.3; } }
.pill__time { font-weight: 600; font-variant-numeric: tabular-nums; }
.pill__bars { display: flex; align-items: center; gap: 0.25cqw; height: 1.8cqw; }
.pill__bars i { width: 0.3cqw; height: 100%; border-radius: 1cqw; background: oklch(100% 0 0 / 0.9); transform: scaleY(0.2); }
.play .pill__bars i { animation: talk 0.9s ease-in-out infinite alternate; }
.pill__bars i:nth-child(2) { animation-delay: -0.3s; }
.pill__bars i:nth-child(3) { animation-delay: -0.6s; animation-duration: 0.7s; }
.pill__bars i:nth-child(4) { animation-delay: -0.15s; }
.pill__bars i:nth-child(5) { animation-delay: -0.45s; animation-duration: 1.1s; }
@keyframes talk { from { transform: scaleY(0.2); } to { transform: scaleY(0.95); } }
.pill__hint { color: oklch(100% 0 0 / 0.7); }
.pill__stop {
  display: grid;
  place-items: center;
  width: 2.3cqw;
  height: 2.3cqw;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.13);
}
.pill__stop::after { content: ""; width: 0.85cqw; height: 0.85cqw; border-radius: 0.2cqw; background: var(--color-ink-red); }

/* Ink: the mark draws itself and the pin pops in, then both pull back as the loop ends. */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ink__mark {
  fill: none;
  stroke: var(--color-ink-red);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.play .ink__mark { animation: mark 10s var(--ease-out) infinite; }
@keyframes mark {
  0%, 16% { stroke-dashoffset: 1; }
  30%, 86% { stroke-dashoffset: 0; }
  94%, 100% { stroke-dashoffset: -1; }
}
.ink__pin { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.ink__pin circle:first-child { fill: oklch(100% 0 0); }
.ink__pin circle:nth-child(2) { fill: var(--color-ink-red); }
.ink__pin text { fill: oklch(100% 0 0); font: 700 28px/1 var(--font-body); text-anchor: middle; }
.play .ink__pin { animation: pin 10s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
@keyframes pin {
  0%, 44% { transform: scale(0); }
  50%, 86% { transform: scale(1); }
  92%, 100% { transform: scale(0); }
}

/* What the agent receives: the capture pasted into a chat, in the dark style of today's AI chat apps. */
.chat-shot { margin: 0; }
.chat-shot figcaption {
  margin: 1.1rem auto 0;
  color: var(--color-ink-2);
  text-align: center;
  text-wrap: pretty;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--radius-shot);
  background: #212121;
  box-shadow: var(--shadow-shot);
  color: #ececec;
  font-size: 0.875rem;
  line-height: 1.55;
}
.chat__thread { display: flex; flex-direction: column; gap: 1.1rem; }
.chat__mine { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.chat__bubble {
  max-width: 88%;
  padding: 0.65rem 1rem;
  border-radius: 1.4rem;
  background: #303030;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat__reply { margin: 0; text-wrap: pretty; }

/* The contact sheet as an image attachment: four numbered frames in one thumbnail. */
.chat__sheet {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: min(11rem, 50%);
  padding: 3px;
  border-radius: 0.9rem;
  background: #0b1120;
}
.chat__sheet span {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
  background: oklch(100% 0 0) url("shots/demo-screen.webp") left top / cover;
}
.chat__sheet span:first-child { border-top-left-radius: 0.7rem; }
.chat__sheet span:nth-child(2) { background-position: 12% 20%; background-size: 260%; border-top-right-radius: 0.7rem; }
.chat__sheet span:nth-child(3) { background-position: 96% 90%; background-size: 260%; border-bottom-left-radius: 0.7rem; }
.chat__sheet span:nth-child(4) { background-position: 100% 24%; background-size: 260%; border-bottom-right-radius: 0.7rem; }
.chat__sheet b {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  place-items: center;
  min-width: 0.95rem;
  height: 0.95rem;
  border-radius: 3px;
  background: oklch(100% 0 0);
  color: #020617;
  font-size: 0.5625rem;
}

.chat__composer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  border-radius: 999px;
  background: #303030;
  color: #9b9b9b;
}
.chat__composer span { flex: 1; }
.chat__plus, .chat__send { display: grid; place-items: center; flex: none; }
.chat__plus::before { content: "+"; font: 300 1.35rem/1 var(--font-body); color: #ececec; }
.chat__send { width: 2rem; height: 2rem; border-radius: 50%; background: #ececec; }
.chat__send::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.2rem;
  border-left: 2px solid #212121;
  border-top: 2px solid #212121;
  transform: rotate(45deg);
}

/* ---------- buy ---------- */
.buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) var(--gutter);
  text-align: center;
}
.buy h2 { margin: 0; font: 800 var(--text-xl)/1.05 var(--font-display); letter-spacing: -0.03em; }
.buy p { margin: 0 0 1rem; color: var(--color-ink-2); font-size: var(--text-lede); }
.buy form { margin: 0; }
.buy .meta a { color: var(--color-ink); }

/* /thanks (rendered by worker/store.js): the license key, selectable in one click. */
.thanks { min-height: 70vh; justify-content: center; }
.license {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-raised);
  color: var(--color-ink);
  font: 400 var(--text-sm)/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  word-break: break-all;
  resize: none;
}

/* ---------- footer ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--color-line);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

@media (prefers-reduced-motion: reduce) {
  .sel, .preview { animation: none; }
  /* Show & Tell holds its finished state. */
  .desk--show .pill { transform: translate(-50%, 0); }
  .desk--show::after { opacity: 1; }
  .ink__mark { stroke-dashoffset: 0; }
  .ink__pin { transform: none; }
  .preview { transform: translateX(125%); }
  .btn { transition: none; }
}
