/* Keyloom website.
   Colors are the application's own dark theme (src/ui/theme.rs), with the
   accent frozen at Keyloom's green; the same tokens as the Keyloom design
   system. Type is Open Sans and Noto Sans Mono, the fonts the app renders
   with. The page needs no build step: edit, then push. */

:root {
  color-scheme: dark;

  --bg: oklch(0.145 0.006 152);
  --surface: oklch(0.205 0 152);
  --panel: oklch(0.235 0.008 152);
  --sheet: oklch(0.185 0.007 152);
  --fg: oklch(0.93 0.01 152);
  --fg-bright: oklch(0.97 0.01 152);
  --muted: oklch(0.76 0.01 152);
  --eyebrow: oklch(0.75 0.01 152);
  --dim: oklch(0.66 0.01 152);
  --prompt: oklch(0.6 0.008 152);
  --accent: oklch(0.78 0.14 152);
  --accent-hover: oklch(0.83 0.14 152);
  --tint-chip-fg: oklch(0.97 0.02 152);
  --tint-cta-bg: oklch(0.3 0.04 152);
  --tint-cta-border: oklch(0.45 0.07 152);
  --cap-plain-top: oklch(0.325 0.007 152);
  --cap-plain-bottom: oklch(0.275 0.007 152);
  --cap-plain-border: oklch(0.36 0.007 152);
  --cap-plain-fg: oklch(0.9 0.008 152);
  --cap-held-top: oklch(0.5 0.1 152);
  --cap-held-bottom: oklch(0.42 0.09 152);
  --cap-held-fg: oklch(0.99 0.01 152);
  --cap-mapped-top: oklch(0.34 0.032 152);
  --cap-mapped-bottom: oklch(0.285 0.028 152);
  --cap-mapped-border: oklch(0.46 0.075 152);
  --pill-key-bg: oklch(0.31 0.04 152);
  --pill-key-border: oklch(0.44 0.07 152);
  --pill-key-fg: oklch(0.95 0.02 152);
  --pill-app-bg: oklch(0.3 0.05 196);
  --pill-app-border: oklch(0.44 0.07 196);
  --pill-app-fg: oklch(0.92 0.03 196);
  --holding: oklch(0.78 0.13 85);
  --hero-glow: oklch(0.27 0.05 152 / 0.45);
  --lit-ring: oklch(0.78 0.14 152 / 0.25);

  --hairline: rgba(255, 255, 255, 0.09);
  --wash-5: rgba(255, 255, 255, 0.05);
  --wash-7: rgba(255, 255, 255, 0.07);
  --wash-10: rgba(255, 255, 255, 0.1);
  --wash-12: rgba(255, 255, 255, 0.12);
  --shadow-popover: 0 24px 50px rgba(0, 0, 0, 0.7);
  --cap-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);

  --r-panel: 13px;
  --r-popover: 12px;
  --r-row: 9px;
  --r-control: 8px;
  --r-cap: 6px;

  --font-sans: "Open Sans", "Fira Sans", system-ui, sans-serif;
  --font-mono: "Noto Sans Mono", "Fira Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Browsers without oklch() (before 2023) get the same palette in sRGB. */

@supports not (color: oklch(0 0 0)) {
  :root {
  --bg: #080b09;
  --surface: #171717;
  --panel: #1b1f1c;
  --sheet: #101411;
  --fg: #e3eae5;
  --fg-bright: #f0f7f2;
  --muted: #adb3ae;
  --eyebrow: #a9b0ab;
  --dim: #8e948f;
  --prompt: #7d827e;
  --accent: #6ad18a;
  --accent-hover: #7be19a;
  --tint-chip-fg: #ecf9ef;
  --tint-cta-bg: #1e3424;
  --tint-cta-border: #356042;
  --cap-plain-top: #323532;
  --cap-plain-bottom: #252926;
  --cap-plain-border: #3a3e3b;
  --cap-plain-fg: #dae0db;
  --cap-held-top: #2f7346;
  --cap-held-bottom: #1e5b34;
  --cap-held-fg: #f7fef8;
  --cap-mapped-top: #2c3d30;
  --cap-mapped-bottom: #202e23;
  --cap-mapped-border: #356443;
  --pill-key-bg: #203626;
  --pill-key-border: #325e3f;
  --pill-key-fg: #e5f3e8;
  --pill-app-bg: #023536;
  --pill-app-border: #105e5f;
  --pill-app-fg: #cfebeb;
  --holding: #ddb049;
  --hero-glow: rgba(17, 45, 26, 0.45);
  --lit-ring: rgba(106, 209, 138, 0.25);
  }
}

/* ---- Base ------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

/* ---- Header ---------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: clamp(60px, 5vw, 72px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-bright);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--fg-bright);
}

.brand img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--fg-bright);
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  background: radial-gradient(70% 45% at 50% 0%, var(--hero-glow), transparent 70%);
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(48px, 6vw, 88px) clamp(56px, 6.7vw, 96px);
}

.hero h1 {
  margin: 18px 0 0;
  max-width: 860px;
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg-bright);
  text-wrap: balance;
}

.hero .lead {
  margin: clamp(16px, 1.5vw, 22px) 0 0;
  max-width: 640px;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
  color: var(--muted);
  text-wrap: pretty;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 2.2vw, 32px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-row);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.shot {
  width: 100%;
  margin: clamp(40px, 4.4vw, 64px) 0 0;
  border: 1px solid var(--wash-12);
  border-radius: clamp(8px, 0.8vw, 12px);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-popover);
}

.shot img {
  display: block;
  width: 100%;
}

/* ---- Steps ----------------------------------------------------------- */

