/* Agent Flow — "Technical Flow Notebook"
   Paper, ink and one rust-amber accent. No card grids, no purple gradients. */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #f3eee1;
  --paper-dark: #e9e1cb;
  --ink: #1c2541;
  --ink-soft: #4a5378;
  --ink-faint: rgba(28, 37, 65, 0.72);
  --amber: #b5651d;
  --amber-deep: #8f4d16;
  --amber-soft: #d99a55;
  --line: rgba(28, 37, 65, 0.16);
  --rail: rgba(181, 101, 29, 0.55);
  --max: 1180px;
  --gap-node: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.11  0 0 0 0 0.15  0 0 0 0 0.26  0 0 0 0.028 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

a { color: var(--amber-deep); }
a:hover { color: var(--amber); }

.kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  position: relative;
  padding-top: 14px;
  margin: 0 0 16px;
}
.kicker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--amber);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  max-width: var(--max);
  margin: 0 auto;
}
.mark {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}
.mark svg { display: block; }
.lang-switch {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 15px;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  touch-action: manipulation;
  transition: border-color .15s, color .15s;
}
.lang-switch:hover { border-color: var(--amber-soft); color: var(--amber-deep); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 56px 0 88px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.7rem);
  max-width: 12.5ch;
}
.hero .lede {
  font-size: 21px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 24px 0 32px;
  font-style: italic;
}
.hero-art { position: relative; height: 380px; }
.hero-art svg { width: 100%; height: 100%; }
.flow-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.flow-box.accent { fill: var(--amber); stroke: var(--amber-deep); }
.flow-box-label { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; fill: var(--ink); }
.flow-box-label.on-accent { fill: var(--paper); }
.flow-box-sub { font-family: 'Newsreader', serif; font-style: italic; font-size: 12px; fill: var(--ink-soft); }
.flow-box-sub.on-accent { fill: rgba(243,238,225,0.85); }
.flow-conn { stroke: var(--amber-deep); stroke-width: 1.8; }
.flow-branch { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; fill: var(--ink-faint); letter-spacing: 0.03em; }

@media (prefers-reduced-motion: no-preference) {
  .flow-box, .flow-conn { opacity: 0; animation: rise .5s ease-out forwards; transform-box: fill-box; transform-origin: center; }
  .flow-box { transform: translateY(10px); }
  .flow-box:nth-of-type(1) { animation-delay: .1s; }
  .flow-conn:nth-of-type(1) { animation-delay: .5s; }
  .flow-box:nth-of-type(2) { animation-delay: .7s; }
  .flow-conn:nth-of-type(2) { animation-delay: 1.1s; }
  .flow-conn:nth-of-type(3) { animation-delay: 1.3s; }
  .flow-conn:nth-of-type(4) { animation-delay: 1.3s; }
  .flow-box:nth-of-type(3) { animation-delay: 1.7s; }
  .flow-box:nth-of-type(4) { animation-delay: 1.7s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
}

/* ---------- scroll reveal (progressive enhancement: only when .js is set AND motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease-out, transform .7s ease-out;
  }
  html.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- CTA button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: 3px;
  padding: 15px 26px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--amber-deep); }
.btn:active { transform: translateY(1px); }
.btn-arrow { transition: transform .15s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.hero-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 16px;
  letter-spacing: 0.01em;
}

/* ---------- main column (same centered axis as the hero) ---------- */
.flow-spine {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  position: relative;
  padding: 64px 0;
}
@media (max-width: 720px) {
  .section { padding: 48px 0; }
}

.section.alt { background: var(--paper-dark); }
.section.alt::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--paper-dark);
  z-index: -1;
}

.section h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  max-width: 20ch;
  margin-bottom: 24px;
}

.section .body p { max-width: 62ch; margin: 0 0 16px; }
.section .body p:last-child { margin-bottom: 0; }

.pull {
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  border-left: 3px solid var(--amber-soft);
  padding-left: 20px;
  margin: 30px 0;
  max-width: 50ch;
}

/* ---------- flow examples (same list language as .def-list) ---------- */
.flows { display: flex; flex-direction: column; margin-top: 8px; }
.flow-item {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.flow-item:last-child { border-bottom: 1px solid var(--line); }
.flow-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber-deep);
  letter-spacing: 0.03em;
  padding-top: 5px;
}
.flow-tag .n {
  display: inline;
  font: inherit;
  color: var(--amber-deep);
  margin-right: 10px;
}
.flow-item h3 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 8px;
  font-style: italic;
  color: var(--ink);
}
.flow-item p { max-width: 60ch; margin: 0; color: var(--ink-soft); }

