/* MenuMeters website. The palette is taken from the meters themselves:
   user CPU blue, system CPU red, transmit green, wired-memory maroon. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-2: #4b505b;
  --ink-3: #6e7480;
  --rule: #dcdfe5;
  --blue: #2f6feb;
  --blue-ink: #ffffff;
  --red: #d9443a;
  --green: #2f9a46;
  --maroon: #7d2948;
  --bar-top: #f4f4f6;
  --bar-bottom: #e4e5e9;
  --bar-edge: rgba(0, 0, 0, 0.08);
  --menubar: rgba(246, 247, 249, 0.72);
  --menubar-hover: rgba(0, 0, 0, 0.08);

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121417;
    --surface: #1a1d22;
    --ink: #eceef2;
    --ink-2: #b0b6c1;
    --ink-3: #8b929e;
    --rule: #2c3038;
    --blue: #5b8def;
    --blue-ink: #0b1220;
    --red: #f0675c;
    --green: #5fcb6a;
    --maroon: #c25b7f;
    --bar-top: #2b2e33;
    --bar-bottom: #23262b;
    --bar-edge: rgba(255, 255, 255, 0.08);
    --menubar: rgba(24, 26, 30, 0.7);
    --menubar-hover: rgba(255, 255, 255, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

code { font-family: var(--mono); font-size: 0.88em; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 40px; }

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

h1, h2, h3 {
  font-family: var(--sans);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 22px;
  font-weight: 640;
  line-height: 1.25;
}

p { margin: 0 0 1em; }

.section { padding: clamp(80px, 11vw, 140px) 0; }

.section-intro {
  max-width: 38em;
  margin-top: 20px;
  font-size: 19px;
  color: var(--ink-2);
}

/* The site header is a menu bar. */

.menubar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px;
  background: var(--menubar);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--bar-edge);
  font-family: var(--system);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.menubar-menus { display: flex; align-items: center; min-width: 0; }

.menubar-menus a {
  color: inherit;
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.menubar-menus a:hover { background: var(--menubar-hover); }

.menubar-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.menubar-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.menubar-status img { height: 21px; width: auto; }
.menubar-clock { padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .menubar-menus a:not(.menubar-app):not([href="#download"]) { display: none; }
  .hide-narrow { display: none; }
}
@media (max-width: 420px) {
  .menubar-clock { display: none; }
}

/* Hero */

.hero {
  padding: clamp(120px, 16vw, 180px) 0 clamp(8px, 2vw, 24px);
  overflow: hidden;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 0 28px -8px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 12em;
}

.lead {
  max-width: 34em;
  margin: 28px 0 36px;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--blue-ink);
  font-weight: 640;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid transparent;
}
.button:hover { filter: brightness(1.06); }

.button-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.button-quiet:hover { background: var(--surface); filter: none; }

.fineprint {
  max-width: 40em;
  margin-top: 22px;
  font-size: 15px;
  color: var(--ink-3);
}

/* The loupe: the meters at three times their size. */

.loupe {
  --zoom: 3;
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loupe-bar {
  display: flex;
  align-items: center;
  gap: calc(9px * var(--zoom));
  padding: calc(4px * var(--zoom)) calc(14px * var(--zoom));
  border-radius: calc(8px * var(--zoom));
  background: linear-gradient(var(--bar-top), var(--bar-bottom));
  border: 1px solid var(--bar-edge);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 30px 60px -30px rgba(20, 30, 60, 0.35);
}
.loupe-bar img { zoom: var(--zoom); }

.loupe figcaption {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

@media (max-width: 1100px) { .loupe { --zoom: 2.2; } }
@media (max-width: 860px)  { .loupe { --zoom: 1.8; } }
@media (max-width: 660px)  { .loupe { --zoom: 1.4; } }
@media (max-width: 500px)  { .loupe { --zoom: 1.1; } }
@media (max-width: 400px)  { .loupe { --zoom: 0.95; } }

/* The four meters */

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px 64px;
  margin-top: 72px;
}
@media (max-width: 860px) { .meter-grid { grid-template-columns: 1fr; gap: 56px; } }

.meter {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.meter h3 { font-size: 26px; font-weight: 680; }
.meter > p { margin: 12px 0 28px; color: var(--ink-2); max-width: 32em; }

.variants {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 18px;
  font-size: 14px;
  color: var(--ink-3);
}
.variants li { display: flex; flex-direction: column; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 66px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(var(--bar-top), var(--bar-bottom));
  border: 1px solid var(--bar-edge);
}
.chip img { zoom: 2; }

/* Menus and preferences, on a dark band in either theme */

.showcase {
  background:
    radial-gradient(900px 520px at 72% 18%, #27324d 0%, transparent 70%),
    radial-gradient(700px 480px at 12% 90%, #2a2036 0%, transparent 70%),
    #13151b;
  color: #e8eaed;
}
.showcase a { color: #7ea6f5; }

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.15fr);
  grid-template-areas:
    "text cpu prefs"
    "disk cpu prefs";
  gap: 48px 40px;
  align-items: start;
}
.showcase-text { grid-area: text; }
.showcase-text p { color: #b4bac5; font-size: 18px; max-width: 30em; }
.showcase-text h2 { margin-bottom: 24px; }
.shot-cpu { grid-area: cpu; }
.shot-disk { grid-area: disk; }
.shot-prefs { grid-area: prefs; }

.shot { margin: 0; }
.shot img { margin: 0 auto; }
.shot figcaption {
  margin-top: 4px;
  font-size: 14px;
  color: #8f96a3;
  text-align: center;
}
.shot-prefs img {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.shot-prefs figcaption { margin-top: 18px; }

@media (max-width: 1000px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "text text"
      "cpu disk"
      "prefs prefs";
  }
  .shot-prefs img { max-width: 520px; }
}
@media (max-width: 620px) {
  .showcase-grid { grid-template-columns: 1fr; grid-template-areas: "text" "cpu" "disk" "prefs"; }
}

/* History */

.timeline {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  max-width: 920px;
}

.timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 40px;
  position: relative;
}

.timeline .when {
  margin: 0;
  padding-top: 2px;
  font-size: 24px;
  font-weight: 680;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.timeline .what {
  position: relative;
  padding: 0 0 52px 36px;
  border-left: 2px solid var(--rule);
}
.timeline li:last-child .what { border-left-color: transparent; padding-bottom: 0; }

.timeline .what::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-3);
}

.timeline h3 { margin-bottom: 8px; }

.timeline .what p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 36em;
  margin: 0;
}

.timeline .now .when { color: var(--blue); }
.timeline .now .what::before {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 22%, transparent);
}