.steps {
  background: var(--surface);
  border-block: 1px solid var(--wash-7);
}

.steps-list {
  margin: 0;
  padding: clamp(40px, 3.9vw, 56px) 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tint-cta-border);
  border-radius: var(--r-control);
  background: var(--tint-cta-bg);
  color: var(--tint-chip-fg);
  font-size: 15px;
  font-weight: 600;
}

.step h3 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--fg-bright);
}

.step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Sections -------------------------------------------------------- */

.section .wrap {
  padding-block: clamp(56px, 7.2vw, 104px);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-bright);
  text-wrap: balance;
}

.section-header p {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* ---- Feature cards --------------------------------------------------- */

.cards {
  margin: clamp(32px, 3.3vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 1.9vw, 28px);
  border: 1px solid var(--wash-7);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.card figure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 96px;
  margin: 0;
  padding: 0 12px;
  border-radius: var(--r-row);
  background: var(--sheet);
}

.card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--fg-bright);
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* Illustrations: key caps, pills and chips drawn the way the app draws them. */

.cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 50px;
  height: 50px;
  border: 1px solid var(--cap-plain-border);
  border-radius: var(--r-cap);
  background: linear-gradient(var(--cap-plain-top), var(--cap-plain-bottom));
  color: var(--cap-plain-fg);
  box-shadow: var(--cap-shadow);
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
}

.cap small {
  font-size: 9px;
  line-height: 11px;
  font-weight: 400;
  color: var(--muted);
}

.cap strong {
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  color: var(--accent);
}

.cap .hint {
  font-size: 8px;
  line-height: 10px;
  color: var(--muted);
}

.cap--mapped {
  border-color: var(--cap-mapped-border);
  background: linear-gradient(var(--cap-mapped-top), var(--cap-mapped-bottom));
}

.cap--held {
  border-color: var(--cap-held-top);
  background: linear-gradient(var(--cap-held-top), var(--cap-held-bottom));
  color: var(--cap-held-fg);
  font-weight: 600;
}

.cap--held small {
  font-size: 8px;
  line-height: 10px;
  color: var(--cap-held-fg);
}

.cap--lit {
  box-shadow: 0 0 0 3px var(--lit-ring), var(--cap-shadow);
}

.cap--wide {
  width: 56px;
  height: 56px;
}

.cap--sm {
  width: 42px;
  height: 44px;
}

.cap--fkey {
  width: 44px;
  height: 40px;
}

.row {
  display: flex;
  gap: 6px;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stack .label {
  font-size: 11px;
  line-height: 14px;
  color: var(--dim);
}

.card figure .stack + .stack {
  margin-left: 16px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: 8px;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend div span:first-child {
  width: 34px;
  font-size: 11px;
  line-height: 14px;
  color: var(--dim);
}

.pill-key,
.pill-app {
  padding: 3px 8px;
  border: 1px solid var(--pill-key-border);
  border-radius: var(--r-cap);
  background: var(--pill-key-bg);
  color: var(--pill-key-fg);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-app {
  border-color: var(--pill-app-border);
  background: var(--pill-app-bg);
  color: var(--pill-app-fg);
}

.chord {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.chord .pill-key {
  padding: 4px 9px;
}

.chord .op {
  font-size: 12px;
  color: var(--dim);
}

.chord .arrow {
  margin: 0 4px;
  font-size: 14px;
  color: var(--accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--wash-10);
  border-radius: var(--r-control);
  background: var(--wash-5);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.dot--holding {
  background: var(--holding);
}

.caret {
  font-size: 9px;
  color: var(--dim);
}

.readout {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  color: var(--muted);
}

/* ---- Install --------------------------------------------------------- */

.installer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: clamp(28px, 2.8vw, 40px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs:empty {
  display: none;
}

.tab,
.pill,
.copy {
  border: 1px solid var(--wash-10);
  border-radius: var(--r-control);
  background: var(--wash-5);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.pill {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.copy {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  color: var(--fg);
  font-size: 13px;
}

.tab:hover,
.pill:hover,
.copy:hover {
  background: var(--wash-10);
}

.tab[aria-pressed="true"],
.pill[aria-pressed="true"] {
  border-color: var(--tint-cta-border);
  background: var(--tint-cta-bg);
  color: var(--tint-chip-fg);
}

.copy.is-done {
  color: var(--accent);
}

.distro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.version {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* With scripting, the tabs name the distribution and version, so the
   headings only need to reach assistive technology. Without it, every
   block shows in order under its heading, the way the README reads. */

.js .distro-title,
.js .version-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.js .distro:not(.is-active),
.js .version:not(.is-active) {
  display: none;
}

.no-js .copy {
  display: none;
}

.distro-title {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--fg-bright);
}

.version-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--muted);
}

.terminal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(16px, 1.7vw, 24px);
  border: 1px solid var(--wash-12);
  border-radius: var(--r-popover);
  background: var(--sheet);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--muted);
}

.terminal pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 22px;
  color: var(--fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal code {
  font: inherit;
}

.terminal .line::before {
  content: "$ ";
  color: var(--prompt);
  user-select: none;
}

.note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dim);
}

.note code {
  font-family: var(--font-mono);
  font-size: 13px;
}

.download {
  margin: clamp(28px, 2.8vw, 40px) 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(28px, 2.8vw, 40px) clamp(32px, 3.3vw, 48px);
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
}

.footer-brand strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-bright);
}

.footer-brand span {
  font-size: 14px;
  line-height: 20px;
  color: var(--dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--fg-bright);
}
