/* Humwren site. One quiet dark frame; each plugin lends only its accent (--accent, set per page or card from
   site.json). Moss appears only in the wren's song marks. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500-latin-ext.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* The site's own colours (round 5). */
  --page: #121314;
  --plate: #1A1B1D;
  --line: #2C2D30;
  --text: #ECECEC;
  --caption: #A3A4A8;
  --moss: #A9CF7A;      /* the wren's song marks only */
  /* Greys the round 5 boards use between those. */
  --body: #C9CACD;      /* paragraphs */
  --outline: #5A5B60;   /* quiet button border */
  --quiet: #4A4B50;     /* empty clip track */
  --hover-line: #3A3B3F;
  /* A plugin's colour; pages and cards set it from site.json. */
  --accent: var(--text);
  --on-accent: var(--page);

  --gutter: 40px;
  --plate-pad: 20px;
  --plate-radius: 10px;
  --shot-radius: 4px;
  --sans: "Archivo", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1152px; margin-inline: auto; padding-inline: var(--gutter); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 10;
  background: var(--text); color: var(--page); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 16px; color: var(--page); }

/* The wren: body in currentColor, song marks in moss. */
.wren { display: block; flex: none; }
.wren .song { fill: var(--moss); }

/* ---------- Top bar ---------- */
.top { border-bottom: 1px solid var(--line); }
.top-row {
  min-height: 76px; padding-block: 10px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 32px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand .wren { width: 42px; height: 42px; color: var(--text); }
.wordmark { font-size: 20px; font-weight: 760; font-stretch: 125%; letter-spacing: 0.02em; text-transform: uppercase; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; font-size: 15px; }
.nav-links a:not(.btn) { display: inline-block; padding-block: 10px; text-decoration: none; }
.nav-links a[aria-current="page"]:not(.btn) { text-decoration: underline; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 6px;
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn--outline { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.btn--outline:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn--quiet { border-color: var(--outline); color: var(--text); font-weight: 500; }
.btn--quiet:hover { border-color: var(--caption); }
.btn--light { min-height: 44px; padding: 0 18px; background: var(--text); color: var(--page); }
.btn--light:hover { background: #FFFFFF; color: var(--page); }

/* ---------- Small labels ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--caption);
}
.eyebrow--accent { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.lede { font-size: 18px; line-height: 1.6; color: var(--body); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px;
}
.section-head h2 { font-size: 30px; font-weight: 700; font-stretch: 125%; line-height: 1.15; }
.section-head .note { font-family: var(--mono); font-size: 13px; color: var(--caption); }

/* ---------- The plate: every screenshot sits on the same one ---------- */
.mount { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plate {
  background: var(--plate); border: 1px solid var(--line); border-radius: var(--plate-radius);
  padding: var(--plate-pad);
}
.plate--accent { border-top: 2px solid var(--accent); }
.shot { width: 100%; border-radius: var(--shot-radius); outline: 1px solid var(--line); }
.mount figcaption { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--caption); overflow-wrap: anywhere; }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; align-items: center;
  padding-block: 64px;
}
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero-title { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; font-stretch: 125%; letter-spacing: -0.015em; line-height: 1.04; }

/* The "not found" page (404.html) */
.not-found { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 96px 120px; }
.not-found > * { max-width: 760px; }
.holding { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 112px 160px; }
.holding > * { max-width: 760px; }
.holding .wren { width: 96px; height: 96px; color: var(--text); }

.plugins { border-top: 1px solid var(--line); padding-top: 48px; }
.plugins .section-head { margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--plate); border: 1px solid var(--line); border-radius: var(--plate-radius); padding: 12px 12px 18px;
}
.card:hover { border-color: var(--hover-line); }
.card-shot { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--shot-radius); outline: 1px solid var(--line); background: var(--page); }
.card-shot img { width: 100%; height: 100%; object-fit: cover; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.card .eyebrow { gap: 8px; font-size: 11px; letter-spacing: 0.06em; }
.card h3 { font-size: 26px; font-weight: 720; font-stretch: 125%; line-height: 1.15; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--plate-radius); }
.card-text { font-size: 15px; line-height: 1.55; color: var(--body); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .play { position: relative; z-index: 1; }
@supports selector(:has(*)) {
  .card h3 a:focus-visible { outline: none; }
  .card:has(h3 a:focus-visible) { outline: 2px solid var(--text); outline-offset: 3px; }
}
.status { font-family: var(--mono); font-size: 12px; color: var(--caption); white-space: nowrap; }
.status--released { color: var(--accent); }

/* ---------- Play buttons (inert until a clip's src is set in site.json) ---------- */
.play {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px;
  padding: 0; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.3; text-align: left; cursor: pointer;
}
.play[aria-disabled="true"] { cursor: default; }
.ring {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--accent); border-radius: 50%;
}
.ring svg { width: 12px; height: 12px; }
.ring .i-play { fill: var(--accent); }
.ring .i-pause { display: none; fill: var(--on-accent); }
.play.is-playing .ring { background: var(--accent); }
.play.is-playing .i-play { display: none; }
.play.is-playing .i-pause { display: block; }
.play--big { justify-content: center; }
.play--big .ring { width: 40px; height: 40px; }

/* ---------- Plugin page ---------- */
.phero { display: grid; padding-block: 48px 40px; }
.phero--wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px 56px; align-items: end; }
.phero--side { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 40px; align-items: center; padding-block: 40px 36px; }
.phero-text { display: flex; flex-direction: column; gap: 20px; container-type: inline-size; }
.phero--side .phero-text { gap: 18px; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--caption); }
.crumbs a { color: var(--caption); }
.crumbs a:hover { color: var(--text); }
/* The name fills at most its column: --chars is the name's length, 0.8em a little over one expanded bold letter
   (DrumLab, the widest so far, measures 0.78em a letter). */
