/* Hallmark · shape: the plugin's own window, one look at a time · genre: atmospheric · theme: custom (inherited: the plugin's four looks, src/plugin/Theme.cpp) · job: try (download) · idea: "The page wears the plugin: pick a look and the page and its moving disc change with it, then play its real presets" · vibe: "the plugin window, opened up into a page"
 * paper: per look (Disc #FBFBFE, Glow #FDFDFF, Droplet #07070B, Halo #FEFEFF) · accent: per look (cobalt, ink, pale ink, halo blue) · display: the plugin's title faces (Helvetica Neue, Young Serif, Geist, Newsreader italic) · body: Helvetica Neue, Manrope, Geist · hero: the plugin's live disc shader bleeding off the right edge, the head and download on the left · nav: wordmark, the look switch, one action · footer: one row, wordmark, line, links · imagery: the product (its real presets, playable in the page) · signature: the look switch that re-skins the page and the disc, and the presets you can play
 * axes: per-look/grotesk-mixed/per-look · posture: product-led · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, a download page has little to argue; the playable presets make the case by letting people hear it */
/* Hallmark · waive 37 · each look sets at most two families (Disc one, Glow and Halo two, Droplet one); the switch shows one look at a time · the five faces are the plugin's own four looks, so the page matches the window it sells */
/* Hallmark · dismissed F7 · the pills wrap groups of controls (the look switch, the sound and computer switches), shaped like the plugin's own segmented pills; the skip link is a control too */
/* Hallmark · dismissed 3 · five columns on desktop, each holds the plugin control it describes (a text field, two buttons, a chat, knobs), not icon tiles */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --nav-height: 76px;
  --hero-text: 34rem;
  /* Each look's own colours, for the switch's swatches whatever look is on. */
  --swatch-glow-a: #FFE07A; --swatch-glow-b: #FF7749; --swatch-glow-c: #8E9BFF;
  --swatch-droplet-b: #D9468F; --swatch-droplet-c: #07070B;
  --swatch-disc-a: #FEFEFF; --swatch-disc-c: #1450F0;
  --swatch-halo-a: #FFF6D6; --swatch-halo-b: #FF7A45; --swatch-halo-c: #5B79FF;
}

body { font-size: 1.0625rem; }
h1, h2 { font-weight: var(--display-weight); font-style: var(--display-style); letter-spacing: var(--tracking-display); line-height: 1.04; color: var(--color-ink); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); line-height: 1.25; color: var(--color-ink); }
p, dd, li { color: var(--color-muted); }

.skip { position: absolute; left: var(--space-md); top: -100px; z-index: var(--z-tooltip); background: var(--color-accent); color: var(--color-accent-ink); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); }
.skip:focus-visible { top: var(--space-md); }

/* Buttons and links: the plugin's pill. Eight states each. */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--space-lg);
  border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink);
  font-weight: 600; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.button:hover { background: color-mix(in oklab, var(--color-accent) 86%, var(--color-ink)); }
.button:active { transform: scale(0.98); }
.button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.button[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.button-small { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
:root[data-look="droplet"] .button:hover { background: color-mix(in oklab, var(--color-accent) 82%, var(--color-paper)); }

.link { color: var(--color-ink); font-weight: 600; text-underline-offset: 0.25em; transition: color var(--dur-short) var(--ease-out); }
.link:hover { color: var(--color-highlight); }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; transition: none; }

/* Nav: wordmark, the look switch, one action. */
.nav {
  position: sticky; top: 0; z-index: var(--z-sticky-nav); height: var(--nav-height);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-md);
  background: color-mix(in oklab, var(--color-paper) 88%, transparent); backdrop-filter: blur(14px);
}
.nav .button { justify-self: end; }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 600; color: var(--color-ink); text-decoration: none; font-size: var(--text-lg); }
.wordmark:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 6px; }
.mark { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--color-paper-2), var(--color-highlight) 60%, var(--color-ink)); }

