/* keel.keellabs.dev - colours from Keel's own design tokens (navy, blue #4d8eff, the icon's cyan). */

:root {
  --page: #f4f6fb;
  --raised: #ffffff;
  --alt: #eceef4;
  --ink: #131b2e;
  --muted: #5c6373;
  --line: #dfe3ed;
  --blue: #005ac2;          /* text and links on light: 6.2:1 on white */
  --blue-fill: #2f6fe0;
  --cyan: #4fd8ff;
  --grad: linear-gradient(100deg, #2f6fe0 0%, #19a8d8 100%);
  --shadow: 0 1px 2px rgb(11 19 38 / 0.06), 0 12px 32px rgb(11 19 38 / 0.08);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b1326;
    --raised: #131b2e;
    --alt: #0f1729;
    --ink: #dae2fd;
    --muted: #9aa0ae;
    --line: #283044;
    --blue: #7aa9ff;
    --blue-fill: #4d8eff;
    --grad: linear-gradient(100deg, #4d8eff 0%, #4fd8ff 100%);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px rgb(0 0 0 / 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue-fill); outline-offset: 2px; border-radius: 6px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--alt); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 5px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 90%, transparent); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand img { border-radius: 7px; }
nav { display: flex; gap: 4px; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; font-weight: 500; }
nav a:hover { color: var(--ink); background: var(--alt); }

/* hero */
.hero { padding: 76px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 52px; align-items: center; }
.hero-grid > *, .cards > * { min-width: 0; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
h1 { margin: 0; font-size: clamp(36px, 5.2vw, 58px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 20px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.version-line { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform 120ms ease, filter 120ms ease;
}
.button.primary { background: linear-gradient(100deg, #2f6fe0, #1592c4); color: #fff; /* fixed: white text stays readable in dark mode */ box-shadow: 0 8px 22px rgb(47 111 224 / 0.3); }
.button.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button.ghost { color: var(--ink); border: 1px solid var(--line); background: var(--raised); }
.button.ghost:hover { border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button.primary:hover { transform: none; } }

/* illustrated window */
.window { margin: 0; background: #0b1326; color: #dae2fd; border-radius: 16px; border: 1px solid #283044; box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #131b2e; border-bottom: 1px solid #222a3d; }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4154; }
.window-bar b { margin-left: 8px; font-size: 13px; font-weight: 600; color: #9aa0ae; }
.window-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.svc { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; background: #131b2e; border: 1px solid #222a3d; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.svc .name { font-weight: 600; }
.svc .meta { color: #8c909f; font-family: var(--mono); font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #5c6373; }
.dot.on { background: #34d399; box-shadow: 0 0 0 3px rgb(52 211 153 / 0.18); }
.pill { font-size: 11px; font-weight: 600; color: #34d399; background: rgb(52 211 153 / 0.12); padding: 2px 8px; border-radius: 99px; }
.pill.off { color: #9aa0ae; background: #222a3d; }
.sites { margin-top: 4px; }
.label { margin: 0 0 6px; font-size: 12px; color: #8c909f; text-transform: uppercase; letter-spacing: 0.06em; }
.site { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; padding: 6px 0; }
.lock { color: #34d399; font-size: 8px; }
.site .tag { margin-left: auto; font-family: Inter, sans-serif; font-size: 11px; color: #7aa9ff; background: rgb(77 142 255 / 0.14); padding: 1px 8px; border-radius: 99px; }
.term { margin: 6px 0 0; background: #060e20; border: 1px solid #222a3d; border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; color: #c2c6d6; overflow-x: auto; }
.term .p { color: #4fd8ff; }

/* sections */
.section { padding: 76px 0; }
.section.alt { background: var(--alt); border-block: 1px solid var(--line); }
h2 { margin: 0 0 8px; font-size: 34px; letter-spacing: -0.02em; }
.section-lead { margin: 0 0 30px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }

.stack { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.stack div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stack dt { font-weight: 600; }
.stack dd { margin: 0; color: var(--muted); }

.downloads .card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.downloads .meta { margin-bottom: 6px; font-size: 14px; }
.downloads .card.recommended { border-color: var(--blue-fill); box-shadow: 0 0 0 1px var(--blue-fill), var(--shadow); }
.downloads .card.recommended h3::after { content: "Your system"; margin-left: 10px; vertical-align: 3px; font-size: 12px; font-weight: 600; color: var(--blue); background: color-mix(in srgb, var(--blue-fill) 14%, transparent); padding: 2px 8px; border-radius: 99px; }
.small { font-size: 14px; font-weight: 500; }
.small-row { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.after { margin: 26px 0 0; color: var(--muted); }

details { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details > :not(summary) { margin: 0 20px 18px; color: var(--muted); }
details ul { padding-left: 20px; }

.foot { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 880px) {
  .hero { padding: 40px 0; }
  .hero-grid, .cards, .stack { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 34px; }
  .stack div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  nav a:not(:nth-child(3)) { display: none; }
  .section { padding: 52px 0; }
  .cta .button { flex: 1 1 auto; }
}
