/* ---------------------------------------------------------------
   Contextually — design tokens v2
   ink petrol #0E2226 / deep pane #13343B / flow cyan #43D9C0
   bright flow #8FF2E2 / audit amber #E8A33D / paper #F2F5F4
--------------------------------------------------------------- */
:root {
  --petrol: #0E2226;
  --petrol-deep: #091A1D;
  --pane: #13343B;
  --pane-2: #0F2A30;
  --flow: #43D9C0;
  --flow-bright: #8FF2E2;
  --flow-dim: #2A8F80;
  --amber: #E8A33D;
  --paper: #F2F5F4;
  --paper-2: #E7ECEA;
  --ink: #1C2B2E;
  --ink-soft: #4A5C5F;
  --line: rgba(14, 34, 38, 0.14);
  --line-dark: rgba(255, 255, 255, 0.10);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --display: "Archivo", var(--sans);
  --max: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--flow); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------- nav ------------------------------- */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border-bottom: 1px solid transparent;
  color: #E9F2F0;
}
nav.top.scrolled {
  background: rgba(9, 26, 29, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: rgba(67, 217, 192, 0.12);
  box-shadow: 0 8px 32px rgba(6, 18, 20, 0.35);
}
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand {
  font-family: var(--display);
  font-weight: 600; font-size: 21px; letter-spacing: -0.02em;
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.nav-links { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.nav-links a { text-decoration: none; opacity: 0.82; transition: opacity 0.2s ease; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  background: var(--flow); color: var(--petrol) !important;
  padding: 9px 18px; border-radius: 6px; font-weight: 600; opacity: 1 !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { background: var(--flow-bright); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(67, 217, 192, 0.28); }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ------------------------------- hero ------------------------------- */
header.site {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% 8%, rgba(67, 217, 192, 0.10), transparent 60%),
    radial-gradient(900px 600px at 6% 92%, rgba(232, 163, 61, 0.05), transparent 55%),
    linear-gradient(180deg, var(--petrol-deep) 0%, var(--petrol) 46%, var(--petrol) 100%);
  color: #E9F2F0;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.9;
}
header.site .wrap, header.site .tokenmath { position: relative; z-index: 2; }

.hero { padding: 168px 0 0; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.01; letter-spacing: -0.03em; font-weight: 660;
  max-width: 14ch;
}
.hero h1 .flow-text {
  background: linear-gradient(92deg, var(--flow) 10%, var(--flow-bright) 60%, var(--flow) 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.sub {
  margin-top: 24px; font-size: 19px; line-height: 1.65;
  color: rgba(233, 242, 240, 0.78); max-width: 56ch;
}
.hero-ctas { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* staged hero entrance */
.stage { opacity: 0; transform: translateY(18px); animation: stagein 0.9s var(--ease-out) forwards; }
.stage-2 { animation-delay: 0.12s; }
.stage-3 { animation-delay: 0.24s; }
.stage-4 { animation-delay: 0.42s; }
@keyframes stagein { to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 14px 28px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; font-family: var(--sans);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn .arr { transition: transform 0.22s var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--flow) 0%, #37C4AC 100%);
  color: var(--petrol);
  box-shadow: 0 8px 26px rgba(67, 217, 192, 0.22), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(67, 217, 192, 0.34), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-ghost { border-color: rgba(255,255,255,0.18); color: #E9F2F0; background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: rgba(143, 242, 226, 0.45); background: rgba(67, 217, 192, 0.06); transform: translateY(-2px); }

/* ------------------------- signature diagram ------------------------- */
.flow-diagram { padding: 64px 0 8px; position: relative; }
.flow-diagram::before {
  content: ""; position: absolute; inset: 10% 18%;
  background: radial-gradient(closest-side, rgba(67, 217, 192, 0.13), transparent 70%);
  pointer-events: none;
}
.flow-diagram svg { width: 100%; height: auto; display: block; position: relative; }
.dash-line { stroke-dasharray: 7 9; animation: flowdash 1.4s linear infinite; }
.dash-line.slow { animation-duration: 2.2s; }
@keyframes flowdash { to { stroke-dashoffset: -16; } }
.runtime-frame { animation: pulseframe 3.2s ease-in-out infinite; }
@keyframes pulseframe {
  0%, 100% { stroke-opacity: 0.4; }
  50% { stroke-opacity: 0.95; }
}
.node-card { transition: stroke 0.25s ease; }

/* ------------------------- token math strip ------------------------- */
.tokenmath {
  border-top: 1px solid var(--line-dark);
  background: linear-gradient(180deg, rgba(15, 42, 48, 0.6), var(--pane-2));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tokenmath .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.tm-cell { padding: 38px 26px; border-left: 1px solid var(--line-dark); }
.tm-cell:first-child { border-left: none; padding-left: 0; }
.tm-num {
  font-family: var(--mono); font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500; color: #E9F2F0; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tm-num em { font-style: normal; color: var(--flow); text-shadow: 0 0 24px rgba(67, 217, 192, 0.45); }
.tm-label {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.14em; color: rgba(233, 242, 240, 0.5); margin-top: 8px;
}
@media (max-width: 720px) {
  .tokenmath .wrap { grid-template-columns: 1fr; }
  .tm-cell { border-left: none; border-top: 1px solid var(--line-dark); padding-left: 0; }
  .tm-cell:first-child { border-top: none; }
}

/* --------------------------- connector ticker --------------------------- */
.ticker-strip {
  background: var(--petrol-deep);
  border-top: 1px solid var(--line-dark);
  overflow: hidden; position: relative; z-index: 2;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; gap: 0; width: max-content;
  animation: tick 38s linear infinite;
}
.ticker-strip:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker-track span {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  color: rgba(233, 242, 240, 0.42); padding: 0 26px; white-space: nowrap;
}
.ticker-track span b { color: rgba(143, 242, 226, 0.6); font-weight: 400; }

/* ------------------------------ sections ------------------------------ */
section.block { padding: 104px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--flow-dim); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--flow-dim); }
.block h2 {
  font-family: var(--display); font-weight: 630;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.07; letter-spacing: -0.025em;
  max-width: 22ch;
}
.block p.lede { margin-top: 20px; font-size: 18px; color: var(--ink-soft); max-width: 62ch; }

/* problem cards */
.probs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 58px; }
.prob {
  position: relative;
  background: linear-gradient(180deg, #FDFEFE, #F8FAFA);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 30px 28px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease;
}
.prob::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(67,217,192,0.55), transparent);
  opacity: 0; transition: opacity 0.35s ease;
}
.prob:hover {
  transform: translateY(-5px);
  border-color: rgba(67, 217, 192, 0.35);
  box-shadow: 0 22px 44px rgba(14, 34, 38, 0.10);
}
.prob:hover::before { opacity: 1; }
.prob .mono-tag {
  font-family: var(--mono); font-size: 13px; color: var(--flow-dim);
  display: block; margin-bottom: 14px;
}
.prob h3 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.prob p { margin-top: 10px; font-size: 15.5px; color: var(--ink-soft); }
@media (max-width: 860px) { .probs { grid-template-columns: 1fr; } }

/* how it works */
.steps { margin-top: 58px; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 84px 1fr; gap: 26px;
  padding: 36px 0; border-top: 1px solid var(--line);
  transition: background 0.3s ease;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step:hover { background: linear-gradient(90deg, rgba(67,217,192,0.045), transparent 60%); }
.step-num { font-family: var(--mono); font-size: 15px; color: var(--flow-dim); padding-top: 4px; }
.step h3 { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.step p { margin-top: 10px; color: var(--ink-soft); max-width: 64ch; }
.step code {
  font-family: var(--mono); font-size: 14px; background: var(--paper-2);
  padding: 2px 7px; border-radius: 4px;
}
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: 8px; } }

/* ------------------------- audit ledger (dark) ------------------------- */
.dark {
  background:
    radial-gradient(900px 480px at 90% 0%, rgba(67, 217, 192, 0.07), transparent 60%),
    var(--petrol);
  color: #E9F2F0;
  border-top: 1px solid rgba(67, 217, 192, 0.18);
  position: relative;
}
.dark::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 242, 226, 0.6), transparent);
}
.dark .block h2 { color: #F2F8F6; }
.dark .eyebrow { color: var(--flow); }
.dark .eyebrow::before { background: var(--flow); }
.dark p.lede { color: rgba(233, 242, 240, 0.72); }

.ledger {
  margin-top: 52px;
  background: linear-gradient(180deg, #16393F, var(--pane));
  border: 1px solid var(--line-dark); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(4, 14, 16, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.ledger-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 24px; border-bottom: 1px solid var(--line-dark);
  font-family: var(--mono); font-size: 13px; color: rgba(233,242,240,0.6);
  background: rgba(9, 26, 29, 0.4);
}
.ledger-bar .live { color: var(--amber); }
.ledger-bar .live .blink { animation: blink 1.6s steps(2, start) infinite; display: inline-block; }
@keyframes blink { 50% { opacity: 0.15; } }
.ledger-lines {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.95;
  padding: 28px 26px; overflow-x: auto; color: #CFE0DC;
}
.lline { white-space: pre; opacity: 0; transform: translateX(-8px); }
.ledger.in .lline { animation: llin 0.5s var(--ease-out) forwards; }
.ledger.in .lline:nth-child(1) { animation-delay: 0.10s; }
.ledger.in .lline:nth-child(2) { animation-delay: 0.32s; }
.ledger.in .lline:nth-child(3) { animation-delay: 0.54s; }
.ledger.in .lline:nth-child(4) { animation-delay: 0.76s; }
.ledger.in .lline:nth-child(5) { animation-delay: 0.98s; }
.ledger.in .lline:nth-child(6) { animation-delay: 1.20s; }
.ledger.in .lline:nth-child(7) { animation-delay: 1.48s; }
@keyframes llin { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lline { opacity: 1; transform: none; } }
.ledger .k { color: rgba(233,242,240,0.45); }
.ledger .v-flow { color: var(--flow); }
.ledger .v-amber { color: var(--amber); }
.ledger .v-dim { color: rgba(207,224,220,0.55); }

.gov-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 52px; }
.gov-point {
  padding: 24px 22px; border: 1px solid var(--line-dark); border-radius: 12px;
  background: rgba(19, 52, 59, 0.35);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
}
.gov-point:hover { border-color: rgba(232, 163, 61, 0.4); background: rgba(19, 52, 59, 0.6); transform: translateY(-4px); }
.gov-point h3 {
  font-family: var(--display); font-size: 18px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.gov-point h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--amber);
  flex: 0 0 auto; box-shadow: 0 0 12px rgba(232, 163, 61, 0.5);
}
.gov-point p { margin-top: 8px; font-size: 15px; color: rgba(233,242,240,0.66); }
@media (max-width: 860px) { .gov-points { grid-template-columns: 1fr; } }

/* ------------------------------ mcp strip ------------------------------ */
.mcp-strip {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
  margin-top: 10px;
}
.mcp-code {
  background: linear-gradient(160deg, #10282D, var(--petrol));
  border: 1px solid rgba(67, 217, 192, 0.16);
  border-radius: 14px; padding: 28px 26px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.8; color: #CFE0DC;
  overflow-x: auto;
  box-shadow: 0 24px 56px rgba(14, 34, 38, 0.22);
  position: relative;
}
.mcp-code::before {
  content: "mcp.json"; position: absolute; top: -11px; left: 20px;
  font-size: 11px; letter-spacing: 0.1em; color: var(--flow-dim);
  background: var(--paper); padding: 2px 10px; border: 1px solid var(--line); border-radius: 20px;
}
.mcp-code .c { color: rgba(207,224,220,0.4); }
.mcp-code .s { color: var(--flow); }
@media (max-width: 860px) { .mcp-strip { grid-template-columns: 1fr; } }

/* ------------------------------ cta ------------------------------ */
.cta-outer {
  background:
    radial-gradient(700px 340px at 50% 0%, rgba(67, 217, 192, 0.10), transparent 65%),
    var(--paper);
}
.cta-form { margin-top: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.cta-form .full { grid-column: 1 / -1; }
.cta-form input {
  font-family: var(--sans); font-size: 16px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF;
  color: var(--ink); width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cta-form input:focus { border-color: var(--flow-dim); box-shadow: 0 0 0 4px rgba(67, 217, 192, 0.14); outline: none; }
.cta-form input::placeholder { color: #93A3A0; }
.cta-form button { grid-column: 1 / -1; justify-self: start; }
.form-msg { margin-top: 16px; font-size: 15px; font-family: var(--mono); }
.form-msg.ok { color: var(--flow-dim); }
.form-msg.err { color: #C0533B; }
@media (max-width: 640px) { .cta-form { grid-template-columns: 1fr; } }

/* ------------------------------ cases ------------------------------ */
.cases-grid { display: grid; grid-template-columns: 360px 1fr; gap: 30px; margin-top: 58px; align-items: stretch; }
.case-rail { display: flex; flex-direction: column; gap: 14px; }
.case-tab {
  text-align: left; width: 100%; background: linear-gradient(180deg, #FDFEFE, #F8FAFA);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px;
  cursor: pointer; font-family: var(--sans); font-size: 15px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}
.case-tab:hover { transform: translateY(-2px); border-color: rgba(67, 217, 192, 0.35); }
.case-tab.active {
  border-color: rgba(67, 217, 192, 0.55);
  box-shadow: 0 14px 32px rgba(14, 34, 38, 0.10), inset 3px 0 0 var(--flow);
}
.case-tab .goal-label {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.13em; color: var(--flow-dim); display: block; margin-bottom: 8px;
}
.case-tab p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.case-tab strong { display: block; font-family: var(--display); font-stretch: 124%; font-weight: 620; font-size: 16.5px; margin-bottom: 6px; letter-spacing: -0.005em; }

.case-stage { position: relative; }
.case-panel { display: none; height: 100%; }
.case-panel.active { display: flex; flex-direction: column; }
.case-code {
  flex: 1;
  background: linear-gradient(160deg, #10282D, var(--petrol));
  border: 1px solid rgba(67, 217, 192, 0.16);
  border-radius: 14px 14px 0 0; padding: 26px 26px 20px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.85; color: #CFE0DC;
  overflow-x: auto;
  box-shadow: 0 24px 56px rgba(14, 34, 38, 0.22);
}
.case-code .goalline {
  color: rgba(233, 242, 240, 0.55); border-bottom: 1px dashed rgba(255,255,255,0.12);
  padding-bottom: 12px; margin-bottom: 14px; white-space: pre-wrap;
}
.case-code .goalline b { color: var(--amber); font-weight: 500; }
.cl { display: block; white-space: pre; opacity: 0; transform: translateX(-6px); }
.case-panel.active .cl { animation: llin 0.4s var(--ease-out) forwards; }
.case-panel.active .cl:nth-of-type(1) { animation-delay: 0.05s; }
.case-panel.active .cl:nth-of-type(2) { animation-delay: 0.13s; }
.case-panel.active .cl:nth-of-type(3) { animation-delay: 0.21s; }
.case-panel.active .cl:nth-of-type(4) { animation-delay: 0.29s; }
.case-panel.active .cl:nth-of-type(5) { animation-delay: 0.37s; }
.case-panel.active .cl:nth-of-type(6) { animation-delay: 0.45s; }
.case-panel.active .cl:nth-of-type(7) { animation-delay: 0.53s; }
.case-panel.active .cl:nth-of-type(8) { animation-delay: 0.61s; }
@media (prefers-reduced-motion: reduce) { .cl { opacity: 1; transform: none; } }
.case-code .kw { color: #8FF2E2; }
.case-code .fn { color: var(--flow); }
.case-code .str { color: #E8C27A; }
.case-code .cm { color: rgba(207, 224, 220, 0.4); }
.case-result {
  border: 1px solid rgba(67, 217, 192, 0.16); border-top: none;
  border-radius: 0 0 14px 14px;
  background: var(--petrol-deep);
  padding: 15px 26px;
  font-family: var(--mono); font-size: 13px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: rgba(233, 242, 240, 0.6);
}
.case-result .out { color: var(--flow); }
.case-result .tok { color: var(--amber); }
@media (max-width: 900px) {
  .cases-grid { grid-template-columns: 1fr; }
  .case-rail { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .case-tab { min-width: 240px; }
}
footer.site {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px; font-size: 14px; color: var(--ink-soft);
}
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* --------------------------- gather (ultimate context) --------------------------- */
.gather { margin-top: 60px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 860px; margin: 0 auto; }
.chip {
  font-family: var(--mono); font-size: 13px; padding: 8px 16px;
  border: 1px solid var(--line-dark); border-radius: 20px;
  color: rgba(233, 242, 240, 0.75); background: rgba(19, 52, 59, 0.55);
  transition: transform 1s var(--ease-out), opacity 1s ease, border-color 0.4s ease;
  transform: var(--scatter, none); opacity: 0.4;
}
.gather.in .chip { transform: none; opacity: 1; }
.gather.in .chip:hover { border-color: rgba(67, 217, 192, 0.5); }
.chips .chip:nth-child(1)  { --scatter: translate(-70px, -46px) rotate(-7deg); }
.chips .chip:nth-child(2)  { --scatter: translate(38px, -72px) rotate(5deg); }
.chips .chip:nth-child(3)  { --scatter: translate(-24px, 58px) rotate(-4deg); }
.chips .chip:nth-child(4)  { --scatter: translate(84px, -30px) rotate(8deg); }
.chips .chip:nth-child(5)  { --scatter: translate(-96px, 24px) rotate(6deg); }
.chips .chip:nth-child(6)  { --scatter: translate(20px, 76px) rotate(-9deg); }
.chips .chip:nth-child(7)  { --scatter: translate(66px, 48px) rotate(4deg); }
.chips .chip:nth-child(8)  { --scatter: translate(-50px, -68px) rotate(9deg); }
.chips .chip:nth-child(9)  { --scatter: translate(102px, 18px) rotate(-5deg); }
.chips .chip:nth-child(10) { --scatter: translate(-84px, 62px) rotate(3deg); }
.chips .chip:nth-child(11) { --scatter: translate(30px, -54px) rotate(-6deg); }
.chips .chip:nth-child(12) { --scatter: translate(-36px, 40px) rotate(7deg); }
.gather.in .chip:nth-child(2)  { transition-delay: 0.05s; }
.gather.in .chip:nth-child(3)  { transition-delay: 0.10s; }
.gather.in .chip:nth-child(4)  { transition-delay: 0.15s; }
.gather.in .chip:nth-child(5)  { transition-delay: 0.20s; }
.gather.in .chip:nth-child(6)  { transition-delay: 0.25s; }
.gather.in .chip:nth-child(7)  { transition-delay: 0.30s; }
.gather.in .chip:nth-child(8)  { transition-delay: 0.35s; }
.gather.in .chip:nth-child(9)  { transition-delay: 0.40s; }
.gather.in .chip:nth-child(10) { transition-delay: 0.45s; }
.gather.in .chip:nth-child(11) { transition-delay: 0.50s; }
.gather.in .chip:nth-child(12) { transition-delay: 0.55s; }
@media (prefers-reduced-motion: reduce) { .chip { transform: none; opacity: 1; } }
.gather-arrow {
  margin: 26px auto 0; width: 1px; height: 44px;
  background: linear-gradient(180deg, rgba(67, 217, 192, 0.1), var(--flow));
  position: relative;
}
.gather-arrow::after {
  content: ""; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--flow);
}
.context-pill {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 22px; padding: 14px 28px; border-radius: 40px;
  border: 1px solid rgba(67, 217, 192, 0.45);
  background: linear-gradient(160deg, rgba(19, 52, 59, 0.9), rgba(15, 42, 48, 0.9));
  font-family: var(--mono); font-size: 14.5px; color: var(--flow-bright);
  box-shadow: 0 0 44px rgba(67, 217, 192, 0.22), inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.8s ease 0.7s, transform 0.8s var(--ease-out) 0.7s;
}
.gather.in .context-pill { opacity: 1; transform: none; }
.context-pill .tok { color: var(--amber); }
.gather-tag { margin-top: 20px; font-size: 14.5px; color: rgba(233, 242, 240, 0.5); font-family: var(--sans); }

/* --------------------------- use cases --------------------------- */
.uc-hero { padding: 158px 0 76px; position: relative; z-index: 2; }
.uc-hero .eyebrow { color: var(--flow); }
.uc-hero .eyebrow::before { background: var(--flow); }
.uc-hero h1 {
  font-family: var(--display); font-stretch: 124%; font-weight: 690;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -0.02em;
  max-width: 18ch;
}
.uc-hero p.sub { margin-top: 20px; font-size: 18px; line-height: 1.65; color: rgba(233, 242, 240, 0.76); max-width: 58ch; }
.uc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 56px; }
.uc-card {
  display: block; text-decoration: none;
  background: linear-gradient(180deg, #FDFEFE, #F8FAFA);
  border: 1px solid var(--line); border-radius: 12px; padding: 28px 26px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.uc-card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(67,217,192,0.55), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.uc-card:hover { transform: translateY(-4px); border-color: rgba(67, 217, 192, 0.4); box-shadow: 0 20px 44px rgba(14, 34, 38, 0.10); }
.uc-card:hover::before { opacity: 1; }
.uc-card .mono-tag { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--flow-dim); display: block; margin-bottom: 12px; }
.uc-card h3 { font-family: var(--display); font-stretch: 124%; font-weight: 630; font-size: 21px; letter-spacing: -0.01em; color: var(--ink); }
.uc-card p { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.uc-card .go { display: inline-block; margin-top: 16px; font-family: var(--mono); font-size: 13px; color: var(--flow-dim); }
.uc-card:hover .go { color: var(--flow); }
@media (max-width: 800px) { .uc-grid { grid-template-columns: 1fr; } }
.uc-code-wrap { margin-top: 54px; }
.uc-flow {
  background: linear-gradient(165deg, #14363D, var(--petrol));
  border: 1px solid rgba(67, 217, 192, 0.18);
  border-radius: 14px; padding: 24px 22px; margin: 26px 0 10px;
  box-shadow: 0 22px 48px rgba(14, 34, 38, 0.18);
}
.uc-flow svg { width: 100%; height: auto; display: block; }
.crumb { font-family: var(--mono); font-size: 13px; margin-bottom: 22px; }
.crumb a { color: rgba(233,242,240,0.6); text-decoration: none; }
.crumb a:hover { color: var(--flow); }

/* --------------------------- pipeline (how it works) --------------------------- */
.pipeline {
  display: grid; grid-template-columns: 1fr 52px 1fr 52px 1fr;
  gap: 0; margin-top: 58px; align-items: stretch;
}
.pl-stage { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.pipeline.in .pl-stage { opacity: 1; transform: none; }
.pipeline.in .pl-stage:nth-of-type(1) { transition-delay: 0.05s; }
.pipeline.in .pl-stage:nth-of-type(3) { transition-delay: 0.5s; }
.pipeline.in .pl-stage:nth-of-type(5) { transition-delay: 0.95s; }
.pl-canvas {
  background: linear-gradient(165deg, #14363D, var(--petrol));
  border: 1px solid rgba(67, 217, 192, 0.18);
  border-radius: 14px; padding: 18px 16px 12px;
  box-shadow: 0 18px 40px rgba(14, 34, 38, 0.16);
}
.pl-canvas svg { width: 100%; height: auto; display: block; }
.pl-num { font-family: var(--mono); font-size: 13px; color: var(--flow-dim); margin: 20px 0 8px; }
.pl-stage h3 { font-family: var(--display); font-stretch: 124%; font-size: 20px; font-weight: 630; letter-spacing: -0.008em; }
.pl-stage p { margin-top: 8px; font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.pl-link { position: relative; align-self: center; height: 2px; margin-top: -120px; opacity: 0; transition: opacity 0.4s ease; }
.pipeline.in .pl-link { opacity: 1; }
.pipeline.in .pl-link:nth-of-type(2) { transition-delay: 0.35s; }
.pipeline.in .pl-link:nth-of-type(4) { transition-delay: 0.8s; }
.pl-link::before {
  content: ""; position: absolute; left: 6px; right: 10px; top: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--flow-dim) 0 6px, transparent 6px 13px);
  animation: linkflow 1.1s linear infinite;
}
@keyframes linkflow { to { background-position: 13px 0; } }
.pl-link::after {
  content: ""; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--flow-dim);
}
.pl-dot {
  position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--flow); box-shadow: 0 0 10px rgba(67, 217, 192, 0.7);
  transform: translateY(-50%);
  animation: dotrun 1.8s ease-in-out infinite;
}
@keyframes dotrun { 0% { left: 4%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 88%; opacity: 0; } }
.pl-blink { animation: blink 1.2s steps(2, start) infinite; }
.pl-shield { animation: shieldpulse 2.8s ease-in-out infinite; transform-origin: center; }
@keyframes shieldpulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
.pl-chip { animation: chipglow 2.6s ease-in-out infinite; }
@keyframes chipglow { 0%, 100% { filter: drop-shadow(0 0 3px rgba(67,217,192,0.4)); } 50% { filter: drop-shadow(0 0 10px rgba(67,217,192,0.85)); } }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr; gap: 0; }
  .pl-link { height: 44px; width: 2px; margin: 10px auto; align-self: auto; }
  .pl-link::before { left: 0; right: auto; top: 4px; bottom: 8px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--flow-dim) 0 6px, transparent 6px 13px); animation: linkflowv 1.1s linear infinite; }
  .pl-link::after { right: auto; left: 50%; top: auto; bottom: 0; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--flow-dim); }
  .pl-dot { display: none; }
}
@keyframes linkflowv { to { background-position: 0 13px; } }
@media (prefers-reduced-motion: reduce) {
  .pl-stage, .pl-link { opacity: 1; transform: none; }
  .pl-dot { display: none; }
}

/* ------------------------- prompt to done ------------------------- */
.chatdemo { margin-top: 56px; max-width: 900px; }
.chatdemo .st {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.chatdemo.in .st { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .chatdemo .st { opacity: 1; transform: none; } }
.chat-msg { display: flex; gap: 12px; align-items: flex-end; margin: 20px 0; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .bubble {
  padding: 16px 20px; border-radius: 16px; font-size: 15.5px; line-height: 1.55;
  max-width: 76%;
}
.chat-msg.user .bubble {
  background: var(--petrol); color: #E9F2F0; border-bottom-right-radius: 5px;
  box-shadow: 0 12px 28px rgba(14, 34, 38, 0.18);
}
.chat-msg.agent .bubble {
  background: #FFFFFF; border: 1px solid var(--line); border-bottom-left-radius: 5px;
  box-shadow: 0 12px 28px rgba(14, 34, 38, 0.08);
}
.chat-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: var(--petrol); display: flex; align-items: center; justify-content: center;
}
.trace {
  background: linear-gradient(160deg, #10282D, var(--petrol));
  border: 1px solid rgba(67, 217, 192, 0.16);
  border-radius: 12px; padding: 18px 22px; margin: 6px 0 6px 42px;
  font-family: var(--mono); font-size: 13px; line-height: 2; color: #CFE0DC;
  box-shadow: 0 18px 40px rgba(14, 34, 38, 0.2);
}
.trace .k { color: rgba(233, 242, 240, 0.45); }
.trace .flow { color: var(--flow); }
.trace .amber { color: var(--amber); }
.tr-branch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tr-ret, .tr-dest { border-radius: 8px; padding: 11px 15px; line-height: 1.6; }
.tr-ret { border: 1px solid rgba(67, 217, 192, 0.35); background: rgba(67, 217, 192, 0.06); }
.tr-dest { border: 1px solid rgba(232, 163, 61, 0.4); background: rgba(232, 163, 61, 0.06); }
@media (max-width: 700px) {
  .trace { margin-left: 0; }
  .tr-branch { grid-template-columns: 1fr; }
  .chat-msg .bubble { max-width: 92%; }
}

/* reveal on scroll — with stagger support */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.probs .reveal:nth-child(2), .gov-points .reveal:nth-child(2) { transition-delay: 0.12s; }
.probs .reveal:nth-child(3), .gov-points .reveal:nth-child(3) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ------------------ display face: Archivo Expanded ------------------ */
.brand, .hero h1, .block h2, .prob h3, .step h3, .gov-point h3 { font-stretch: 124%; }
.brand { font-weight: 640; letter-spacing: -0.01em; }
.hero h1 { letter-spacing: -0.022em; font-weight: 690; font-size: clamp(34px, 5.4vw, 62px); line-height: 1.06; max-width: 21ch; }
.block h2 { letter-spacing: -0.016em; font-weight: 660; }
.prob h3, .step h3, .gov-point h3 { letter-spacing: -0.008em; }