/* Kalamos docs — shared stylesheet. Self-contained, theme-aware, responsive. */

:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f3ede1;
  --text: #23201a;
  --muted: #6b6459;
  --accent: #9c4a24;
  --accent-2: #b8791f;
  --border: #e6ded0;
  --shadow: 0 1px 2px rgba(35, 32, 26, .06), 0 8px 24px rgba(35, 32, 26, .05);
  --radius: 12px;
  --maxw: 860px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120e;
    --surface: #1d1a15;
    --surface-2: #232019;
    --text: #ece6da;
    --muted: #a49b8a;
    --accent: #e0925f;
    --accent-2: #d8b25e;
    --border: #2e2a22;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="light"] {
  --bg: #faf7f0; --surface: #ffffff; --surface-2: #f3ede1; --text: #23201a;
  --muted: #6b6459; --accent: #9c4a24; --accent-2: #b8791f; --border: #e6ded0;
  --shadow: 0 1px 2px rgba(35,32,26,.06), 0 8px 24px rgba(35,32,26,.05);
}
:root[data-theme="dark"] {
  --bg: #14120e; --surface: #1d1a15; --surface-2: #232019; --text: #ece6da;
  --muted: #a49b8a; --accent: #e0925f; --accent-2: #d8b25e; --border: #2e2a22;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text);
  letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; border-radius: 6px; object-fit: cover; }
.nav-links { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

/* ---- Layout ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 72px; }
.wide { max-width: 1080px; }

h1 { font-family: var(--serif); font-size: 2.1rem; line-height: 1.2; margin: 0 0 .4em; }
h2 { font-family: var(--serif); font-size: 1.5rem; margin: 2.2em 0 .6em; padding-bottom: .2em; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.15rem; margin: 1.8em 0 .4em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .12em .4em; border-radius: 5px; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
small, .muted { color: var(--muted); }

/* ---- Hero ---- */
.hero { text-align: center; padding: 56px 0 28px; }
.hero .reed { width: 76px; height: 76px; margin: 0 auto 20px; display: block; border-radius: 18px; object-fit: cover; }
.hero h1 { font-size: 2.7rem; margin-bottom: .25em; }
.hero .lead { max-width: 34ch; margin: 0 auto 1.6em; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 20px; }

/* ---- Buttons ---- */
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---- Cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 28px 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.card p { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.card .ic { font-size: 1.25rem; }

.callout {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 14px 18px; margin: 1.4em 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---- Tables (feature matrix) ---- */
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); position: sticky; top: 0; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td.c { text-align: center; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin: 1em 0; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 14px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }
.footer-inner .sep { margin-left: auto; }

/* ---- Coming-soon (web app) ---- */
.soon { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.soon .reed { width: 88px; height: 88px; margin-bottom: 24px; opacity: .9; border-radius: 20px; object-fit: cover; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2.1rem; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 14px; }
}