.looks { display: flex; gap: var(--space-2xs); padding: var(--space-2xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface); }
.looks button {
  display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 36px; padding: 0 var(--space-sm) 0 var(--space-xs);
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.looks button:hover { color: var(--color-ink); background: color-mix(in oklab, var(--color-ink) 7%, transparent); }
.looks button[aria-checked="true"] { background: var(--color-paper-3); color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-rule); }
.looks button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.swatch { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 18%, transparent); }
.swatch-glow { background: radial-gradient(circle at 35% 35%, var(--swatch-glow-a), var(--swatch-glow-b) 55%, var(--swatch-glow-c)); }
.swatch-droplet { background: radial-gradient(circle at 40% 35%, var(--swatch-droplet-b), var(--swatch-droplet-c) 75%); }
.swatch-disc { background: radial-gradient(circle, var(--swatch-disc-a) 0 22%, var(--swatch-disc-c) 70%); }
.swatch-halo { background: radial-gradient(circle, var(--swatch-halo-a) 0 30%, var(--swatch-halo-b) 52%, var(--swatch-halo-c) 80%); }

/* Hero: the plugin's live disc off the right edge, the head on the left. */
.hero { position: relative; min-height: min(calc(100svh - var(--nav-height)), 860px); display: grid; align-items: center; isolation: isolate; }
.disc {
  position: absolute; inset: 0 0 0 30%; width: 70%; height: 100%; z-index: -1;
  -webkit-mask-image: linear-gradient(to right, transparent, currentColor 28%); mask-image: linear-gradient(to right, transparent, currentColor 28%);
}
html:not(.has-gl) .disc { display: none; }
html:not(.has-gl) .hero { background: radial-gradient(60% 70% at 72% 50%, var(--color-paper-3), var(--color-paper) 70%); }
.hero-grid { padding-block: var(--space-2xl); }
.hero-text { max-width: var(--hero-text); }
.hero h1 { font-size: var(--text-display); }
.lead { margin-top: var(--space-lg); font-size: var(--text-lead); color: var(--color-ink); max-width: 30ch; }
.actions { margin-top: var(--space-xl); display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-lg); }
.terms { margin-top: var(--space-md); font-size: var(--text-sm); max-width: 44ch; }

/* Sections share one rhythm. */
main > section:not(.hero) { margin-top: var(--section-gap); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.section-head h2, .how h2, .versions h2 { font-size: var(--text-section); }
.section-head p { max-width: 42ch; }

/* Five steps, each with the control it's about, drawn in the current look. */
.how h2 { margin-bottom: var(--space-2xl); max-width: 16ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap-columns); counter-reset: step; }
.steps li { counter-increment: step; }
.steps h3::before { content: counter(step) ". "; color: var(--color-highlight); }
.steps p { margin-top: var(--space-xs); font-size: var(--text-md); }
.demo { height: 132px; margin-bottom: var(--space-lg); display: flex; align-items: center; justify-content: center; gap: var(--space-xs); border-radius: var(--radius-card); background: var(--color-paper-2); padding: var(--space-md); }
.field { display: block; width: 100%; padding: var(--space-sm) var(--space-md); border-radius: 18px; background: var(--color-surface); border: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); font-size: var(--text-sm); line-height: 1.4; }
.caret { display: inline-block; vertical-align: -3px; width: 2px; height: 1.1em; margin-left: var(--space-3xs); background: var(--color-highlight); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pill { display: inline-flex; align-items: center; min-height: 46px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
.pill-accent { background: var(--color-accent); color: var(--color-accent-ink); }
.pill-paste { background: var(--color-paste); color: var(--color-on-paste); }
.demo-chat { flex-direction: column; align-items: stretch; }
.bubble { padding: var(--space-xs) var(--space-sm); border-radius: 14px; font-size: var(--text-xs); background: var(--color-surface); color: var(--color-ink); border: var(--rule-hair) solid var(--color-rule); max-width: 85%; }
.bubble-you { align-self: flex-end; background: var(--color-accent); color: var(--color-accent-ink); border-color: transparent; }
.demo-knobs svg { width: 52px; height: 52px; }
.demo-knobs path { fill: none; stroke-width: 6; stroke-linecap: round; }
.demo-knobs .track { stroke: color-mix(in oklab, var(--color-ink) 14%, transparent); }
.demo-knobs .value { stroke: var(--color-highlight); }

/* The explorer: one real preset per family, playing in the browser. */
.explorer-grid { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: var(--gap-columns); align-items: start; }
.preset-list { display: grid; gap: var(--space-lg); max-height: 44rem; overflow-y: auto; padding-right: var(--space-xs); }
.preset-group ul { list-style: none; margin: var(--space-2xs) 0 0; padding: 0; display: grid; gap: var(--space-3xs); }
.group-name { font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); padding-left: var(--space-md); }
.preset {
  width: 100%; display: grid; gap: var(--space-3xs); text-align: left; padding: var(--space-sm) var(--space-md); border: 0; border-radius: 14px;
  background: transparent; color: var(--color-ink); cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}
.preset:hover { background: color-mix(in oklab, var(--color-ink) 6%, transparent); }
.preset[aria-pressed="true"] { background: var(--color-paper-3); box-shadow: inset 3px 0 0 var(--color-highlight); }
.preset:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.preset-name { font-weight: 600; }

.player { background: var(--color-paper-2); border-radius: var(--radius-card); padding: var(--space-xl); min-width: 0; }
.player-name { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: var(--text-2xl); }
.player-about { margin-top: var(--space-xs); }
.request { margin: var(--space-lg) 0 0; padding-left: var(--space-md); border-left: 3px solid var(--color-highlight); }
.request figcaption { font-size: var(--text-xs); color: var(--color-muted); }
.request blockquote { margin: var(--space-2xs) 0 0; color: var(--color-ink); font-size: var(--text-lg); }

.knobs { margin-top: var(--space-xl); display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--space-sm); }
.knob {
  display: grid; justify-items: center; gap: var(--space-2xs); padding: var(--space-md) var(--space-xs); border-radius: 18px;
  background: var(--color-surface); border: var(--rule-hair) solid var(--color-rule); cursor: ns-resize; touch-action: none; user-select: none;
  transition: border-color var(--dur-short) var(--ease-out);
}
.knob:hover, .knob.is-dragging { border-color: var(--color-highlight); }
.knob:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.knob svg { width: 56px; height: 56px; }
.knob path { fill: none; stroke-width: 5; stroke-linecap: round; }
.knob .track { stroke: color-mix(in oklab, var(--color-ink) 14%, transparent); }
.knob .value { stroke: var(--color-highlight); }
.knob-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.knob-value { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }

