/*
 * The Earwork Labs homepage. Colours are the app's own (src/app/theme/tokens.css): the dark bench with brass, and a
 * warm paper bench for visitors whose system is light. The type is the app's, Instrument Sans. Controls follow the
 * "Resin" look: softly rounded rectangles, cream lit from within for the main action, smoky for the rest.
 *
 * The raccoons (Rosin and the Bandit mark) are the app's drawings; their rules below are the app's
 * (Raccoon.css, RaccoonMarks.css) cut down to the poses this page uses. Every motion sits inside
 * prefers-reduced-motion: no-preference, so with reduced motion the art simply rests.
 */
@font-face {
  font-family: 'Instrument Sans';
  src: url('instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bench: #1b1a22;
  --surface: #23212b;
  --surface-hover: #292733;
  --line: #2f2d3a;
  --line-strong: #3f3c4c;
  --text: #f3eedf;
  --muted: #aaa5b8;
  --brass: #a8893f;
  --brass-light: #f0d48a;
  --verdigris: #3fb6a8;
  --glow: rgba(240, 212, 138, 0.13);
  --shot-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
  --lift-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.7);

  /* The main action: cream, lit from within. */
  --primary-bg: radial-gradient(120% 150% at 50% -10%, #fff3d2 0%, #f3dc9c 55%, #e9cb82 100%);
  --primary-text: #1b1a22;
  --primary-edge: rgba(255, 255, 255, 0.55);
  --primary-glow: 0 0 0 1px rgba(240, 212, 138, 0.45), 0 10px 30px -10px rgba(240, 212, 138, 0.5);
  --primary-glow-hover: 0 0 0 1px rgba(240, 212, 138, 0.7), 0 14px 38px -10px rgba(240, 212, 138, 0.7);
  --smoky: rgba(255, 255, 255, 0.045);
  --smoky-hover: rgba(255, 255, 255, 0.08);

  /* Rosin and the Bandit (the app's Playful touches tokens). */
  --fur: #c2bdcf;
  --paw: #6b6680;
  --ear-warm: #d7a39a;
  --key-black: #16161c;
  --knob: #f3eedf;
  --bin: #3c3948;
  --mark: var(--brass-light);

  /* The two free apps' own colours (their icons'). */
  --tuner: #aeb6f5;
  --tuner-wood: #5b6bb5;
  --metronome: #f0a888;
  --metronome-wood: #b0623f;
  --drones: #d3bdf2;
  --drones-wood: #8e6fc1;

  --font: 'Instrument Sans', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bench: #f3efe6;
    --surface: #fbf8f1;
    --surface-hover: #fffdf7;
    --line: #e3dccb;
    --line-strong: #cfc6b0;
    --text: #1f1d26;
    --muted: #5d5868;
    --brass: #b69240;
    --brass-light: #7d5a08;
    --verdigris: #17776d;
    --glow: rgba(214, 170, 70, 0.22);
    --shot-shadow: 0 40px 80px -36px rgba(70, 52, 14, 0.45), 0 2px 6px rgba(70, 52, 14, 0.06);
    --card-shadow: 0 1px 2px rgba(70, 52, 14, 0.05);
    --lift-shadow: 0 22px 40px -24px rgba(70, 52, 14, 0.4);

    /* On paper the main action is ink, with the cream inside it. */
    --primary-bg: linear-gradient(#2c2935, #1f1d26);
    --primary-text: #fff3d2;
    --primary-edge: rgba(255, 255, 255, 0.12);
    --primary-glow: 0 10px 24px -12px rgba(31, 29, 38, 0.55);
    --primary-glow-hover: 0 14px 30px -12px rgba(31, 29, 38, 0.7);
    --smoky: rgba(31, 29, 38, 0.04);
    --smoky-hover: rgba(31, 29, 38, 0.075);

    --fur: #9a96a6;
    --paw: #5a566a;
    --ear-warm: #c98a80;
    --key-black: #1f1d26;
    --knob: #ffffff;
    --bin: #c4c1b8;
    /* The Bandit a shade lighter than the text brass, so its eyes show in the mask. */
    --mark: #a47c1c;

    --tuner: #4e54bd;
    --tuner-wood: #878bcc;
    --metronome: #a8431a;
    --metronome-wood: #c58062;
    --drones: #6b4aa8;
    --drones-wood: #a68bd4;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bench);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.top,
main > section,
.foot {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* ---- Header ---- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand .rmark {
  width: 32px;
  height: 32px;
}

.top nav {
  display: flex;
  gap: 4px;
}

.top nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 160ms, background-color 160ms;
}

.top nav a:hover {
  color: var(--text);
  background: var(--smoky);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: 56px 40px;
  text-align: center;
}

/* Lamp light over the bench. */
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -140px;
  width: min(1500px, 100vw);
  height: 900px;
  translate: -50% 0;
  background: radial-gradient(46% 44% at 50% 34%, var(--glow), transparent 100%);
  pointer-events: none;
}

.hero-text {
  max-width: 760px;
  margin-inline: auto;
}

.eyebrow {
  color: var(--brass-light);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(42px, 7.4vw, 88px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.by-ear {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

/* One long bow stroke under "by ear". */
.squiggle {
  position: absolute;
  left: -2%;
  bottom: -0.14em;
  width: 104%;
  height: 0.2em;
  overflow: visible;
}

.squiggle path {
  fill: none;
  stroke: var(--brass-light);
  stroke-width: 3.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
}

.lede {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  margin: 28px auto 0;
  max-width: 34em;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.fine {
  color: var(--muted);
  font-size: 14px;
  margin-top: 18px;
}

.hero-shot {
  position: relative;
  margin: 72px 0 0;
}

/* The window's frame is on the picture, so a narrow screen can show the window larger than itself, cropped. */
.hero-shot picture {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shot-shadow);
  background: var(--surface);
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--smoky);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 160ms, box-shadow 200ms, translate 200ms var(--ease);
}

a.button:hover {
  background: var(--smoky-hover);
  translate: 0 -1px;
}

a.button:active {
  translate: 0 1px;
}

.button.primary {
  background: var(--primary-bg);
  border-color: transparent;
  color: var(--primary-text);
  box-shadow: var(--primary-glow), inset 0 1px 0 var(--primary-edge);
}

a.button.primary:hover {
  background: var(--primary-bg);
  box-shadow: var(--primary-glow-hover), inset 0 1px 0 var(--primary-edge);
}

.button[aria-disabled='true'] {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
  cursor: default;
  font-weight: 500;
}

/* ---- Sections ---- */
main > section:not(.hero) {
  padding-block: 88px 24px;
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 650;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-head .eyebrow {
  margin-bottom: 12px;
}

.section-lede {
  color: var(--muted);
  margin-top: 14px;
  max-width: 36em;
  text-wrap: pretty;
}

/* ---- What Earwork does ---- */
.feature-wrap {
  position: relative;
  margin-top: 44px;
}

.feature-grid {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid li {
  padding: 26px 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: translate 260ms var(--ease), border-color 200ms, background-color 200ms;
}

.feature-grid li:hover {
  translate: 0 -3px;
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.feature-grid p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.55;
}

.glyph {
  display: block;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brass) 16%, transparent);
  fill: none;
  stroke: var(--brass-light);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: rotate 300ms var(--spring), scale 300ms var(--spring);
}

.glyph .dot {
  fill: var(--brass-light);
  stroke: none;
}

.glyph .span {
  fill: color-mix(in srgb, var(--brass-light) 45%, transparent);
  stroke: none;
}

.feature-grid li:hover .glyph {
  rotate: -6deg;
  scale: 1.06;
}

/* The Bandit, looking over the top of the last card in the row. */
.peek {
  position: absolute;
  right: 34px;
  top: -66px;
  width: 84px;
  height: 84px;
}

.peek .rmark {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Free practice apps ---- */
.app-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.app-card {
  --accent: var(--tuner);
  --brass: var(--tuner-wood);
  position: relative;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: translate 300ms var(--ease), border-color 200ms, box-shadow 300ms, background-color 200ms;
}

.app-card--metronome {
  --accent: var(--metronome);
  --brass: var(--metronome-wood);
}

.app-card:hover,
.app-card:focus-visible {
  translate: 0 -5px;
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--card-shadow), 0 26px 50px -28px color-mix(in srgb, var(--accent) 70%, transparent), var(--lift-shadow);
}

.app-card:focus-visible {
  border-radius: 18px;
}

.app-card > img {
  flex: none;
  border-radius: 17px;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
  transition: rotate 400ms var(--spring), scale 400ms var(--spring);
}

.app-card:hover > img {
  rotate: -5deg;
  scale: 1.05;
}

.app-card h3 {
  font-size: 22px;
}

.app-card p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.55;
}

.go {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.arrow {
  display: inline-block;
  transition: translate 240ms var(--ease);
}

.app-card:hover .arrow {
  translate: 5px 0;
}

/* ---- Get Earwork ---- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.download-card--now {
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--brass) 20%, var(--surface)), var(--surface) 62%);
  border-color: color-mix(in srgb, var(--brass) 38%, var(--line));
  box-shadow: var(--card-shadow);
}

.download-card h3 {
  font-size: 22px;
}

.download-card p {
  color: var(--muted);
  font-size: 16px;
  flex: 1;
  margin-bottom: 14px;
}

.soon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Footer ---- */
.foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 120px;
  padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.maker {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 4px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.foot-links a {
  text-decoration: none;
  transition: color 160ms;
}

.foot-links a:hover {
  color: var(--text);
}

/* =====================================================================================================
 * The raccoons
 * ===================================================================================================== */

/* Where a raccoon stands: on the top edge of whatever holds it. Never in the way of a click. */
.perch {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
  user-select: none;
}

.perch .raccoon {
  display: block;
  width: 100%;
  height: 100%;
}

/* On an edge there is no floor to cast a shadow on. */
.perch .raccoon__shadow {
  display: none;
}

/* The hero: Rosin on top of the Earwork window, playing. His feet are at 62.6 of the drawing's 64 units. */
.perch--hero {
  right: 5%;
  bottom: calc(100% - 5px);
  width: clamp(104px, 15vw, 176px);
  aspect-ratio: 1;
}

.note {
  position: absolute;
  width: 11%;
  fill: var(--brass-light);
  stroke: var(--brass-light);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  overflow: visible;
}

.note path {
  fill: none;
}

.note--1 {
  left: 2%;
  top: 6%;
  rotate: -10deg;
}

.note--2 {
  left: 22%;
  top: -12%;
  width: 9%;
  rotate: 8deg;
  opacity: 0.5;
}

.perch--card {
  right: 26px;
  bottom: calc(100% - 3px);
  width: 84px;
  height: 84px;
}

/* Asleep on the installers that are not here yet. */
.perch--nap {
  right: 26px;
  bottom: calc(100% - 3px);
  width: 84px;
  height: 84px;
}

/* The trash panda, on the footer's rule. */
.perch--bin {
  right: 6px;
  bottom: calc(100% - 3px);
  width: 92px;
  height: 92px;
}

/* ---- Rosin (Raccoon.css) ---- */
.raccoon {
  --raccoon-line: 1.5;
  overflow: visible;
  color: var(--key-black);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.raccoon__fur {
  fill: var(--fur);
  stroke: currentColor;
  stroke-width: var(--raccoon-line);
}

.raccoon__paw,
.raccoon__ear-back,
.raccoon__tail-tip {
  fill: var(--paw);
  stroke: currentColor;
  stroke-width: var(--raccoon-line);
}

.raccoon__ear-in {
  fill: var(--ear-warm);
}

.raccoon__light,
.raccoon__eye {
  fill: var(--knob);
}

.raccoon__mask,
.raccoon__nose,
.raccoon__pupil,
.raccoon__board,
.raccoon__tailpiece,
.raccoon__peg-head,
.raccoon__soundhole {
  fill: currentColor;
}

.raccoon__muzzle {
  fill: var(--knob);
  stroke: currentColor;
  stroke-width: calc(var(--raccoon-line) * 0.8);
}

.raccoon__eye,
.raccoon__pupil {
  transform-box: fill-box;
  transform-origin: center;
}

.raccoon__eye-shut {
  fill: none;
  stroke: var(--knob);
  stroke-width: 1.2;
}

.raccoon__mouth,
.raccoon__tuft,
.raccoon__toes {
  fill: none;
  stroke: currentColor;
  stroke-width: calc(var(--raccoon-line) * 0.75);
}

.raccoon__tuft-fill {
  fill: var(--fur);
}

.raccoon__tail-line {
  fill: none;
  stroke: currentColor;
  stroke-width: calc(8px + 2px * var(--raccoon-line));
}

.raccoon__tail-fill {
  fill: none;
  stroke: var(--fur);
  stroke-width: 8;
}

.raccoon__tail-rings {
  fill: none;
  stroke: var(--paw);
  stroke-width: 8;
  stroke-linecap: butt;
  stroke-dasharray: 3.4 3.8;
  stroke-dashoffset: -2.6;
}

.raccoon__limb-line {
  fill: none;
  stroke: currentColor;
  stroke-width: calc(4.4px + 2px * var(--raccoon-line));
}

.raccoon__limb-fill {
  fill: none;
  stroke: var(--fur);
  stroke-width: 4.4;
}

.raccoon__wood {
  fill: var(--brass);
  stroke: currentColor;
  stroke-width: var(--raccoon-line);
}

.raccoon__strings {
  fill: none;
  stroke: var(--knob);
  stroke-width: 0.45;
}

.raccoon__pegs {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
}

.raccoon__scroll-eye {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
}

.raccoon__fhole,
.raccoon__bridge {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
}

.raccoon__fiddle .raccoon__wood {
  stroke-width: calc(var(--raccoon-line) / 0.8);
}

.raccoon__fiddle .raccoon__bridge {
  stroke-width: 1.12;
}

.raccoon__fiddle .raccoon__pegs {
  stroke-width: 1.4;
}

.raccoon__fiddle .raccoon__strings {
  stroke-width: 0.56;
}

.raccoon__fiddle .raccoon__fhole {
  stroke-width: 1.1;
}

.raccoon__bow-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.raccoon__bow-stick {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
}

.raccoon__bow-hair {
  fill: none;
  stroke: var(--knob);
  stroke-width: 0.7;
}

.raccoon__bow-frog {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.raccoon__z {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
}

/* Pivots: the foot at its heel, the head at its neck, the body at its seat (drawing units). */
.raccoon__foot {
  transform-box: view-box;
  transform-origin: 35.6px 60.4px;
}

.raccoon__head {
  transform-box: view-box;
  transform-origin: 32px 35px;
}

.raccoon__body {
  transform-box: view-box;
  transform-origin: 32px 60px;
}

.raccoon__bow,
.raccoon__strum,
.raccoon__peeker {
  transform-box: view-box;
}

.raccoon__fiddle {
  transform-box: view-box;
  transform-origin: 32.6px 37px;
}

.raccoon--listening .raccoon__head {
  rotate: -7deg;
}

.raccoon--playing .raccoon__head {
  rotate: 6deg;
}

.raccoon--asleep .raccoon__head {
  rotate: 16deg;
  translate: 2px 4px;
}

/* The trash panda: a ribbed bin and the section pennant it found. */
.raccoon__bin {
  fill: var(--bin);
  stroke: currentColor;
  stroke-width: var(--raccoon-line);
}

.raccoon__bin-line {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
}

.raccoon__found-stick {
  stroke: currentColor;
  stroke-width: 1.4;
}

.raccoon__found-flag {
  fill: var(--brass);
  stroke: currentColor;
  stroke-width: 1;
}

/* On the dark bench the outline is the bench's own tone: a lighter stick keeps the pennant's pole readable. */
@media (prefers-color-scheme: dark) {
  .raccoon__found-stick {
    stroke: var(--muted);
  }
}

/* ---- The Bandit mark (RaccoonMarks.css) ---- */
.rmark {
  flex: none;
  overflow: visible;
  color: var(--mark);
}

.rmark__ink {
  fill: currentColor;
}

.rmark__mask {
  fill: var(--key-black);
}

.rmark__round {
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.rmark__ink.rmark__round {
  stroke: currentColor;
}

.rmark__mask.rmark__round {
  stroke: var(--key-black);
  stroke-width: 1.2;
}

.rmark__head,
.rmark__ear {
  transform-box: view-box;
}

.rmark__ear--l {
  transform-origin: 9.4px 11.6px;
}

.rmark__ear--r {
  transform-origin: 22.6px 11.6px;
}

.rmark__head {
  transform-origin: 16px 28px;
}

.rmark__eye {
  transform-box: fill-box;
  transform-origin: center;
}

/* =====================================================================================================
 * Motion (none of it with reduced motion)
 * ===================================================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Things arrive as they scroll into view (home.js puts .js on the page and .in on each as it arrives). */
  .js [data-reveal] {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 600ms var(--ease), translate 700ms var(--ease);
  }

  .js [data-reveal].in {
    opacity: 1;
    translate: 0 0;
  }

  .js .feature-grid li:nth-child(3n + 2),
  .js .app-card:nth-child(2),
  .js .download-card:nth-child(2) {
    transition-delay: 80ms;
  }

  .js .feature-grid li:nth-child(3n) {
    transition-delay: 160ms;
  }

  /* The opening: the words, then the window, then Rosin hops up onto it. */
  .hero-text > * {
    animation: rise 700ms var(--ease) both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 60ms;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 140ms;
  }

  .hero-text > :nth-child(4) {
    animation-delay: 220ms;
  }

  .hero-text > :nth-child(5) {
    animation-delay: 300ms;
  }

  .hero-shot picture {
    animation: rise 900ms var(--ease) 260ms both;
  }

  .squiggle path {
    animation: draw 900ms var(--ease) 700ms both;
  }

  .perch--hero {
    animation: hop-on 700ms var(--spring) 1000ms both;
  }

  /* Rosin plays: a slow stroke out and back, the arm with the bow, the fiddle swaying, the foot keeping time. */
  .perch--hero.live .raccoon__bow {
    animation: raccoon-bow 1600ms ease-in-out infinite;
  }

  .perch--hero.live .raccoon__bow-arm > path {
    animation: raccoon-bow-arm 1600ms ease-in-out infinite;
  }

  .perch--hero.live .raccoon__fiddle {
    animation: raccoon-sway 1600ms ease-in-out infinite;
  }

  .perch--hero.live .raccoon__foot {
    animation: raccoon-tap 800ms linear infinite;
  }

  .perch--hero.live .note--1 {
    animation: note-float 3200ms ease-in-out infinite;
  }

  .perch--hero.live .note--2 {
    animation: note-float 3200ms ease-in-out 1600ms infinite;
  }

  /* The Bandit comes up from behind the card, then blinks and flicks an ear now and then. */
  .js .peek[data-reveal] {
    opacity: 1;
    translate: 0 62%;
    transition: translate 800ms var(--spring) 500ms;
  }

  .js .peek[data-reveal].in {
    translate: 0 0;
  }

  .peek.live .rmark__eye {
    animation: blink 5200ms ease-in-out 2s infinite;
  }

  .peek.live .rmark__ear--r {
    animation: flick-r 5200ms ease-out 3s infinite;
  }

  .brand:hover .rmark__ear--r {
    animation: flick-once-r 260ms ease-out;
  }

  .brand:hover .rmark__ear--l {
    animation: flick-once-l 260ms ease-out;
  }

  /* The app cards: a lift and a small wiggle; the tuner's Rosin cocks his head and taps, the metronome's strums. */
  .app-card:hover,
  .app-card:focus-visible {
    animation: wiggle 520ms var(--ease);
  }

  .app-card.live .raccoon__eye {
    animation: blink 4600ms ease-in-out 1s infinite;
  }

  .app-card.live .raccoon__pupil {
    animation: blink-pupil 4600ms ease-in-out 1s infinite;
  }

  .app-card:hover .perch,
  .app-card:focus-visible .perch {
    animation: hop 420ms var(--ease);
  }

  .app-card:hover .raccoon__foot,
  .app-card:focus-visible .raccoon__foot {
    animation: raccoon-tap 500ms linear infinite;
  }

  .app-card:hover .raccoon__strum,
  .app-card:focus-visible .raccoon__strum {
    animation: raccoon-strum 500ms ease-in-out infinite;
  }

  .app-card--tuner:hover .raccoon__head,
  .app-card--drones:hover .raccoon__head,
  .app-card--drones:focus-visible .raccoon__head,
  .app-card--tuner:focus-visible .raccoon__head {
    animation: listen 1400ms ease-in-out infinite;
  }

  .app-card--metronome:hover .raccoon__head,
  .app-card--metronome:focus-visible .raccoon__head {
    animation: nod 500ms ease-out infinite;
  }

  /* Asleep: a slow breath, the z's drifting. */
  .download-card.live .raccoon__body,
  .download-card.live .raccoon__head {
    animation: raccoon-breathe 4.2s ease-in-out infinite;
  }

  .download-card.live .raccoon__z {
    animation: raccoon-z 4.2s ease-in-out infinite;
  }

  /* The trash panda: up out of the bin when the footer arrives, a look round, then it stays to watch. */
  .js .perch--bin[data-reveal] {
    opacity: 1;
    translate: 0 0;
  }

  .js .perch--bin[data-reveal] .raccoon__peeker {
    translate: 0 30px;
  }

  .js .perch--bin[data-reveal].in .raccoon__peeker {
    translate: 0 0;
    animation: rosin-peek 1700ms ease-in-out 300ms backwards;
  }

  .perch--bin.live .raccoon__eye {
    animation: blink 5000ms ease-in-out 3s infinite;
  }

  .perch--bin.live .raccoon__pupil {
    animation: blink-pupil 5000ms ease-in-out 3s infinite;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes hop-on {
  0% {
    opacity: 0;
    translate: 0 26px;
  }
  60% {
    opacity: 1;
  }
}

@keyframes hop {
  40% {
    translate: 0 -5px;
  }
}

@keyframes wiggle {
  0% {
    rotate: 0deg;
  }
  30% {
    rotate: -0.7deg;
  }
  60% {
    rotate: 0.5deg;
  }
  100% {
    rotate: 0deg;
  }
}

@keyframes note-float {
  0% {
    opacity: 0;
    translate: 6px 14px;
  }
  25% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    translate: -10px -22px;
  }
}

@keyframes blink {
  0%,
  4.6%,
  100% {
    scale: 1 1;
  }
  2.3% {
    scale: 1 0.12;
  }
}

@keyframes blink-pupil {
  0%,
  4.6%,
  100% {
    opacity: 1;
  }
  1.2%,
  3.4% {
    opacity: 0;
  }
}

@keyframes flick-r {
  0%,
  6%,
  100% {
    rotate: 0deg;
  }
  2% {
    rotate: 18deg;
  }
  4% {
    rotate: 0deg;
  }
  5% {
    rotate: 12deg;
  }
}

@keyframes flick-once-r {
  35% {
    rotate: 18deg;
  }
}

@keyframes flick-once-l {
  35% {
    rotate: -18deg;
  }
}

@keyframes listen {
  50% {
    rotate: -13deg;
  }
}

@keyframes nod {
  30% {
    translate: 0 1.4px;
  }
}

/* The app's own (Raccoon.css, RosinTouches.css). */
@keyframes raccoon-tap {
  0% {
    rotate: 0deg;
  }
  8% {
    rotate: -17deg;
  }
  22% {
    rotate: 0deg;
  }
  100% {
    rotate: 0deg;
  }
}

@keyframes raccoon-bow {
  50% {
    translate: -4.36px 7.87px;
  }
}

@keyframes raccoon-bow-arm {
  50% {
    d: path('M22.4 41.6L15.2 51.8L31.14 50.87');
  }
}

@keyframes raccoon-sway {
  50% {
    rotate: 1deg;
  }
}

@keyframes raccoon-strum {
  40% {
    translate: 2.2px 2px;
  }
}

@keyframes raccoon-breathe {
  50% {
    scale: 1 1.025;
  }
}

@keyframes raccoon-z {
  0%,
  100% {
    opacity: 0.35;
    translate: 0 0;
  }
  50% {
    opacity: 1;
    translate: 0.6px -1.2px;
  }
}

@keyframes rosin-peek {
  0% {
    translate: 0 30px;
  }
  30% {
    translate: 0 -1px;
  }
  38% {
    translate: 0 0;
    rotate: 0deg;
  }
  58% {
    rotate: -4deg;
  }
  80% {
    rotate: 3deg;
  }
  100% {
    rotate: 0deg;
  }
}

/* ---- Narrower windows ---- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-block: 36px 24px;
  }

  .hero-shot {
    margin-top: 112px;
  }

  .app-card {
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .top,
  main > section,
  .foot {
    width: min(1120px, 100% - 40px);
  }

  .top nav {
    display: none;
  }

  .feature-grid,
  .app-cards,
  .download-grid {
    grid-template-columns: 1fr;
  }

  main > section:not(.hero) {
    padding-block: 64px 16px;
  }

  /* The window runs off the right edge of the screen, at a size its words can be read. */
  .hero-shot {
    margin-top: 128px;
  }

  .hero-shot picture {
    margin-right: -20px;
    border-right: 0;
    border-radius: 11px 0 0 11px;
  }

  .hero-shot img {
    width: 178%;
    max-width: none;
  }

  .perch--hero {
    right: 2%;
  }

  .feature-wrap {
    margin-top: 72px;
  }

  .peek {
    width: 72px;
    height: 72px;
    top: -52px;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .app-cards {
    gap: 96px;
  }

  .app-card,
  .download-card {
    padding: 24px;
  }

  .app-card > img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .download-grid {
    gap: 96px;
  }

  .soon .button {
    flex: 1 1 auto;
  }

  .foot {
    margin-top: 132px;
  }
}

/* ---- Three free apps, and the one coming later ---- */
.app-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-card {
  flex-direction: column;
  gap: 18px;
}

.app-card--drones {
  --accent: var(--drones);
  --brass: var(--drones-wood);
}

.js .app-card:nth-child(3) {
  transition-delay: 160ms;
}

.coming {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
  padding: 22px 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

.coming h3 {
  font-size: 19px;
}

.coming p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 16px;
}

.coming-tag {
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brass-light) 14%, transparent);
  color: var(--brass-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .app-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .app-card {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .coming {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px;
  }
}

/* ---- Coming later: two apps side by side ---- */
.coming {
  align-items: flex-start;
}

.coming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 36px;
  flex: 1;
}

/* ---- Chartsmith (paid) ---- */
.pro-card {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-top: 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}

.pro-icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
}

.pro-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pro-title h3 {
  font-size: 22px;
}

.pro-tag {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--brass-light) 45%, transparent);
  color: var(--brass-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pro-text p {
  color: var(--muted);
  margin: 10px 0 20px;
  font-size: 16px;
  line-height: 1.55;
  max-width: 44em;
}

@media (max-width: 900px) {
  .coming {
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .coming-list {
    grid-template-columns: 1fr;
  }

  .pro-card {
    flex-direction: column;
    gap: 18px;
    padding: 24px;
  }
}

/* Coming-later apps: their icons smaller and quieter than the live apps' */
.coming-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.coming-list img {
  flex: none;
  border-radius: 12px;
  opacity: 0.85;
}

.coming {
  flex-direction: column;
  gap: 18px;
}

/* The owner's statement about Earwork, once, under the opening lede */
.claim {
  margin: 18px auto 0;
  max-width: 36em;
  color: var(--text);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
}

/* Chartsmith's features inside its card */
.pro-features {
  list-style: none;
  margin: 4px 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 32px;
}

.pro-features li {
  border-top: 2px solid color-mix(in srgb, #f58028 70%, transparent);
  padding-top: 12px;
}

.pro-features h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.pro-text .pro-features p {
  margin: 6px 0 0;
  font-size: 15px;
}

.pro-text .pro-next {
  margin: 0 0 18px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .pro-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pro-features {
    grid-template-columns: 1fr;
  }
}

/* Eight features: four across on a wide screen, two otherwise, one on a phone */
.pro-features {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1180px) {
  .pro-features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pro-features {
    grid-template-columns: 1fr;
  }
}

/* ---- Hero: three facts at a glance ---- */
.facts {
  list-style: none;
  margin: 26px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

.facts li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--smoky);
  color: var(--muted);
  font-size: 14px;
}

.facts strong {
  color: var(--text);
  font-weight: 650;
}

/* ---- The practice bar's four tools ---- */
.practice-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: none;
}

.practice-grid li {
  position: relative;
  padding: 24px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

/* A thread through the four cards, like the loop running through them. */
.practice-grid li + li::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 41px;
  width: 18px;
  border-top: 2px dashed color-mix(in srgb, var(--verdigris) 55%, transparent);
}

.step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 2px solid var(--verdigris);
  color: var(--verdigris);
  font-weight: 700;
  font-size: 15px;
}

.practice-grid p,
.room-card li,
.details-group li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.practice-grid p {
  margin-top: 8px;
}

.practice-note {
  margin-top: 22px;
  color: var(--muted);
}

/* ---- The tuner, metronome and drones inside Earwork ---- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.room-card {
  --accent: var(--tuner);
  padding: 26px 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.room-card--metronome {
  --accent: var(--metronome);
}

.room-card--drones {
  --accent: var(--drones);
}

.room-card img {
  display: block;
  border-radius: 14px;
  margin-bottom: 16px;
}

.room-card ul,
.details-group ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.room-card li {
  position: relative;
  padding-left: 18px;
}

.room-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.section-lede a {
  color: var(--brass-light);
  text-underline-offset: 3px;
}

/* ---- The small things ---- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 28px;
  margin-top: 40px;
}

.details-group h3 {
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid color-mix(in srgb, var(--brass) 60%, transparent);
}

.details-group strong {
  color: var(--text);
  font-weight: 600;
}

.only {
  display: inline-block;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  vertical-align: 1px;
}

@media (max-width: 1000px) {
  .practice-grid,
  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-grid li + li::before {
    display: none;
  }
}

@media (max-width: 900px) {
  .room-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .practice-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .facts li {
    font-size: 13px;
  }
}

/* ---- A look inside: screenshots of the app ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 40px 0 0;
}

.gallery figure {
  margin: 0;
}

.gallery .wide {
  grid-column: 1 / -1;
}

.gallery a {
  display: block;
  border-radius: 12px;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--lift-shadow);
  background: var(--surface);
  transition: translate 260ms var(--ease), box-shadow 260ms;
}

.gallery a:hover img {
  translate: 0 -3px;
}

.gallery figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.gallery figcaption strong {
  color: var(--text);
  font-weight: 650;
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ---- The Earwork Labs line, as in the Tuner, Metronome and Drones: the flask, then the words ---- */
.labs-note {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--smoky);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.4;
  text-wrap: balance;
}

.labs-note__flask {
  flex: none;
  width: 14px;
  height: 14px;
  translate: 0 2px;
  fill: none;
  stroke: var(--brass-light);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* In the footer it is one more small line, left-aligned, no pill. */
.labs-note--foot {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  justify-content: flex-start;
  font-size: 13px;
}

@media (max-width: 640px) {
  .labs-note:not(.labs-note--foot) {
    border-radius: 14px;
    text-align: left;
  }
}

.labs-note--apps {
  margin-bottom: 32px;
}
