/* The site: concept B "whiteout" (site/concepts/B/RATIONALE.md). One typeface (Inter
   400/500), two sizes (--l, --s; 16px on reading pages), four colours with roles, a
   few full-window frames per page that fade in as they arrive. No dark mode. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: block; src: url("../fonts/Inter-Regular.d25c7537.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: block; src: url("../fonts/Inter-Medium.6f995b15.woff2") format("woff2"); }

:root {
  --bg: #f7f9fc;   /* snow: pale and cool, reads as white in shade */
  --ink: #141418;  /* near-black, a hair cool. 17.4:1 */
  --sec: #5c6572;  /* secondary: quiet grey-blue. 5.6:1 */
  --acc: #ff6c2f;  /* accent: the plugin's riso orange. fills with ink on top, never small text */
  --l: clamp(3rem, 8vw, 6.5rem);  /* the big size */
  --s: 0.875rem;                  /* the small size, 14px */
  --ease: cubic-bezier(.2, .6, .2, 1);
  --t: 800ms;
  --pad: 16px;
  color-scheme: light;
}
@media (min-width: 640px) { :root { --pad: 40px; } }

* { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum", "ss01";
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
img, video, canvas { display: block; }

/* small type: everything that is not --l */
p, label, button, input, textarea, li, a, summary, td, th, .lbl { font-size: var(--s); font-weight: 500; letter-spacing: .01em; }
.quiet { color: var(--sec); font-weight: 400; }
.lbl { letter-spacing: .12em; }
h1, h2, h3 { font-size: var(--s); font-weight: 500; letter-spacing: .01em; margin: 0; }

/* big type: at most twice per page */
.big { font-size: var(--l); font-weight: 400; letter-spacing: -.03em; line-height: 1; margin: 0; }
.big .dot { color: var(--acc); }   /* the one accent on its line: a full stop */

/* links, buttons, fields */
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 300ms var(--ease); }
a:hover { border-bottom-color: var(--ink); }
.quiet a { color: var(--sec); }
.quiet a:hover { border-bottom-color: var(--sec); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.btn {
  appearance: none; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: 12px 20px; border-radius: 999px; cursor: pointer; line-height: 1; font-family: inherit;
  display: inline-block; text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn:hover { border-bottom-color: var(--ink); }
.btn[disabled] { cursor: default; color: var(--sec); border-color: var(--sec); }
.btn.acc { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.btn.acc[disabled] { background: transparent; border-color: var(--sec); }
.btn:focus-visible { outline-offset: 3px; border-radius: 999px; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
input[type="email"], textarea {
  appearance: none; border: 0; border-bottom: 1px solid var(--ink); background: transparent;
  padding: 10px 0; border-radius: 0; color: var(--ink); font-family: inherit; line-height: 1.5;
}
input[type="email"] { width: min(60vw, 260px); }
input::placeholder, textarea::placeholder { color: var(--sec); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline: none; border-bottom-width: 2px; }
input[disabled], textarea[disabled] { color: var(--sec); border-bottom-color: var(--sec); }
textarea { width: min(86vw, 520px); resize: vertical; font-size: var(--s); word-break: break-all; }
.note { min-height: 1.5em; }
.note:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 999px; z-index: 10; }
.skip:focus { left: var(--pad); }

/* ---- fixed chrome: wordmark top-left, frame counter top-right ---- */
.mark, .count {
  position: fixed; top: 22px; z-index: 2; margin: 0;
  font-size: var(--s); font-weight: 500; letter-spacing: .02em; line-height: 1;
}
.mark { left: var(--pad); color: var(--ink); border-bottom: 0; }
.count { right: var(--pad); color: var(--sec); font-weight: 400; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.read .count { display: none; }

/* ---- frames: one window each, scroll snaps ---- */
.frames { scroll-snap-type: y mandatory; scroll-behavior: smooth; }
.f {
  height: 100vh; height: 100svh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px var(--pad) 56px;
  text-align: center;
  gap: 28px;
  position: relative;
}
.f > * { margin: 0; }
.f .line { max-width: 36em; }

/* the product: the only dark thing on the page. Sized by the window's height so a
   frame never scrolls. */
.shot { height: auto; width: auto; max-height: 52vh; max-width: min(86vw, 420px); border-radius: 12px; }
.shot.small { max-height: 42vh; }
@supports (height: 1svh) { .shot { max-height: 52svh; } .shot.small { max-height: 42svh; } }

/* an honest empty slot: outlined, 7:8, nothing in it */
.slot { aspect-ratio: 7 / 8; border: 1px solid var(--sec); opacity: .45; border-radius: 10px; }
.f > .slot { height: 42vh; height: 42svh; max-width: 86vw; }
/* a one-frame product page with the email field under the picture */
.shot.tiny { max-height: 34vh; }
.f > .slot.tiny { height: 34vh; height: 34svh; }
@supports (height: 1svh) { .shot.tiny { max-height: 34svh; } .f > .slot.tiny { height: 34svh; } }

/* ---- the hero: name, line, buy, formats on the left; the live demo on the right ---- */
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hero-text > * { margin: 0; }
.hero-text .row { justify-content: center; }
@media (min-width: 900px) {
  .hero { flex-direction: row; justify-content: center; align-items: center; gap: clamp(48px, 7vw, 120px); padding-left: max(var(--pad), calc((100vw - 1100px) / 2)); padding-right: max(var(--pad), calc((100vw - 1100px) / 2)); }
  .hero-text { align-items: flex-start; text-align: left; order: 0; }
  .hero-text .row { justify-content: flex-start; }
  .hero .demo { order: 1; width: auto; }
  .hero .demo-stage { width: min(560px, 42vw, calc(70vh * 7 / 8)); }
  @supports (height: 1svh) { .hero .demo-stage { width: min(560px, 42vw, calc(70svh * 7 / 8)); } }
}
@media (max-width: 899px) { .hero .demo { order: -1; } }

/* the live demo: the plugin's 420x480, scaled so the frame fits (7:8 of up to 50svh
   stacked, 70svh beside the text). The record is the play button. */
.demo { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
/* Rounded like the plugin window on a Mac. clip-path, not just overflow: a WebGL canvas
   is composited on its own and in Firefox / Safari can ignore an ancestor's border-radius. */
.demo-stage { position: relative; width: min(86vw, 420px, calc(50vh * 7 / 8)); aspect-ratio: 7 / 8; border-radius: 12px; overflow: hidden; clip-path: inset(0 round 12px); isolation: isolate; }
.demo-stage .tapespin-demo, .demo-stage canvas { border-radius: 12px; }
@supports (height: 1svh) { .demo-stage { width: min(86vw, 420px, calc(50svh * 7 / 8)); } }
.demo-stage.idle { cursor: pointer; }
.demo-stage.idle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 12px; }
.demo-stage .shot { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.demo-stage.idle .shot { opacity: .85; }
.demo-mount { width: 100%; }
/* the veil: a paper-coloured wash with "play" on the record's label (centre 50% / 47.6%, diameter 27%) */
.demo-veil { position: absolute; inset: 0; display: none; background: rgba(247, 249, 252, .18); }
.demo-stage.idle .demo-veil { display: block; }
.demo-play { position: absolute; left: 50%; top: 47.6%; transform: translate(-50%, -50%); width: 27%; aspect-ratio: 1; border-radius: 999px; background: var(--acc); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: var(--s); font-weight: 500; letter-spacing: .01em; white-space: nowrap; transition: background var(--t) var(--ease); }
.demo-play.wide { width: auto; aspect-ratio: auto; padding: 10px 16px; background: var(--bg); color: var(--sec); }
.demo-stage.idle:hover .demo-play:not(.wide) { background: #ff8a3d; }
.demo-hint { margin: 0; }
.link { appearance: none; background: none; border: 0; border-bottom: 1px solid var(--sec); color: var(--sec); padding: 0; font: inherit; cursor: pointer; line-height: 1.2; }
.link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* hold · drag · let go: three small pictures in one row, a word and a line each */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; max-width: 640px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.steps .shot { width: 100%; max-width: 180px; max-height: 32vh; max-height: 32svh; }
.steps p { margin: 0; }
@media (max-width: 479px) { .steps { gap: 12px; } }

/* the one field */
.email-form { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.email-form .field { display: flex; align-items: flex-end; gap: 16px; }

/* the licence key, when there is one */
.key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; line-height: 1.5; word-break: break-all; max-width: 560px; user-select: all; margin: 0; }
.activate { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* the site's links: at the foot of the last frame, or the end of a reading page */
.meta { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 6px 24px; flex-wrap: wrap; padding: 0 var(--pad); margin: 0; text-align: center; }
.read .meta { position: static; justify-content: flex-start; padding: 0; margin-top: 96px; text-align: left; }

/* ---- reading pages: support, press, legal. one quiet column, 16px ---- */
.read main { width: 100%; max-width: 60ch; margin: 0 auto; padding: 140px var(--pad) 96px; }
.read main > * + * { margin-top: 1em; }
.read h1 { font-size: var(--s); letter-spacing: .12em; color: var(--sec); font-weight: 400; margin-bottom: 40px; }
.read h2 { margin-top: 64px; letter-spacing: .12em; color: var(--sec); font-weight: 400; text-transform: lowercase; }
.read h3 { margin-top: 32px; }
.read p, .read li, .read summary, .read td, .read th, .read label { font-size: 1rem; font-weight: 400; letter-spacing: 0; }
.read ul, .read ol { padding-left: 1.2em; }
.read li + li { margin-top: .35em; }
.read a { border-bottom-color: var(--sec); }
.read a:hover { border-bottom-color: var(--ink); }
.read code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.read details { border-top: 1px solid var(--sec); padding: 12px 0; }
.read details:last-of-type { border-bottom: 1px solid var(--sec); }
.read summary { cursor: pointer; list-style: none; padding-right: 28px; position: relative; }
.read summary::-webkit-details-marker { display: none; }
.read summary::after { content: "+"; position: absolute; right: 2px; top: 0; color: var(--sec); font-weight: 400; }
.read details[open] summary::after { content: "−"; }
.read details > div { padding-top: 8px; color: var(--sec); }
.read details > div > * + * { margin-top: .75em; }
.read table { width: 100%; border-collapse: collapse; }
.read td, .read th { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-top: 1px solid var(--sec); }
.read tr:first-child td, .read tr:first-child th { border-top: 0; }
.read td:first-child { color: var(--sec); white-space: nowrap; }
.read td:last-child { overflow-wrap: anywhere; }
.read .draft { border: 1px solid var(--acc); border-radius: 10px; padding: 14px 16px; margin-bottom: 40px; }
.read .draft p { font-size: var(--s); }
.read .shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 24px 0 0; }
.read .shots img, .read .shots .slot { width: 100%; height: auto; border-radius: 10px; max-width: none; }
.read .shots li { font-size: var(--s); color: var(--sec); }
.read .shots li a { border-bottom: 0; }
.read .shots li span { display: block; margin-top: 8px; }
@media (max-width: 639px) { .read .shots { grid-template-columns: 1fr 1fr; } }
.read .downloads { list-style: none; padding: 0; margin: 16px 0 0; }
.read .downloads li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--sec); }
.read .downloads li:last-child { border-bottom: 1px solid var(--sec); }
.read .downloads a { border-bottom-color: var(--ink); }

/* ---- motion: slow fades as frames arrive, a slight drift on the product ---- */
.f > * { opacity: 0; transition: opacity var(--t) var(--ease), transform 900ms var(--ease); }
.drift { transform: translateY(10px); }
.f.in > * { opacity: 1; }
.f.in .drift { transform: none; }
.f.in > :nth-child(2) { transition-delay: 90ms; }
.f.in > :nth-child(3) { transition-delay: 180ms; }
.f.in > :nth-child(4) { transition-delay: 270ms; }
.f.in > :nth-child(5) { transition-delay: 360ms; }
.no-js .f > * { opacity: 1; }
.no-js .drift { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .f > *, .btn, a { transition: none; }
  .f > * { opacity: 1; }
  .drift { transform: none; }
}
