:root {
  --bg: #f5f2ea;
  --bg-strong: #efe8da;
  --paper: rgba(255, 252, 245, 0.78);
  --panel: rgba(255, 248, 237, 0.94);
  --panel-strong: rgba(255, 251, 245, 0.98);
  --text: #1a1a1a;
  --muted: #555;
  --line: rgba(31, 36, 31, 0.12);
  --line-strong: rgba(31, 36, 31, 0.22);
  --accent: #0b6b57;
  --accent-strong: #054739;
  --accent-soft: #d8ece4;
  --signal: #bc4d2b;
  --shadow: 0 18px 50px rgba(30, 28, 24, 0.08);
  --shadow-soft: 0 10px 24px rgba(30, 28, 24, 0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --max: 1180px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(11, 107, 87, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(188, 77, 43, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f5ef 0%, #f5f2ea 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  background: rgba(15, 25, 20, 0.06);
  padding: 0.1rem 0.3rem;
  border-radius: 0.35rem;
}

.site-shell {
  min-height: 100vh;
  padding-bottom: 1rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 1rem 0 1.15rem;
  background: linear-gradient(180deg, rgba(248, 245, 239, 0.96), rgba(248, 245, 239, 0.74));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.logo,
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  flex: 0 0 auto;
}

.brand span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.48);
  padding: 0.35rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.site-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  transition: background 0.2s ease, color 0.2s ease, transform 140ms ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a.active {
  background: rgba(11, 107, 87, 0.09);
  color: var(--text);
  transform: translateY(-1px);
}

.site-nav .nav-cta {
  background: var(--accent);
  color: white;
}

.site-nav .nav-demo {
  background: #f0a63a;
  color: #1f1a13;
  font-weight: 700;
}

.site-nav .nav-demo:hover,
.site-nav .nav-demo.is-active,
.site-nav .nav-demo.active {
  background: #db9228;
  color: #1f1a13;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta.is-active {
  background: var(--accent-strong);
  color: white;
}

main {
  padding-bottom: 4.5rem;
}

main > section {
  margin-top: var(--space-xl);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 32px;
}

.hero-copy,
.hero-panel,
.card,
.cta-band,
.quote-band,
.page-intro,
.diagram-shell,
.flow-stage,
.feature,
.use-case {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.card,
.cta-band,
.quote-band,
.page-intro,
.diagram-shell {
  padding: 1.8rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--signal);
  margin: 0 0 0.9rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.9rem);
  max-width: 11ch;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 800px;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.3rem, 2.25vw, 1.85rem);
}

h3 {
  font-size: 1rem;
}

.lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.72;
}

p {
  font-size: 16px;
  color: #555;
}

.section-subtext {
  font-size: 18px;
  color: #666;
  max-width: 600px;
}

.hero-subtext {
  font-size: 16px;
  max-width: 600px;
  color: #666;
}

.text-block,
.lead,
.hero-subtext,
.micro-note,
.section-subtext {
  max-width: 640px;
}

.hero-copy .lead {
  margin: 1rem 0 0;
}

.hero-actions,
.cta-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button-primary {
  background: #1f6f5f;
  color: white;
  box-shadow: 0 12px 24px rgba(11, 107, 87, 0.18);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 500;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.button-primary:hover {
  background: #175a4d;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.button-primary:active {
  transform: translateY(0);
}

.button-demo {
  background: #f0a63a;
  color: #1f1a13;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(240, 166, 58, 0.22);
}

.button-demo:hover {
  background: #db9228;
  color: #1f1a13;
  box-shadow: 0 6px 16px rgba(191, 124, 27, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line);
}

.button-secondary:hover {
  background: rgba(11, 107, 87, 0.06);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.micro-note {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 65ch;
  margin-top: 1rem;
  padding-left: 0.95rem;
  border-left: 3px solid rgba(11, 107, 87, 0.18);
}

.panel-kicker {
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--muted);
}

.flow-card {
  display: grid;
  gap: 0.65rem;
}

.flow-card span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.8rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(11, 107, 87, 0.09), rgba(11, 107, 87, 0.18));
  font-weight: 600;
  border: 1px solid rgba(11, 107, 87, 0.08);
}

.hero-panel blockquote,
.quote-band blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
  margin: 1.3rem 0 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.section-stack .section-heading {
  margin-bottom: var(--space-md);
  max-width: 60rem;
}

.section-stack .section-heading h2,
.card h2,
.page-intro h1 {
  margin-top: 0.25rem;
}

.card p,
.card li,
.feature p,
.use-case p,
.quote-band p,
.cta-band p,
.page-intro p {
  color: var(--muted);
}

.card ul,
.feature-grid,
.use-case-list {
  margin: 1rem 0 0;
}

.card ul {
  display: grid;
  gap: 0.55rem;
}

.feature-grid,
.use-case-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature,
.use-case {
  padding: 1.3rem;
  display: grid;
  gap: 0.7rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(1) {
  transition-delay: 0.05s;
}

.fade-in:nth-child(2) {
  transition-delay: 0.1s;
}

.fade-in:nth-child(3) {
  transition-delay: 0.15s;
}

.fade-in:nth-child(4) {
  transition-delay: 0.2s;
}

.steps-grid,
.flow-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.interactive-demo-shell {
  display: grid;
  gap: var(--space-md);
}

.demo-sticky-nav {
  position: static;
  display: grid;
  gap: 0.85rem;
  padding: 0;
  background: transparent;
}

.demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 245, 0.72);
  box-shadow: var(--shadow-soft);
}

