/* Layout: one long page; a hero where a live phone drives a Mac screen, then
   plain sections on the same dark ground as the app itself. Dark first, with
   a light palette for people whose system is set to light, or who pick it with
   the button in the header (data-theme, set by the script in index.html's head).
   Sections are set like a manual: hairlines and run-in heads rather than cards. */
:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --bg-raised: #0f1114;
  --surface: #131518;
  --surface-2: #1b1e23;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --fg: #eef0f3;
  --muted: #8f96a0;

  /* The app's own gesture colours: blue moves, purple scrolls, orange drags. */
  --move: #5b8cff;
  --scroll: #a78bfa;
  --drag: #f5a524;
  --move-text: #86a8ff;
  --scroll-text: #c4b1ff;
  --drag-text: #f8bd55;
  --cta: #3366f0;
  --cta-hover: #4675f5;
  --cta-ink: #ffffff;

  /* Device mock-ups look the same in both themes. */
  --dev-bg: #0a0b0d;
  --dev-surface: #131518;
  --dev-line: rgba(255, 255, 255, 0.08);
  --dev-fg: #eef0f3;
  --dev-muted: #8a9099;
  --dev-ok: #34d399;

  --font-display: "Young Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-device: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;

  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f3f5f8;
    --bg-raised: #ebeef3;
    --surface: #ffffff;
    --surface-2: #f2f4f8;
    --line: rgba(14, 20, 32, 0.09);
    --line-strong: rgba(14, 20, 32, 0.17);
    --fg: #0e1218;
    --muted: #59606d;
    --move: #3366f0;
    --scroll: #7d5cf2;
    --drag: #e08f0b;
    --move-text: #2556d8;
    --scroll-text: #6440de;
    --drag-text: #a35f00;
    --cta: #2556d8;
    --cta-hover: #1f4bc2;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-raised: #ebeef3;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --line: rgba(14, 20, 32, 0.09);
  --line-strong: rgba(14, 20, 32, 0.17);
  --fg: #0e1218;
  --muted: #59606d;
  --move: #3366f0;
  --scroll: #7d5cf2;
  --drag: #e08f0b;
  --move-text: #2556d8;
  --scroll-text: #6440de;
  --drag-text: #a35f00;
  --cta: #2556d8;
  --cta-hover: #1f4bc2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Paints the band behind a phone's status bar above the sticky nav. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}

h1, h2, h3 { margin: 0; text-wrap: balance; font-synthesis: none; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--move); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

/* -- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--cta);
  color: var(--cta-ink);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--cta-hover); }
.btn:active { transform: translateY(1px); }
.btn-small { height: 38px; padding: 0 16px; border-radius: 8px; font-size: 0.9375rem; }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: currentColor; }
.btn-block { width: 100%; }

/* -- nav ------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 400 1.25rem/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand .mark { width: 28px; height: 28px; flex: none; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--fg); }

/* Light or dark. It shows the one in use, and hides without scripts, since then it
   can't do anything. */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--fg); background: var(--surface-2); }
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .sun, :root[data-theme="light"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root:not([data-theme]) .theme-toggle { display: none; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
}

/* -- hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding-block: 72px 88px;
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 48px 64px; }
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.8rem + 3.6vw, 4.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lede { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }

.aside { max-width: 30em; margin-top: 28px; color: var(--muted); font-size: 0.9375rem; }

/* -- demo: Mac display ----------------------------------------------------- */

.demo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  -webkit-user-select: none;
  user-select: none;
}
.display, .phone { grid-area: 1 / 1; }

