/* kaf-mirror project site.
   Color, type and layout follow KafScale (kafscale.io): warm paper
   background, Space Grotesk / IBM Plex stacks, mint and ember accents.
   Link and button colors are darker than KafScale's so body text and
   controls meet WCAG AA contrast. Latin woff2 files are self-hosted
   in fonts/. There are no requests to a font or analytics host.
*/

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  font-family: "IBM Plex Sans", "Trebuchet MS", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --bg: #f7f6f2;
  --bg-alt: #ffffff;
  --text: #111111;
  --muted: #3f4c5a;
  --border: rgba(15, 23, 42, 0.14);
  --panel: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --mint: #18c6ac;
  --ember: #b45309;
  --accent: #0c4a6e;
  --accent-hover: #082f49;
  --link: #9a3412;
  --link-hover: #0c4a6e;
  --link-visited: #7c2d12;
  --button-bg: #0c4a6e;
  --button-fg: #ffffff;
  --button-hover: #082f49;
  --code-bg: #0f172a;
  --code-fg: #f8fafc;
  --hero-gradient:
    radial-gradient(circle at 20% 20%, rgba(24, 198, 172, 0.18), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(244, 162, 97, 0.18), transparent 50%),
    linear-gradient(180deg, #f7f6f2, #eceae4 70%);
  --radius: 14px;
  --content: 1200px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07090a;
    --bg-alt: #0b0f10;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: rgba(255, 255, 255, 0.14);
    --panel: #101416;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    --ember: #fbbf24;
    --accent: #7dd3fc;
    --link: #fbbf24;
    --link-hover: #7dd3fc;
    --link-visited: #f59e0b;
    --button-bg: #7dd3fc;
    --button-fg: #082f49;
    --button-hover: #bae6fd;
    --code-bg: #020617;
    --code-fg: #f8fafc;
    --hero-gradient:
      radial-gradient(circle at 20% 10%, rgba(24, 198, 172, 0.18), transparent 55%),
      radial-gradient(circle at 80% 0%, rgba(244, 162, 97, 0.2), transparent 50%),
      linear-gradient(180deg, #0b0e0e, #050505 65%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 40;
  padding: 0.5rem 0.8rem;
  background: var(--button-bg);
  color: var(--button-fg);
  border-radius: 8px;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--button-fg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--content);
  margin-inline: auto;
  padding: 0.9rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand:visited,
.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}

.nav-wide {
  display: none;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav-wide a,
.nav-menu nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.nav-wide a:visited,
.nav-menu nav a:visited {
  color: var(--text);
}

.nav-wide a[aria-current="page"],
.nav-menu nav a[aria-current="page"] {
  color: var(--accent);
}
.nav-wide a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--mint);
}
.nav-menu nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--mint);
}

.nav-wide a:hover,
.nav-menu nav a:hover {
  color: var(--link-hover);
}

.nav-menu {
  position: relative;
}

.nav-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
}

.nav-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu nav {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  min-width: 14rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  display: grid;
  gap: 0.15rem;
}

.nav-menu nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

@media (min-width: 800px) {
  .nav-menu {
    display: none;
  }

  .nav-wide {
    display: flex;
  }
}

main {
  flex: 1;
}

.hero {
  background: var(--hero-gradient);
  border-bottom: 1px solid var(--border);
}

.wrap {
  max-width: var(--content);
  margin-inline: auto;
  padding: 2.5rem var(--pad) 3.5rem;
}

.hero .wrap {
  padding-top: 3.2rem;
  padding-bottom: 3.6rem;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--ember);
  margin: 0 0 0.85rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.35rem);
  max-width: 18ch;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin-top: 0;
}

h3 {
  font-size: 1.15rem;
}

.lede,
.section p,
.note p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 46rem;
  color: var(--text);
}

.muted,
.section .muted {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.button:visited {
  color: var(--button-fg);
}

.button.primary {
  background: var(--button-bg);
  color: var(--button-fg);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--button-hover);
  color: var(--button-fg);
}

.button.secondary {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:visited,
.button.secondary:hover,
.button.secondary:focus-visible {
  color: var(--text);
}

.section {
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: 0;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}

@media (min-width: 800px) {
  .grid.features,
  .grid.docs {
    grid-template-columns: 1fr 1fr;
  }
}

.card,
.note,
.kafscale {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.2rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p:last-child,
.note p:last-child,
.kafscale p:last-child {
  margin-bottom: 0;
}

.kafscale {
  margin-top: 2rem;
}

pre,
code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem 1.1rem;
  border-radius: 12px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 1.15rem;
}

pre code {
  font-size: 0.9rem;
  color: inherit;
}

p code,
li code,
td code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05rem 0.35rem;
  font-size: 0.9em;
}

.steps h3 {
  margin-top: 1.6rem;
}

.steps h3:first-child {
  margin-top: 0.4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--font-display);
  font-weight: 600;
}

.docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.docs-list li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.docs-list a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.docs-list a:visited {
  color: var(--text);
}

.docs-list a:hover {
  color: var(--link-hover);
}

.docs-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  margin-top: auto;
}

.site-footer .wrap {
  padding-top: 2rem;
  padding-bottom: 2.4rem;
}

.site-footer p {
  margin: 0 0 0.55rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0.4rem 0 0.8rem;
}

.footer-links span {
  color: var(--muted);
}

/* Hidden until a demo video exists. Do not remove #demo-video. */
#demo-video[hidden] {
  display: none !important;
}

#demo-video .video-frame {
  position: relative;
  width: 100%;
  max-width: 56rem;
  aspect-ratio: 16 / 9;
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

#demo-video iframe,
#demo-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

html {
  overflow-x: hidden;
}

body,
main,
#content,
.card,
.kafscale,
.note,
.docs-list li,
pre {
  min-width: 0;
  max-width: 100%;
}

.wrap,
.site-header-inner {
  min-width: 0;
  max-width: var(--content);
  margin-inline: auto;
}

pre {
  overflow-x: auto;
}

.hero h1 {
  overflow-wrap: break-word;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

pre code {
  display: block;
  white-space: inherit;
  max-width: 100%;
}

p code,
li code,
td code {
  overflow-wrap: break-word;
  word-break: break-word;
}
