@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* The plugin's Steel palette, matched to Source/gui/Theme.h. */
:root {
  --deep: #14181d;
  --shallow: #262d34;
  --ink: #e8eef3;
  --mist: #a3b0bc;
  --hero: #4fd2ff;
  --space: #6ee6a0;
  --tone: #3fa9ff;
  --env: #5fe3d2;
  --motion: #8ea2ff;
  --accent: #4fd2ff;
  --on-accent: #10202a;
  --shadow: rgb(0 0 0 / 0.7);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(120% 70% at 15% 0%, var(--shallow), transparent 65%),
    var(--deep);
  background-attachment: fixed;
  transition: background-color 0.4s, color 0.4s;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--hero); text-underline-offset: 0.2em; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--hero); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--deep);
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* Header */
.top {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
}
.wordmark {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark b { font-weight: 700; color: var(--hero); }
.build { margin: 0; color: var(--mist); font-size: 0.9rem; }
.top-link { margin-left: auto; color: var(--ink); font-weight: 500; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow-x: clip;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lede { margin: 0 0 2rem; color: var(--mist); max-width: 34em; }

.downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.dl {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.3rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.dl:hover { border-color: var(--ink); }
.dl.is-primary {
  order: -1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.dl.is-primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
.dl-title { font-weight: 650; font-size: 1.05rem; }
.dl-meta { font-size: 0.85rem; opacity: 0.75; }
.fineprint { margin: 0; font-size: 0.85rem; color: var(--mist); max-width: 34em; }

.hero-shot {
  position: relative;
  margin: 0;
  display: grid;
}
.shot {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 30px 70px -20px var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: opacity 0.45s;
}
/* Only the screenshot for the selected page is visible. */
.shot:not(.shot-browser) { opacity: 0; }
[data-page="envelopes"] .shot-filter,
[data-page="envelopes"] .shot-browser { opacity: 0; }
[data-page="envelopes"] .shot-envelopes { opacity: 1; }
[data-page="browser"] .shot-filter,
[data-page="browser"] .shot-envelopes { opacity: 0; }
[data-page="browser"] .shot-browser { opacity: 1; }

figcaption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--mist);
}
.theme-switch { display: inline-flex; gap: 0.35rem; }
.theme-switch button {
  font: inherit;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-switch button[aria-pressed="true"] {
  border-color: var(--hero);
  background: color-mix(in srgb, var(--hero) 16%, transparent);
}

/* Sections share a measure and rhythm. */
.feature,
.sync,
.controls,
.install,
.notes {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 32rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  justify-content: center;
}
.crops { display: grid; }
.curve-crop {
  grid-area: 1 / 1;
  width: min(30rem, 88vw);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 60px -24px var(--shadow);
  transition: opacity 0.45s;
}
.feature-copy { grid-column: 2; }
.feature-copy p { color: var(--mist); margin: 0 0 1rem; }
.preset-browser {
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}
.preset-browser-copy p { color: var(--mist); margin: 0; }
.preset-browser-figure { margin: 0; }
.preset-browser-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 30px 70px -20px var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
}
.sync {
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.sync-copy p { color: var(--mist); margin: 0 0 1rem; }
.sync-figure { margin: 0; }
.sync-figure svg { width: 100%; height: auto; display: block; }
.sync-figure figcaption { margin-top: 0.75rem; font-size: 0.9rem; color: var(--mist); }
.under-hood { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.under-hood li {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid color-mix(in srgb, var(--hero) 40%, transparent);
  background: color-mix(in srgb, var(--hero) 8%, transparent);
  color: var(--mist);
}
.under-hood li:nth-child(2) { --hero: var(--tone); }
.under-hood li:nth-child(3) { --hero: var(--env); }
.under-hood li:nth-child(4) { --hero: var(--space); }
.under-hood b { display: block; color: var(--hero); font-weight: 700; margin-bottom: 0.2rem; }
.sync .beats line { stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1.5; stroke-dasharray: 4 5; }
.sync .beat-labels text { fill: var(--mist); font-size: 13px; text-anchor: middle; }
.sync .vol { stroke: var(--hero); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sync .flt { stroke: var(--tone); stroke-width: 3.5; fill: none; stroke-linecap: round; }
.sync .legend text { fill: var(--mist); font-size: 13px; dominant-baseline: middle; }

.controls-intro,
.install-intro { color: var(--mist); margin: 0 0 2.25rem; max-width: 40em; }
.groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
/* Outlined like the plugin's own sections, each in its section colour. */
.group {
  --c: var(--hero);
  padding: 1.25rem 1.4rem 0.6rem;
  border-radius: 16px;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: linear-gradient(color-mix(in srgb, var(--c) 12%, transparent), color-mix(in srgb, var(--c) 2%, transparent));
}
.group[data-role="space"] { --c: var(--space); }
.group[data-role="tone"] { --c: var(--tone); }
.group[data-role="env"] { --c: var(--env); }
.group[data-role="motion"] { --c: var(--motion); }
.group h3 { margin: 0 0 0.75rem; color: var(--c); font-size: 1.05rem; font-weight: 650; }
.group dl { margin: 0; }
.group dt { font-weight: 600; }
.group dd { margin: 0 0 0.9rem; color: var(--mist); font-size: 0.95rem; }

.os-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.os h3 { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 650; }
.os ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.os li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.1rem 2.6rem;
  max-width: 34em;
}
.os li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--hero);
  color: var(--hero);
  font-size: 0.85rem;
  font-weight: 650;
}
code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  overflow-wrap: anywhere;
}

.notes ul { margin: 0 0 1.5rem; padding-left: 1.2rem; max-width: 42em; color: var(--mist); }
.notes li { margin-bottom: 0.5rem; }
details summary { cursor: pointer; color: var(--ink); font-weight: 500; }
details pre {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
  color: var(--mist);
}

/* Post-download help */
.install-help {
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1.5px solid color-mix(in srgb, var(--hero) 45%, transparent);
  border-radius: 18px;
  background: linear-gradient(var(--shallow), var(--deep));
  color: var(--ink);
  box-shadow: 0 30px 80px var(--shadow);
}
.install-help::backdrop { background: rgb(0 0 0 / 0.55); backdrop-filter: blur(3px); }
.install-help h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.help-intro { margin: 0 0 1.25rem; color: var(--mist); font-size: 0.95rem; }
.help-steps { display: none; margin: 0 0 1.25rem; padding-left: 1.3rem; }
.help-steps li { margin-bottom: 0.6rem; padding-left: 0.2rem; }
.help-steps li::marker { color: var(--hero); font-weight: 650; }
.install-help[data-os="mac"] .help-steps[data-os="mac"],
.install-help[data-os="windows"] .help-steps[data-os="windows"] { display: block; }
.help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.help-close {
  font: inherit;
  font-weight: 650;
  padding: 0.6rem 1.4rem;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.help-more { font-size: 0.9rem; }

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--mist);
  font-size: 0.9rem;
}
.bottom p { margin: 0; margin-right: auto; }
.bottom a { color: var(--mist); }

@media (max-width: 860px) {
  .sync,
  .preset-browser { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-shot { margin-top: 1rem; }
  .feature { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .feature-copy { grid-column: 1; }
  .sync-figure { max-width: 34rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot,
  .curve-crop,
  body { transition: none; }
}