.demo-progress-copy {
  display: grid;
  gap: 0.25rem;
}

.demo-progress-copy strong {
  font-size: 1rem;
}

.demo-progress-copy p {
  margin: 0;
  color: var(--muted);
}

.demo-toolbar-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.demo-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(11, 107, 87, 0.08);
  overflow: hidden;
}

.demo-progress-bar span {
  display: block;
  height: 100%;
  width: 16.666%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(11, 107, 87, 0.88), rgba(11, 107, 87, 0.58));
  transition: width 0.2s ease;
}

.demo-step-buttons {
  align-items: stretch;
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr);
}

.demo-step-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  position: relative;
  min-height: 0;
  padding: 0.32rem 0.5rem;
  gap: 0.08rem;
}

.demo-step-card .step-index {
  margin-bottom: 0;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.82rem;
}

.demo-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0;
}

.demo-step-history {
  display: grid;
  gap: 0;
  padding: 0.18rem 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(11, 107, 87, 0.08);
}

.demo-step-history strong {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.05;
}

.demo-step-history p {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.demo-step-state {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-step-trigger {
  min-width: 138px;
  min-height: 1.85rem;
  padding: 0.28rem 0.68rem;
}

.demo-step-card.is-active {
  border-color: rgba(11, 107, 87, 0.28);
  box-shadow: 0 14px 28px rgba(11, 107, 87, 0.12);
}

.demo-step-card.is-complete {
  border-color: rgba(11, 107, 87, 0.18);
  background: linear-gradient(180deg, rgba(248, 246, 242, 1), rgba(237, 247, 242, 0.95));
}

.demo-step-card.is-complete .step-index,
.demo-step-card.is-active .step-index {
  background: var(--accent);
  color: white;
  box-shadow: none;
}

.demo-step-trigger:focus-visible,
.demo-toolbar-actions .button:focus-visible {
  outline: 3px solid rgba(11, 107, 87, 0.24);
  outline-offset: 3px;
}

.demo-detail-grid {
  align-items: stretch;
}

.demo-detail-panel,
.demo-summary-panel {
  min-height: 100%;
}

.demo-detail-panel:focus {
  outline: none;
}

.demo-detail-panel {
  gap: 1rem;
}

.demo-detail-panel p,
.demo-summary-panel p {
  margin: 0;
}

.demo-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.demo-detail-item {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 107, 87, 0.08);
}

.demo-detail-item dt {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.demo-detail-item dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.demo-detail-list,
.demo-summary-panel ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.15rem;
}

.demo-tech-note {
  padding: 0.95rem 1rem;
  border-left: 3px solid rgba(11, 107, 87, 0.18);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.demo-tech-note strong {
  display: block;
  margin-bottom: 0.35rem;
}

.card,
.feature,
.use-case,
.step-card,
.flow-stage {
  min-height: 240px;
  padding: var(--space-md);
  border-radius: 20px;
  background: #f8f6f2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 0.7rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.feature:hover,
.use-case:hover,
.step-card:hover,
.flow-stage:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.step-card span,
.flow-stage span {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(11, 107, 87, 0.08);
}

.step-card h2,
.step-card h3,
.flow-stage h2,
.flow-stage h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.8vw, 2.1rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}

.demo-steps .step-card h2,
.demo-steps .step-card h3,
.demo-steps .flow-stage h2,
.demo-steps .flow-stage h3 {
  font-size: clamp(1rem, 1.35vw, 1.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.step-card p,
.flow-stage p {
  overflow-wrap: anywhere;
  max-width: 100%;
}

body[data-page="demo"] .card h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1.08;
}

.diagram-shell {
  display: grid;
  grid-template-columns: repeat(9, auto);
  gap: 0.75rem;
  align-items: center;
  overflow-x: auto;
}

.diagram-lane,
.diagram-arrow {
  white-space: nowrap;
}

.diagram-lane {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.diagram-lane.diagram-focus {
  background: linear-gradient(90deg, rgba(11, 107, 87, 0.14), rgba(11, 107, 87, 0.22));
}

.diagram-arrow {
  color: var(--signal);
  font-weight: 700;
}

.scope-card ul,
.card ul {
  padding-left: 1.2rem;
}

.caution {
  border-color: rgba(188, 77, 43, 0.22);
  background: linear-gradient(180deg, rgba(255, 248, 237, 0.94), rgba(255, 244, 238, 0.94));
}

.quote-band {
  display: grid;
  gap: 1rem;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.2rem;
  align-items: center;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .fade-in.visible,
  .card,
  .feature,
  .use-case,
  .step-card,
  .flow-stage,
  .button-primary,
  .button-secondary,
  .site-nav a,
  .demo-progress-bar span {
    transition: none !important;
    transform: none !important;
  }

  .fade-in {
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .hero,
  .section-grid,
  .feature-grid,
  .use-case-list,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .diagram-shell {
    grid-template-columns: 1fr;
  }

  .diagram-arrow {
    text-align: center;
  }

  .demo-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  h1,
  .hero-title {
    max-width: 100%;
  }

  .page-hero-title {
    max-width: 100%;
  }

  .demo-toolbar-actions {
    width: 100%;
  }

  .demo-toolbar-actions .button {
    flex: 1 1 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
