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

/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #0e1216; /* graphite background */
  --panel: #171d23; /* metal panels */
  --panel2: #1e262e;
  --ink: #e8edf2;
  --muted: #a3afbc;
  --line: #2c3743;
  --orange: #ff7a00; /* safety orange */
  --cyan: #00d1ff; /* sensor blue */
  --lime: #7cff4f;
  --edge: 18px; /* cut corner size */
}
/* ===== 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 {
  font-family: "Orbitron", "Inter", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 {
  font-size: clamp(1.9rem, 4.8vw, 3.3rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
}
h2::after {
  content: "";
  display: block;
  width: 90px;
  height: 5px;
  margin-top: 12px;
  background: repeating-linear-gradient(
    45deg,
    var(--orange) 0 8px,
    #0e1216 8px 14px
  );
}
h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 0.5em;
  color: #fff;
}
.sub {
  margin-top: 46px;
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.sub::before {
  content: "> ";
  color: var(--orange);
}
p {
  margin: 0 0 1em;
  max-width: 72ch;
}
a {
  color: var(--cyan);
}
mark {
  background: rgba(255, 122, 0, 0.2);
  color: #ffb866;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
.hl {
  color: var(--orange);
}
.code-tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lime);
  border: 1px solid var(--lime);
  padding: 3px 12px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
/* ===== 3. TOP NAV ===== */
nav.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  background: #080b0e;
  padding: 14px max(24px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand b {
  color: var(--orange);
}
.led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 2s infinite;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
nav.top a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 11px;
  border-bottom: 2px solid transparent;
}
nav.top a:hover {
  color: #fff;
  border-bottom-color: var(--orange);
}
/* ===== 4. HERO (centered) + CSS ROBOT ===== */
.hero {
  padding: 70px max(24px, calc((100% - 1040px) / 2)) 80px;
  text-align: center;
  border-bottom: 14px solid;
  border-image: repeating-linear-gradient(
      45deg,
      var(--orange) 0 14px,
      #0e1216 14px 28px
    )
    14;
}
.hero p {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: 1.18rem;
  color: var(--muted);
}
.bot {
  width: 130px;
  margin: 0 auto 26px;
  position: relative;
}
.bot .antenna {
  display: block;
  width: 4px;
  height: 22px;
  background: #6b7886;
  margin: 0 auto;
  position: relative;
}
.bot .antenna::before {
  content: "";
  position: absolute;
  top: -9px;
  left: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px var(--orange);
}
.bot .head {
  height: 88px;
  border-radius: 20px;
  background: linear-gradient(160deg, #4b5864, #26303a);
  border: 2px solid #6b7886;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
}
.bot .eye {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  animation: blink 3s infinite;
}
.bot .mouth {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    #9aa7b4 0 6px,
    transparent 6px 9px
  );
}
.bot .neck {
  width: 30px;
  height: 12px;
  margin: 0 auto;
  background: #3a4651;
}
.bot .shoulders {
  height: 26px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(160deg, #4b5864, #26303a);
  border: 2px solid #6b7886;
  border-bottom: 0;
}
.btn {
  display: inline-block;
  background: var(--orange);
  color: #0e1216;
  font-weight: 800;
  padding: 13px 28px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}
.btn:hover {
  background: #ff9433;
}
.btn.ghost {
  background: var(--cyan);
  margin-left: 12px;
}
.btn.ghost:hover {
  background: #4de0ff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 48px auto 0;
  max-width: 820px;
  text-align: left;
}
.stat {
  background: var(--panel);
  border-left: 4px solid var(--cyan);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.93rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.stat:nth-child(2) {
  border-left-color: var(--orange);
}
.stat:nth-child(3) {
  border-left-color: var(--lime);
}
.stat b {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  color: #fff;
}
/* ===== 5. SECTIONS ===== */
section {
  padding: 72px max(24px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
}
section:nth-of-type(even) {
  background: #10151a;
}
/* ===== 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 {
  background: var(--panel);
  padding: 24px;
  box-shadow: inset 4px 0 0 var(--cyan);
  clip-path: polygon(
    0 0,
    calc(100% - var(--edge)) 0,
    100% var(--edge),
    100% 100%,
    var(--edge) 100%,
    0 calc(100% - var(--edge))
  );
  transition: background 0.2s;
}
.grid .card:nth-child(even),
.two .card:nth-child(even) {
  box-shadow: inset 4px 0 0 var(--orange);
}
.card:hover {
  background: var(--panel2);
}
.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.7rem;
  font-weight: 700;
  color: var(--lime);
  border: 1px solid var(--lime);
  padding: 1px 9px;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}
/* highlighted important points */
.key {
  background: linear-gradient(
    90deg,
    rgba(255, 122, 0, 0.16),
    rgba(255, 122, 0, 0.04)
  );
  border: 1px solid var(--orange);
  border-left: 8px solid var(--orange);
  padding: 18px 24px;
  margin: 28px 0;
}
.key b {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #0e1216;
  background: var(--orange);
  padding: 2px 10px;
  margin-bottom: 8px;
}
.key p {
  margin: 0;
  color: var(--ink);
}
.key.warn {
  background: linear-gradient(
    90deg,
    rgba(255, 60, 60, 0.16),
    rgba(255, 60, 60, 0.04)
  );
  border-color: #ff4d4d;
}
.key.warn b {
  background: #ff4d4d;
}
.essay {
  background: var(--panel);
  padding: 30px 34px;
  margin-top: 20px;
  border-top: 4px solid var(--orange);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 24px),
    calc(100% - 24px) 100%,
    0 100%
  );
}
.essay p {
  max-width: none;
  color: var(--muted);
  text-align: justify;
}
.essay p:last-child {
  margin-bottom: 0;
}
/* ===== 7. PIPELINE + STEPS ===== */
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  background: var(--panel);
  padding: 18px;
  border-top: 3px solid var(--orange);
}
ol.pipe li:nth-child(even) {
  border-top-color: var(--cyan);
}
ol.pipe li::before {
  content: "0" counter(p);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--lime);
}
ol.pipe b {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  color: #fff;
  margin: 2px 0 4px;
}
ol.pipe span {
  font-size: 0.92rem;
  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: 54px 1fr;
  gap: 18px;
  background: var(--panel);
  padding: 18px 22px;
  border-left: 4px solid var(--cyan);
}
ol.steps li::before {
  content: counter(s);
  width: 46px;
  height: 46px;
  background: var(--orange);
  color: #0e1216;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
/* ===== 8. TABLE, CODE, DL, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #0a0e12;
  color: var(--orange);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
td:first-child {
  color: var(--cyan);
  font-weight: 700;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--panel2);
}
pre.code {
  background: #06090c;
  border: 1px solid var(--line);
  border-left: 6px solid var(--lime);
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  color: #bfffa8;
  margin: 22px 0;
}
dl {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  margin: 22px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
}
dt,
dd {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
dt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: var(--cyan);
}
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(--cyan);
  padding: 15px 22px;
  margin-bottom: 12px;
}
details[open] {
  border-left-color: var(--orange);
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 9. FOOTER ===== */
footer {
  background: #080b0e;
  color: var(--muted);
  text-align: center;
  padding: 34px 20px 46px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  border-top: 14px solid;
  border-image: repeating-linear-gradient(
      45deg,
      var(--orange) 0 14px,
      #0e1216 14px 28px
    )
    14;
}
/* ===== 10. ANIMATION + RESPONSIVE ===== */
@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 600px) {
  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;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