.transport { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.play { min-width: 7rem; }
.sources { display: flex; flex-wrap: wrap; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); border: var(--rule-hair) solid var(--color-rule); background: var(--color-surface); }
.sources button, .own {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.sources button:hover, .own:hover { color: var(--color-ink); }
.sources button[aria-checked="true"], .own.is-on { background: var(--color-paper-3); color: var(--color-ink); }
.sources button:focus-visible, .own:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
.own input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.own[data-error]::after { content: attr(data-error); margin-left: var(--space-xs); color: var(--color-error); }
.original { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.original input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-accent); cursor: pointer; }
.original input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Free and full. */
.versions h2 { margin-bottom: var(--space-2xl); }
.version { border-top: 2px solid var(--color-ink); padding-top: var(--space-lg); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-lg); max-width: 40rem; }
.version ul { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-xs); }
.version li { color: var(--color-ink); }
.soon { font-weight: 600; color: var(--color-ink); }

/* Install: a Mac and a Windows tab. Without JavaScript both show. */
.platforms { display: inline-flex; gap: var(--space-2xs); padding: var(--space-2xs); margin-bottom: var(--space-xl); border-radius: var(--radius-pill); border: var(--rule-hair) solid var(--color-rule); background: var(--color-surface); }
.platforms button {
  min-height: 40px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--color-muted); font-weight: 600; font-size: var(--text-sm); cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.platforms button:hover { color: var(--color-ink); }
.platforms button[aria-selected="true"] { background: var(--color-paper-3); color: var(--color-ink); }
.platforms button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
html:not(.has-tabs) .platforms { display: none; }
html:not(.has-tabs) .install-panel + .install-panel { margin-top: var(--space-2xl); }
.install-panel[hidden] { display: none; }

/* Install. */
.install { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); counter-reset: install; }
.install li { counter-increment: install; border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-lg); }
.install h3::before { content: counter(install) ". "; color: var(--color-highlight); }
.install p { margin-top: var(--space-xs); }
.install b { color: var(--color-ink); }
.download .actions { margin-top: var(--space-2xl); }
.download .terms { margin-top: 0; }

/* Footer: one row. */
.footer { margin-top: var(--section-gap); border-top: var(--rule-hair) solid var(--color-rule); }
.footer-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-lg); padding-block: var(--space-xl); }
.footer p { font-size: var(--text-sm); }
.footer nav { display: flex; gap: var(--space-lg); }
.footer nav a { color: var(--color-ink); font-size: var(--text-sm); transition: color var(--dur-short) var(--ease-out); }
.footer nav a:hover { color: var(--color-highlight); }
.footer nav a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }

