/* Cue — a print shop on paper.
   Chrome is quiet umber on newsprint; the eight riso inks are the only loud thing,
   and they overprint (multiply) exactly the way voices stack on the sheet. */

:root {
  /* Paper */
  --paper: #FAF9F4;
  --sheet: #FFFEF9;
  --mist: #F5F2EC;
  --wash: #EBE4DC;
  --plate: #F1EBE4;
  --rule: #E9E1D8;
  --bar: #D8C6B9;

  /* Type ink */
  --ink: #1F2229;
  --ink-2: #5C6070;
  --ink-3: #8C8F99;

  /* Chrome */
  --umber: #926247;
  --umber-deep: #6A4C3C;

  /* The eight drum inks. Each one is a voice. */
  --bass: #00838A;
  --pluck: #0078BF;
  --pad: #00A95C;
  --lead: #FF6C2F;
  --keys: #765BA7;
  --bell: #FF48B0;
  --kick: #2B2D26;
  --hat: #FFB511;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

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

*, *::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(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; max-width: var(--measure); }

a { color: var(--umber-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap { max-width: 1140px; margin: 0 auto; padding-inline: var(--gutter); }

/* ─── Masthead ─────────────────────────────────────────────────────────── */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 68px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.mark img {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
.mark span {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.masthead nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
  font-size: 0.94rem;
}
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 620px) { .masthead nav .hide-sm { display: none; } }

/* ─── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.4rem;
  border: 1px solid var(--umber);
  border-radius: 6px;
  background: var(--umber);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--wash);
  transition: box-shadow 90ms linear, transform 90ms linear;
}
.btn:hover { color: #fff; background: var(--umber-deep); border-color: var(--umber-deep); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--wash); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--bar);
  box-shadow: none;
}
.btn--quiet:hover { background: var(--mist); color: var(--ink); border-color: var(--umber); }

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); }

/* Copy on the left, Cue standing at the trailing edge — the Studio tab's top zone,
   with his waist bottom-aligned to the download row. */
.hero-grid { display: grid; gap: clamp(0.5rem, 2vw, 2.5rem); }
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) clamp(320px, 38vw, 520px);
    align-items: end;
  }
}

.hero h1 {
  font-size: clamp(2.9rem, 8.5vw, 5.4rem);
  line-height: 0.96;
  max-width: 13ch;
  margin-bottom: 1.1rem;
}
.hero .lede {
  font-size: clamp(1.06rem, 1.6vw, 1.22rem);
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.1rem; }
.hero-actions .aside {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0;
}

/* ─── The sheet ────────────────────────────────────────────────────────── */

.press { padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.press-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .press-grid { grid-template-columns: minmax(0, 1fr) 238px; align-items: start; }
}

.sheet {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--bar);
  border-radius: 6px;
  box-shadow: 7px 7px 0 var(--wash);
  overflow: hidden;
}
.sheet svg { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.sheet svg .stroke { mix-blend-mode: multiply; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sheet svg .hit { mix-blend-mode: multiply; }

.sheet-hint {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  padding-bottom: 1.4rem;
  pointer-events: none;
  transition: opacity 260ms ease;
}
.sheet-hint span {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-3);
  background: rgba(255, 254, 249, 0.82);
  padding: 0.1rem 0.7rem;
}
.sheet-hint[hidden] { display: flex; opacity: 0; }

/* Transport sits under the paper, on the paper's own colour. */
.transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.transport .spacer { flex: 1 1 auto; }
.transport .readout {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--bar);
  border-radius: 6px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--mist); border-color: var(--umber); }
.icon-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* The ink strip: one swatch per voice. */
.strip { display: grid; gap: 0.3rem; }
@media (max-width: 899px) {
  .strip { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
}
.strip h2 {
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--sans);
  font-variation-settings: normal;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
  grid-column: 1 / -1;
}
.swatch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.swatch i {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--chip);
  flex: none;
}
.swatch:hover { background: var(--mist); }
.swatch[aria-pressed="true"] {
  border-color: var(--bar);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 600;
}

/* ─── The beats ────────────────────────────────────────────────────────── */

.beats { padding-block: clamp(2.75rem, 6vw, 4.25rem); }
.beats h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 18ch; margin-bottom: 2.2rem; }

.beat-list { display: grid; gap: clamp(1.6rem, 3.5vw, 2.4rem); }
@media (min-width: 760px) { .beat-list { grid-template-columns: 1fr 1fr; } }

.beat { display: grid; grid-template-columns: 22px 1fr; gap: 0 0.95rem; }
.beat i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--chip);
  margin-top: 0.55rem;
  mix-blend-mode: multiply;
}
.beat h3 {
  font-weight: 500;
  font-style: italic;
  font-size: 1.32rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.beat p { margin: 0; color: var(--ink-2); font-size: 0.98rem; max-width: 40ch; }

/* ─── Overprint moment ─────────────────────────────────────────────────── */

.overprint {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.overprint .wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 860px) { .overprint .wrap { grid-template-columns: 1fr 1fr; } }
.overprint h2 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  max-width: 14ch;
  margin-bottom: 0.9rem;
}
.overprint p { color: var(--ink-2); max-width: 44ch; }
.overprint svg { display: block; width: 100%; height: auto; }
.overprint svg path { mix-blend-mode: multiply; fill: none; stroke-linecap: round; }

/* ─── Plates ───────────────────────────────────────────────────────────── */

