@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #f4f6fb; /* page background, light and plain */
  --white: #ffffff;
  --tint: #eaeefb; /* soft indigo tint for alternate sections */
  --ink: #141b34; /* main text */
  --muted: #51597a; /* secondary text */
  --line: #dde2f0;
  --indigo: #3b3fd9; /* primary */
  --indigo-dark: #2a2da8;
  --amber: #f5a524; /* accent */
  --amber-soft: #fff3dc;
  --radius: 16px;
  --shadow: 0 4px 14px rgba(20, 27, 52, 0.07);
}
/* ===== 2. BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.75 "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
h1,
h2,
h3 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.sub {
  margin-top: 44px;
  color: var(--indigo);
}
p {
  margin: 0 0 1em;
  max-width: 70ch;
}
a {
  color: var(--indigo);
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}
section {
  padding: 72px 0;
}
section:nth-of-type(odd) {
  background: var(--white);
}
.code-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--indigo-dark);
  background: var(--tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.accent {
  color: var(--indigo);
}
/* ===== 3. NAV ===== */
nav.top {
  background: var(--white);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
nav.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand span {
  color: var(--amber);
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
nav.top a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
nav.top a:hover {
  background: var(--tint);
  color: var(--indigo-dark);
}
/* ===== 4. HERO (centered) ===== */
.hero {
  padding: 80px 0 90px;
  text-align: center;
  background: var(--tint);
}
.hero p {
  margin-left: auto;
  margin-right: auto;
}
.hero .code-tag {
  background: var(--white);
}
.lead {
  font-size: 1.18rem;
  color: var(--muted);
}
.btn {
  display: inline-block;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover {
  background: var(--indigo-dark);
}
.btn.ghost {
  background: var(--white);
  color: var(--indigo-dark);
  margin-left: 10px;
}
.btn.ghost:hover {
  background: var(--amber-soft);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 48px;
  text-align: left;
}
.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
  color: var(--ink);
}
/* ===== 5. CARDS ===== */
.grid,
.two {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-bottom: 4px solid transparent;
  transition: border-color 0.2s;
}
section:nth-of-type(odd) .card {
  background: var(--bg);
}
.card:hover {
  border-bottom-color: var(--amber);
}
.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--indigo-dark);
  background: var(--tint);
  padding: 3px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.callout {
  background: var(--amber-soft);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 26px 0;
  max-width: 74ch;
}
.callout p {
  margin: 0;
}
.essay {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 34px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--indigo);
}
.essay p {
  max-width: none;
  color: var(--muted);
}
.essay p:last-child {
  margin-bottom: 0;
}
/* ===== 6. PIPELINE + STEPS ===== */
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
section:nth-of-type(odd) ol.pipe li {
  background: var(--bg);
}
ol.pipe li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
ol.pipe b {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
}
ol.pipe span {
  font-size: 0.93rem;
  color: var(--muted);
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
section:nth-of-type(odd) ol.steps li {
  background: var(--bg);
}
ol.steps li::before {
  content: counter(s);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 800;
  display: grid;
  place-items: center;
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
/* ===== 7. TABLE, CODE, DL, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--indigo);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
td:first-child {
  color: var(--indigo-dark);
  font-weight: 700;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:nth-child(even) td {
  background: var(--bg);
}
pre.code {
  background: #141b34;
  border-radius: var(--radius);
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: #dde4ff;
  margin: 20px 0;
  border-top: 5px solid var(--amber);
}
dl {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr;
  gap: 0;
  margin: 22px 0 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
section:nth-of-type(odd) dl {
  background: var(--bg);
}
dt,
dd {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
dt {
  font-weight: 700;
  color: var(--indigo-dark);
}
dd {
  color: var(--muted);
}
dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}
@media (max-width: 560px) {
  dl {
    grid-template-columns: 1fr;
  }
  dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .btn.ghost {
    margin: 12px 0 0;
  }
  .essay {
    padding: 22px;
  }
  ol.steps li {
    grid-template-columns: 1fr;
  }
}
details {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
section:nth-of-type(odd) details {
  background: var(--bg);
}
details[open] {
  border-left: 5px solid var(--amber);
}
summary {
  cursor: pointer;
  font-weight: 700;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 8. FOOTER ===== */
footer {
  background: var(--ink);
  color: #c9d0ea;
  padding: 30px 0 44px;
  text-align: center;
  font-size: 0.88rem;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 9. NEURAL NETWORK ANIMATION (hero) ===== */
.nn {
  display: block;
  width: min(430px, 92%);
  margin: 0 auto 24px;
  overflow: visible;
}
.nn .links line {
  stroke: var(--indigo);
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
  opacity: 0.3;
  animation: nnflow 1.6s linear infinite;
}
.nn .nd {
  fill: var(--white);
  stroke: var(--indigo);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: nnpulse 3.2s ease-in-out infinite;
}
.nn .l2 {
  animation-delay: 0.4s;
}
.nn .l3 {
  animation-delay: 0.8s;
}
.nn .l4 {
  animation-delay: 1.2s;
  stroke: var(--amber);
}
.nn .lbls text {
  fill: var(--muted);
  font:
    700 8px "JetBrains Mono",
    ui-monospace,
    monospace;
  letter-spacing: 0.08em;
}
@keyframes nnflow {
  to {
    stroke-dashoffset: -18;
  }
}
@keyframes nnpulse {
  0%,
  100% {
    transform: scale(1);
    fill: var(--white);
  }
  50% {
    transform: scale(1.4);
    fill: var(--indigo);
  }
}
@keyframes nnpulseout {
  0%,
  100% {
    transform: scale(1);
    fill: var(--white);
  }
  50% {
    transform: scale(1.4);
    fill: var(--amber);
  }
}
.nn .l4 {
  animation-name: nnpulseout;
}
@media (prefers-reduced-motion: reduce) {
  .nn .links line,
  .nn .nd {
    animation: none !important;
  }
}
