/* PhosphorLive website. One stylesheet for every page.
   The page is the stage (deep blue-black, from the app icon); anything that is
   video output sits on true black. State colours mean state, as in the app:
   green = playing, red = blackout. */

/* Archivo (SIL Open Font License, see fonts/OFL.txt), self-hosted so no
   visitor data goes to a font CDN. One variable file: weight 100–900, width 62–125%. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-variable.woff2") format("woff2-variations"), url("fonts/archivo-variable.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --stage: #070a12;
  --screen: #000;
  --panel: #0d1320;
  --panel-2: #131b2c;
  --line: rgba(160, 180, 220, 0.14);
  --line-strong: rgba(160, 180, 220, 0.28);
  --ink: #eef2f8;
  --ink-2: #aab4c6;
  --ink-3: #7f8a9e;
  --blue: #6aa2ff;
  --play: #34d27b;
  --red: #ff4d40;
  --impact: #ff8a4c;

  --font: "Archivo", -apple-system, system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
  --radius: 12px;
}

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

html { background: var(--stage); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
::selection { background: var(--blue); color: var(--stage); }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--ink); color: var(--stage); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); font-weight: 800; text-wrap: balance; }
.display {
  font-size: clamp(46px, 7.2vw, 100px);
  line-height: 0.93;
  font-stretch: 125%;
  letter-spacing: -0.03em;
}
h1.page-title {
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 0.98;
  font-stretch: 122%;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.02;
  font-stretch: 118%;
  letter-spacing: -0.02em;
}
h3 { font-size: 21px; line-height: 1.25; font-stretch: 108%; font-weight: 700; letter-spacing: -0.005em; }
p { text-wrap: pretty; }
.lede { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.small { font-size: 15px; line-height: 1.55; color: var(--ink-3); }
strong { color: var(--ink); font-weight: 650; }
.prose > * + * { margin-top: 1em; }
.prose h3 { margin-top: 1.8em; }
.prose h3 + p { margin-top: 0.4em; }
.prose > h3:first-child { margin-top: 0; }
.prose h3 + ol.howto { margin-top: 0.9em; }
.prose { max-width: 38em; }

ul.list { list-style: none; }
ul.list li { position: relative; padding-left: 22px; }
ul.list li + li { margin-top: 0.55em; }
ul.list li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 7px; height: 7px; border-radius: 2px; background: var(--ink-3); }

kbd {
  font-family: var(--font); font-size: 0.82em; font-weight: 600; color: var(--ink);
  padding: 1px 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--panel);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 10px;
  font-size: 17px; font-weight: 650; font-stretch: 105%; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--stage); }
.btn-primary:hover { background: #fff; color: var(--stage); }
.btn-secondary { border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 9px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 10, 18, 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-stretch: 110%; font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 4px; list-style: none; margin-left: auto; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 16px; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); font-size: 15px; font-weight: 600; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu ul { list-style: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5); }
.nav-menu li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-menu li a:hover { background: var(--panel-2); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 6.5vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { margin-top: 18px; }

/* ---------- Home: hero with the playable pad rig ---------- */
.hero { padding: clamp(32px, 4vw, 52px) 0 clamp(64px, 8vw, 104px); }
.hero-top { display: grid; grid-template-columns: 7fr 5fr; gap: 24px 48px; align-items: end; }
.hero-top .lede { margin-bottom: 26px; }
.fineprint { margin-top: 16px; font-size: 15px; color: var(--ink-3); }

