/* Quail's website: one hand-written stylesheet, no build step (ADR D-062).
   Colours come from the app icon: quail yellow, charcoal, chestnut and cream. */

:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --surface-2: #f3eee2;
  --text: #24211d;
  --muted: #6b645a;
  --line: #e4ddcd;
  --accent: #fdd41c;
  --accent-ink: #24211d;
  --link: #8a4f1c;
  --code-bg: #f1ece0;
  --shadow: 0 1px 2px rgb(36 33 29 / 6%), 0 8px 24px rgb(36 33 29 / 8%);
  --radius: 14px;
  --max: 1080px;
  --prose: 720px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181614;
    --surface: #211e1b;
    --surface-2: #2a2622;
    --text: #efe9df;
    --muted: #a99f92;
    --line: #37322c;
    --accent: #fdd41c;
    --accent-ink: #1b1916;
    --link: #f3c35b;
    --code-bg: #2a2622;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

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

code,
pre,
kbd {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
}

kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 0.35em;
  background: var(--surface);
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
  font-size: 15px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
  border: 1px solid rgb(0 0 0 / 8%);
}

.button:hover {
  filter: brightness(0.97);
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.site-nav .button {
  padding: 6px 14px;
  color: var(--accent-ink);
}

/* Landing */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero img.icon {
  width: 112px;
  height: 112px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
}

.hero .lede {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.install {
  max-width: 560px;
  margin: 28px auto 0;
  text-align: left;
}

.install pre {
  margin: 0;
}

.install p {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 2px 0;
}

.shot {
  margin: 40px auto 0;
  max-width: 1000px;
}

.shot img {
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.shot figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

section.band {
  padding: 56px 0;
}

section.band.alt {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

section.band h2 {
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

section.band .sub {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: var(--prose);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tools li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14.5px;
}

.nots {
  columns: 2;
  column-gap: 32px;
  padding-left: 1.1em;
  color: var(--muted);
}

/* Docs */

.docs {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 64px;
}

.docs-nav {
  position: sticky;
  top: 82px;
  align-self: start;
  font-size: 15px;
}

.docs-nav h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 8px;
}

.docs-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.docs-nav a {
  display: block;
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.docs-nav a:hover {
  background: var(--surface-2);
}

.docs-nav a[aria-current="page"] {
  background: var(--surface-2);
  font-weight: 600;
}

.prose {
  max-width: var(--prose);
}

.prose h1 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 10px;
}

.prose .lede {
  font-size: 19px;
  color: var(--muted);
  margin-top: 0;
}

.prose h2 {
  font-size: 23px;
  margin: 40px 0 8px;
  padding-top: 8px;
}

.prose h3 {
  font-size: 18px;
  margin: 28px 0 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-weight: 600;
}

.prose td:first-child {
  white-space: nowrap;
}

.note {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
}

.path {
  font-weight: 600;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 14.5px;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-left: auto;
}

.site-footer a {
  color: var(--muted);
}

/* Narrow screens */

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

  .site-nav .hide-narrow {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .nots {
    columns: 1;
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 20px;
  }

  .docs-nav {
    position: static;
  }

  .prose td:first-child {
    white-space: normal;
  }

  .prose td code {
    overflow-wrap: anywhere;
  }

  .docs-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
  }

  .docs-nav h2 {
    display: none;
  }

  .site-footer nav {
    margin-left: 0;
  }
}

a.card {
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--link);
}
