/* getkerf.dev. Colours from docs/branding/brand.md. Light and dark follow prefers-color-scheme. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --ink: #141822;
  --muted: #5d6470;
  --line: #e2e5ea;
  --teal: #008979;        /* Kerf Teal: the mark, accents */
  --trim: #5cc8b6;        /* the trimmed piece of the mark */
  --accent: #00776a;      /* links and button fills: Kerf Teal darkened to pass WCAG AA on paper and with white text */
  --accent-ink: #ffffff;
  --accent-soft: #e3f4f1;
  --code-bg: #eef1f4;
  --shadow: 0 1px 2px rgb(20 24 34 / 6%), 0 8px 24px rgb(20 24 34 / 8%);
  --radius: 12px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0e14;
    --surface: #141720;
    --surface-2: #1a1e28;
    --ink: #eceff2;
    --muted: #9aa2ae;
    --line: #272c37;
    --teal: #2fbda7;
    --trim: #9ae6d8;
    --accent: #2fbda7;
    --accent-ink: #0c0e14;
    --accent-soft: #11302c;
    --code-bg: #10131a;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.35em; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand svg { height: 28px; width: auto; }
.logo-body { fill: var(--teal); }
.logo-trim { fill: var(--trim); }
.logo-word { fill: var(--ink); }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav .btn { color: var(--ink); }
@media (max-width: 860px) { .nav .section-link { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none; line-height: 1.2;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 20px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink); font-size: 0.86rem; font-weight: 500;
}
.lede { font-size: clamp(1.08rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 46rem; margin: 0 auto 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 0.92rem;
}
.facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: var(--teal); margin-right: 8px; vertical-align: 0.15em; }
.shot {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.hero .shot { margin-top: 48px; }

/* Sections */
main > section { padding: 72px 0; }
main > section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 48rem; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p, .card ul { margin: 0; color: var(--muted); }
.card ul { padding-left: 1.1em; }
.card li + li { margin-top: 4px; }
.card h3 { margin-bottom: 8px; }
.card .num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); font-weight: 600; display: block; margin-bottom: 8px; }

/* Architecture diagram (HTML, so it reflows on small screens) */
.arch { margin: 0 0 40px; }
.arch-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.node-title { font-weight: 600; margin: 0 0 2px; }
.node-sub { color: var(--muted); font-size: 0.86rem; margin: 0 0 12px; font-family: var(--mono); }
.node ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.node li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 0.92rem; }
.node li span { color: var(--muted); }
.node.cluster { border-color: color-mix(in srgb, var(--teal) 50%, var(--line)); }
.node.store { align-self: center; text-align: center; border-style: dashed; }
.edge { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 12px; min-width: 120px; text-align: center; }
.edge svg { width: 64px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.6; }
.edge small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; max-width: 9rem; }
.pull {
  grid-column: 1 / -1; margin-top: 14px; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line)); background: var(--accent-soft);
  font-size: 0.94rem; text-align: center;
}
.arch figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
@media (max-width: 860px) {
  .arch-grid { grid-template-columns: 1fr; }
  .edge { flex-direction: row; gap: 10px; padding: 10px 0; min-width: 0; }
  .edge svg { transform: rotate(90deg); width: 32px; }
  .edge small { max-width: none; }
  .node.store { align-self: stretch; }
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font: 600 0.85rem/26px var(--mono); text-align: center;
}
.steps strong { color: var(--ink); }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.feature h3 { margin-top: 18px; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.also { margin-top: 40px; color: var(--muted); }

/* Comparison table */
.table-wrap { position: relative; /* contains the .sr-only spans, which would widen the page */ overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 0.9rem; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; background: var(--surface-2); font-size: 0.82rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
tr.us { background: var(--accent-soft); }
.yes { color: var(--accent); font-weight: 600; }
.no { color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 32px; }

/* Quick start */
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .qs { grid-template-columns: 1fr; } }
.qs > div { min-width: 0; }
pre {
  margin: 0 0 1em; padding: 16px 18px; overflow-x: auto; border-radius: 10px;
  background: var(--code-bg); border: 1px solid var(--line); font-size: 0.86rem; line-height: 1.6;
}
pre .c { color: var(--muted); }
.reqs { margin-top: 24px; color: var(--muted); }

/* FAQ */
.faq { max-width: 52rem; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.15s;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details > div { padding: 0 0 18px; color: var(--muted); }
details > div p:last-child { margin-bottom: 0; }

/* Closing call to action */
.closing { text-align: center; }
.closing p { color: var(--muted); max-width: 40rem; margin: 0 auto 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; padding: 80px 20px; }
.notfound p { color: var(--muted); }
.notfound-mark { justify-self: center; margin-bottom: 24px; }
