/* The landing page. System fonts only; light and dark follow the system. */
:root {
  --bg: #fbfaf8;
  --band: #f1efea;
  --surface: #ffffff;
  --text: #1d1f23;
  --muted: #5b6069;
  --line: #dedbd3;
  --accent: #1f6f5c;
  --accent-text: #ffffff;
  --accent-soft: #e2f0eb;
  --code-bg: #f3f1ec;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --band: #1c1f23;
    --surface: #212429;
    --text: #e8e6e1;
    --muted: #a3a7ae;
    --line: #34383e;
    --accent: #5cc3a5;
    --accent-text: #0f1a16;
    --accent-soft: #1d3530;
    --code-bg: #2a2e34;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

/* The bar at the top */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px;
             min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650;
         color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--text); }

/* The first screen */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.unofficial { display: inline-block; margin: 0 0 18px; padding: 4px 12px; border-radius: 999px;
              background: var(--accent-soft); color: var(--text); font-size: 0.85rem; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }

.button { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600;
          text-decoration: none; border: 1px solid var(--line); color: var(--text);
          background: var(--surface); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button:hover { filter: brightness(1.05); }

.shot { display: block; }
.shot img, img.shot { display: block; width: 100%; height: auto; border-radius: 10px;
                      border: 1px solid var(--line); box-shadow: 0 12px 32px rgb(0 0 0 / 0.12); }
/* The Swagger picture is a long page: its top part only. */
img.shot.crop { aspect-ratio: 1200 / 760; object-fit: cover; object-position: top; }

/* Bands with a background */
section { padding: 56px 0; }
section.wrap { padding-top: 56px; padding-bottom: 56px; }  /* .wrap alone would zero them */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Downloads */
.version { color: var(--muted); margin-top: -0.3em; }
.downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.download { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px;
            border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
            color: var(--text); text-decoration: none; }
.download:hover { border-color: var(--accent); }
.download.yours { border: 2px solid var(--accent); padding: 17px; }
.download-tag { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase;
                letter-spacing: 0.04em; }
.download-system { font-weight: 650; font-size: 1.1rem; }
.download-needs { color: var(--muted); font-size: 0.9rem; }
.download-file { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin-top: 8px; }
.small { color: var(--muted); font-size: 0.92rem; max-width: 760px; }

/* Three ways */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 12px;
        background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.card p { margin: 0 0 10px; }
.card .shot { margin: 4px 0 12px; }
.card .shot img { box-shadow: none; }
.copy-row { display: flex; align-items: stretch; gap: 8px; margin: 0 0 10px; }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px;
                 border-radius: 6px; background: var(--code-bg); font-size: 0.85rem;
                 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.copy { flex: none; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line);
        background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.copy:hover { border-color: var(--accent); }

/* The API */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }

/* Safety */
.facts { list-style: none; padding: 0; margin: 0 0 18px; display: grid;
         grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.facts li { padding-left: 16px; border-left: 3px solid var(--accent); }

.footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 40px;
          color: var(--muted); font-size: 0.9rem; }

/* Narrower screens */
@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; gap: 32px; }
  section.hero { padding-top: 36px; }
  .downloads { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .downloads, .facts { grid-template-columns: 1fr; }
  .top nav { gap: 14px; }
}
