:root {
  --bg: #f2ece0;
  --surface: #faf6ed;
  --surface-strong: #fff9ee;
  --ink: #1a2c24;
  --muted: #5f6b61;
  --faint: #8a9c8e;
  --line: #d5c8a9;
  --sand: #ead9b8;
  --accent: #ad4f2d;
  --accent-dark: #6b2d16;
  --leaf: #45644d;
  --gold: #c8943a;
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.16em;
}

.site-header,
.site-footer,
main {
  width: min(1360px, calc(100% - 4rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  gap: 0.28rem;
}

.brand a {
  font-size: 1.58rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
}

.tag {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  font-style: italic;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--muted);
}

.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active {
  background: var(--sand);
  color: var(--ink);
}

.site-nav .app-link {
  background: var(--accent);
  color: var(--surface-strong);
  font-weight: 600;
}

.site-nav .app-link:hover {
  background: var(--accent-dark);
  color: var(--surface-strong);
}

main { padding: 2.2rem 0 4.5rem; }

/* Cards and surfaces */
.hero-copy,
.card,
.highlight,
.page-head,
.docs-card,
.docs-note,
.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(93, 72, 31, 0.07);
}

.hero-copy,
.highlight,
.page-head,
.docs-card,
.docs-note,
.docs-article,
.value-card {
  padding: 1.75rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 0.45rem;
}

.hero-copy-home {
  background: var(--surface-strong);
}

.hero-showcase {
  position: relative;
}

.showcase-shell {
  height: 100%;
  min-height: 25rem;
  border-radius: 12px;
  border: 1px solid rgba(107, 45, 22, 0.22);
  background: linear-gradient(170deg, #1e2e27, #253524);
  color: #f0e8d8;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(34, 40, 36, 0.18);
}

.showcase-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(240, 232, 216, 0.14);
}

.showcase-bar-title {
  font-size: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: rgba(240, 232, 216, 0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.showcase-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.9rem;
  height: calc(100% - 3rem);
}

.showcase-chat,
.showcase-sidebar {
  background: rgba(240, 232, 216, 0.06);
  border: 1px solid rgba(240, 232, 216, 0.1);
  border-radius: 10px;
  padding: 1rem;
}

.chat-bubble {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  line-height: 1.6;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.chat-bubble.user {
  background: rgba(200, 148, 58, 0.14);
  border: 1px solid rgba(200, 148, 58, 0.2);
}

.chat-bubble.assistant {
  background: rgba(240, 232, 216, 0.1);
  border: 1px solid rgba(240, 232, 216, 0.1);
  font-family: Georgia, "Times New Roman", serif;
}

.mini-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(240, 232, 216, 0.08);
  border: 1px solid rgba(240, 232, 216, 0.1);
  margin-top: 0.65rem;
}

.mini-card strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.mini-card span {
  color: rgba(240, 232, 216, 0.6);
  line-height: 1.45;
  font-size: 0.82rem;
}

.accent-card {
  border-color: rgba(173, 79, 45, 0.4);
  background: rgba(173, 79, 45, 0.12);
}

/* Docs article */
.docs-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.85rem;
  box-shadow: 0 2px 10px rgba(93, 72, 31, 0.06);
}

/* Typography */
.eyebrow,
.story-kicker {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--leaf);
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  margin-bottom: 0.95rem;
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  margin-bottom: 0.65rem;
}

h3 {
  font-size: 1.1rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.76;
  max-width: 40rem;
}

/* Actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.45rem;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  background: rgba(69, 100, 77, 0.07);
  border: 1px solid rgba(69, 100, 77, 0.16);
  color: var(--leaf);
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.button,
.docs-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.button {
  padding: 0.85rem 1.3rem;
  border-radius: 6px;
  font-size: 0.97rem;
}

.button.primary {
  background: var(--accent);
  color: var(--surface-strong);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: var(--sand);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background: var(--line);
}

.docs-link {
  color: var(--accent-dark);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1em;
}

.docs-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Lists */
.hero-panel ul,
.detail-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.82;
}

/* Grids */
.docs-grid,
.landing-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.docs-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* Card variants */
.value-card-strong {
  background: var(--surface-strong);
  border-color: var(--line);
}

.card { padding: 1.2rem; }

.highlight {
  margin-top: 1.7rem;
  background: var(--surface);
}

.highlight-home {
  background: var(--surface-strong);
}

.page-head { margin-bottom: 1.15rem; }
.page-hero-roomy { margin-bottom: 1.35rem; }

/* Inner page heroes fill full card width — override the tight home-hero constraints */
.page-head h1 { max-width: none; }
.page-head .lede { max-width: none; }

p { margin: 0 0 1rem; }

.docs-article p,
.docs-card p,
.docs-note p,
.card p,
.highlight p,
.value-card p {
  line-height: 1.78;
  color: var(--muted);
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 0 2.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.92rem;
}

.site-footer strong {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-content: flex-start;
}

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

.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 860px) {
  html { font-size: 16px; }

  .hero,
  .docs-grid,
  .docs-layout,
  .landing-band,
  .site-footer,
  .showcase-body {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase-shell { min-height: auto; }

  .hero-copy,
  .highlight,
  .page-head,
  .docs-card,
  .docs-note,
  .docs-article,
  .value-card {
    padding: 1.35rem;
  }

  h1 { max-width: none; }
}