.rig { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-top: clamp(32px, 4vw, 44px); align-items: start; }
.screen {
  position: relative; aspect-ratio: 16 / 9; background: var(--screen); overflow: hidden;
  border-radius: 6px; box-shadow: 0 40px 80px -30px rgba(70, 120, 255, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.screen-media { position: absolute; inset: 0; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.screen video.on { visibility: visible; }
.screen .flash, .screen .fallback { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.screen .flash { background: #fff; }
.screen .fallback { background: #000 center / 15% auto no-repeat; transition: opacity 0.6s ease-out; }
.screen.is-black .fallback { opacity: 1; }
.screen-now {
  position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: #fff; padding: 5px 10px; border-radius: 7px; background: rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
}
.screen-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--play); }
.screen.is-black .screen-now::before { background: var(--red); }
/* The filmed pad hit, picture-in-picture: the stick lands, the screen cuts. */
.hitcam {
  position: absolute; right: 14px; bottom: 12px; width: clamp(150px, 38%, 360px); aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 6px; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 14px 32px rgba(0, 0, 0, 0.6);
  opacity: 0; transition: opacity 0.9s ease-out;
}
.hitcam.on { opacity: 1; transition: opacity 0.2s ease-out; }
.screen .hitcam video { position: static; display: block; width: 100%; height: 100%; object-fit: cover; visibility: visible; }
.screen-media.punch { animation: punch 0.42s cubic-bezier(0.2, 0.8, 0.2, 1); }
.screen .flash.go { animation: whiteout 0.5s ease-out; }
@keyframes punch { from { transform: scale(1.16); } to { transform: scale(1); } }
@keyframes whiteout { from { opacity: 1; } to { opacity: 0; } }

.pads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad {
  position: relative; aspect-ratio: 1; border-radius: 12px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, #161f33, #0f1626); border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 rgba(0, 0, 0, 0.5);
  padding: 10px 11px; display: flex; flex-direction: column; justify-content: space-between;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.pad:hover { border-color: var(--ink-3); }
.pad:active, .pad.down { transform: translateY(1px) scale(0.98); }
.pad-top { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.pad-note { font-size: 20px; font-weight: 750; font-stretch: 115%; color: var(--ink); line-height: 1; }
.pad-key { font-size: 12px; color: var(--ink-3); }
.pad-name { font-size: 14px; line-height: 1.2; font-weight: 600; color: var(--ink-2); }
.pad[aria-pressed="true"] { border-color: var(--play); box-shadow: inset 0 0 0 1px var(--play), 0 0 24px -4px rgba(52, 210, 123, 0.55); }
.pad[aria-pressed="true"] .pad-note { color: var(--play); }
.pad[aria-pressed="true"] .pad-name { color: var(--ink); }
.pad-hit .pad-note { color: var(--impact); font-size: 15px; font-stretch: 110%; }
.pad-hit.down { border-color: var(--impact); box-shadow: inset 0 0 0 1px var(--impact); }
.pad-black { border-color: rgba(255, 77, 64, 0.6); }
.pad-black .pad-note { color: var(--red); font-size: 14px; font-stretch: 100%; letter-spacing: 0.03em; }
.pad-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pad-black[aria-pressed="true"] { background: var(--red); border-color: var(--red); box-shadow: none; }
.pad-black[aria-pressed="true"] .pad-note, .pad-black[aria-pressed="true"] .pad-name, .pad-black[aria-pressed="true"] .pad-key { color: #fff; }
.rig-hint { margin-top: 12px; font-size: 15px; color: var(--ink-3); }

/* ---------- Home: sources ---------- */
.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; list-style: none; }
.sources li { padding: 20px 0 22px; border-top: 1px solid var(--line); }
.sources h3 { font-size: 19px; margin-bottom: 6px; }
.sources p { font-size: 16px; color: var(--ink-3); }

/* ---------- Two-column text + media ---------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.split--flip { grid-template-columns: 7fr 5fr; }
.split--flip > :first-child { order: 2; }
.split h2 + p, .split h2 + .lede { margin-top: 20px; }
.split .lede + p, .split p + p { margin-top: 16px; }
.split .list { margin-top: 22px; }
.more { display: inline-block; margin-top: 24px; font-weight: 650; }

.shot { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-strong), 0 40px 70px -35px rgba(0, 0, 0, 0.9); }
.shot img, .shot video { width: 100%; }
figure figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.output { border-radius: 6px; overflow: hidden; background: #000; }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-size: 44px; line-height: 1; font-weight: 800; font-stretch: 125%; color: var(--ink); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 17px; }

/* ---------- Film ---------- */
.film { margin-top: 8px; }
.film video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; }

/* ---------- Maker note ---------- */
.maker { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.maker blockquote p { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.32; color: var(--ink); font-weight: 500; font-stretch: 100%; }
.maker blockquote p + p { margin-top: 0.7em; }
.maker cite { display: block; margin-top: 22px; font-style: normal; font-size: 16px; color: var(--ink-3); }
.facts { list-style: none; }
.facts li { padding: 18px 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { display: block; font-size: 19px; font-stretch: 108%; }
.facts span { font-size: 16px; color: var(--ink-3); }

/* ---------- Buy ---------- */
.buy { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; }
.buy > div { padding: clamp(28px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.buy > div + div { border-left: 1px solid var(--line-strong); }
.buy .price { font-size: clamp(34px, 3.4vw, 44px); line-height: 1; font-weight: 800; font-stretch: 120%; color: var(--ink); }
.buy .price small { font-size: 16px; font-weight: 500; font-stretch: 100%; color: var(--ink-3); margin-left: 6px; }
.buy .list { font-size: 16px; }
.buy .actions { margin-top: auto; padding-top: 10px; }
.buy-first { background: var(--panel); }
.req { margin-top: 22px; font-size: 15px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 52em; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; color: var(--ink); font-size: 19px; font-weight: 650; font-stretch: 104%; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 28px; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 33px; }
.faq .answer { padding: 0 0 22px; max-width: 40em; }
.faq .answer > * + * { margin-top: 0.8em; }

/* ---------- Closing call ---------- */
.closer { text-align: left; }
.closer h2 { font-size: clamp(38px, 5.6vw, 76px); font-stretch: 125%; line-height: 0.95; letter-spacing: -0.03em; max-width: 12em; }
.closer p { margin: 20px 0 30px; }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 4vw, 56px); }
.page-hero .lede { margin-top: 24px; }
.page-hero .actions { margin-top: 30px; }
.crumb { font-size: 15px; color: var(--ink-3); margin-bottom: 18px; }
.crumb a { color: var(--ink-3); }
.page-figure { padding-bottom: clamp(48px, 6vw, 88px); }
.topic { display: grid; grid-template-columns: 4fr 8fr; gap: 24px 56px; padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.topic h2 { font-size: clamp(26px, 2.8vw, 36px); position: sticky; top: 100px; align-self: start; }
.topic .media-wide { grid-column: 1 / -1; margin-top: 12px; }
.next-pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; list-style: none; }
.next-pages li { border-top: 1px solid var(--line); padding: 18px 0; }
.next-pages a { display: block; text-decoration: none; color: var(--ink); font-weight: 700; font-stretch: 108%; font-size: 19px; }
.next-pages a:hover { color: var(--blue); }
.next-pages span { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-3); }
.next-pages a[aria-current="page"] { color: var(--ink-3); }

.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--line); vertical-align: top; }
.compare thead th { color: var(--ink); font-weight: 700; border-top: 0; font-size: 17px; }
.compare tbody th { color: var(--ink-2); font-weight: 500; width: 30%; }
.compare td { color: var(--ink-2); }

ol.howto { list-style: none; counter-reset: s; max-width: 40em; }
ol.howto li { counter-increment: s; position: relative; padding-left: 52px; }
ol.howto li + li { margin-top: 20px; }
ol.howto li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 48px; font-size: 15px; color: var(--ink-3); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: 15px; font-stretch: 100%; font-weight: 650; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.foot-grid ul { list-style: none; }
.foot-grid li + li { margin-top: 8px; }
.foot-grid a { color: var(--ink-3); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); }
.foot-note { margin-top: 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-note a { color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .rig { grid-template-columns: 1fr; }
  .pads { max-width: 440px; }
  .split, .split--flip, .maker { grid-template-columns: 1fr; gap: 36px; }
  .split--flip > :first-child { order: 0; }
  .next-pages { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-menu { display: block; }
  .site-head .wrap { gap: 16px; }
  .hero-top { grid-template-columns: 1fr; }
  .sources, .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li + li { margin-top: 36px; }
  .topic { grid-template-columns: 1fr; }
  .topic h2 { position: static; }
  .buy { grid-template-columns: 1fr; }
  .buy > div + div { border-left: 0; border-top: 1px solid var(--line-strong); }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .site-head .btn { display: none; }
  .pads { max-width: none; gap: 8px; }
  .pad-name { font-size: 13px; }
  .next-pages, .foot-grid { grid-template-columns: 1fr; }
  .compare tbody th { width: 38%; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-media.punch, .screen .flash.go { animation: none; }
  .screen .fallback { transition: none; }
  .faq summary::after { transition: none; }
}

code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; color: var(--ink); background: var(--panel); padding: 2px 6px; border-radius: 5px; }
.hint-touch { display: none; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
.legal .prose h3 { margin-top: 1.2em; }
