/* loud.ad: a vintage tube guitar amp. Cream tweed by day, black tolex in a dark room by night.
   The amp is drawn in CSS and sized in cqi of its own width, so it scales from a 375 px phone up. */

@font-face {
  font-family: "Anton";
  src: url("fonts/anton-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono-variable-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-variable-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- colours ---------- */

:root {
  color-scheme: light;
  --wall: #f2eadb;
  --ink: #2a2118;
  --ink-soft: #5c4a39;
  --red: #d7372a;
  --red-text: #b3291e;
  --focus: #2a2118;
  --tweed: #e9dcc0;
  --cab-text: #2a2118;
  --piping: #4a2a17;
  --piping-hi: rgba(255, 236, 200, 0.28);
  --panel-a: #382a20;
  --panel-b: #241a13;
  --panel-text: #f1e3c4;
  --grille: #3b2a1f;
  --thread: rgba(225, 190, 118, 0.3);
  --thread-x: rgba(225, 190, 118, 0.12);
  --face: #f5ecd3;
  --face-edge: #e3d3ad;
  --face-ink: #2a2118;
  --lamp-off: #6a4318;
  --lamp-on: #ffad2e;
  --shadow: rgba(70, 44, 18, 0.34);
  --spot: rgba(255, 214, 150, 0);
  --switch-plate: #2b2019;
  --wire: #1b1714;
  --face-off: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --wall: #121110;
  --ink: #f1e7d2;
  --ink-soft: #bfb39c;
  --red: #e2402f;
  --red-text: #ff5a43;
  --focus: #f1e7d2;
  --tweed: #1d1b19;
  --cab-text: #efe4cd;
  --piping: #d8ccb2;
  --piping-hi: rgba(0, 0, 0, 0.5);
  --panel-a: #141312;
  --panel-b: #0a0909;
  --panel-text: #efe4cd;
  --grille: #26272a;
  --thread: rgba(205, 208, 214, 0.22);
  --thread-x: rgba(205, 208, 214, 0.1);
  --face: #ffd68a;
  --face-edge: #c9822a;
  --face-ink: #2a1a0c;
  --lamp-off: #4a2f12;
  --lamp-on: #ffc552;
  --shadow: rgba(0, 0, 0, 0.7);
  --spot: rgba(255, 196, 120, 0.14);
  --switch-plate: #0b0a09;
  --wire: #4a423b;
  --face-off: brightness(0.5) saturate(0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --wall: #121110;
    --ink: #f1e7d2;
    --ink-soft: #bfb39c;
    --red: #e2402f;
    --red-text: #ff5a43;
    --focus: #f1e7d2;
    --tweed: #1d1b19;
    --cab-text: #efe4cd;
    --piping: #d8ccb2;
    --piping-hi: rgba(0, 0, 0, 0.5);
    --panel-a: #141312;
    --panel-b: #0a0909;
    --panel-text: #efe4cd;
    --grille: #26272a;
    --thread: rgba(205, 208, 214, 0.22);
    --thread-x: rgba(205, 208, 214, 0.1);
    --face: #ffd68a;
    --face-edge: #c9822a;
    --face-ink: #2a1a0c;
    --lamp-off: #4a2f12;
    --lamp-on: #ffc552;
    --shadow: rgba(0, 0, 0, 0.7);
    --spot: rgba(255, 196, 120, 0.14);
    --switch-plate: #0b0a09;
    --wire: #4a423b;
    --face-off: brightness(0.5) saturate(0.55);
  }
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 17px/1.5 "Instrument Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

main {
  overflow-x: clip;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

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

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 400 25px/1 "Anton", Impact, sans-serif;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.wm-jewel {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a86 0 12%, #8b2016 60%, #4a0f0a);
  box-shadow: 0 0 0 1.5px #b59a62, inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}

.is-live .wm-jewel {
  background: radial-gradient(circle at 35% 30%, #fff1e8 0 14%, #ff4a35 50%, #b3170c);
  box-shadow: 0 0 0 1.5px #c9a85f, 0 0 10px 2px rgba(255, 70, 45, 0.6);
}

/* The theme switch: three small gold amp knobs on a dark faceplate; the chosen one ringed red. */
.theme {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 3px 7px;
  border-radius: 15px;
  background: linear-gradient(var(--panel-a), var(--switch-plate));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.25);
}

.theme-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #3a2810;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 249, 222, 0.95) 0 9%, transparent 42%),
    radial-gradient(circle, #f2d68a 0 50%, #c9a04a 61%, transparent 63%),
    repeating-conic-gradient(#8f6a26 0 9deg, #f0cf78 9deg 18deg);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s, transform 0.2s;
}

.theme-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-btn:hover {
  transform: rotate(-14deg);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--panel-text);
  outline-offset: 2px;
}

:root:not([data-theme]) .theme-btn[data-theme-value="system"],
:root[data-theme="light"] .theme-btn[data-theme-value="light"],
:root[data-theme="dark"] .theme-btn[data-theme-value="dark"] {
  box-shadow: 0 0 0 2px var(--red-text), 0 0 9px 1px rgba(255, 70, 45, 0.55), 0 2px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- hero ---------- */

.hero {
  padding-top: 6px;
}

h1 {
  font: 400 clamp(50px, 15.2vw, 76px) / 0.94 "Anton", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.004em;
}

h1 .accent {
  color: var(--red-text);
}

.lede {
  max-width: 34em;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.stage {
  position: relative;
  isolation: isolate;
  margin-top: 6px;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -12% -30% -4%;
  z-index: -1;
  background: radial-gradient(ellipse 52% 50% at 50% 46%, var(--spot), transparent 72%);
  opacity: calc(0.55 + var(--level, 0) * 0.9);
  pointer-events: none;
}

.play-title {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2px;
  height: 34px;
  padding-right: calc(19% - 30px);
  font: 600 12px/1 "Martian Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-text);
}

.play-title > span {
  padding-bottom: 14px;
}

.hint-arrow {
  width: 40px;
  height: 30px;
  margin-bottom: -6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toy {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- the amp ---------- */

.amp {
  --rot: -150deg;
  --needle: -48deg;
  position: relative;
  width: 100%;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}

.handle {
  display: block;
  width: 32cqi;
  height: 4.4cqi;
  margin: 0 auto -0.4cqi;
  border-radius: 2.4cqi 2.4cqi 0.6cqi 0.6cqi;
  background:
    repeating-linear-gradient(90deg, transparent 0 1.2cqi, rgba(255, 230, 190, 0.22) 1.2cqi 1.6cqi) 0 0.7cqi / 100% 0.2cqi no-repeat,
    repeating-linear-gradient(90deg, transparent 0 1.2cqi, rgba(255, 230, 190, 0.22) 1.2cqi 1.6cqi) 0 calc(100% - 1.1cqi) / 100% 0.2cqi no-repeat,
    linear-gradient(#6b4127, #3d2414 70%, #2a180c);
  box-shadow: inset 0 0.4cqi 0.4cqi rgba(255, 220, 170, 0.25), 0 0.6cqi 1cqi rgba(0, 0, 0, 0.35);
}

.cab {
  position: relative;
  padding: 3.2cqi;
  border-radius: 2.6cqi;
  color: var(--cab-text);
  background:
    radial-gradient(ellipse 120% 95% at 50% 40%, transparent 52%, rgba(120, 72, 22, 0.32) 100%),
    url("img/cloth.svg"),
    repeating-linear-gradient(45deg, rgba(110, 74, 32, 0.24) 0 1.3px, transparent 1.3px 3.9px),
    repeating-linear-gradient(-45deg, rgba(255, 252, 238, 0.4) 0 1px, transparent 1px 3.9px),
    linear-gradient(170deg, #efe4cb, var(--tweed) 45%, #dccaa4);
  box-shadow:
    inset 0 0 0 0.55cqi var(--piping),
    inset 0 0 0 0.8cqi var(--piping-hi),
    inset 0 1.4cqi 2cqi rgba(255, 250, 235, 0.35),
    inset 0 -2cqi 3cqi rgba(80, 48, 16, 0.25),
    0 2.4cqi 3.4cqi -1cqi var(--shadow),
    0 5cqi 9cqi -2cqi var(--shadow);
}

:root[data-theme="dark"] .cab {
  background:
    radial-gradient(ellipse 110% 90% at 46% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    url("img/tolex.svg"),
    linear-gradient(170deg, #262320, var(--tweed) 50%, #141312);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cab {
    background:
      radial-gradient(ellipse 110% 90% at 46% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
      url("img/tolex.svg"),
      linear-gradient(170deg, #262320, var(--tweed) 50%, #141312);
  }
}

/* the control panel: meter and jewel, Tone and Reach on the left; the big Volume knob on the right */
.panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 31cqi;
  grid-template-rows: auto auto;
  grid-template-areas: "meter volume" "small volume";
  align-items: center;
  column-gap: 2cqi;
  row-gap: 2.6cqi;
  padding: 2.6cqi 2.4cqi 2cqi 3.4cqi;
  border-radius: 1.4cqi;
  color: var(--panel-text);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    linear-gradient(var(--panel-a), var(--panel-b));
  box-shadow:
    0 0 0 0.5cqi var(--piping),
    0 0 0 0.75cqi var(--piping-hi),
    inset 0 1cqi 1.8cqi rgba(0, 0, 0, 0.55),
    inset 0 -0.3cqi 0.4cqi rgba(255, 255, 255, 0.06);
}

.screw {
  position: absolute;
  width: 1.8cqi;
  height: 1.8cqi;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, rgba(0, 0, 0, 0.65) 44% 56%, transparent 56%),
    radial-gradient(circle at 35% 30%, #fff 0 8%, #c9c3b6 30%, #6f685c 80%);
  box-shadow: 0 0.2cqi 0.3cqi rgba(0, 0, 0, 0.6);
}
.screw.tl { top: 1cqi; left: 1cqi; }
.screw.tr { top: 1cqi; right: 1cqi; }
.screw.bl { bottom: 1cqi; left: 1cqi; }
.screw.br { bottom: 1cqi; right: 1cqi; }

.meter {
  grid-area: meter;
  display: flex;
  align-items: center;
  gap: 3cqi;
}

.face {
  position: relative;
  flex: 0 0 37cqi;
  aspect-ratio: 200 / 110;
  overflow: hidden;
  border-radius: 1cqi;
  background:
    radial-gradient(ellipse 80% 90% at 50% 100%, rgba(255, 190, 90, calc(var(--level, 0) * 0.55)), transparent 70%),
    radial-gradient(ellipse 120% 120% at 50% 90%, var(--face) 50%, var(--face-edge));
  box-shadow:
    0 0 0 0.7cqi #2d2620,
    0 0 0 1cqi #a99e8a,
    0 0 0 1.25cqi #4b4237,
    inset 0 1cqi 1.4cqi rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .face {
  box-shadow:
    0 0 0 0.7cqi #2d2620,
    0 0 0 1cqi #6c6458,
    0 0 0 1.25cqi #2b261f,
    inset 0 1cqi 1.4cqi rgba(0, 0, 0, 0.35),
    0 0 4cqi 0.6cqi rgba(255, 170, 60, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .face {
    box-shadow:
      0 0 0 0.7cqi #2d2620,
      0 0 0 1cqi #6c6458,
      0 0 0 1.25cqi #2b261f,
      inset 0 1cqi 1.4cqi rgba(0, 0, 0, 0.35),
      0 0 4cqi 0.6cqi rgba(255, 170, 60, 0.35);
  }
}

.scale {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--face-ink);
  stroke-linecap: round;
}
.scale .arc { stroke-width: 2; }
.scale .major { stroke-width: 3.2; }
.scale .minor { stroke-width: 1.6; opacity: 0.75; }
.scale .red { stroke: var(--red); stroke-width: 7; stroke-linecap: butt; }

.vu {
  position: absolute;
  left: 9%;
  bottom: 11%;
  font: 700 3cqi/1 "Martian Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  color: var(--face-ink);
}

.needle {
  position: absolute;
  left: calc(50% - 0.3cqi);
  bottom: -7.3%;
  width: 0.6cqi;
  height: 92%;
  border-radius: 0.3cqi 0.3cqi 0 0;
  background: linear-gradient(#1b1209 0 72%, #2a1a0c);
  transform-origin: 50% 100%;
  transform: rotate(var(--needle));
  box-shadow: 0.5cqi 0.5cqi 0.6cqi rgba(0, 0, 0, 0.25);
}

.face::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2.6cqi;
  width: 8cqi;
  height: 5cqi;
  translate: -50% 0;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(circle at 50% 30%, #4b4036, #15100c 70%);
}

.glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(162deg, rgba(255, 255, 255, 0.5) 0 14%, rgba(255, 255, 255, 0.08) 30%, transparent 46%),
    linear-gradient(transparent 70%, rgba(0, 0, 0, 0.08));
}

.jewel {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 7cqi;
  height: 7cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fbf4e4, #b9ae98 45%, #5d554b 80%);
  box-shadow: 0 0.4cqi 0.6cqi rgba(0, 0, 0, 0.6);
}

.jewel > span,
.lamp > span {
  display: block;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 15deg, rgba(255, 255, 255, 0.22) 0 30deg, rgba(0, 0, 0, 0.18) 30deg 60deg),
    radial-gradient(circle at 38% 32%, #c25544 0 10%, #6e1a11 55%, #3a0b07);
  box-shadow: inset 0 0 0.6cqi rgba(0, 0, 0, 0.6);
  transition: background 0.18s, box-shadow 0.18s;
}

.amp.is-live .jewel > span {
  background:
    repeating-conic-gradient(from 15deg, rgba(255, 255, 255, 0.35) 0 30deg, rgba(120, 0, 0, 0.18) 30deg 60deg),
    radial-gradient(circle at 38% 32%, #fff3ea 0 12%, #ff4733 45%, #c0190c);
  box-shadow: 0 0 2.6cqi 0.8cqi rgba(255, 60, 40, 0.65), inset 0 0 0.6cqi rgba(255, 220, 200, 0.7);
}

.knob-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqi;
}

.smalls {
  grid-area: small;
  display: flex;
  justify-content: space-around;
  padding-right: 8cqi;
}

.knob-cell.big {
  grid-area: volume;
  align-self: center;
}

.knob-label {
  font: 600 max(8.5px, 2.4cqi) / 1 "Martian Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-text);
}

/* a gold knurled knob: the knurl and cap turn, the shine stays put like a real light */
.knob {
  position: relative;
  display: block;
  border-radius: 50%;
  box-shadow: 0 1cqi 1.4cqi rgba(0, 0, 0, 0.6), 0 0.2cqi 0.2cqi rgba(0, 0, 0, 0.6);
}

.knob .turn,
.knob--tone,
.knob--reach {
  border-radius: 50%;
}

.knob .turn {
  position: absolute;
  inset: 0;
  transform: rotate(var(--rot));
}

.knurl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 62%, rgba(0, 0, 0, 0.35) 100%),
    repeating-conic-gradient(#87621f 0 5deg, #f3d27a 5deg 10deg);
}

.cap {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0.05) 1px 2px),
    radial-gradient(circle at 50% 50%, #f7df98, #dcb256 60%, #a8792a);
  box-shadow: inset 0 0 0 0.25cqi rgba(110, 76, 20, 0.6), 0 0 0.3cqi rgba(0, 0, 0, 0.45);
}

.pointer {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 0.7cqi;
  height: 38%;
  translate: -50% 0;
  border-radius: 0.4cqi;
  background: #2a1a0b;
  box-shadow: 0 0 0 0.12cqi rgba(255, 240, 200, 0.4);
}

.shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 252, 235, 0.85) 0 6%, rgba(255, 250, 230, 0.2) 22%, transparent 40%),
    radial-gradient(circle at 70% 78%, transparent 40%, rgba(60, 30, 0, 0.3) 72%);
  pointer-events: none;
}

.knob--tone,
.knob--reach {
  width: 10cqi;
  height: 10cqi;
}
.knob--tone > :not(.shine) { transform: rotate(-35deg); }
.knob--reach > :not(.shine) { transform: rotate(55deg); }
.knob--tone::after,
.knob--reach::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 252, 235, 0.8) 0 6%, transparent 38%);
}

/* the Volume slider: a big hit area, the dial numbers silk-screened round the knob */
.volume {
  position: relative;
  width: 31cqi;
  aspect-ratio: 1;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.volume:active {
  cursor: grabbing;
}

.volume.is-static {
  cursor: default;
  touch-action: auto;
}

.volume:focus-visible {
  outline: 0.6cqi solid var(--panel-text);
  outline-offset: -0.2cqi;
}

.volume .knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18.5cqi;
  height: 18.5cqi;
  translate: -50% -50%;
}

.dial span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4cqi;
  height: 3cqi;
  margin: -1.5cqi 0 0 -2cqi;
  text-align: center;
  font: 600 max(7.5px, 2.35cqi) / 3cqi "Martian Mono", ui-monospace, monospace;
  color: var(--panel-text);
  opacity: 0.85;
  transform: rotate(calc(-150deg + var(--i) * 27.2727deg)) translateY(-13.2cqi) rotate(calc(150deg - var(--i) * 27.2727deg));
  transition: color 0.2s, opacity 0.2s;
}
.dial span:nth-child(1) { --i: 0; }
.dial span:nth-child(2) { --i: 1; }
.dial span:nth-child(3) { --i: 2; }
.dial span:nth-child(4) { --i: 3; }
.dial span:nth-child(5) { --i: 4; }
.dial span:nth-child(6) { --i: 5; }
.dial span:nth-child(7) { --i: 6; }
.dial span:nth-child(8) { --i: 7; }
.dial span:nth-child(9) { --i: 8; }
.dial span:nth-child(10) { --i: 9; }
.dial span:nth-child(11) { --i: 10; }
.dial span:nth-child(12) { --i: 11; }
.dial span.is-at {
  color: #ffd27a;
  opacity: 1;
}
.dial span:nth-child(12).is-at {
  color: #ff6a52;
}

/* channel lights */
.channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1cqi;
  margin: 3cqi 0 2.6cqi;
  padding: 0 1cqi;
  list-style: none;
}

.channels li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3cqi;
  text-align: center;
}

.lamp {
  display: grid;
  place-items: center;
  width: 5.4cqi;
  height: 5.4cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fbf4e4, #b9ae98 45%, #5d554b 80%);
  box-shadow: 0 0.3cqi 0.5cqi rgba(0, 0, 0, 0.5);
}

.lamp > span {
  background:
    repeating-conic-gradient(from 15deg, rgba(255, 255, 255, 0.2) 0 30deg, rgba(0, 0, 0, 0.16) 30deg 60deg),
    radial-gradient(circle at 38% 32%, #b98a4a 0 10%, var(--lamp-off) 60%, #2a1806);
}

.is-on > .lamp > span {
  background:
    repeating-conic-gradient(from 15deg, rgba(255, 245, 210, 0.26) 0 30deg, rgba(150, 60, 0, 0.16) 30deg 60deg),
    radial-gradient(circle at 40% 36%, #fff2c4 0 12%, var(--lamp-on) 42%, #e5860f 78%, #b85f06);
  box-shadow: 0 0 2.4cqi 0.7cqi rgba(255, 170, 50, 0.7), inset 0 0 0.6cqi rgba(255, 240, 200, 0.6);
}

.amp--off:not(.is-live) .face {
  filter: var(--face-off);
}

.ch-name {
  width: min-content;
  font: 600 max(8.5px, 2.2cqi) / 1.25 "Martian Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cab-text);
}

/* the grille cloth, with the speaker behind it and the brand plate */
.grille {
  position: relative;
  display: grid;
  place-items: center;
  height: 29cqi;
  overflow: hidden;
  border-radius: 1.2cqi;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(255, 200, 110, calc(var(--level, 0) * 0.16)), transparent 70%),
    repeating-linear-gradient(0deg, var(--thread) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, var(--thread-x) 0 1px, transparent 1px 4px),
    linear-gradient(var(--grille), color-mix(in srgb, var(--grille), #000 30%));
  box-shadow:
    0 0 0 0.5cqi var(--piping),
    0 0 0 0.75cqi var(--piping-hi),
    inset 0 1.2cqi 2cqi rgba(0, 0, 0, 0.5);
}

.cone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46cqi;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.32) 0 9%, rgba(0, 0, 0, 0.08) 10% 34%, rgba(0, 0, 0, 0.22) 35% 38%, rgba(0, 0, 0, 0.06) 39% 66%, rgba(0, 0, 0, 0.26) 68% 71%, transparent 72%);
}

.plate {
  position: absolute;
  left: 6cqi;
  top: 3.4cqi;
  font: 400 7.4cqi/1 "Anton", Impact, sans-serif;
  letter-spacing: 0.02em;
  transform: skewX(-12deg) rotate(-4deg);
  color: transparent;
  background: linear-gradient(175deg, #fff3c4, #e2b85a 45%, #9b6d22 70%, #f1d18a);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0.35cqi 0.3cqi rgba(0, 0, 0, 0.6));
}

.at11 {
  position: relative;
  max-width: 74cqi;
  margin-top: 7cqi;
  text-align: center;
  text-wrap: balance;
  font: 400 max(15px, 4.6cqi) / 1.08 "Anton", Impact, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffe3a6;
  text-shadow: 0 0 1.4cqi rgba(255, 170, 50, 0.85), 0 0.3cqi 0.3cqi rgba(0, 0, 0, 0.8);
}

.js .at11 {
  visibility: hidden;
  opacity: 0;
}

.js .amp.is-eleven .at11 {
  visibility: visible;
  opacity: 1;
}

.feet {
  display: flex;
  justify-content: space-between;
  padding: 0 7cqi;
  height: 1.6cqi;
}
.feet span {
  width: 9cqi;
  height: 100%;
  border-radius: 0 0 1cqi 1cqi;
  background: linear-gradient(#2a2320, #0c0a09);
}

.amp::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -3.2cqi;
  height: 6cqi;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, var(--shadow), transparent 70%);
}

/* ---------- steps ---------- */

.steps {
  margin-top: 64px;
}

.kicker {
  font: 600 12px/1 "Martian Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.step-list {
  display: grid;
  gap: 28px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 14px;
  grid-template-rows: auto 1fr;
  row-gap: 4px;
  align-items: start;
}

.step .lamp {
  width: 30px;
  height: 30px;
  grid-row: span 2;
  align-self: start;
}

.step.is-on .lamp > span {
  background:
    repeating-conic-gradient(from 15deg, rgba(255, 245, 210, 0.26) 0 30deg, rgba(150, 60, 0, 0.16) 30deg 60deg),
    radial-gradient(circle at 40% 36%, #fff2c4 0 12%, var(--lamp-on) 42%, #e5860f 78%, #b85f06);
  box-shadow: 0 0 14px 4px rgba(255, 170, 50, 0.6), inset 0 0 3px rgba(255, 240, 200, 0.6);
}

.step-no {
  position: absolute;
  left: 11px;
  top: 38px;
  font: 600 11px/1 "Martian Mono", ui-monospace, monospace;
  color: var(--ink-soft);
}

.step h3 {
  padding-top: 3px;
  font: 650 19px/1.2 "Instrument Sans", system-ui, sans-serif;
}

.step p {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 72px;
  padding: 26px 0 40px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.foot-line {
  font-size: 14px;
  color: var(--ink-soft);
}

.foot-line a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ---------- 404: the amp unplugged ---------- */

.nf {
  padding-top: 10px;
}

.nf h1 {
  font-size: clamp(44px, 13vw, 96px);
}

.nf-back {
  margin-top: 14px;
  font-size: 17px;
}

.nf-back a {
  color: var(--red-text);
  font-weight: 600;
  text-underline-offset: 4px;
}

.nf-scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 560px;
  margin: 34px auto 0;
  padding-bottom: 18%;
}

.nf-scene .amp {
  width: 78%;
  margin-left: 4%;
}

.nf-scene .amp {
  z-index: 1;
}

.cable {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  overflow: visible;
}
.cable .wire {
  fill: none;
  stroke: var(--wire);
  stroke-width: 7;
  stroke-linecap: round;
}
.cable .wire-hi {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---------- motion (only with .motion, set when reduced motion is not asked for) ---------- */

.motion .dial span {
  transition: color 0.25s, opacity 0.25s;
}

.motion .is-on > .lamp > span {
  animation: lamp-on 0.34s steps(1, end);
}

.motion .amp.is-eleven .channels .lamp > span {
  animation: blink 0.62s steps(1, end);
}

.motion .amp.is-eleven .cab {
  animation: thump 0.42s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.motion .at11 {
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s;
  transform: scale(0.94);
}
.motion .amp.is-eleven .at11 {
  transform: none;
}

.motion .volume.is-hint .turn {
  animation: hint 1.1s ease-in-out;
}

.motion .step .lamp > span {
  transition: background 0.2s, box-shadow 0.3s;
}

.motion .step.is-on .lamp > span {
  animation: lamp-on 0.4s steps(1, end);
}

:root:not(.motion) *,
:root:not(.motion) *::before,
:root:not(.motion) *::after {
  transition: none !important;
  animation: none !important;
}

@keyframes lamp-on {
  0% { filter: brightness(0.4); }
  25% { filter: brightness(1.1); }
  45% { filter: brightness(0.55); }
  65% { filter: brightness(1); }
}

@keyframes blink {
  0% { filter: brightness(1.25); }
  30% { filter: brightness(0.25); }
  60% { filter: brightness(1.3); }
}

@keyframes thump {
  0% { transform: none; }
  20% { transform: translateY(0.5cqi) scale(1.004); }
  45% { transform: translateY(-0.3cqi); }
  70% { transform: translateY(0.15cqi); }
  100% { transform: none; }
}

@keyframes hint {
  0%, 100% { transform: rotate(var(--rot)); }
  30% { transform: rotate(calc(var(--rot) + 16deg)); }
  60% { transform: rotate(calc(var(--rot) + 4deg)); }
}

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

@media (min-width: 960px) {
  .bar {
    height: 76px;
  }
  .wordmark {
    font-size: 28px;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    column-gap: 56px;
    min-height: calc(100vh - 140px);
    padding-top: 0;
  }
  h1 {
    font-size: clamp(76px, 8.2vw, 124px);
  }
  .lede {
    margin-top: 22px;
    font-size: 19px;
  }
  .stage {
    width: 100%;
    max-width: 640px;
    justify-self: end;
    margin-top: 0;
  }
  .play-title {
    font-size: 13px;
    height: 42px;
  }
  .steps {
    margin-top: 72px;
  }
  .nf {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    column-gap: 56px;
    min-height: calc(100vh - 220px);
  }
  .nf-scene {
    margin-top: 0;
  }
}