@media (max-width: 640px) {
  .flow-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; max-width: 68ch; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  color: var(--amber-deep);
  flex: 0 0 auto;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a {
  margin: 14px 0 0;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- form ---------- */
.signup {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  max-width: 480px;
  flex-wrap: wrap;
}
.signup-field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.signup-field label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.signup input[type="email"] {
  width: 100%;
  font-family: 'Newsreader', serif;
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}
.signup input[type="email"]:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.signup .btn { flex: 0 0 auto; align-self: flex-end; }
.form-fine {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 12px;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  margin-top: 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.footer-row a { color: var(--ink-faint); }
.footer-row a:hover { color: var(--amber-deep); }
.legal-note {
  max-width: 60ch;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.6;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 220px; order: -1; }
}

/* ---------- cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: -260px; z-index: 50;
  max-width: 520px; margin: 0 auto;
  background: var(--ink); color: var(--paper);
  border-radius: 6px; padding: 20px 22px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.28);
  font-family: 'Newsreader', serif; font-size: 15px; line-height: 1.55;
  transition: bottom .4s ease-out;
}
.cookie-banner.is-visible { bottom: 20px; }
.cookie-banner p { margin: 0 0 14px; color: var(--paper); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions button {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 10px 18px;
  border-radius: 3px; cursor: pointer; min-height: 40px;
}
#cookie-accept { background: var(--amber); color: var(--ink); border: none; }
#cookie-accept:hover { background: var(--amber-soft); }
#cookie-decline { background: transparent; color: var(--paper); border: 1px solid rgba(243,238,225,0.35); }
#cookie-decline:hover { border-color: var(--paper); }
@media (max-width: 640px) { .cookie-banner { left: 12px; right: 12px; padding: 16px 18px; bottom: -300px; } .cookie-banner.is-visible { bottom: 12px; } }

/* --- Accessibility: visible keyboard focus --- */
a:focus-visible, button:focus-visible, .lang-switch:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--amber-deep);
  outline-offset: 2px;
}

/* --- Legal page (privacy policy) --- */
.legal-page { min-height: 100vh; }
.legal-wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-back { display: inline-block; margin-bottom: 32px; font-size: 14px; text-decoration: none; }
.legal-content h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin: 0 0 8px; }
.legal-content .legal-updated { color: var(--ink-soft); font-size: 14px; margin: 0 0 40px; }
.legal-content h2 { font-size: 19px; margin: 36px 0 12px; }
.legal-content p { line-height: 1.65; margin: 0 0 14px; max-width: 68ch; }
.legal-content code { font-size: 0.9em; padding: 1px 5px; border-radius: 3px; background: rgba(128,128,128,0.15); }

/* ---------- definition list (agentic workflow vs script vs RPA) ---------- */
.def-list { margin: 28px 0 0; max-width: 62ch; }
.def-list > div {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.def-list > div:last-child { border-bottom: 1px solid var(--line); }
.def-list dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--amber-deep);
  padding-top: 3px;
}
.def-list dd { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
@media (max-width: 640px) {
  .def-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- topbar secondary nav (blog link) ---------- */
.topbar-links { display: flex; align-items: center; gap: 20px; }
.topbar-blog-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .15s;
}
.topbar-blog-link:hover { color: var(--amber-deep); }

/* ---------- blog hub ---------- */
.blog-header { padding: 48px 0 16px; }
.blog-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 16ch;
  margin: 0 0 20px;
}
.blog-intro {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 66ch;
  font-style: italic;
  margin: 0;
}
.blog-list { display: flex; flex-direction: column; margin-top: 8px; }
.blog-list-item {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.blog-list-item:last-child { border-bottom: 1px solid var(--line); }
.blog-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 5px;
}
.blog-list-item h2 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.blog-list-item h2 a { color: var(--ink); text-decoration: none; }
.blog-list-item h2 a:hover { color: var(--amber-deep); }
.blog-list-item p { max-width: 62ch; margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) {
  .blog-list-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- blog article ---------- */
.breadcrumbs {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 22px;
}
.breadcrumbs a { color: var(--ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber-deep); }
.breadcrumbs span { margin: 0 6px; }
.article-header { padding: 40px 0 8px; }
.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  max-width: 19ch;
  margin: 0 0 14px;
}
.article-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 8px;
}
.article-body .body h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  max-width: 26ch;
  margin: 44px 0 16px;
}
.article-body .body h2:first-child { margin-top: 0; }
.article-body .body h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 28px 0 12px;
}
.article-body .body ul, .article-body .body ol {
  max-width: 62ch;
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--ink-soft);
}
.article-body .body li { margin-bottom: 8px; }
.article-body .body li::marker { color: var(--amber-deep); }
.article-table-wrap { max-width: 68ch; overflow-x: auto; margin: 20px 0 28px; }
.article-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 16px; }
.article-table th, .article-table td {
  text-align: left;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber-deep);
}
.article-links p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  margin-top: 24px;
}
