:root {
  --bg: #f3efe4;
  --panel: rgba(255, 252, 245, 0.82);
  --ink: #1f2430;
  --muted: #5c6472;
  --line: rgba(31, 36, 48, 0.12);
  --blue: #154a7d;
  --gold: #a46f1f;
  --rust: #8f4a2f;
  --shadow: 0 18px 50px rgba(31, 36, 48, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(21, 74, 125, 0.11), transparent 34%),
    radial-gradient(circle at bottom right, rgba(164, 111, 31, 0.13), transparent 28%),
    linear-gradient(180deg, #f7f3ea 0%, var(--bg) 100%);
}

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

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero,
.section,
.fit-panel,
.info-card,
.project-card {
  backdrop-filter: blur(6px);
}

.hero {
  padding: 3rem;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 252, 245, 0.92), rgba(250, 245, 234, 0.72));
  box-shadow: var(--shadow);
}

.eyebrow,
.section-label {
  margin: 0 0 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 62ch;
  margin-bottom: 1.5rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions,
.contact-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.contact-link:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: #f7f3ea;
  box-shadow: 0 10px 24px rgba(31, 36, 48, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.55);
}

.button-small {
  padding: 0.72rem 0.95rem;
  font-size: 0.92rem;
}

.project-actions {
  margin-top: 1rem;
}

.meta-list,
.project-card ul,
.fit-panel ul {
  padding-left: 1.1rem;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin: 1.4rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.section {
  margin-top: 1.35rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.4rem;
}

.section-copy h2,
.contact-block h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.section-copy p,
.contact-block p,
.info-card p,
.project-card p,
.fit-panel li {
  color: var(--muted);
  line-height: 1.6;
}

.card-stack {
  display: grid;
  gap: 1rem;
}

.info-card,
.fit-panel,
.project-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card h3,
.fit-panel h3,
.info-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.1rem;
}

.accent-blue {
  background: linear-gradient(180deg, rgba(21, 74, 125, 0.08), rgba(255, 255, 255, 0.72));
}

.accent-gold {
  background: linear-gradient(180deg, rgba(164, 111, 31, 0.1), rgba(255, 255, 255, 0.72));
}

.accent-ink {
  background: linear-gradient(180deg, rgba(31, 36, 48, 0.08), rgba(255, 255, 255, 0.72));
}

.accent-rust {
  background: linear-gradient(180deg, rgba(143, 74, 47, 0.1), rgba(255, 255, 255, 0.72));
}

.contact-block {
  text-align: center;
}

.contact-actions {
  justify-content: center;
  margin-top: 1rem;
}

.contact-link {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid transparent;
}

.demo-hero h1 {
  max-width: 16ch;
}

.demo-stat {
  display: inline-flex;
  margin-bottom: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(21, 74, 125, 0.18);
  border-radius: 999px;
  background: rgba(21, 74, 125, 0.08);
  color: var(--blue);
  font-weight: 700;
}

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

.kb-list li {
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.demo-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.demo-input {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.demo-input:focus {
  border-color: rgba(21, 74, 125, 0.45);
  box-shadow: 0 0 0 4px rgba(21, 74, 125, 0.09);
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.question-chip {
  min-height: 4.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.question-chip:hover,
.question-chip.active {
  transform: translateY(-1px);
  border-color: rgba(21, 74, 125, 0.34);
  background: linear-gradient(180deg, rgba(21, 74, 125, 0.09), rgba(255, 255, 255, 0.74));
}

.question-chip:disabled {
  cursor: wait;
  opacity: 0.72;
}

.demo-output {
  min-height: 12rem;
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
}

.demo-output h3 {
  margin-bottom: 0.7rem;
}

.demo-output p {
  line-height: 1.6;
}

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

.typing-line {
  position: relative;
  margin-bottom: 0.55rem;
  color: var(--blue);
  font-family: "Courier New", monospace;
}

.typing-line::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 1rem;
  margin-left: 0.25rem;
  background: var(--blue);
  vertical-align: -0.15rem;
  animation: blink 900ms steps(2, start) infinite;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.pipeline-step {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(21, 74, 125, 0.08), rgba(255, 255, 255, 0.7));
  text-align: center;
  color: var(--ink);
  font-weight: 700;
}

.comparison-grid,
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.architecture-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-heading {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(164, 111, 31, 0.12);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.status-pill-blue {
  background: rgba(21, 74, 125, 0.1);
  color: var(--blue);
}

.terminal {
  height: 25rem;
  overflow: auto;
  padding: 1.2rem;
  border-radius: 18px;
  background: #10141d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #e9eef7;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
}

.terminal-line {
  margin: 0 0 0.55rem;
  line-height: 1.5;
  color: #d9e2ef;
}

.muted-terminal {
  color: #8492a8;
}

.terminal-decision {
  color: #f0c36a;
}

.terminal-complete {
  color: #7bd99a;
}

.demo-footer {
  color: var(--muted);
  text-align: center;
}

.project-page {
  max-width: 1180px;
}

.project-hero h1 {
  max-width: 12ch;
}

.reliable-hero h1 {
  max-width: 10ch;
}

.hero-intro {
  max-width: 72ch;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.principle-section h2,
.closing-statement h2 {
  max-width: 18ch;
  margin-bottom: 0.85rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.principle-section p,
.closing-statement p {
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.65;
}

.project-summary p {
  max-width: 82ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.orchestrator-pipeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.3rem;
}

.agent-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.3rem;
}

.orchestrator-pipeline span,
.agent-flow span,
.tag-grid span {
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(21, 74, 125, 0.08), rgba(255, 255, 255, 0.68));
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.agent-flow span {
  position: relative;
}

.agent-flow span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.43rem;
  z-index: 2;
  width: 0.35rem;
  height: 0.35rem;
  border-top: 2px solid rgba(21, 74, 125, 0.45);
  border-right: 2px solid rgba(21, 74, 125, 0.45);
  transform: translateY(-50%) rotate(45deg);
}

.workflow-list,
.feature-list {
  margin-bottom: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}

.component-grid,
.control-grid,
.tag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.control-grid {
  margin-bottom: 1rem;
}

.tag-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.code-card {
  overflow: hidden;
  border: 1px solid rgba(31, 36, 48, 0.18);
  border-radius: 20px;
  background: #10141d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.code-card pre {
  margin: 0;
  padding: 1.1rem;
  overflow-x: auto;
  color: #e9eef7;
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.comparison-section .comparison-grid {
  margin-bottom: 1rem;
}

.command-grid ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.failure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.failure-grid span {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-weight: 700;
}

.closing-statement {
  text-align: center;
}

.closing-statement h2,
.closing-statement p {
  margin-right: auto;
  margin-left: auto;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .hero,
  .section {
    padding: 1.4rem;
    border-radius: 24px;
  }

  .section-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .demo-input-row,
  .question-grid,
  .pipeline,
  .orchestrator-pipeline,
  .agent-flow,
  .component-grid,
  .control-grid,
  .tag-grid,
  .comparison-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .agent-flow span:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -0.48rem;
    transform: translateX(50%) rotate(135deg);
  }

  .failure-grid {
    grid-template-columns: 1fr;
  }

  .meta-list {
    display: block;
  }

  .meta-list li + li {
    margin-top: 0.4rem;
  }
}
