/* Quatech — a measuring instrument after dark: graphite chassis, silkscreened labels, key caps and
   channel LEDs. CH1 Punch Power (cabinet red and gold), CH2 AirMouse BT (night violet). The fonts are
   the apps' own and ship with the site. */

@font-face { font-family: "Teko"; src: url("../fonts/Teko.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("../fonts/BarlowSemiCondensed-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("../fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bangers"; src: url("../fonts/Bangers.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --chassis: #0e1012;
  --chassis-hi: #171a1e;
  --chassis-lo: #090a0c;
  --ink: #e9ece7;
  --ink-2: #b6bcb6;
  --silk: #858d87;
  --rule: #2a2f34;
  --ch1: #e3262e;
  --ch1-deep: #8e1218;
  --gold: #f4c44e;
  --gold-lo: #c48a1c;
  --cream: #fff3d6;
  --ch2: #7d5bff;
  --ch2-glow: #b9a6ff;
  --night: #0d0a1c;
  --night-2: #17122e;
  --display: "Teko", "Arial Narrow", sans-serif;
  --body: "Barlow SC", "Segoe UI", Roboto, sans-serif;
  --comic: "Bangers", "Impact", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chassis);
  color: var(--ink);
  font: 400 18px/1.55 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ch2-glow); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* silkscreen: the instrument's printed labels */
.silk {
  font: 500 15px/1.1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silk);
}
.led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 12px currentColor; vertical-align: 1px; flex: none; }
.led.lamp-red { color: var(--ch1); }
.led.lamp-violet { color: var(--ch2); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 16, 18, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; text-decoration: none; }
.mark b { font: 600 30px/1 var(--display); letter-spacing: 0.09em; padding-top: 4px; }
.bar nav { margin-left: auto; display: flex; gap: 6px 22px; flex-wrap: wrap; }
.bar nav a { font: 500 19px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 8px 0 5px; border-bottom: 2px solid transparent; color: var(--ink-2); }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ink); border-color: currentColor; }
/* phones: one row, the studio link folds away (it is the page's last section anyway) */
@media (max-width: 600px) {
  .bar .wrap { flex-wrap: nowrap; min-height: 56px; gap: 10px; }
  .mark b { font-size: 24px; }
  .bar nav { gap: 14px; flex-wrap: nowrap; }
  .bar nav a { font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
  .bar nav a:nth-child(3) { display: none; }
}
@media (max-width: 350px) { .bar nav a { font-size: 13px; } .mark b { font-size: 21px; } .bar nav { gap: 10px; } }

/* key caps */
.key {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 16px 10px; /* Teko sits high in its box */
  background: #16191c;
  border: 1px solid #24292e;
  border-radius: 9px;
  font: 500 19px/1 var(--display); letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.key:hover { background: #1b1f23; border-color: #30363c; color: var(--ink); }
.key:active { transform: translateY(1px); }
.key small { font: 400 15px/1 var(--display); color: var(--silk); letter-spacing: 0.1em; }

/* ---------- hero: two phones that move with you ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(36px, 6vw, 80px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 56px;
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero { --h1-gap: clamp(26px, 2.6vw, 42px); }
.hero h1 {
  font: 600 clamp(54px, 7vw, 112px)/0.86 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 18px 0 var(--h1-gap);
  text-wrap: balance;
}
.hero h1 em { font-style: normal; }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 36ch; margin: 0 0 24px; color: var(--ink-2); }
.hero .lede strong { font-weight: 600; color: var(--ink); }
.channels { display: flex; gap: 10px; flex-wrap: wrap; }

.phones-wrap { display: grid; justify-items: center; gap: 10px; }
.phones { --pw: clamp(180px, 16vw, 236px); position: relative; width: 100%; height: calc(var(--pw) * 2.62 + 56px); perspective: 1300px; }
.rig { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
/* a real phone: black glass almost to the edge, held in a thin band of dark metal that catches the light */
.phone {
  --rim: max(2px, calc(var(--pw) * .012));
  --bez: calc(var(--pw) * .024);
  --r: calc(var(--pw) * .16);
  --r-in: calc(var(--r) - var(--rim) - var(--bez));
  --edge: calc(2 * (var(--rim) + var(--bez)));
  position: absolute; top: 3%;
  width: var(--pw);
  height: calc((var(--pw) - var(--edge)) * 2400 / 1080 + var(--edge)); /* the glass is exactly the screen's shape, so nothing is cropped */
  border-radius: var(--r);
  border: var(--rim) solid transparent;
  padding: var(--bez);
  background: linear-gradient(#030304, #030304) padding-box, linear-gradient(150deg, #6e747c 0%, #23262a 16%, #4a4f56 32%, #121417 50%, #3c4148 68%, #16181b 84%, #5a6068 100%) border-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  transform-style: preserve-3d;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-in); }
.phone .keys { /* volume and power on the right edge */
  position: absolute; top: 19%; height: 22%; right: calc(-1 * var(--rim) - 2px); width: 2px; border-radius: 0 2px 2px 0; pointer-events: none;
  background: linear-gradient(#4f555c 0 55%, transparent 55% 70%, #4f555c 70% 100%);
}
.phone::before { /* the screen's reflection, moving as the phone turns */
  content: ""; position: absolute; inset: var(--bez); border-radius: var(--r-in); pointer-events: none;
  background: linear-gradient(115deg, transparent calc(var(--gx, 50%) - 30%), rgba(255,255,255,.08) var(--gx, 50%), transparent calc(var(--gx, 50%) + 22%));
  mix-blend-mode: screen;
}
.phone::after { /* punch-hole camera */
  content: ""; position: absolute; left: 50%; top: 2.6%; width: 3.6%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%);
  background: #050506; box-shadow: 0 0 0 1px #1d2024;
}
.phone.pp { left: 10%; transform: translateZ(70px) rotateZ(-5deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 50px 90px -30px rgba(0,0,0,.95), 0 0 76px -24px rgba(227, 38, 46, .34); }
.phone.am { right: 8%; top: 10%; transform: translateZ(-50px) rotateZ(6deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 50px 90px -30px rgba(0,0,0,.95), 0 0 76px -24px rgba(125, 91, 255, .36); }
.phone .tag {
  position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%);
  display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
  font: 500 16px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
}
.floor { position: absolute; left: 12%; right: 12%; bottom: 0; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); filter: blur(6px); }
.phones-note { margin: 0; font-size: 15px; color: var(--silk); text-align: center; max-width: 44ch; line-height: 1.4; }
.phones-note b { color: var(--ink-2); font-weight: 600; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .lede { max-width: 46ch; }
  .phones { --pw: clamp(140px, 40vw, 220px); }
  .phone.pp { left: 4%; }
  .phone.am { right: 2%; }
}

/* ---------- section bits ---------- */
.ch-label { display: flex; gap: 10px; align-items: center; font: 500 16px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; margin: 0; }
.spec { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1px dashed rgba(244, 196, 78, .35); }
.spec li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 14px; padding: 11px 0 10px; border-bottom: 1px dashed rgba(244, 196, 78, .35); }
.spec .k { font: 500 17px/1.25 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); padding-top: 2px; }
.spec .v { font-size: 17px; line-height: 1.45; }
@media (max-width: 520px) { .spec li { grid-template-columns: 1fr; gap: 2px; } }
.cta-row { display: flex; gap: 14px 18px; align-items: center; flex-wrap: wrap; }
.textlink { font: 500 19px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; padding: 10px 0 6px; border-bottom: 2px solid currentColor; }

/* ---------- CH1: Punch Power ---------- */
.ch1 {
  position: relative; isolation: isolate; color: var(--cream);
  background: #120507;
  overflow: hidden;
}
.ch1::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/pp/hall.webp") center 30% / cover no-repeat;
  opacity: .28; filter: saturate(.8);
}
.ch1::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--chassis) 0%, rgba(18,5,7,0) 12%, rgba(18,5,7,0) 86%, var(--chassis) 100%),
    radial-gradient(60% 55% at 28% 45%, rgba(227, 38, 46, .42), transparent 70%),
    radial-gradient(rgba(0,0,0,.35) 1px, transparent 1.6px) 0 0 / 6px 6px;
}
.ch1 .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(64px, 8vw, 116px); padding-bottom: clamp(64px, 8vw, 116px); }
.ch1 .ch-label { color: var(--gold); }
.comic {
  font: 400 clamp(48px, 6.2vw, 92px)/0.92 var(--comic);
  letter-spacing: 0.015em;
  color: var(--gold);
  margin: 16px 0 18px;
  -webkit-text-stroke: 0.06em #160404;
  paint-order: stroke fill;
  text-shadow: 0.05em 0.06em 0 #160404;
  text-wrap: balance;
}
.ch1 p.copy { font-size: clamp(18px, 1.5vw, 20px); max-width: 40ch; color: #f6e3c4; margin: 0 0 24px; }
.ch1 .textlink { color: var(--gold); }

.plate {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px 8px;
  font: 400 22px/1 var(--comic); letter-spacing: 0.04em; text-decoration: none;
  color: var(--gold);
  background: linear-gradient(#2a2420, #141110);
  border: 2px solid var(--gold-lo);
  border-radius: 10px;
  box-shadow: 0 0 0 2px #0a0606, 0 3px 0 2px #0a0606, 0 1px 0 rgba(255, 230, 160, .35) inset;
}
.plate[aria-disabled="true"] { cursor: default; }
a.plate:hover, a.plate:focus-visible { border-color: var(--gold); }
.plate .soon { font: 500 14px/1 var(--display); letter-spacing: 0.12em; color: #cbb98f; padding: 4px 7px 2px; border: 1px solid #6b5a3a; border-radius: 4px; }

.stage-wrap { display: grid; justify-items: center; gap: 14px; }
.cabinet {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1100 / 1760;
  overflow: hidden;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.55));
  -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent);
          mask-image: linear-gradient(180deg, #000 86%, transparent);
}
.cabinet .full { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1100 / 2445; }
.cabinet .full > img.machine { width: 100%; height: 100%; }
.cabinet canvas.score { position: absolute; left: 29%; top: 33.5%; width: 42.1%; height: 6.2%; }
.bag-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bag-hit {
  position: absolute; left: 28.6%; top: 21.5%; width: 42.8%; height: 37.5%;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 42% 42% 46% 46%;
}
.bag-hit:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cabinet.shake { animation: cab-shake .34s ease-out; }
@keyframes cab-shake {
  0% { translate: 0 0; } 18% { translate: -7px 2px; } 36% { translate: 6px -2px; }
  54% { translate: -4px 1px; } 72% { translate: 2px 0; } 100% { translate: 0 0; }
}
.shout {
  position: absolute; left: 50%; top: 43%; transform: translate(-50%, 0) scale(.6) rotate(-6deg);
  font: 400 clamp(30px, 3.4vw, 44px)/1 var(--comic); color: var(--gold); white-space: nowrap;
  -webkit-text-stroke: 0.08em #160404; paint-order: stroke fill; text-shadow: 0.05em 0.07em 0 #160404;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1);
}
.shout.on { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-6deg); }
.stage-note { font-size: 15px; color: #d9c6a5; text-align: center; max-width: 34ch; margin: 0; line-height: 1.4; }
.stage-note b { font-weight: 600; color: var(--cream); }

@media (max-width: 900px) {
  .ch1 .wrap { grid-template-columns: 1fr; }
  .cabinet { width: min(86vw, 360px); }
}

/* ---------- CH2: AirMouse BT ---------- */
.ch2 {
  position: relative; isolation: isolate; color: #ece8ff;
  background:
    linear-gradient(180deg, var(--chassis) 0%, rgba(13,10,28,0) 14%, rgba(13,10,28,0) 86%, var(--chassis) 100%),
    radial-gradient(70% 60% at 75% 40%, #2a1e66 0%, transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night));
  overflow: hidden;
}
.ch2::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(185, 166, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(185, 166, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 50%, #000, transparent);
          mask-image: radial-gradient(70% 70% at 70% 50%, #000, transparent);
}
.ch2 .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(64px, 8vw, 116px); padding-bottom: clamp(64px, 8vw, 116px); }
.ch2 .ch-label { color: var(--ch2-glow); }
.ch2 h2 {
  font: 600 clamp(52px, 6.4vw, 96px)/0.88 var(--display);
  text-transform: uppercase; letter-spacing: 0.01em;
  margin: 16px 0 18px; color: #fff;
  text-wrap: balance;
}
.ch2 h2 span { color: inherit; }
.ch2 p.copy { font-size: clamp(18px, 1.5vw, 20px); max-width: 42ch; color: #cfc8f2; margin: 0 0 24px; }
.ch2 .spec, .ch2 .spec li { border-color: rgba(185, 166, 255, .28); }
.ch2 .spec .k { color: var(--ch2-glow); }
.btn-violet {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 22px 9px;
  font: 600 21px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: #fff; background: linear-gradient(#8f72ff, #6a46f5);
  border-radius: 12px; box-shadow: 0 10px 30px -10px rgba(125, 91, 255, .8), 0 1px 0 rgba(255,255,255,.35) inset;
}
.btn-violet:hover { filter: brightness(1.08); }
.ch2 .textlink { color: var(--ch2-glow); }

.screen-wrap { display: grid; gap: 14px; justify-items: center; }
.tv {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 16px; padding: 12px;
  background: linear-gradient(#1e1838, #0f0b22);
  box-shadow: 0 0 0 1px rgba(185, 166, 255, .25), 0 40px 80px -30px rgba(0,0,0,.8);
}
.tv-screen {
  position: relative; height: 100%; border-radius: 8px; overflow: hidden; cursor: none;
  background: radial-gradient(80% 90% at 30% 20%, #2d2366, #120e2a 70%);
  touch-action: pan-y;
}
.tv-screen .os { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; }
.tv-screen .os-bar { display: flex; justify-content: space-between; padding: 10px 14px; font: 400 15px/1 var(--display); letter-spacing: 0.1em; color: #a99ee0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; padding: 2% 5% 6%; align-content: center; }
.tile {
  aspect-ratio: 16 / 10; border-radius: 8px;
  background: linear-gradient(135deg, var(--a), var(--b));
  display: flex; align-items: flex-end; padding: 8px 10px; font: 500 clamp(13px, 1.3vw, 17px)/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,.9);
  transition: transform .18s, box-shadow .18s;
}
.tile.hot { transform: scale(1.06); box-shadow: 0 0 0 2px #fff, 0 12px 30px -10px rgba(0,0,0,.6); }
.cursor { position: absolute; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; will-change: transform; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid #fff; pointer-events: none; animation: ripple .5s ease-out forwards; }
@keyframes ripple { to { transform: scale(5); opacity: 0; } }
.tv-note { font-size: 15px; color: #b4abe0; text-align: center; margin: 0; max-width: 46ch; line-height: 1.4; }
.tv-note b { color: #fff; font-weight: 600; }
@media (max-width: 900px) { .ch2 .wrap { grid-template-columns: 1fr; } .ch2 .screen-wrap { order: -1; } }

/* ---------- studio ---------- */
.studio { padding: clamp(56px, 8vw, 110px) 0; }
.studio .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.studio h2 { font: 600 clamp(44px, 5.4vw, 80px)/0.9 var(--display); text-transform: uppercase; margin: 14px 0 0; text-wrap: balance; }
.studio .body p { margin: 0 0 16px; max-width: 58ch; color: var(--ink-2); }
.studio .body p a { color: var(--ink); }
.datasheet { margin-top: 28px; border: 1px solid var(--rule); border-radius: 12px; background: var(--chassis-hi); overflow: hidden; }
.datasheet table { width: 100%; border-collapse: collapse; font-size: 16px; }
.datasheet th, .datasheet td { text-align: left; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.datasheet tr:last-child th, .datasheet tr:last-child td { border-bottom: 0; }
.datasheet th { font: 500 16px/1.2 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--silk); width: 30%; }
.datasheet thead th { color: var(--ink); background: #22262b; }
.datasheet thead th .led { margin-right: 8px; }
.scroll-x { overflow-x: auto; }
@media (max-width: 900px) { .studio .wrap { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--rule); background: var(--chassis-lo); padding: 28px 0 36px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: baseline; justify-content: space-between; }
footer .cols { display: flex; flex-wrap: wrap; gap: 10px 28px; }
footer a { text-decoration: none; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
footer a:hover { border-color: var(--ink); color: var(--ink); }
footer p { margin: 0; font-size: 15px; color: var(--silk); }

/* ---------- app pages ---------- */
.app-id { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.app-id img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }
.app-id .silk { display: block; margin-top: 6px; }
.app-id b { font: 600 32px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; display: block; padding-top: 4px; }
.app-top .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.app-top h1.comic { font-size: clamp(54px, 7vw, 104px); }
.wrap.two { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .app-top .wrap, .wrap.two { grid-template-columns: 1fr; } }

/* screenshot strips: the heading sits in the page column with two arrow keys beside it, and the
   strip itself runs edge to edge, its first card lined up under the heading */
.shots { --edge: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); }
.shots-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section .shots-head h2.h { margin: 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 21vw, 300px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--edge, var(--gutter)) 22px; scroll-padding-inline: var(--edge, var(--gutter)); }
.gallery img { width: 100%; border-radius: 18px; scroll-snap-align: start; box-shadow: 0 22px 40px -24px rgba(0,0,0,.85); }
/* with the script: no browser scrollbar; a mouse drags the strip */
.gallery.has-ctl { scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery.has-ctl::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) {
  .gallery.has-ctl { cursor: grab; }
  .gallery img { transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
  .gallery img:hover { transform: translateY(-6px); }
}
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gallery.dragging img { pointer-events: none; }
.gal-nav { display: flex; gap: 10px; flex: none; position: relative; top: calc(clamp(38px, 4.4vw, 64px) * -.088); } /* level with the middle of the capitals, not the line box */
.gal-nav[hidden] { display: none; }
@media (hover: none) { .gal-nav { display: none; } } /* on a phone the finger is the control */
.gal-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: none; color: var(--ink); cursor: pointer; transition: border-color .25s, background-color .25s, opacity .25s; }
.gal-btn svg { width: 18px; height: 18px; }
.gal-btn:hover:not(:disabled) { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .05); }
.gal-btn:disabled { opacity: .28; cursor: default; }
.am-page .gal-btn { border-color: rgba(185, 166, 255, .3); color: #ece8ff; }
.am-page .gal-btn:hover:not(:disabled) { border-color: rgba(185, 166, 255, .65); background: rgba(185, 166, 255, .08); }
.pp-page .gal-btn { border-color: rgba(244, 196, 78, .38); color: var(--gold); }
.pp-page .gal-btn:hover:not(:disabled) { border-color: rgba(244, 196, 78, .75); background: rgba(244, 196, 78, .08); }
.gallery img { width: 100%; border-radius: 14px; scroll-snap-align: start; box-shadow: 0 16px 30px -18px rgba(0,0,0,.7); }
.section { padding: clamp(44px, 6vw, 84px) 0; }
.section h2.h { font: 600 clamp(38px, 4.4vw, 64px)/0.92 var(--display); text-transform: uppercase; margin: 12px 0 24px; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps figure { margin: 0; }
.steps img { border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.steps figcaption { padding-top: 12px; }
.steps figcaption b { font: 500 22px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 4px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps img { aspect-ratio: 16 / 11; } }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid rgba(255,255,255,.14); padding: 14px 0; }
.faq summary { cursor: pointer; font: 500 23px/1.15 var(--display); letter-spacing: 0.04em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 28px; line-height: .8; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 10px 0 4px; max-width: 64ch; }

.pp-page main { background: #120507; color: var(--cream); }
.pp-page .section { border-top: 1px dashed rgba(244, 196, 78, .25); }
.pp-page .silk { color: #c9a86a; }
.pp-page .comic-h {
  font-family: var(--comic); font-weight: 400; text-transform: none; letter-spacing: 0.015em; color: var(--gold);
  -webkit-text-stroke: 0.06em #160404; paint-order: stroke fill; text-shadow: 0.05em 0.06em 0 #160404;
}
.pp-page .steps figcaption { color: #f0dcbc; }
.pp-page .steps figcaption b { color: var(--gold); }
.pp-page .faq details { border-color: rgba(244, 196, 78, .25); }
.pp-page .faq a { color: var(--gold); }
.pp-page .spec .v { color: #f6e3c4; }

.am-page main { background: var(--night); color: #ece8ff; }
.am-page .section { border-top: 1px solid rgba(185, 166, 255, .16); }
.am-page .silk { color: #9f93d6; }
.am-page .section h2.h { color: #fff; }
.am-page .section h2.h span { color: inherit; }
.am-page .faq details { border-color: rgba(185, 166, 255, .22); }
.am-page .faq a, .am-page .spec a { color: var(--ch2-glow); }
.am-page .spec { border-color: rgba(185, 166, 255, .28); }
.am-page .spec li { border-color: rgba(185, 166, 255, .28); }
.am-page .spec .k { color: var(--ch2-glow); }
.am-page .spec .v { color: #ddd7fb; }
.am-page .app-top h1 { font: 600 clamp(54px, 7vw, 104px)/0.88 var(--display); text-transform: uppercase; margin: 8px 0 18px; color: #fff; text-wrap: balance; }
.am-page .app-top h1 span { color: inherit; }

/* ---------- documents (privacy) ---------- */
.doc { padding: clamp(32px, 5vw, 64px) 0 80px; }
.doc article { max-width: 760px; background: var(--chassis-hi); border: 1px solid var(--rule); border-radius: 16px; padding: clamp(22px, 4vw, 48px); }
.doc h1 { font: 600 clamp(40px, 5vw, 64px)/0.95 var(--display); text-transform: uppercase; margin: 10px 0 6px; }
.doc h2 { font: 500 25px/1.1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; margin: 30px 0 8px; }
.doc h3 { font-weight: 600; font-size: 18px; margin: 18px 0 4px; }
.doc p, .doc li { font-size: 17px; color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc .updated { color: var(--silk); margin: 0 0 18px; }
.doc ul { padding-left: 1.2em; }
.doc a { color: var(--ch2-glow); }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }

/* ---------- phones ---------- */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .hero { padding: 26px 0 36px; }
  .hero .silk { font-size: 13px; }
  .channels .key { flex: 1 1 0; justify-content: center; padding: 13px 10px 10px; }
  .ch1 .wrap, .ch2 .wrap { padding-top: 44px; padding-bottom: 52px; gap: 26px; }
  .studio { padding: 44px 0 52px; }
  .section { padding: 40px 0; }
  .spec li { padding: 10px 0 9px; }
  .cta-row { gap: 12px 18px; }
  .cta-row .plate, .cta-row .btn-violet { flex: 1 1 100%; justify-content: center; }
  .stage-note, .tv-note, .phones-note { font-size: 14px; }
  /* the datasheet: each row's name on top, the two apps side by side under it */
  .datasheet thead th:first-child { display: none; }
  .datasheet thead tr, .datasheet tbody tr { display: grid; grid-template-columns: 1fr 1fr; }
  .datasheet tbody th { grid-column: 1 / -1; width: auto; padding: 12px 14px 0; border-bottom: 0; }
  .datasheet td, .datasheet thead th { padding: 6px 14px 12px; font-size: 15px; }
  .datasheet thead th { padding-top: 12px; }
  footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; width: 100%; }
  .faq summary { font-size: 20px; }
  .app-id img { width: 60px; height: 60px; border-radius: 15px; }
  .app-id b { font-size: 26px; }
  .gallery { grid-auto-columns: 62vw; }
}
.doc article { overflow-wrap: anywhere; }
@media (max-width: 600px) { .bar nav a { padding: 14px 0 11px; } }

/* ---------- AirMouse: the real app driving a TV across the room ---------- */
.am-scene { position: relative; width: 100%; aspect-ratio: 1 / 0.78; }
/* a real TV: thin black bezel, 16:9 glass, a slim neck and foot, a power light */
.am-scene .tv { position: absolute; left: 0; top: 2%; width: 86%; aspect-ratio: auto; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.tv-body { position: relative; padding: 1.1% 1.1% 1.9%; background: #070809; border-radius: 6px; box-shadow: 0 0 0 1px #2c3036, 0 1px 0 #3a3f46 inset, 0 36px 60px -26px rgba(0,0,0,.9); }
.tv-body::after { content: ""; position: absolute; left: 50%; bottom: .55%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #e3262e; box-shadow: 0 0 6px #e3262e; opacity: .85; }
.am-scene .tv-screen { aspect-ratio: 16 / 9; height: auto; border-radius: 2px; cursor: none; background: radial-gradient(90% 100% at 20% 10%, #2a2160, #100c24 70%); }
.am-scene .tv-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 38%); }
.tv-stand { position: relative; height: 0; padding-bottom: 7%; }
.tv-stand::before { content: ""; position: absolute; left: 50%; top: 0; width: 6%; height: 62%; transform: translateX(-50%); background: linear-gradient(90deg, #15181b, #2a2e34, #15181b); }
.tv-stand::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 30%; height: 38%; transform: translateX(-50%); border-radius: 3px 3px 6px 6px; background: linear-gradient(#2a2e34, #121417); box-shadow: 0 10px 18px -8px rgba(0,0,0,.8); }
.am-scene .os-bar { padding: 2.2% 3% 0; font-size: clamp(9px, 1vw, 12px); }
.am-scene .os-bar .bt { color: #b9a6ff; }
.am-scene .tiles { padding: 3% 4% 5%; gap: 3%; }
.am-scene .tile { border-radius: 6px; font-size: clamp(10px, 1vw, 13px); padding: 6px 8px; }
/* the phone: minimal, held in front of the TV's corner */
/* held in the air, not standing on anything: it floats, turns about its own middle and follows the hand (site.js) */
.am-phone { position: absolute; right: 2%; top: 24%; width: 25%; transform: rotate(-6deg); transform-origin: 50% 50%; will-change: transform; }
.am-frame {
  --in: 2.4%; --sc: 95.2%;
  position: relative; aspect-ratio: 1080 / 2400;
  border-radius: 15% / 6.75%;
  padding: var(--in);
  background: #030304;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 28px 50px -18px rgba(0,0,0,.9);
}
/* the same metal band and side keys as the phones up top; the band sits behind the glass so the
   screen and its touch areas keep their measured places */
.am-frame::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 15.4% / 6.9%; background: linear-gradient(150deg, #6e747c 0%, #23262a 16%, #4a4f56 32%, #121417 50%, #3c4148 68%, #16181b 84%, #5a6068 100%); }
.am-frame::after { content: ""; position: absolute; top: 19%; height: 22%; right: -4px; width: 2px; border-radius: 0 2px 2px 0; background: linear-gradient(#4f555c 0 55%, transparent 55% 70%, #4f555c 70% 100%); }
.am-frame .ui { position: absolute; inset: var(--in); width: var(--sc); height: var(--sc); object-fit: cover; border-radius: 12.8% / 5.75%; }
.am-scene[data-mode="touchpad"] .ui-mouse, .am-scene[data-mode="mouse"] .ui-touch { visibility: hidden; }
/* hit areas laid over the real screens, measured on the 1080 x 2400 captures */
.am-hit { position: absolute; left: calc(var(--in) + var(--sc) * var(--l)); top: calc(var(--in) + var(--sc) * var(--t)); width: calc(var(--sc) * var(--w)); height: calc(var(--sc) * var(--h)); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.am-hit:focus-visible { outline: 2px solid var(--ch2-glow); outline-offset: 1px; }
.am-pad { --l: .05; --t: .1454; --w: .90; --h: .5717; touch-action: none; cursor: grab; }
.am-pad:active { cursor: grabbing; }
.am-l { --l: .05; --t: .735; --w: .43; --h: .098; }
.am-r { --l: .519; --t: .735; --w: .43; --h: .098; }
.am-tab-touch { --l: 0; --t: .9125; --w: .3333; --h: .061; }
.am-tab-mouse { --l: .3333; --t: .9125; --w: .3333; --h: .061; }
.am-scene[data-mode="mouse"] .am-pad, .am-scene[data-mode="mouse"] .am-l, .am-scene[data-mode="mouse"] .am-r { display: none; }
.am-ml { --l: .05; --t: .2; --w: .446; --h: .626; }
.am-mr { --l: .504; --t: .2; --w: .446; --h: .626; }
.am-scene[data-mode="touchpad"] .am-ml, .am-scene[data-mode="touchpad"] .am-mr { display: none; }
.finger {
  position: absolute; left: 0; top: 0; width: 18%; aspect-ratio: 1; margin: -9% 0 0 -9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(185,166,255,.6), rgba(185,166,255,.14) 60%, transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.finger.on { opacity: 1; }
.tile.open { animation: tile-open .45s ease-out; }
@keyframes tile-open { 0% { filter: brightness(1.9); } 100% { filter: brightness(1); } }
.ripple.right { border-color: var(--ch2-glow); }
.am-note { font-size: 15px; color: #b4abe0; text-align: center; margin: 14px auto 0; max-width: 52ch; line-height: 1.45; }
.am-note b { color: #fff; font-weight: 600; }
.am-scene-wrap { display: grid; gap: 6px; justify-items: center; }
@media (max-width: 600px) {
  .am-scene { aspect-ratio: 1 / 1.32; }
  .am-scene .tv { width: 100%; top: 0; }
  .am-phone { width: 30%; top: 47%; right: 12%; }
  .am-tab-touch::after, .am-tab-mouse::after { content: ""; position: absolute; inset: -8px -2px; } /* a finger-sized target on a small phone */
  .am-note { font-size: 14px; }
}

.am-scene .os-bar .led { width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; }
.am-page .app-top .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 900px) { .am-page .app-top .wrap { grid-template-columns: 1fr; } }

/* app identity instead of channel labels: the apps' own icons */
.key img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.app-tag { display: flex; align-items: center; gap: 12px; margin: 0; font: 500 22px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.app-tag img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.8); }
.ch1 .app-tag { color: var(--gold); }
.ch2 .app-tag { color: #fff; }
.datasheet thead th .ico { display: inline-block; width: 22px; height: 22px; border-radius: 6px; margin-right: 8px; vertical-align: -5px; }

@media (min-width: 901px) { .hero-text { margin-top: calc(-38px - var(--h1-gap)); } }
