:root {
  color-scheme: dark;

  --bg: #101319;
  --bg-soft: #171b23;
  --line: #262c38;
  --text: #e9ecf2;
  --muted: #98a1b3;
  --faint: #6c7689;
  --accent: #8fb4ff;

  /* The bloom behind the header, the key caps, and the two shadows. Written out here
     rather than in place, because light mode has to be able to answer for them. */
  --glow: 31, 38, 52;
  --key: #212734;
  --shadow-icon: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-shot: 0 24px 60px rgba(0, 0, 0, 0.5);

  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

/* The site follows the reader's Mac. Nothing below this block knows about it: only the
   tokens change, which is what keeps one stylesheet doing both. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #f5f6f8;
    --bg-soft: #ffffff;
    --line: #e1e4ea;
    --text: #14171e;
    --muted: #596273;
    --faint: #878f9d;
    --accent: #2f5fd0;

    --glow: 255, 255, 255;
    --key: #eceef2;
    /* Far softer than their dark counterparts. The same shadow that reads as depth on a
       dark page reads as dirt on a light one. */
    --shadow-icon: 0 14px 30px rgba(20, 23, 30, 0.16);
    --shadow-shot: 0 18px 44px rgba(20, 23, 30, 0.18);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(
      900px 520px at 50% -140px,
      rgba(var(--glow), 1) 0%,
      rgba(var(--glow), 0) 70%
    ),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ---------- navigation ---------- */

/* On every page, so the three of them read as one site and you can leave without
   scrolling to the bottom first. */
.topnav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 0 0;
  font-size: 14px;
}

.topnav a {
  color: var(--faint);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--text);
}

/* The page you are on, said by not being a link. */
.topnav [aria-current="page"] {
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 64px 0 56px;
}

.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  box-shadow: var(--shadow-icon);
}

h1 {
  margin: 26px 0 0;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.tagline {
  margin: 12px 0 0;
  font-size: 21px;
  color: var(--text);
}

.sub {
  margin: 14px auto 0;
  max-width: 34em;
  color: var(--muted);
}

/* ---------- call to action ---------- */

.cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 34px;
  padding: 12px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
}

.cta-top {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.cta-main {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cta-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--faint);
}

/* ---------- the palette picture ---------- */

.demo {
  margin-top: 24px;
}

/* The render has transparent, rounded corners, so the shadow is taken from the shape
   rather than from the box. A box-shadow would put a rectangle behind it. */
.shot {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(var(--shadow-shot));
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  margin-right: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--key);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92em;
  text-align: center;
}

kbd.big {
  font-size: 15px;
  padding: 4px 10px;
  color: var(--text);
}

.hotkey-line {
  margin: 20px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- features ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.feature h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- closing note ---------- */

.promise {
  margin-top: 56px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.promise p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* The closing note is two thoughts, and they need air between them. */
.promise p + p {
  margin-top: 12px;
}

footer {
  margin-top: 56px;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

footer p { margin: 0; }

/* A step down from the line above it: this has to be readable and findable, not the
   first thing anyone reads. */
.credit {
  margin-top: 6px;
  font-size: 13px;
}

.credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- changelog ---------- */

/* The same hero, with the air taken out of it. That page is a list to scan, not a page to
   land on, so the first release should be close to the top. */
.page-hero {
  padding: 48px 0 24px;
}

.page-hero .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
}

.release {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* The version reads as a label on what follows rather than as a headline, so it is
   smaller and quieter than the text under it. Tabular figures keep the dates lined up
   down the page. */
.release h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.release ul {
  margin: 0;
  padding-left: 22px;
}

.release li,
.release p {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--muted);
}

.release li:last-child,
.release p:last-child {
  margin-bottom: 0;
}

.release code {
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.88em;
  background: var(--bg-soft);
  color: var(--text);
}

/* ---------- faq ---------- */

/* Closed, the page is its own list of questions: you scan it, find yours, and open that
   one. Nobody reads an FAQ from top to bottom, and with the answers showing there was no
   way not to. */
.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 16px 32px 16px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 19px;
  font-weight: 400;
  color: var(--faint);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 20px;
  padding-right: 32px;
  font-size: 16px;
  color: var(--muted);
}

footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- narrow screens ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }

  .hero { padding: 40px 0 40px; }

  h1 { font-size: 38px; }

  .tagline { font-size: 19px; }

  .features {
    grid-template-columns: 1fr;
    margin-top: 56px;
    padding-top: 40px;
  }

  .page-hero { padding: 32px 0 20px; }
}