.pname {
  --max: 104px;
  font-size: min(var(--max), calc(100cqi / (var(--chars) * 0.8)));
  font-weight: 760; font-stretch: 125%; letter-spacing: -0.02em; line-height: 0.95;
}
.phero--side .pname { --max: 76px; }
.phero .lede { font-size: 20px; line-height: 1.55; max-width: 660px; }
.phero--side .lede { font-size: 18px; }
.phero .actions { padding-top: 4px; }
.specs {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 24px;
  border-top: 1px solid var(--line); padding-top: 18px; font-size: 15px;
}
.specs dt { padding-top: 2px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--caption); }

/* A released plugin's whole window, below the intro: the plate hugs it. */
.window { width: fit-content; max-width: 100%; margin-inline: auto; }
.window .shot { width: 820px; max-width: 100%; }

.hear { padding-top: 56px; }
.hear .section-head { margin-bottom: 18px; }
.clips li {
  display: grid; grid-template-columns: 44px 220px minmax(0, 1fr) 90px; grid-template-areas: "btn title wave len";
  align-items: center; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line);
}
.clips .play { grid-area: btn; }
.clip-title { grid-area: title; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clip-title strong { font-size: 16px; font-weight: 600; }
.clip-note { font-size: 13px; color: var(--caption); }
/* No clip yet: a quiet flat track where the waveform will go. */
.clip-wave {
  grid-area: wave; height: 36px;
  background: repeating-linear-gradient(90deg, var(--quiet) 0 2px, transparent 2px 5px) center / 100% 3px no-repeat;
}
.clip-length { grid-area: len; font-family: var(--mono); font-size: 12px; color: var(--caption); text-align: right; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding-top: 48px; }
.feature figcaption { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 0; font-family: var(--sans); font-size: 16px; color: var(--body); }
.feature h3 { font-size: 22px; font-weight: 700; font-stretch: 125%; line-height: 1.2; color: var(--text); }
.feature p { line-height: 1.55; }
.feature .mount { gap: 16px; }

/* ---------- Footer ---------- */
main { padding-bottom: 56px; }
.foot { border-top: 1px solid var(--line); }
.foot-row {
  min-height: 84px; padding-block: 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  font-size: 14px; color: var(--caption);
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .wren { width: 26px; height: 26px; color: var(--caption); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-links a { display: inline-block; padding-block: 10px; color: var(--caption); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 48px; }
  .hero-text { max-width: 640px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phero--side { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .phero--side .phero-text { max-width: 640px; }
}
@media (max-width: 820px) {
  .phero--wide { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .specs { max-width: 520px; }
  .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; --plate-pad: 12px; }
  .top-row { min-height: 0; padding-block: 12px 6px; }
  .nav-links { gap: 0 22px; }
  .hero { padding-block: 36px 40px; }
  .holding { padding-block: 64px 96px; }
  .holding .wren { width: 72px; height: 72px; }
  .hero-text { gap: 20px; }
  .lede { font-size: 17px; }
  .phero { padding-block: 32px; }
  .phero .lede { font-size: 18px; }
  .plugins, .features { padding-top: 40px; }
  .hear { padding-top: 44px; }
  .clips li { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "btn title len" "btn wave wave"; gap: 4px 16px; }
  .clip-wave { height: 20px; }
  main { padding-bottom: 44px; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .brand .wren { width: 36px; height: 36px; }
  .wordmark { font-size: 18px; }
  .nav-links { gap: 0 18px; }
}
