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

/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #0b0f14; /* dashboard background */
  --panel: #121923;
  --panel2: #18222f;
  --ink: #e8eef5;
  --muted: #9aa9ba;
  --line: #223045;
  --emerald: #19d3a2; /* main accent */
  --gold: #ffc857;
  --blue: #5aa9ff;
  --pink: #ff7aa8;
}
/* ===== 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;
}
.page {
  margin: 0;
  padding: 0;
}
h1,
h2,
h3 {
  font-family: "Manrope", "Inter", sans-serif;
  line-height: 1.18;
  margin: 0 0 0.5em;
  color: #fff;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 5px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.sub {
  margin-top: 46px;
  color: var(--gold);
}
p {
  margin: 0 0 1em;
  max-width: 72ch;
}
a {
  color: var(--emerald);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.hl {
  background: linear-gradient(90deg, var(--emerald), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.code-tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 87, 0.5);
  background: rgba(255, 200, 87, 0.08);
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
/* ===== 3. TOP NAV ===== */
nav.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  background: #070a0e;
  padding: 14px max(24px, calc((100% - 1000px) / 2));
  margin: 0;
  width: 100%;
  position: static;
  height: auto;
  float: none;
  overflow: visible;
}
.brand {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand b {
  color: var(--emerald);
}
.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow:
    16px 0 0 var(--gold),
    32px 0 0 var(--blue);
  margin-right: 34px;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
nav.top li {
  display: block;
  margin: 0;
  padding: 0;
}
nav.top a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
  border-bottom: 0;
}
nav.top a:hover {
  color: #fff;
  background: rgba(25, 211, 162, 0.12);
}
/* ===== 4. HERO (centered) + ANIMATED CHART ===== */
.hero {
  padding: 56px max(24px, calc((100% - 1000px) / 2)) 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(25, 211, 162, 0.14),
    transparent 60%
  );
}
.hero p {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
}
.viz {
  position: relative;
  width: min(400px, 92%);
  margin: 0 auto 28px;
}
.chartviz {
  display: block;
  width: 100%;
  overflow: visible;
}
.chartviz .card {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 2;
}
.chartviz .wd {
  opacity: 0.9;
}
.chartviz .w1 {
  fill: var(--pink);
}
.chartviz .w2 {
  fill: var(--gold);
}
.chartviz .w3 {
  fill: var(--emerald);
}
.chartviz .grid line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.chartviz .axis {
  stroke: var(--muted);
  stroke-width: 1.5;
  opacity: 0.6;
}
.chartviz .g1 {
  stop-color: var(--emerald);
}
.chartviz .g2 {
  stop-color: var(--blue);
}
.chartviz .bar {
  fill: url(#gbar);
  transform-box: fill-box;
  transform-origin: bottom;
  animation: grow 6s ease-in-out infinite;
}
.chartviz .b2 {
  animation-delay: 0.15s;
}
.chartviz .b3 {
  animation-delay: 0.3s;
}
.chartviz .b4 {
  animation-delay: 0.45s;
}
.chartviz .b5 {
  animation-delay: 0.6s;
}
.chartviz .trend {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 6s ease-in-out infinite;
}
.chartviz .pt {
  fill: var(--bg);
  stroke: var(--gold);
  stroke-width: 3;
  opacity: 0;
  animation: showpt 6s ease-in-out infinite;
}
.chartviz .p2 {
  animation-delay: 0.2s;
}
.chartviz .p3 {
  animation-delay: 0.4s;
}
.chartviz .p4 {
  animation-delay: 0.6s;
}
.chartviz .p5 {
  animation-delay: 0.8s;
}
.kpi {
  position: absolute;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  animation: floaty 4s ease-in-out infinite;
  white-space: nowrap;
}
.k1 {
  top: -6px;
  right: -18px;
  color: var(--emerald);
}
.k2 {
  bottom: 28px;
  left: -24px;
  color: var(--gold);
  animation-delay: -1.3s;
}
.k3 {
  bottom: -10px;
  right: 10px;
  color: var(--blue);
  animation-delay: -2.6s;
}
.btn {
  display: inline-block;
  background: var(--emerald);
  color: #03140f;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
}
.btn:hover {
  background: #4ae3ba;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--gold);
  margin-left: 12px;
}
.btn.ghost:hover {
  background: rgba(255, 200, 87, 0.14);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 46px auto 0;
  max-width: 900px;
  text-align: left;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--emerald);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.93rem;
}
.stat b {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
  color: #fff;
}
.s2 {
  border-top-color: var(--blue);
}
.s3 {
  border-top-color: var(--gold);
}
.s4 {
  border-top-color: var(--pink);
}
/* ===== 5. SECTIONS ===== */
section {
  padding: 72px max(24px, calc((100% - 1000px) / 2));
  border-bottom: 1px solid var(--line);
}
section:nth-of-type(even) {
  background: #0e141b;
}
/* ===== 6. CARDS ===== */
.grid,
.two {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 24px 24px;
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald), var(--blue));
}
.grid .card:nth-child(4n + 2)::before {
  background: linear-gradient(90deg, var(--gold), var(--pink));
}
.grid .card:nth-child(4n + 3)::before {
  background: linear-gradient(90deg, var(--blue), var(--emerald));
}
.grid .card:nth-child(4n + 4)::before {
  background: linear-gradient(90deg, var(--pink), var(--gold));
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald);
}
.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
.card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.card li {
  margin-bottom: 0.5em;
}
.tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(25, 211, 162, 0.12);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.callout {
  background: linear-gradient(
    90deg,
    rgba(255, 200, 87, 0.16),
    rgba(255, 200, 87, 0.04)
  );
  border: 1px solid rgba(255, 200, 87, 0.45);
  border-left: 8px solid var(--gold);
  padding: 18px 24px;
  border-radius: 12px;
  margin: 28px 0;
}
.callout p {
  margin: 0;
  color: var(--ink);
}
.essay {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--emerald);
  border-radius: 12px;
  padding: 30px 34px;
  margin-top: 20px;
}
.essay p {
  max-width: none;
  color: var(--muted);
  text-align: justify;
}
.essay p:last-child {
  margin-bottom: 0;
}
.note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 12px;
}
/* ===== 7. LIFECYCLE, STEPS, CHART ===== */
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
ol.pipe li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--emerald);
  color: #03140f;
  font-weight: 800;
  font-family: "Manrope", sans-serif;
  margin-bottom: 10px;
}
ol.pipe li:nth-child(4n + 2)::before {
  background: var(--gold);
}
ol.pipe li:nth-child(4n + 3)::before {
  background: var(--blue);
}
ol.pipe li:nth-child(4n + 4)::before {
  background: var(--pink);
}
ol.pipe b {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  color: #fff;
}
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: 12px;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
ol.steps li::before {
  content: counter(s);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  color: var(--gold);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
.chart {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-top: 18px;
}
.chart .row {
  display: grid;
  grid-template-columns: 190px 1fr 90px;
  gap: 14px;
  align-items: center;
  padding: 8px 0;
  font-size: 0.93rem;
  color: var(--ink);
}
.chart .bar {
  height: 16px;
  background: #1c2736;
  border-radius: 999px;
  overflow: hidden;
}
.chart .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}
.chart em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
}
/* ===== 8. TABLE, CODE, DL, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
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: #0c1219;
  color: var(--emerald);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
td:first-child {
  font-weight: 700;
  color: var(--gold);
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--panel2);
}
pre.code {
  background: #070b10;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.87rem;
  color: #bde3ff;
  margin: 24px 0;
}
dl {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr;
  margin: 22px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
dt,
dd {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
dt {
  font-weight: 700;
  color: var(--emerald);
}
dd {
  color: var(--muted);
}
dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}
details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  padding: 16px 22px;
  margin-bottom: 12px;
}
details[open] {
  border-left-color: var(--emerald);
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 9. FOOTER ===== */
footer {
  background: #070a0e;
  color: var(--muted);
  text-align: center;
  padding: 32px 20px 46px;
  font-size: 0.88rem;
  border-top: 3px solid var(--emerald);
}
/* ===== 10. ANIMATION + RESPONSIVE ===== */
@keyframes grow {
  0% {
    transform: scaleY(0);
  }
  18%,
  80% {
    transform: scaleY(1);
  }
  95%,
  100% {
    transform: scaleY(0);
  }
}
@keyframes draw {
  0%,
  12% {
    stroke-dashoffset: 1;
  }
  45%,
  80% {
    stroke-dashoffset: 0;
  }
  95%,
  100% {
    stroke-dashoffset: 1;
  }
}
@keyframes showpt {
  0%,
  25% {
    opacity: 0;
  }
  40%,
  80% {
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}
@keyframes floaty {
  50% {
    transform: translateY(-8px);
  }
}
@media (max-width: 600px) {
  .chart .row {
    grid-template-columns: 1fr;
  }
  dl {
    grid-template-columns: 1fr;
  }
  dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .btn.ghost {
    margin: 12px 0 0;
  }
  .essay {
    padding: 22px;
  }
  .essay p {
    text-align: left;
  }
  ol.steps li {
    grid-template-columns: 1fr;
  }
  .k1 {
    right: -6px;
  }
  .k2 {
    left: -6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .chartviz .bar,
  .chartviz .trend,
  .chartviz .pt,
  .kpi {
    animation: none !important;
  }
  .chartviz .trend {
    stroke-dashoffset: 0;
  }
  .chartviz .pt {
    opacity: 1;
  }
}
