/* Ledgerhand marketing site — one stylesheet, no build step. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --surface: #ffffff;
  --text: #16191d;
  --text-muted: #555d66;
  --border: #e3e6e9;
  --accent: #0b6b63;
  --accent-hover: #08554f;
  --accent-soft: #e7f3f1;
  --on-accent: #ffffff;
  --ok: #17663a;
  --ok-soft: #e8f5ec;
  --err: #a4262c;
  --err-soft: #fbeced;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --line: #d3dbd9;
  --focus: #1a56db;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214;
    --bg-soft: #161a1d;
    --surface: #1a1f23;
    --text: #e9ecef;
    --text-muted: #a6afb8;
    --border: #2a3136;
    --accent: #5cc8b8;
    --accent-hover: #7fd8ca;
    --accent-soft: #14302c;
    --on-accent: #06201c;
    --ok: #6fd39a;
    --ok-soft: #12301f;
    --err: #ff9aa0;
    --err-soft: #3a1619;
    --warn: #f2c66d;
    --warn-soft: #3a2e10;
    --line: #33403d;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px;
  background: var(--surface); color: var(--text);
  padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 100;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  color: var(--text-muted); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.site-nav .btn { margin-left: 8px; }
@media (max-width: 720px) {
  .site-nav a.nav-optional { display: none; }
}
@media (max-width: 420px) {
  .site-nav:has(.btn) a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .975rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 60px 0; } }
.section-soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 12px;
}
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 40em; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 40px; align-items: center; }
.hero h1 { max-width: 14em; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 20px; font-size: .9rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; list-style: none; }
.hero-note li { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 60px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* Chat illustration (decorative, built from real product behaviour) */
.chat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); padding: 18px; max-width: 460px; width: 100%; justify-self: center; margin: 0;
  font-size: .925rem;
}
.chat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.chat-avatar svg { width: 18px; height: 18px; }
.chat-top strong { display: block; font-size: .9rem; }
.chat-top span { display: block; font-size: .78rem; color: var(--text-muted); }
.bubble { padding: 10px 14px; border-radius: 16px; margin-bottom: 10px; max-width: 88%; line-height: 1.45; }
.bubble-me { margin-left: auto; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.bubble-bot { background: var(--bg-soft); border-bottom-left-radius: 4px; }
.doc-card { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.doc-card svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.doc-card b { display: block; font-size: .85rem; }
.doc-card small { color: var(--text-muted); font-size: .78rem; }
.chat-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip { font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.chip-ok { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bank-line { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ok); background: var(--ok-soft); padding: 8px 12px; border-radius: 10px; margin-top: 4px; }
.bank-line svg { width: 16px; height: 16px; flex: none; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); font-size: .975rem; }
.icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; }

.steps { counter-reset: step; }
.step { position: relative; }
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem; margin-bottom: 14px;
}

/* Feature groups */
.feature-group h3 { display: flex; align-items: center; gap: 10px; }
.feature-group h3 .icon { margin: 0; width: 36px; height: 36px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-muted); font-size: .975rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b6b63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%235cc8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
.ticks strong { color: var(--text); font-weight: 600; }

/* Safety principles */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 640px) { .principles { grid-template-columns: 1fr; } }
.principle { display: flex; gap: 16px; align-items: flex-start; }
.principle .icon { flex: none; margin: 0; }
.principle h3 { margin-bottom: 4px; }
.principle p { margin: 0; color: var(--text-muted); font-size: .975rem; }
.callout {
  margin-top: 40px; padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: .95rem;
}
.callout strong { color: var(--text); }