.display { width: 84%; padding-bottom: 6%; }

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  overflow: hidden;
  container-type: inline-size;
  border-radius: 10px;
  border: 7px solid #0c0d10;
  outline: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(90% 80% at 12% 8%, #3d5fe0 0%, transparent 60%),
    radial-gradient(80% 90% at 95% 100%, #8251d8 0%, transparent 58%),
    radial-gradient(60% 60% at 70% 30%, #1f8fb3 0%, transparent 70%),
    #121834;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
}

.stand {
  width: 22%;
  height: 0;
  padding-bottom: 7%;
  margin: 0 auto;
  background: linear-gradient(180deg, #7d838c, #b9bec5 40%, #868c95);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.menubar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  height: 3.6cqw;
  padding: 0 1.8cqw;
  background: rgba(14, 16, 26, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.mb-dot { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.mb-item { height: 0.9cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.45); }
.mb-item.w1 { width: 4.6cqw; background: rgba(255, 255, 255, 0.7); }
.mb-item.w2 { width: 3cqw; }
.mb-item.w3 { width: 3.6cqw; }
.mb-clock { margin-left: auto; color: rgba(255, 255, 255, 0.85); font: 600 1.5cqw/1 var(--font-device); }

.window {
  position: absolute;
  left: 5%;
  top: 11%;
  width: 52%;
  height: 66%;
  border-radius: 1.4cqw;
  overflow: hidden;
  background: #1c1f26;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2cqw 4cqw rgba(0, 0, 0, 0.45);
  transition: outline-color 0.2s;
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  height: 4.4cqw;
  padding: 0 1.6cqw;
  background: #25282f;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}
.titlebar i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #ff5f57; }
.titlebar i:nth-child(2) { background: #febc2e; }
.titlebar i:nth-child(3) { background: #28c840; }
.titlebar span { margin-left: 1.4cqw; color: rgba(255, 255, 255, 0.7); font: 600 1.45cqw/1 var(--font-device); }

.win-body { position: absolute; inset: 4.4cqw 0 0; overflow: hidden; }
.win-content { display: flex; flex-direction: column; gap: 1.15cqw; padding: 2.6cqw 3cqw; will-change: transform; }
.ln { display: block; flex: none; width: var(--w, 80%); height: 1cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.13); }
.ln.h { width: 46%; height: 1.8cqw; margin-top: 0.8cqw; background: rgba(255, 255, 255, 0.34); }
.pic {
  display: block;
  flex: none;
  aspect-ratio: 16 / 6;
  margin-block: 0.6cqw;
  border-radius: 1cqw;
  background: linear-gradient(160deg, #f6b25b, #e8667c 45%, #5b4bd6);
}
.pic.alt { background: linear-gradient(200deg, #66d1c1, #3a7bd5 60%, #283a8f); }

.icon {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7cqw;
  width: 11cqw;
  translate: -50% -50%;
  transition: opacity 0.35s, scale 0.35s;
}
.icon .label {
  padding: 0.2cqw 0.7cqw;
  border-radius: 0.6cqw;
  color: #fff;
  font: 600 1.35cqw/1.3 var(--font-device);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.icon.selected .label { background: #2f62e8; text-shadow: none; }
.icon.selected .glyph { outline: 0.3cqw solid rgba(255, 255, 255, 0.35); outline-offset: 0.4cqw; }
.icon.lifted { transition: none; scale: 1.06; }
.icon.lifted .glyph { box-shadow: 0 1.4cqw 2cqw rgba(0, 0, 0, 0.45); }
.icon.gone { opacity: 0; scale: 0.4; }

.file { --x: 71%; --y: 25%; z-index: 2; }
.file .glyph {
  width: 4.8cqw;
  height: 6cqw;
  border-radius: 0.6cqw;
  background:
    linear-gradient(135deg, transparent 72%, rgba(0, 0, 0, 0.18) 72%) top right / 1.6cqw 1.6cqw no-repeat,
    linear-gradient(180deg, #eef1f6, #cfd5df);
  position: relative;
}
.file .glyph::after {
  content: "";
  position: absolute;
  inset: 2.1cqw 1.4cqw;
  border-radius: 0.3cqw;
  background: linear-gradient(160deg, #f6b25b, #e8667c 60%, #5b4bd6);
}
.folder { --x: 71%; --y: 62%; }
.folder .glyph {
  position: relative;
  width: 6.6cqw;
  height: 5cqw;
  margin-top: 0.8cqw;
  border-radius: 0.5cqw 0.5cqw 0.7cqw 0.7cqw;
  background: linear-gradient(180deg, #74b6ff, #3f8cf0);
  transition: filter 0.2s, scale 0.2s;
}
.folder .glyph::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.8cqw;
  width: 2.8cqw;
  height: 1.2cqw;
  border-radius: 0.5cqw 0.5cqw 0 0;
  background: #5aa4fb;
}
.folder.target .glyph { filter: brightness(1.25); scale: 1.08; }

.dock {
  position: absolute;
  left: 50%;
  bottom: 2.2%;
  display: flex;
  gap: 1cqw;
  padding: 0.9cqw;
  translate: -50% 0;
  border-radius: 1.8cqw;
  background: rgba(255, 255, 255, 0.16);
  outline: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.dock i { width: 4.2cqw; height: 4.2cqw; border-radius: 1.1cqw; background: linear-gradient(160deg, #6aa0ff, #3a5fe0); }
.dock i:nth-child(2) { background: linear-gradient(160deg, #c4a6ff, #7b4fd6); }
.dock i:nth-child(3) { background: linear-gradient(160deg, #ffd27a, #f08a24); }
.dock i:nth-child(4) { background: linear-gradient(160deg, #7ee2b0, #1fa36b); }
.dock i:nth-child(5) { background: linear-gradient(160deg, #e6e9ef, #9aa2ae); }

.ctx {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-width: 17cqw;
  padding: 0.6cqw;
  border-radius: 1.1cqw;
  background: rgba(40, 43, 51, 0.94);
  outline: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1.6cqw 3cqw rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.9);
  font: 500 1.45cqw/1 var(--font-device);
  animation: pop 0.14s ease-out;
}
.ctx span { padding: 0.75cqw 1.2cqw; border-radius: 0.6cqw; }
.ctx span:first-child { background: #2f62e8; }
.ctx hr { width: 100%; height: 1px; margin: 0.5cqw 0; border: 0; background: rgba(255, 255, 255, 0.14); }
@keyframes pop { from { opacity: 0; scale: 0.94; } }

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 3.4cqw;
  height: 3.4cqw;
  margin: -0.35cqw 0 0 -0.7cqw;
  pointer-events: none;
  filter: drop-shadow(0 0.2cqw 0.4cqw rgba(0, 0, 0, 0.35));
  will-change: left, top;
}

.click-ring {
  position: absolute;
  z-index: 4;
  width: 5cqw;
  height: 5cqw;
  margin: -2.5cqw 0 0 -2.5cqw;
  border-radius: 50%;
  border: 0.35cqw solid rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}
.click-ring.go { animation: ring 0.4s ease-out; }
.click-ring.r { border-color: #c4b1ff; }
@keyframes ring { from { opacity: 0.95; scale: 0.3; } to { opacity: 0; scale: 1.2; } }

/* -- demo: phone ----------------------------------------------------------- */

.phone {
  justify-self: end;
  align-self: end;
  position: relative;
  z-index: 1;
  width: 31%;
  aspect-ratio: 9 / 19;
  max-width: 100%;
  container-type: inline-size;
}
.phone-body {
  height: 100%;
  padding: 3.2cqw;
  border-radius: 15cqw;
  background: linear-gradient(160deg, #3a3e46, #15171b 40%, #2a2d33);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 70px -20px rgba(0, 0, 0, 0.6);
}
.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  height: 100%;
  padding: 11cqw 4cqw 5cqw;
  border-radius: 12cqw;
  background: var(--dev-bg);
  color: var(--dev-fg);
  font-family: var(--font-device);
  overflow: hidden;
}

.p-bar { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.p-status {
  display: inline-flex;
  align-items: center;
  gap: 2.4cqw;
  min-width: 0;
  padding: 2.2cqw 3.8cqw 2.2cqw 3.2cqw;
  border-radius: 99px;
  background: var(--dev-surface);
  border: 1px solid var(--dev-line);
  font-size: 4.2cqw;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.p-dot {
  flex: none;
  width: 2.6cqw;
  height: 2.6cqw;
  border-radius: 50%;
  background: var(--dev-ok);
  box-shadow: 0 0 0 1cqw rgba(52, 211, 153, 0.18);
  transition: box-shadow 0.2s;
}
.p-dot.blip { box-shadow: 0 0 0 2cqw rgba(52, 211, 153, 0.25); }
.p-gear { width: 7cqw; height: 7cqw; color: var(--dev-muted); flex: none; }

.p-pad {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 9cqw;
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.5px) 0 0 / 7.4cqw 7.4cqw,
    linear-gradient(180deg, #16181c, var(--dev-surface));
  border: 1px solid var(--dev-line);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.p-pad:active { cursor: grabbing; }
.p-pad:hover { border-color: rgba(91, 140, 255, 0.35); }
.p-pad.flash { border-color: #5b8cff; box-shadow: inset 0 0 0 1px #5b8cff, inset 0 0 12cqw rgba(91, 140, 255, 0.14); transition: none; }
.p-pad.flash-r { border-color: #a78bfa; box-shadow: inset 0 0 0 1px #a78bfa, inset 0 0 12cqw rgba(167, 139, 250, 0.14); transition: none; }
.p-pad.drag { border-color: rgba(245, 165, 36, 0.6); }

.touch {
  --tc: 91, 140, 255;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 26cqw;
  height: 26cqw;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--tc), 0.5) 0%, rgba(var(--tc), 0.13) 45%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.18s;
}
.touch.scroll { --tc: 167, 139, 250; }
.touch.drag { --tc: 245, 165, 36; }
.touch.fade { opacity: 0; }

.p-ripple {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 30cqw;
  height: 30cqw;
  translate: -50% -50%;
  border-radius: 50%;
  border: 0.7cqw solid #5b8cff;
  pointer-events: none;
  animation: ripple 0.4s ease-out forwards;
}
.p-ripple.r { border-color: #a78bfa; }
@keyframes ripple { from { opacity: 0.9; scale: 0.35; } to { opacity: 0; scale: 1.15; } }

.p-mode {
  position: absolute;
  left: 50%;
  bottom: 5cqw;
  translate: -50% 2cqw;
  padding: 1.6cqw 3.8cqw;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.45);
  color: #d4d8de;
  font-size: 3.5cqw;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.2s;
}
.p-mode.show { opacity: 1; translate: -50% 0; }

.demo-caption {
  grid-area: 2 / 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.demo-caption svg { width: 20px; height: 20px; flex: none; color: var(--move-text); }

@media (max-width: 980px) {
  .demo { max-width: 680px; }
}
@media (max-width: 560px) {
  .display { width: 78%; padding-bottom: 14%; }
  .phone { width: 40%; }
  .screen { border-width: 4px; border-radius: 7px; }
}

/* -- sections -------------------------------------------------------------- */

.band { padding-block: clamp(64px, 8vw, 104px); }
.band + .band { border-top: 1px solid var(--line); }

.section-head { display: grid; gap: 12px; max-width: 40rem; margin-bottom: clamp(32px, 4vw, 48px); }
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.section-head p { color: var(--muted); font-size: 1.125rem; }

h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.25; }

/* gestures */

/* A reference list: picture, name and what it does, two columns wide. */
.gestures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) { .gestures { grid-template-columns: minmax(0, 1fr); } }

.gesture {
  --gc: var(--move);
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-content: center;
  column-gap: 24px;
  row-gap: 4px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.gesture.scroll { --gc: var(--scroll); }
.gesture.drag { --gc: var(--drag); }
.gesture svg { grid-row: span 2; display: block; width: 100%; height: auto; }
.gesture h3 { align-self: end; }
.gesture p { align-self: start; color: var(--muted); font-size: 1rem; }
@media (max-width: 560px) {
  .gesture { grid-template-columns: 96px minmax(0, 1fr); column-gap: 18px; padding: 14px 0; }
}

.g-pad {
  fill: var(--surface-2);
  stroke: var(--line-strong);
  stroke-width: 1;
}
.g-dot { fill: var(--gc); }
.g-glow { fill: var(--gc); opacity: 0.2; }
.g-ring { fill: none; stroke: var(--gc); stroke-width: 1.6; opacity: 0.55; }
.g-ring.faint { opacity: 0.25; }
.g-trail { fill: none; stroke: var(--gc); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0.5 6; opacity: 0.8; }
.g-head { fill: none; stroke: var(--gc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }

/* The pictures take turns acting out their gesture: demo.js gives one at a
   time the "playing" class for a single run, and the rest stay still. */
.g-finger, .g-ring, .g-glow, .g-head { transform-box: fill-box; transform-origin: center; }
.g-ring { --o: 0.55; }
.g-ring.faint { --o: 0.25; }

.playing .g-trail { animation: g-flow 0.8s linear 3; }
.playing[data-motion="glide"] .g-finger { animation: g-glide 2.4s linear; }
.playing[data-motion="tap"] .g-finger { animation: g-press 2.4s ease-out; }
.playing[data-motion="tap"] .g-glow { animation: g-pop 2.4s ease-out; }
.playing[data-motion="tap"] .g-ring { animation: g-ripple 2.4s ease-out; }
.playing[data-motion="tap"] .g-ring.faint { animation-delay: 0.12s; }
.playing[data-motion="drag"] .g-finger { animation: g-drag 2.4s ease-in-out; }
.playing[data-motion="drag"] .g-ring { animation: g-pickup 2.4s ease-out; }
.playing[data-motion="swipe"] .g-finger { animation: g-swipe 2.4s ease-out; }
.playing[data-motion="swipe"] .g-head { animation: g-nudge 2.4s ease-out; }

@keyframes g-flow { to { stroke-dashoffset: -6.5; } }

/* One finger fades out, comes back at the start of the trail and follows its curve. */
@keyframes g-glide {
  0%, 6% { transform: none; opacity: 1; }
  12% { transform: none; opacity: 0; }
  13% { transform: translate(-54px, 28px); opacity: 0; }
  22% { transform: translate(-54px, 28px); opacity: 1; }
  36% { transform: translate(-42.5px, 23.3px); }
  50% { transform: translate(-30.8px, 14.8px); }
  64% { transform: translate(-17.2px, 5.8px); }
  78%, 100% { transform: none; opacity: 1; }
}

/* Fingers press down, the glow flares and the rings snap in, then ripple out. */
@keyframes g-press {
  0%, 14% { transform: none; }
  22% { transform: scale(0.78); }
  34%, 100% { transform: none; }
}
@keyframes g-pop {
  0%, 14% { transform: none; opacity: 0.2; }
  24% { transform: scale(1.4); opacity: 0.35; }
  60%, 100% { transform: none; opacity: 0.2; }
}
@keyframes g-ripple {
  0%, 14% { transform: none; opacity: var(--o); }
  22% { transform: scale(0.6); opacity: var(--o); }
  58% { transform: scale(1.3); opacity: 0; }
  59% { transform: none; opacity: 0; }
  86%, 100% { transform: none; opacity: var(--o); }
}

/* The finger comes back at the ring, taps, touches again and carries it along the trail. */
@keyframes g-drag {
  0%, 5% { transform: none; opacity: 1; }
  10% { transform: none; opacity: 0; }
  11% { transform: translate(-50px, 18px); opacity: 0; }
  18% { transform: translate(-50px, 18px); opacity: 1; }
  24% { transform: translate(-50px, 18px) scale(0.8); }
  30% { transform: translate(-50px, 18px); }
  36% { transform: translate(-50px, 18px) scale(0.8); }
  78% { transform: scale(0.8); }
  86%, 100% { transform: none; opacity: 1; }
}
@keyframes g-pickup {
  0%, 30%, 70%, 100% { transform: none; opacity: var(--o); }
  42% { transform: scale(1.5); opacity: 0.6; }
}

/* Two fingers flick up and lift off, then settle back where they started. */
@keyframes g-swipe {
  0%, 10% { transform: none; opacity: 1; }
  48% { transform: translateY(-18px); opacity: 1; }
  58% { transform: translateY(-22px); opacity: 0; }
  59% { transform: none; opacity: 0; }
  84%, 100% { transform: none; opacity: 1; }
}
@keyframes g-nudge {
  0%, 10%, 80%, 100% { transform: none; }
  45% { transform: translateY(-4px); }
}

.legend { display: grid; gap: 8px; max-width: 46rem; margin-top: 28px; color: var(--muted); }
.legend b { font-weight: 600; }
.c-move { color: var(--move-text); }
.c-scroll { color: var(--scroll-text); }
.c-drag { color: var(--drag-text); }

/* setup */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  margin-bottom: 6px;
  font: 400 2.25rem/1 var(--font-display);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.steps p { color: var(--muted); }
@media (max-width: 820px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* details */

.details { columns: 2; column-gap: 56px; max-width: 64rem; }
@media (max-width: 760px) { .details { columns: 1; } }
.details p { margin-bottom: 20px; color: var(--muted); break-inside: avoid; }
.details b { color: var(--fg); font-weight: 600; }

/* pricing */

.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: center; gap: 48px 72px; }
.pricing-copy { display: grid; gap: 16px; max-width: 32rem; }
.pricing-copy p { color: var(--muted); font-size: 1.125rem; }
@media (max-width: 860px) { .pricing { grid-template-columns: minmax(0, 1fr); } }

.price-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.plan { font-weight: 600; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 12px; }
.amount {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.per { color: var(--muted); font-size: 1rem; }
.includes { margin-bottom: 6px; }
.req { color: var(--muted); font-size: 0.875rem; text-align: center; }

/* faq */

.faq { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px 72px; align-items: start; }
@media (max-width: 860px) { .faq { grid-template-columns: minmax(0, 1fr); } }
.faq-list { display: grid; gap: 28px; margin: 0; }
.faq dt { font-weight: 600; }
.faq dd { max-width: 40rem; margin: 6px 0 0; color: var(--muted); }

/* footer */

.footer { border-top: 1px solid var(--line); background: var(--bg-raised); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 36px; color: var(--muted); font-size: 0.9375rem; }
.footer .brand { color: var(--fg); margin-right: auto; }
.footer a:not(.brand) { color: var(--fg); text-underline-offset: 3px; }
.fine { width: 100%; font-size: 0.8125rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .gesture * { animation: none !important; }
}
