@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=IBM+Plex+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap");

:root {
  --accent: #3f6b52;
  --accent-light: #eaf2ed;
  --accent-hover: #2e5240;
  --gray-50: #fafafa;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 56px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
  font-size: 13px;
  letter-spacing: 0.02em;
  gap: 0;
}

.site-nav .nav-wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: 0;
}

.site-nav a {
  color: var(--gray-500);
  text-decoration: none;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.site-nav a:hover {
  color: var(--gray-900);
}

.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
  background: none;
}

/* ── LAYOUT ──────────────────────────────────────── */

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.page-narrow { max-width: 820px; }
.page-wide   { max-width: 1100px; }

.mono {
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

/* ── HEADER (workflow / explorer) ────────────────── */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.header-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.header-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--gray-900);
}

.header-target {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--gray-500);
}

.header-target span {
  font-size: 12px;
  color: var(--gray-700);
  font-style: italic;
}

.caption {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── PIPELINE FIGURE (workflow) ──────────────────── */

.pipeline-figure {
  margin: 0 0 2rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.pipeline-diagram {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.pipeline-caption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-top: 10px;
  text-align: right;
}

/* ── STEPS (workflow) ────────────────────────────── */

.steps {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  border-bottom: 1px solid var(--gray-200);
}

.step:last-child { border-bottom: none; }

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--gray-200);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.step-body {
  padding: 1rem 1.25rem;
}

.step-body h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--gray-900);
}

.step-body p {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-700);
}

/* ── WORKFLOW CTA ────────────────────────────────── */

.workflow-cta {
  margin: 1.5rem 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.workflow-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.workflow-cta a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* ── FOOTER ──────────────────────────────────────── */

.footer {
  margin-top: 2rem;
  font-size: 12px;
  color: var(--gray-400);
  letter-spacing: 0.04em;
}

.footer a {
  color: var(--gray-500);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
}

.footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── HOME PAGE ───────────────────────────────────── */

.page-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero-headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: .75rem;
}

.hero-sub {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.loop-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 2.5rem;
}

.loop-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  background: #fff;
  color: var(--gray-700);
}

.loop-chip--accent {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.loop-arrow {
  color: var(--gray-400);
  font-size: 14px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(63,107,82,.2);
}

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.hero-contact {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.hero-contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.hero-contact a:hover {
  text-decoration: underline;
}

.hero-note {
  font-size: 13px;
  color: var(--gray-400);
  font-style: italic;
  max-width: 400px;
}

/* ── VIEWER (shared) ─────────────────────────────── */

.viewer {
  width: 100%;
  height: 280px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.viewer-frame {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}

.viewer-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}

/* ── LEGACY CLASSES (kept for compat) ────────────── */

.lead {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-900);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}

.card:hover {
  border-color: var(--gray-400);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.card-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.card-body {
  font-family: Inter, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-700);
  margin: 0 0 14px;
}

.card-cta {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.flow-node {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
  text-align: center;
  background: #fff;
}

.flow-node span {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.08em;
}

.flow-node-muted {
  opacity: 0.55;
  border-style: dashed;
}

.flow-arrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  padding: 0 2px;
}

.chart {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 8px;
  padding: 8px 6px;
}

.ig-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ig-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ig-row-label {
  width: 58px;
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.ig-cells {
  display: flex;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.ig-cell {
  flex: 1;
  min-width: 3px;
  height: 12px;
  border: 1px solid rgba(0,0,0,.06);
}

.ig-empty {
  font-size: 10px;
  padding: 8px;
  margin: 0;
  color: var(--gray-500);
}

.seq {
  font-size: 10px;
  letter-spacing: 0.06em;
  word-break: break-all;
  color: var(--gray-500);
  line-height: 1.5;
}

/* keep old home classes working (won't be used after rewrite but safe) */
.home-disclaimer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.home-disclaimer-text {
  max-width: 32rem;
  margin: 0;
  padding: 28px 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  background: #fff;
}

.home-disclaimer-text a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 1100px) {
  .columns { grid-template-columns: 1fr; }
  .col { border-right: none !important; border-bottom: 1px solid var(--gray-200); }
  .col:last-child { border-bottom: none; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-nav {
    padding: 0 1rem;
    font-size: 12px;
  }
  .site-nav a { padding: 0 .6rem; }
  .page { padding: 0 1rem 2rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-headline { font-size: 1.75rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
