:root {
  --bg: #f7f5f1;
  --surface: #fffefb;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --placeholder: #d6d3d1;
  --max: 44rem;
  --nav-h: 3.25rem;
  --font: "Source Han Sans SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d8f3ef 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #f5e6d3 0%, transparent 45%),
    var(--bg);
  line-height: 1.65;
  font-size: 1.02rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #115e59;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(247, 245, 241, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-nav .brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
}

.site-nav .nav-links a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-links a:hover {
  color: var(--accent);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.wrap h1 {
  margin: 0.9rem 0 1.25rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.home-page {
  position: relative;
  overflow-x: clip;
}

.soft-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.home-page .site-nav,
.home-page .home-hero,
.home-page .footer {
  position: relative;
  z-index: 1;
}

.home-hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 2rem, 36rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.home-hero .eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.home-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.home-hero .lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.home-hero .motto {
  margin: 0 0 2.25rem;
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, #0f766e 0%, #b45309 55%, #0f766e 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: motto-shine 8s ease-in-out infinite;
}

.home-hero .motto-line {
  display: block;
}

@keyframes motto-shine {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .motto {
    animation: none;
    background: none;
    color: #0f766e;
  }
}

.case-card {
  display: block;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.case-card:hover {
  border-color: var(--accent);
}

.case-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.case-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.case-card .meta {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--accent);
}

section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: 0;
  padding-top: 1rem;
}

section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.lede {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--accent-soft);
  color: #115e59;
  font-size: 0.78rem;
  border-radius: 2px;
  margin-right: 0.35rem;
}

.arch {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.arch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.arch-box {
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.92rem;
}

.arch-box strong {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.arch-box.rag {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.arch-arrow {
  color: var(--muted);
  font-size: 0.85rem;
}

.arch-arrow.down {
  display: block;
  text-align: center;
  margin: 0.25rem 0;
}

.arch-sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-line {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.capability-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.capability-list li {
  margin: 0.2rem 0;
}

.agent-flow {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1rem;
}

.agent-lane,
.agent-branch {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
}

.agent-branch .arch-box {
  flex: 1 1 10rem;
}

.arch-box.accent {
  border-color: #5eead4;
  background: #f0fdfa;
}

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

.split-col {
  padding: 0.75rem;
  background: rgba(255, 254, 251, 0.7);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.split-col h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.split-col .arch-box {
  width: 100%;
}

@media (max-width: 800px) {
  .agent-split {
    grid-template-columns: 1fr;
  }
}

.evidence-block {
  margin: 1.75rem 0 2rem;
}

.evidence-block h3 {
  margin-top: 0;
}

.shot-frame {
  margin: 0.75rem 0 0.5rem;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: repeating-linear-gradient(
    -45deg,
    #e7e5e4,
    #e7e5e4 8px,
    #f5f5f4 8px,
    #f5f5f4 16px
  );
  border: 1px dashed #a8a29e;
  border-radius: 2px;
  color: #44403c;
  font-size: 0.95rem;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  cursor: zoom-in;
}

.shot-frame.has-image {
  background: var(--surface);
  border-style: solid;
  padding: 0;
  min-height: 0;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1rem;
  background: rgba(12, 10, 9, 0.92);
}

.image-lightbox img {
  display: block;
  max-width: 96vw;
  max-height: calc(100vh - 4.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.image-lightbox-close {
  position: fixed;
  top: 0.85rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.lightbox-open {
  overflow: hidden;
}

.prompt-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.prompt-note code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: #f5f5f4;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
  background: var(--surface);
}

table.data th,
table.data td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: #f5f5f4;
  font-weight: 600;
}

table.data caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.stack-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.2rem;
}

.stack-list li {
  margin: 0.25rem 0;
}

.note-box {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
}

.code-tree {
  padding: 0.85rem 1rem;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer p {
  margin: 0.25rem 0;
}

.placeholder-link {
  color: #a8a29e;
  font-style: italic;
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    height: auto;
    align-items: flex-start;
    padding: 0.65rem 1rem;
  }

  .wrap {
    padding-top: 1.25rem;
  }
}
