@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  /* Test-card palette: the page ground is blank tape, the accents are colour bars. */
  --tape: #dfe4e8;
  --ink: #14181d;
  --ink-soft: #46505a;
  --paper: #ffffff;
  --bar-grey: #c9cdd1;
  --bar-yellow: #e3cc1b;
  --bar-cyan: #19b8c4;
  --bar-green: #23b24b;
  --bar-magenta: #b5179e;
  --bar-red: #d2302c;
  --bar-blue: #1b2cc0;
  --rule: #b9c1c8;

  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--tape);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bar-blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--bar-blue); outline-offset: 3px; }

code, pre { font-family: var(--mono); font-size: 0.8em; }
p code, li code { background: var(--paper); padding: 0.1em 0.35em; border-radius: 3px; }

/* ---------- top ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 1.1rem var(--gutter);
}
.wordmark {
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.top nav { display: flex; gap: 0.4rem 1.5rem; flex-wrap: wrap; }
.top nav a { color: var(--ink); font-size: 1rem; }

/* ---------- the frame: colour bars with the headline as captions ---------- */

.frame {
  position: relative;
  margin: 0 var(--gutter);
  min-height: clamp(20rem, 56vw, 34rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.bars { position: absolute; inset: 0; display: flex; }
.bars i { flex: 1; }
.bars i:nth-child(1) { background: var(--bar-grey); }
.bars i:nth-child(2) { background: var(--bar-yellow); }
.bars i:nth-child(3) { background: var(--bar-cyan); }
.bars i:nth-child(4) { background: var(--bar-green); }
.bars i:nth-child(5) { background: var(--bar-magenta); }
.bars i:nth-child(6) { background: var(--bar-red); }
.bars i:nth-child(7) { background: var(--bar-blue); }

.timecode {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0.3em 0.6em;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  font-variant-numeric: tabular-nums;
}

.captions {
  position: relative;
  margin: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  font-weight: 700;
  font-stretch: 85%;
  font-size: clamp(1.9rem, 6.2vw, 5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
/* Each line sits in its own box, the way burned-in subtitles do. */
.captions span {
  display: table;
  margin-top: 0.14em;
  padding: 0.04em 0.32em 0.1em;
  background: var(--ink);
  color: var(--paper);
}

/* ---------- intro + price check ---------- */

.intro { padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 0; }
.lede { max-width: var(--measure); margin: 0 0 2rem; font-size: 1.3rem; line-height: 1.45; }

.install { max-width: 46rem; }
.install h2 { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 600; line-height: 1.5; }
.install .snippet { border-top: 0.75rem solid var(--bar-blue); }
button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.4rem;
}
.hint { margin: 0.6rem 0 0; color: var(--ink-soft); font-size: 0.95rem; max-width: var(--measure); }

/* ---------- content blocks ---------- */

.block {
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}
.block h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 700;
  font-stretch: 82%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.block-lede { max-width: var(--measure); margin: 0 0 1.5rem; }
.sub { margin: 2.75rem 0 0.4rem; font-size: 1.35rem; font-stretch: 88%; }

.document, .snippet { position: relative; max-width: 58rem; background: var(--paper); }
.document { border-top: 0.75rem solid var(--ink); }
.document pre, .snippet pre {
  margin: 0;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.document b { font-weight: 600; }
mark { background: var(--bar-yellow); color: var(--ink); padding: 0.05em 0.25em; }
.snippet { margin-bottom: 0.5rem; }
.snippet:has(.copy) pre { padding-top: 3.25rem; }
.snippet .copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  background: var(--paper);
  color: var(--ink);
}
.snippet .copy:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem 3rem;
  max-width: 58rem;
  margin: 2rem 0 0;
}
.options dt { font-weight: 700; font-size: 1.2rem; padding-top: 0.6rem; border-top: 0.4rem solid var(--bar-cyan); }
.options div:last-child dt { border-top-color: var(--bar-magenta); }
.options dd { margin: 0.4rem 0 0; }

/* price meter */
.meter { max-width: 40rem; }
.meter label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.meter output { font-variant-numeric: tabular-nums; }
.meter input[type="range"] { width: 100%; margin: 0.9rem 0 1.25rem; accent-color: var(--ink); height: 1.5rem; }
.meter-prices { display: flex; gap: 1rem 3rem; flex-wrap: wrap; }
.meter-prices p { margin: 0; }
.meter-prices strong {
  display: block;
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-stretch: 78%;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.swatch { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.45em; vertical-align: -0.05em; }
.swatch-audio { background: var(--bar-cyan); }
.swatch-visuals { background: var(--bar-magenta); }
.is-off { color: var(--ink-soft); }
.is-off strong { text-decoration: line-through; text-decoration-thickness: 2px; }

.notice {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 0.9rem 1.1rem;
  background: var(--bar-yellow);
}

/* steps: a real sequence, so they are numbered */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 3rem;
  max-width: 68rem;
  margin: 2.5rem 0 0;
  padding: 0;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 0.75rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  font-stretch: 75%;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.steps h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.steps p { margin: 0; }

.faq { max-width: 46rem; margin: 1.5rem 0 0; }
.faq div { border-top: 2px solid var(--ink); padding: 1rem 0 1.25rem; }
.faq dt { font-weight: 700; font-size: 1.2rem; font-stretch: 90%; }
.faq dd { margin: 0.4rem 0 0; }

.plain { max-width: var(--measure); margin: 0; padding-left: 1.2rem; }
.plain li { margin-bottom: 0.3rem; }

.foot {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: 2px solid var(--ink);
  font-size: 1rem;
}
.foot p { margin: 0; max-width: var(--measure); }

@media (max-width: 40rem) {
  body { font-size: 1.05rem; }
  .lede { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