@media (max-width: 72rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-2xl); }
}
@media (max-width: 60rem) {
  .nav { grid-template-columns: 1fr auto; height: auto; padding-block: var(--space-sm); row-gap: var(--space-sm); }
  .looks { grid-column: 1 / -1; grid-row: 2; justify-self: start; overflow-x: auto; max-width: 100%; }
  .disc { inset: 0; width: 100%; opacity: 0.55; -webkit-mask-image: none; mask-image: none; }
  .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--space-md); }
  .install, .explorer-grid { grid-template-columns: minmax(0, 1fr); }
  .preset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; }
  .player { padding: var(--space-lg); }
  .footer-row { grid-template-columns: minmax(0, 1fr); }
}
/* Phones get their own parts, not the desktop ones stacked: a one-row nav, steps and
   presets that scroll sideways, each section opened by a rule, and tighter spacing
   inside a section than between sections. */
@media (max-width: 40rem) {
  :root { --nav-height: 60px; }
  body { font-size: var(--text-md); }

  /* Nav: one row. The look switch shows its swatches; the hero carries the download. */
  .nav { grid-template-columns: minmax(0, 1fr) auto; height: var(--nav-height); padding-block: 0; }
  .nav .button { display: none; }
  .looks { grid-column: auto; grid-row: auto; justify-self: end; overflow: visible; }
  .looks button { width: 36px; padding: 0; gap: 0; justify-content: center; font-size: 0; }

  /* Hero: the disc fills the first screen, the words sit at its foot. */
  .hero { min-height: calc(100svh - var(--nav-height)); align-items: end; }
  .hero-grid { padding-block: var(--space-3xl) var(--space-xl); }
  .lead { margin-top: var(--space-md); }
  .actions { margin-top: var(--space-lg); gap: var(--space-md); }
  .hero .actions .button { flex: 1 1 100%; }

  /* Sections: a rule across the screen opens each one. */
  main > section:not(.hero) { margin-top: 0; padding-top: var(--space-2xl); padding-bottom: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
  main > section.how { border-top: 0; }
  .section-head h2, .how h2, .versions h2 { font-size: 2.25rem; line-height: 1.06; }
  .section-head { gap: var(--space-sm); margin-bottom: var(--space-xl); }
  .how h2, .versions h2 { margin-bottom: var(--space-xl); }
  h3 { font-size: 1.125rem; }

  /* Steps: one card at a time, the next one peeking in. */
  .steps {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: var(--space-sm);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .steps::-webkit-scrollbar { display: none; }
  .steps li { scroll-snap-align: start; }
  .demo { height: 112px; margin-bottom: var(--space-md); }
  .steps p { font-size: var(--text-sm); }

  /* Presets: a row of chips that scrolls sideways, right above the player. */
  .explorer-grid { gap: var(--space-md); }
  .preset-list {
    position: relative; display: flex; gap: var(--space-md); overflow-x: auto; scrollbar-width: none; padding-block: var(--space-2xs);
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .preset-list::-webkit-scrollbar { display: none; }
  .preset-group { flex: none; display: flex; align-items: center; gap: var(--space-xs); }
  .preset-group ul { display: flex; gap: var(--space-2xs); margin: 0; }
  .group-name { padding-left: 0; white-space: nowrap; }
  .preset {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-md); white-space: nowrap;
    border-radius: var(--radius-pill); border: var(--rule-hair) solid var(--color-rule); background: var(--color-surface);
  }
  .preset[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); border-color: transparent; box-shadow: none; }
  .preset[aria-pressed="true"]:hover { background: var(--color-accent); }

  .player { padding: var(--space-lg) var(--space-md); }
  .player-name { font-size: var(--text-xl); }
  .request blockquote { font-size: var(--text-md); }
  .knobs { margin-top: var(--space-lg); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); }
  .knob { padding: var(--space-sm) var(--space-2xs); }
  .knob svg { width: 44px; height: 44px; }
  .transport { margin-top: var(--space-lg); gap: var(--space-sm); }
  .play { flex: 1 1 100%; }
  .sources { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius-card); }
  .sources button, .own { justify-content: center; width: 100%; }

  /* Buying and installing. */
  .version { border-top: 0; padding-top: 0; }
  .platforms { display: flex; margin-bottom: var(--space-lg); }
  .platforms button { flex: 1; }
  .install { gap: var(--space-lg); }
  .install li { padding-top: var(--space-md); }
  .download .actions { margin-top: var(--space-xl); }
  .download .actions .button { flex: 1 1 100%; }
  .footer { margin-top: var(--space-2xl); }
}
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}