.plates { padding-block: clamp(3rem, 7vw, 4.75rem); }
.plates > .wrap > h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 16ch; margin-bottom: 2rem; }

.plate-grid { display: grid; gap: clamp(1.4rem, 3vw, 2rem); }
@media (min-width: 700px) { .plate-grid { grid-template-columns: 1fr 1fr; } }

.plate {
  background: var(--sheet);
  border: 1px solid var(--bar);
  border-radius: 6px;
  padding: clamp(1.25rem, 2.6vw, 1.75rem);
  box-shadow: 6px 6px 0 var(--chip);
}
.plate svg { display: block; width: 100%; height: 108px; margin-bottom: 1.1rem; }
.plate svg * { mix-blend-mode: multiply; }
.plate h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.45rem; }
.plate p { color: var(--ink-2); font-size: 0.98rem; margin: 0; max-width: 42ch; }

/* ─── Premium ──────────────────────────────────────────────────────────── */

.premium { padding-block: clamp(2.5rem, 6vw, 4rem); }
.premium .wrap {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3rem);
}
@media (min-width: 860px) { .premium .wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.premium h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 12ch; margin-bottom: 0.8rem; }
.premium .free { color: var(--ink-2); max-width: 36ch; }

.includes { list-style: none; margin: 0; padding: 0; }
.includes li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.02rem;
}
.includes li:first-child { padding-top: 0; }
.includes li:last-child { border-bottom: none; }
.includes i {
  width: 11px; height: 11px;
  margin-top: 0.52rem;
  border-radius: 50%;
  background: var(--chip);
  mix-blend-mode: multiply;
}
.includes small { display: block; color: var(--ink-3); font-size: 0.88rem; line-height: 1.5; }

/* ─── Closing ──────────────────────────────────────────────────────────── */

.closing {
  padding-block: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--rule);
  text-align: left;
}
.closing .wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
}
@media (min-width: 860px) {
  .closing .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); }
}
.closing h2 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); max-width: 14ch; margin-bottom: 1.1rem; }
.closing p { color: var(--ink-2); max-width: 44ch; margin-bottom: 1.5rem; }
.cue-note {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.06rem;
  color: var(--ink-3);
  max-width: 48ch;
}

/* ─── Cue ──────────────────────────────────────────────────────────────── */

/* The rig is drawn in two flat colours plus a gold for the sparkles; cue.js swaps them for
   these, and the ink follows whichever swatch is selected. */
.cue {
  --cue-ink: #1F2229;
  --cue-paper: #FFFEF9;
  --cue-gold: #E3A61F;
  margin: 0;
}

.cue-figure {
  width: 100%;
  aspect-ratio: 1200 / 1000;
  opacity: 0;
  transition: opacity 400ms ease;
  /* He fades out below the vest, the way he stands in the app. */
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
}
.cue-figure.is-ready { opacity: 1; }
.cue-figure svg { display: block; width: 100%; height: 100%; }

/* He is the size of the headline, not an ornament beside it. */
.cue--hero { cursor: pointer; }
@media (max-width: 899px) {
  /* Above the headline, standing to the trailing edge with the type tucked under his
     waist — the same arrangement as the Studio's compact top zone. */
  .cue--hero {
    order: -1;
    width: min(340px, 84%);
    margin-left: auto;
    margin-right: calc(var(--gutter) / -2);
    margin-bottom: clamp(-2.25rem, -4vw, -1.25rem);
  }
}

.cue--closing { cursor: pointer; align-self: end; }
.cue--closing .cue-figure { max-width: 300px; margin-left: auto; }
@media (max-width: 859px) {
  .cue--closing .cue-figure { max-width: 240px; margin-inline: auto; }
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem 3rem;
  font-size: 0.92rem;
  color: var(--ink-3);
}
.colophon .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: baseline; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }
.colophon a { color: var(--ink-2); text-decoration: none; }
.colophon a:hover { color: var(--ink); text-decoration: underline; }

/* ─── Legal pages ──────────────────────────────────────────────────────── */

.legal { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem); }
.legal-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.legal-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 0.7rem; }
.legal-head p { color: var(--ink-2); max-width: 52ch; margin: 0; }
.legal-head .updated {
  font-size: 0.92rem;
  color: var(--ink-3);
  margin-top: 0.6rem;
}

.legal-body { display: grid; gap: clamp(1.75rem, 5vw, 3.5rem); }
@media (min-width: 940px) {
  .legal-body { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
}

.toc { font-size: 0.93rem; }
.toc h2 {
  font-family: var(--sans);
  font-variation-settings: normal;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-bottom: 0.7rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 940px) { .toc { position: sticky; top: 2rem; } }
@media (max-width: 939px) {
  .toc {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
  }
  .toc ol { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

.prose { max-width: 68ch; }
.prose section + section { margin-top: 2.4rem; }
.prose h2 {
  font-size: 1.62rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  scroll-margin-top: 1.5rem;
}
.prose h3 {
  font-family: var(--sans);
  font-variation-settings: normal;
  letter-spacing: 0;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
}
.prose p, .prose li { color: #33363F; }
.prose ul { margin: 0 0 1.05em; padding-left: 1.15rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--bar); }

.prose .callout {
  background: var(--mist);
  border-left: 3px solid var(--bass);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.4rem;
}
.prose .callout p { margin: 0; max-width: none; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4rem;
  font-size: 0.96rem;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.prose th { font-weight: 600; color: var(--ink); width: 34%; }
.prose td { color: #33363F; }

.legal .back {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
