:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --ink: #13203a;
  --muted: #4b5a75;
  --line: #d3dce8;
  --accent: #0b7f81;
  --accent-ink: #ffffff;
  --hi: #f2b705;
  --soft: #e3f1f1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1525;
    --surface: #15213a;
    --ink: #e8eef7;
    --muted: #a5b4cb;
    --line: #2a3a58;
    --accent: #3cc4c6;
    --accent-ink: #0d1525;
    --soft: #12304a;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1525;
  --surface: #15213a;
  --ink: #e8eef7;
  --muted: #a5b4cb;
  --line: #2a3a58;
  --accent: #3cc4c6;
  --accent-ink: #0d1525;
  --soft: #12304a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.7 "DM Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
p {
  margin: 0 0 1em;
  max-width: 66ch;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--hi);
  outline-offset: 2px;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}
section {
  padding: 68px 0;
  border-top: 1px solid var(--line);
}
.muted {
  color: var(--muted);
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

/* nav */
nav.top {
  padding: 18px 0;
}
nav.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
nav.top a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
nav.top a:hover {
  color: var(--accent);
}

/* hero */
.hero {
  padding: 56px 0 72px;
  border-top: 0;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
  margin-left: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.stat {
  border-left: 4px solid var(--hi);
  padding: 2px 0 2px 14px;
  font-size: 0.97rem;
}
.stat b {
  display: block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.15rem;
}

/* generic cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.card p {
  margin: 0;
  font-size: 0.98rem;
}
.card .tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--soft);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.callout {
  background: var(--soft);
  border-left: 5px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin: 26px 0;
  max-width: 70ch;
}
.callout p {
  margin: 0;
}

/* flow diagram */
.flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.flow .step {
  flex: 1 1 180px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
}
.flow .step b {
  display: block;
  color: var(--accent);
  font-family: "Bricolage Grotesque", sans-serif;
}
.flow .step span {
  font-size: 0.95rem;
}
.flow .arr {
  align-self: center;
  font-size: 1.5rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .flow .arr {
    display: none;
  }
}

/* table */
.scroll {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.96rem;
}
th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-family: "Bricolage Grotesque", sans-serif;
  background: var(--soft);
}
tr:last-child td {
  border-bottom: 0;
}

/* steps */
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 26px 0 0;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
ol.steps li::before {
  content: counter(s);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hi);
  color: #13203a;
  font-weight: 800;
  display: grid;
  place-items: center;
}
ol.steps p {
  margin: 0;
}
ol.steps h3 {
  margin-bottom: 0.3em;
}

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  font-weight: 700;
}
details p {
  margin: 10px 0 0;
}
dl {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 10px 20px;
  margin: 22px 0 0;
}
dt {
  font-weight: 700;
}
dd {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 560px) {
  dl {
    grid-template-columns: 1fr;
  }
  dd {
    margin-bottom: 8px;
  }
}
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.two ul {
  margin: 0;
  padding-left: 20px;
}
.two li {
  margin-bottom: 0.5em;
}
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 0.92rem;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* ===== WORKFLOW ANIMATION (hero) ===== */
.flowviz {
  display: block;
  width: min(540px, 100%);
  margin: 0 0 26px;
  overflow: visible;
}
.flowviz .fl line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  animation: flflow 1.2s linear infinite;
}
.flowviz .fl polygon {
  fill: var(--accent);
}
.flowviz .packet {
  fill: var(--hi);
  filter: drop-shadow(0 0 5px var(--hi));
  animation: flpacket 6s ease-in-out infinite;
}
.flowviz .fn {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 2;
}
.flowviz .n1 {
  animation: fln1 6s ease-in-out infinite;
}
.flowviz .n2 {
  animation: fln2 6s ease-in-out infinite;
}
.flowviz .n3 {
  animation: fln3 6s ease-in-out infinite;
}
.flowviz .fh {
  fill: var(--accent);
  font:
    800 11px "Bricolage Grotesque",
    "DM Sans",
    system-ui,
    sans-serif;
  letter-spacing: 0.08em;
}
.flowviz .fc {
  fill: var(--ink);
  font:
    500 10.5px "DM Sans",
    system-ui,
    sans-serif;
}
@keyframes flflow {
  to {
    stroke-dashoffset: -20;
  }
}
@keyframes flpacket {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  60% {
    transform: translateX(240px);
    opacity: 1;
  }
  66%,
  100% {
    transform: translateX(240px);
    opacity: 0;
  }
}
@keyframes fln1 {
  0%,
  8% {
    fill: var(--soft);
    stroke: var(--accent);
  }
  14%,
  100% {
    fill: var(--surface);
    stroke: var(--line);
  }
}
@keyframes fln2 {
  0%,
  15% {
    fill: var(--surface);
    stroke: var(--line);
  }
  17%,
  47% {
    fill: var(--soft);
    stroke: var(--accent);
  }
  50%,
  100% {
    fill: var(--surface);
    stroke: var(--line);
  }
}
@keyframes fln3 {
  0%,
  59% {
    fill: var(--surface);
    stroke: var(--line);
  }
  62%,
  84% {
    fill: var(--soft);
    stroke: var(--accent);
  }
  88%,
  100% {
    fill: var(--surface);
    stroke: var(--line);
  }
}
@media (prefers-reduced-motion: reduce) {
  .flowviz .fl line,
  .flowviz .packet,
  .flowviz .fn {
    animation: none !important;
  }
  .flowviz .packet {
    opacity: 0;
  }
}
