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

/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #f6f5fc; /* page background, light and plain */
  --white: #ffffff;
  --tint: #edeafb; /* soft indigo tint for alternate sections */
  --ink: #16132e; /* main text */
  --muted: #54507a; /* secondary text */
  --line: #dedaf0;
  --indigo: #5a3fd6; /* primary */
  --indigo-dark: #41289f;
  --amber: #19c3b1; /* accent */
  --amber-soft: #ddf7f3;
  --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: #16132e;
  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. QUANTUM ATOM ILLUSTRATION (hero) ===== */
.atom {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 26px;
}
.orbit {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(90, 63, 214, 0.35);
  border-radius: 50%;
}
.o1 {
  transform: rotate(0deg) scaleY(0.36);
}
.o2 {
  transform: rotate(60deg) scaleY(0.36);
}
.o3 {
  transform: rotate(120deg) scaleY(0.36);
}
.electron {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  animation: orbitSpin 5s linear infinite;
}
.e1 {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
}
.e2 {
  background: var(--indigo);
  box-shadow: 0 0 14px var(--indigo);
  animation-duration: 7s;
  animation-delay: -2s;
}
.e3 {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
  animation-duration: 6s;
  animation-delay: -4s;
}
.nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 35% 30%,
    #8f7bff,
    var(--indigo) 60%,
    var(--indigo-dark)
  );
  color: #fff;
  font:
    700 1.05rem "JetBrains Mono",
    ui-monospace,
    monospace;
  box-shadow:
    0 0 0 8px rgba(90, 63, 214, 0.15),
    0 0 34px rgba(90, 63, 214, 0.55);
  animation: corePulse 3s ease-in-out infinite;
}
.qchip {
  position: absolute;
  font:
    700 0.8rem "JetBrains Mono",
    ui-monospace,
    monospace;
  color: var(--indigo-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  box-shadow: var(--shadow);
  animation: floaty 4s ease-in-out infinite;
}
.c0 {
  top: 6px;
  left: -22px;
}
.c1 {
  bottom: 6px;
  right: -22px;
  animation-delay: -2s;
}
@keyframes orbitSpin {
  from {
    transform: rotate(0deg) translateX(130px);
  }
  to {
    transform: rotate(360deg) translateX(130px);
  }
}
@keyframes corePulse {
  50% {
    transform: scale(1.08);
  }
}
@keyframes floaty {
  50% {
    transform: translateY(-8px);
  }
}
@media (max-width: 480px) {
  .atom {
    transform: scale(0.8);
    margin-bottom: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .electron,
  .nucleus,
  .qchip {
    animation: none !important;
  }
  .electron {
    transform: translateX(130px);
  }
}
