/* The Kadans website (site/generate.py). The app's colours (branding/README.md): its purple on light, the lighter one
   of its dark theme on dark. No web font: the system's, which every visitor already has. */
:root {
  --purple: #6750A4;
  --on-purple: #FFFFFF;
  --ink: #1D1B20;
  --ink-soft: #49454F;
  --ground: #FFFBFE;
  --surface: #F3EDF7;
  --line: #CAC4D0;
  --link: #6750A4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --purple: #D0BCFF;
    --on-purple: #381E72;
    --ink: #E6E0E9;
    --ink-soft: #CAC4D0;
    --ground: #141218;
    --surface: #211F26;
    --line: #49454F;
    --link: #D0BCFF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}
a { color: var(--link); }
img { display: block; }
code {
  font: 0.9em ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

header.top, main, footer.bottom { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
header.top nav.main { display: flex; gap: 20px; margin-right: auto; }
header.top nav a { color: var(--ink-soft); text-decoration: none; }
header.top nav a:hover { color: var(--link); text-decoration: underline; }
header.top nav a[aria-current] { color: var(--ink); font-weight: 600; }
.languages { display: flex; gap: 12px; margin: 0; font-size: 0.95rem; }

main { padding-bottom: 48px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 32px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 40px 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; }
.note { color: var(--ink-soft); font-size: 0.95rem; }

.hero { text-align: center; padding: 40px 0 16px; }
.hero-mark { margin: 0 auto 8px; }
.hero .lead { margin: 0 auto 24px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 12px; }

.nowrap { white-space: nowrap; }

.button {
  display: inline-block;
  white-space: nowrap;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--purple);
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--surface); }
.button.primary { background: var(--purple); color: var(--on-purple); }
.button.primary:hover { filter: brightness(1.08); background: var(--purple); }
.button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h2 { margin-top: 0; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.card.muted { opacity: 0.75; }
.install { color: var(--ink-soft); font-size: 0.95rem; }
.install code { display: block; margin-top: 6px; padding: 6px 8px; }
#desktop { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* The download for the visitor's system (download.js), shown first. */
.suggested-label { display: none; margin: 0 0 6px; font-size: 0.85rem; font-weight: 600; color: var(--link); }
.download.suggested { border-color: var(--purple); border-width: 2px; }
.download.suggested .suggested-label { display: block; }

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

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--ink-soft); }

.legal { max-width: 46em; }
.legal .updated { color: var(--ink-soft); font-size: 0.95rem; }
.legal li { margin-bottom: 6px; }

footer.bottom { padding-bottom: 32px; color: var(--ink-soft); font-size: 0.95rem; }
footer.bottom::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 16px; }
footer.bottom p { margin: 4px 0; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  header.top nav.main { margin-right: 0; }
  .languages { width: 100%; }
}
