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

/* Palettes match the plugin's own themes. */
:root,
[data-theme="kingfisher"] {
  --deep: #07101f;
  --shallow: #10294a;
  --ink: #eaf3ff;
  --mist: #8aa0bd;
  --hero: #36f1cd;
  --space: #36f1cd;
  --tone: #2fc6ff;
  --motion: #4f86ff;
  --accent: #ff9b42;
  --on-accent: #1a0d00;
}

[data-theme="dusk"] {
  --deep: #120a1f;
  --shallow: #3a1638;
  --ink: #fff1ec;
  --mist: #b49aaa;
  --hero: #ffc04d;
  --space: #ff7a5c;
  --tone: #ff4f8b;
  --motion: #b77bff;
  --accent: #ffc04d;
  --on-accent: #241200;
}

*,
*::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;
}
/* Ripple rings centred on the plugin's Decay knob, spreading out behind the screenshot. */
.ripples {
  position: absolute;
  left: 24.4%;
  top: 50.7%;
  width: 190%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 0;
  fill: none;
  stroke: var(--hero);
  stroke-width: 1.5;
  pointer-events: none;
}
.ripples circle { opacity: 0.3; }
.ripples circle:nth-child(2) { opacity: 0.2; }
.ripples circle:nth-child(3) { opacity: 0.12; }
.ripples circle:nth-child(4) { opacity: 0.07; }
.ripples .wave {
  opacity: 0;
  transform-origin: 500px 500px;
  animation: ripple 3.2s cubic-bezier(0.2, 0.6, 0.3, 1) 0.5s 1 both;
}
@keyframes ripple {
  from { transform: scale(1); opacity: 0.45; stroke-width: 3; }
  to { transform: scale(3.4); opacity: 0; stroke-width: 0.6; }
}

.shot {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 30px 70px -20px rgb(0 0 0 / 0.7),
    0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: opacity 0.45s;
}
[data-theme="kingfisher"] .shot-dusk,
[data-theme="dusk"] .shot-kingfisher { opacity: 0; }

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,
.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;
}
.decay-crop {
  grid-area: 1 / 1;
  width: min(20rem, 70vw);
  height: auto;
  transition: opacity 0.45s;
  /* Fade the crop's edges into the page so it doesn't read as a boxed image. */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
.feature-copy { grid-column: 2; }
.feature-copy p { color: var(--mist); margin: 0 0 1rem; }
[data-theme="kingfisher"] .decay-dusk,
[data-theme="dusk"] .decay-kingfisher { opacity: 0; }

.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="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: rgb(0 0 0 / 0.3);
  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 rgb(0 0 0 / 0.6);
}
.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) {
  .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; }
  .decay-crop { width: min(16rem, 70vw); }
}

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