:root {
  --bg: #f2ede3;
  --bg-soft: #fbf7f0;
  --paper: #fffdf8;
  --ink: #14212b;
  --muted: #5f6d78;
  --line: #d7ccba;
  --line-strong: #b9ad9c;
  --brand: #be4b1f;
  --brand-deep: #8f3311;
  --accent: #0f5f7c;
  --accent-soft: #d7edf3;
  --panel: #f6efe4;
  --shadow: 0 18px 60px rgba(20, 33, 43, 0.08);
  --max-width: 1180px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at top right, rgba(15, 95, 124, 0.08), transparent 26%),
    linear-gradient(180deg, #f7f2ea 0%, #f2ede3 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
main { min-height: 70vh; }
code { font-family: var(--font-mono); }

.nav, .footer, .section, .page-shell { width: 100%; }
.nav-inner, .section-inner, .page-inner, .footer-inner, .hero-inner {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(247, 242, 234, 0.88);
  border-bottom: 1px solid rgba(185, 173, 156, 0.65);
}

.nav-inner {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  text-transform: lowercase;
}

.nav-brand-lockup img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.nav-brand-lockup strong, .footer-logo strong { color: var(--brand); }

.nav-links, .footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a, .footer-links a, .section-link, .back-link, .detail-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover, .footer-links a:hover, .section-link:hover, .back-link:hover, .detail-links a:hover {
  color: var(--brand-deep);
}

.hero-home { padding: 4rem 0 3rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-brand-panel, .hero-media-card, .card, .dashboard-surface, .cli-block, .demo-card, .detail-video, .detail-links {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-brand-panel {
  padding: 2rem;
  border-radius: 2rem;
}

.hero-kicker, .section-label, .demo-card-eyebrow, .detail-label {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-banner {
  width: min(100%, 30rem);
  margin: 1rem 0 1.4rem;
  border-radius: 1rem;
}

.hero-brand-panel h1, .page-title, .section-title {
  font-family: var(--font-display);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-brand-panel h1 { font-size: clamp(2.6rem, 5vw, 5rem); max-width: 11ch; }
.hero-copy, .section-sub, .page-intro, .page-body, .footer-copy, .demo-card p, .story-step p { color: var(--muted); }
.hero-copy { font-size: 1.06rem; max-width: 42rem; margin: 1rem 0 0; }
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  padding: 0.82rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
}

.btn-primary { background: var(--brand); color: #fffaf2; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-secondary { background: var(--bg-soft); }

.hero-media-card {
  border-radius: 2rem;
  overflow: hidden;
  align-self: stretch;
}

.hero-video, .detail-video { width: 100%; background: #101820; }
.hero-media-caption { padding: 1rem 1.2rem 1.35rem; }
.hero-media-title { margin: 0; font-weight: 700; }
.hero-media-copy { margin: 0.3rem 0 0; color: var(--muted); }

.section { padding: 0 0 3.5rem; }
.section-dark { padding-top: 0.4rem; }
.section-highlight, .section-contrast, .section-dark { background: transparent; }
.section-heading-row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.5rem;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.75rem); margin-top: 0.2rem; }
.section-sub, .page-intro { max-width: 46rem; }
.section-link { white-space: nowrap; }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.demo-card {
  border-radius: 1.4rem;
  overflow: hidden;
}
.demo-card-media img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.demo-card-body { padding: 1rem 1rem 1.15rem; }
.demo-card h2, .demo-card h3 { margin: 0.25rem 0 0.45rem; font-family: var(--font-display); font-size: 1.55rem; }
.demo-card p { margin: 0 0 0.8rem; }
.demo-meta-row, .artifact-list, .workflow-command-list, .detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.demo-meta-row { color: var(--muted); font-size: 0.93rem; }
.artifact-chip {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.artifact-chip-muted { background: #efe7db; color: #705e4b; }

.section-two-up, .quickstart-shell, .demo-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}
.workflow-stack, .artifact-stack { display: grid; gap: 0.8rem; }
.story-step, .dashboard-column {
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.story-step h3, .card h3 { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: 1.35rem; }

.dashboard-panel { display: grid; gap: 1rem; }
.dashboard-logo { width: 5.5rem; }
.dashboard-surface { border-radius: 1.5rem; overflow: hidden; }
.dashboard-surface-bar {
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.dashboard-surface-body { padding: 1rem; display: grid; gap: 0.9rem; }
.dashboard-pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.dashboard-pill {
  padding: 0.35rem 0.6rem;
  background: var(--panel);
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.dashboard-line { height: 0.7rem; background: #ebdfce; border-radius: 999px; margin-top: 0.8rem; }
.dashboard-line-short { width: 68%; }
.dashboard-kicker { margin: 0; font-weight: 700; }

.cli-block {
  border-radius: 1.35rem;
  padding: 1rem;
}
.cli-block pre { margin: 0; white-space: pre-wrap; }
.cli-block + .cli-block, .workflow-command + .workflow-command { margin-top: 0.75rem; }
.workflow-command { padding: 0.85rem 1rem; border-radius: 1rem; background: var(--paper); border: 1px solid var(--line); }

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card-list-wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  border-radius: 1.3rem;
  padding: 1.15rem;
}
.card p { margin-bottom: 0; }
.card-emphasis { background: linear-gradient(180deg, var(--paper), #fff7eb); }

.page-shell { padding: 3.6rem 0 4.2rem; }
.page-inner { width: min(860px, calc(100% - 2rem)); margin: 0 auto; }
.page-inner-wide { width: min(var(--max-width), calc(100% - 2rem)); }
.page-title { font-size: clamp(2.1rem, 4vw, 4rem); }
.page-body { margin-top: 1.1rem; }
.page-body > *:first-child { margin-top: 0; }
.page-body pre { background: var(--paper); border: 1px solid var(--line); padding: 1rem; overflow: auto; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.detail-meta-grid p { margin: 0.2rem 0 0; }
.artifact-list-roomy { margin-top: 1rem; margin-bottom: 1rem; }
.detail-links { margin-top: 1rem; }
.detail-links a { padding: 0.45rem 0.65rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.demo-prose { margin-top: 1rem; }

.footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.8rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { margin: 0; font-family: var(--font-mono); }
.footer-copy { margin: 0.45rem 0 0; max-width: 34rem; }

@media (max-width: 900px) {
  .hero-grid, .section-two-up, .quickstart-shell, .demo-detail-grid { grid-template-columns: 1fr; }
  .nav-inner, .section-heading-row, .footer-inner { align-items: start; }
}

@media (max-width: 720px) {
  .nav-inner { flex-direction: column; padding: 0.9rem 0; }
  .hero-home, .page-shell { padding-top: 2.6rem; }
  .hero-brand-panel h1 { max-width: none; }
  .detail-meta-grid { grid-template-columns: 1fr; }
}