/* Integrations */
.integrations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .integrations { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .integrations { grid-template-columns: 1fr; } }
.integration { display: flex; flex-direction: column; gap: 10px; }
.integration .name { font-weight: 600; font-size: 1.05rem; }
.integration p { font-size: .9rem; margin: 0; }
.badge {
  align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted);
}
.badge-live { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* FAQ */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--text-muted);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 20px; color: var(--text-muted); }
.faq details > div p:last-child { margin: 0; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .lead { margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Pricing ---------- */
.page-head { padding-top: 72px; padding-bottom: 40px; }
@media (max-width: 720px) { .page-head { padding-top: 48px; } }
.page-head .lead { margin: 0; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; padding-bottom: 88px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.plan { display: flex; flex-direction: column; padding: 0; overflow: hidden; scroll-margin-top: 80px; }
.plan-body { padding: 28px 24px 24px; }
.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan-tag { font-size: .75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.plan h2 { font-size: 1.5rem; margin: 6px 0 6px; }
.plan .for { color: var(--text-muted); font-size: .95rem; min-height: 3em; }
.price { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin: 12px 0 20px; }
.price small { display: block; font-size: .85rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan .ticks { margin-bottom: 0; }
.plan-form { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 24px; }
.plan-form h3 { font-size: 1rem; margin-bottom: 14px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.field label .opt { font-weight: 400; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--text-muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.field .err-msg { color: var(--err); font-size: .85rem; margin-top: 4px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: .8rem; color: var(--text-muted); margin: 4px 0 14px; }
.plan-form .btn { width: 100%; }
.form-status { border-radius: var(--radius-sm); padding: 12px 14px; font-size: .925rem; margin-bottom: 14px; }
.form-status:empty { display: none; }
.form-status.ok { background: var(--ok-soft); color: var(--ok); }
.form-status.error { background: var(--err-soft); color: var(--err); }

/* ---------- Prose (legal pages) ---------- */
.prose { padding-bottom: 88px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 1.5em; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; color: var(--text-muted); }
@media (max-width: 480px) { .prose dl { grid-template-columns: 1fr; gap: 2px; } .prose dd { margin-bottom: 10px; } }
.tbd { background: #fff3c4; color: #5c4400; padding: 0 4px; border-radius: 4px; font-size: .95em; }
@media (prefers-color-scheme: dark) { .tbd { background: #4a3b00; color: #ffe58a; } }

/* ---------- 404 ---------- */
.notfound { padding-top: 120px; padding-bottom: 120px; text-align: center; }
.notfound .code { font-size: 5rem; font-weight: 800; color: var(--accent); letter-spacing: -0.04em; line-height: 1; margin-bottom: 16px; }
.notfound .hero-actions { justify-content: center; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; font-size: .9rem; color: var(--text-muted); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.footer-top p { margin: 8px 0 0; max-width: 28em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--border); padding-top: 20px; font-size: .8rem; }
.footer-legal p { margin: 0 0 6px; }

/* Utilities (no inline styles: the CSP forbids them) */
.plain-list { list-style: none; padding: 0; margin: 0; }
.notfound .lead { margin: 0 auto; }
/* The logo mark's lines inherit this stroke through <use>. */
.brand svg { stroke: var(--on-accent); }


/* ---------- How it works: steps + chat ---------- */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.how-grid .steps { display: grid; gap: 16px; }
@media (max-width: 900px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------- Hero flow animation ----------
   Bank feeds (left) → Ledgerhand (hub) → matched items (right).
   Lines are an SVG stretched to the middle column; "comets" are short dashes
   that travel along each route. Pure CSS; off for prefers-reduced-motion. */
.flow { margin: 0; width: 100%; max-width: 620px; justify-self: end; }
.flow-head {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px;
}
.flow-grid {
  display: grid; grid-template-columns: minmax(0, 150px) minmax(90px, 1fr) minmax(0, 200px);
  height: 380px;
}
.flow-col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-around; }
.flow-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; line-height: 1.25;
  height: 46px; padding: 0 12px; position: relative; z-index: 1;
}
.flow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px var(--ok-soft); }
.flow-chip-dst { height: 62px; gap: 10px; }
.flow-chip-dst > span:last-child { min-width: 0; }
.flow-chip-dst b, .flow-chip-dst small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-chip-dst b { font-size: .875rem; }
.flow-chip-dst small { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.flow-st { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.flow-st svg { width: 17px; height: 17px; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-part { background: var(--warn-soft); color: var(--warn); }
.st-review { background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border); }

.flow-mid { position: relative; }
.flow-mid > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-line { fill: none; stroke: var(--line); stroke-width: .55; }
.flow-comet {
  fill: none; stroke: var(--accent); stroke-width: 1.1; stroke-linecap: round;
  stroke-dasharray: 10 200; stroke-dashoffset: 10; opacity: 0;
  filter: drop-shadow(0 0 3px var(--accent));
}
.flow-hub {
  position: absolute; left: 40%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 1;
}
.flow-hub svg { width: 30px; height: 30px; color: var(--accent); stroke: var(--on-accent); }

@media (max-width: 900px) { .flow { justify-self: center; } }
@media (max-width: 560px) {
  .flow-grid { grid-template-columns: minmax(0, 82px) minmax(64px, 1fr) minmax(0, 156px); height: 330px; }
  .flow-chip { font-size: .74rem; height: 42px; padding: 0 8px; gap: 6px; border-radius: 10px; }
  .flow-dot { width: 6px; height: 6px; }
  .flow-head span:last-child { text-align: right; }
  .flow-chip-dst { height: 56px; }
  .flow-chip-dst b { font-size: .78rem; }
  .flow-chip-dst small { font-size: .7rem; }
  .flow-st { width: 24px; height: 24px; }
  .flow-st svg { width: 14px; height: 14px; }
  .flow-hub { width: 34px; height: 34px; border-radius: 10px; }
  .flow-hub svg { width: 22px; height: 22px; }
  .flow-chip-dst { gap: 7px; padding: 0 8px; }
  .flow-head { font-size: .66rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .flow-line { animation: flow-draw 1.1s ease-out .2s both; }
  .flow-src .flow-chip { animation: flow-in-left .6s ease-out both; }
  .flow-src .flow-chip:nth-child(2) { animation-delay: .08s; }
  .flow-src .flow-chip:nth-child(3) { animation-delay: .16s; }
  .flow-hub { animation: flow-pop .5s ease-out .5s both; }
  .flow-chip-dst { animation: flow-in-right .6s ease-out both; }
  .flow-chip-dst.d1 { animation-delay: .6s; }
  .flow-chip-dst.d2 { animation-delay: .7s; }
  .flow-chip-dst.d3 { animation-delay: .8s; }
  .flow-chip-dst.d4 { animation-delay: .9s; }

  /* Each route runs every 4s; routes start 1s apart. The matched item pulses when its comet arrives. */
  .flow-comet { animation: flow-comet 4s linear infinite; }
  .flow-comet.r1 { animation-delay: 1.4s; }
  .flow-comet.r2 { animation-delay: 2.4s; }
  .flow-comet.r3 { animation-delay: 3.4s; }
  .flow-comet.r4 { animation-delay: 4.4s; }
  .flow-chip-dst .flow-st { animation: flow-arrive 4s ease-out infinite; }
  .flow-chip-dst.d1 .flow-st { animation-delay: 1.4s; }
  .flow-chip-dst.d2 .flow-st { animation-delay: 2.4s; }
  .flow-chip-dst.d3 .flow-st { animation-delay: 3.4s; }
  .flow-chip-dst.d4 .flow-st { animation-delay: 4.4s; }
  .flow-hub::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--accent);
    opacity: 0; animation: flow-ring 1s ease-out 1.9s infinite;
  }
}

@keyframes flow-draw { from { stroke-dasharray: 100; stroke-dashoffset: 100; } to { stroke-dasharray: 100; stroke-dashoffset: 0; } }
@keyframes flow-in-left { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes flow-in-right { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes flow-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes flow-comet {
  0%   { stroke-dashoffset: 10; opacity: 0; }
  6%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes flow-arrive {
  0%, 86%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  92%           { transform: scale(1.18); box-shadow: 0 0 0 6px var(--accent-soft); }
}
@keyframes flow-ring {
  0%   { opacity: .5; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* Scroll reveal (added by main.js only to elements below the fold) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease-out, transform .6s ease-out; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