@media (max-width: 680px) {
  .timeline li { grid-template-columns: 1fr; }
  .timeline .when { text-align: left; padding: 0 0 6px 36px; border-left: 2px solid var(--rule); font-size: 22px; }
  .timeline li:last-child .when { border-left-color: var(--rule); }
  .timeline .what::before { top: -26px; }
}

/* The maintainer's note */

.letter { background: var(--surface); border-block: 1px solid var(--rule); }

.letter-body { max-width: 660px; margin: 0 auto; }
.letter-body h2 { margin-bottom: 36px; }
.letter-body p {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.65;
  margin-bottom: 1.1em;
}
.letter-body .signature {
  margin-top: 40px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-3);
}
.letter-body .signature strong {
  font-size: 22px;
  font-weight: 650;
  color: var(--ink);
}

/* The promise */

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 64px;
  margin: 64px 0 0;
}
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; gap: 40px; } }

.promises > div { border-top: 2px solid var(--ink); padding-top: 22px; }
.promises dt {
  font-size: clamp(21px, 2.2vw, 25px);
  font-weight: 660;
  line-height: 1.2;
  text-wrap: balance;
}
.promises dd {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 30em;
}

.promise-cta { margin: 56px 0 0; }

/* Signing */

.trust { border-top: 1px solid var(--rule); }

.facts { list-style: none; margin: 40px 0 0; padding: 0; }
.facts li {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  max-width: 38em;
}
.facts strong { color: var(--ink); font-weight: 680; }

/* Install */

.install { background: var(--surface); border-block: 1px solid var(--rule); }

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
}
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 40px 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  font-size: 19px;
  max-width: 32em;
}
.steps li::before {
  content: counter(step);
  font-size: 28px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.install-notes { padding-top: 8px; }
.install-notes h3 { margin: 28px 0 8px; }
.install-notes h3:first-child { margin-top: 0; }
.install-notes p { color: var(--ink-2); max-width: 32em; }

.compat { margin-top: clamp(56px, 7vw, 88px); }
.compat-table {
  width: 100%;
  max-width: 900px;
  margin-top: 24px;
  border-collapse: collapse;
}
.compat-table th,
.compat-table td {
  padding: 16px 32px 16px 0;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: baseline;
}
.compat-table thead th {
  padding-top: 0;
  padding-bottom: 10px;
  border-top: 0;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-3);
}
.compat-table tbody th { width: 48%; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.compat-table td { color: var(--ink-2); }
@media (max-width: 640px) {
  .compat-table thead { display: none; }
  .compat-table tr, .compat-table th, .compat-table td { display: block; width: auto; }
  .compat-table tbody th { width: auto; padding-bottom: 4px; }
  .compat-table td { padding-top: 0; border-top: 0; }
}

/* Questions */

.faq-list { margin-top: 48px; max-width: 820px; }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  font-size: 20px;
  font-weight: 580;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-3);
}
.faq details[open] summary::after { content: "\2212"; }

.faq details p {
  margin: -6px 0 26px;
  max-width: 40em;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Thanks */

.credits { border-top: 1px solid var(--rule); }

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 48px;
}
@media (max-width: 860px) { .credits-grid { grid-template-columns: 1fr; gap: 20px; } }
.credits-grid p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.credits-grid strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 650;
  color: var(--ink);
}

.contributors {
  margin-top: 48px;
  max-width: 52em;
  font-size: 15px;
  color: var(--ink-3);
}
.contributors a:not([href^="https://sparkle"]) { color: inherit; text-decoration-color: var(--rule); }
.contributors a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Names in headings link to their profiles without turning blue. */
.timeline h3 a,
.credits-grid strong a { color: inherit; text-decoration-color: var(--rule); }
.timeline h3 a:hover,
.credits-grid strong a:hover { text-decoration-color: currentColor; }

/* Footer */

.footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--ink-3);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 8px 40px; justify-content: space-between; }
.footer-grid p { margin: 0; max-width: 34em; }
.footer-links { display: flex; gap: 20px; }
.footer a { color: var(--ink-2); }
