/* ============================================================
   PumpControl — Modern Industrial design system
   Navy/steel canvas · electric-blue accent · safety-orange CTA
   Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (specs)
   Hand-crafted, no framework. Mobile-first.
   ============================================================ */

:root {
  /* Canvas */
  --ink-900: #070b14;   /* deepest navy */
  --ink-800: #0b1220;   /* page bg */
  --ink-700: #0f1828;   /* raised */
  --steel-700: #14203353;
  --steel-600: #18233a;  /* card */
  --steel-500: #1e2c46;  /* card hover / border-lift */
  --line: rgba(148, 173, 214, 0.14);
  --line-strong: rgba(148, 173, 214, 0.26);

  /* Text */
  --text: #e8eef9;
  --text-dim: #9fb0cb;
  --text-faint: #6c7c98;

  /* Accent */
  --blue-400: #5b9dff;
  --blue-500: #2f6bff;   /* primary electric blue */
  --blue-600: #1f55e6;
  --blue-glow: rgba(47, 107, 255, 0.35);
  --orange: #ff6a2c;     /* safety-orange CTA, used sparingly */
  --orange-600: #f2551a;
  --ok: #34d399;

  /* Type */
  --font-display: "Archivo", "Archivo Expanded", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Scale (fluid) */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.3rem, 1.7rem + 2.8vw, 4.5rem);
  --step-5: clamp(2.5rem, 1.4rem + 5.5vw, 6rem);

  /* Space */
  --space-1: 0.5rem; --space-2: 0.75rem; --space-3: 1rem; --space-4: 1.5rem;
  --space-5: 2rem; --space-6: 3rem; --space-7: 4.5rem; --space-8: 7rem;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 50px -28px rgba(0,0,0,0.8);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 82% -8%, rgba(47,107,255,0.16), transparent 60%),
    radial-gradient(800px 500px at 0% 0%, rgba(47,107,255,0.07), transparent 55%),
    var(--ink-800);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-3); color: var(--text-dim); }
a { color: var(--blue-400); text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-6); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-400);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--blue-500);
}
.lede { font-size: var(--step-1); color: var(--text-dim); max-width: 56ch; line-height: 1.55; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--blue-500);
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.4rem; min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--orange); color: #1a0c05; box-shadow: 0 10px 30px -12px rgba(255,106,44,0.7); }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-2px); }
.btn--blue { background: var(--blue-500); color: #fff; box-shadow: 0 10px 30px -12px var(--blue-glow); }
.btn--blue:hover { background: var(--blue-600); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--blue-500); color: #fff; transform: translateY(-2px); }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(9,14,24,0.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__logo { height: 30px; width: auto; display: block; transition: opacity .15s ease; }
.brand:hover .brand__logo { opacity: 0.85; }
.brand__divider { width: 1px; height: 22px; background: var(--line-strong); }
.brand__sub { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; color: var(--text-dim); }

.nav__links { display: none; align-items: center; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; transition: color .15s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; }
.nav__cta { display: none; }

.nav__toggle {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); cursor: pointer;
}
.nav__toggle svg { width: 22px; height: 22px; }

.mobile-menu { display: none; border-top: 1px solid var(--line); padding: var(--space-3) 0 var(--space-4); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 0.85rem var(--space-4); color: var(--text-dim); font-weight: 500; border-radius: 8px; }
.mobile-menu a:hover { background: var(--steel-600); color: #fff; }
.mobile-menu .btn { margin: var(--space-3) var(--space-4) 0; }

@media (min-width: 880px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--space-7) var(--space-7); }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(620px 420px at 78% 12%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(620px 420px at 78% 12%, #000 0%, transparent 75%);
  opacity: .7;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { margin-bottom: var(--space-4); max-width: 16ch; }
.hero h1 .accent { color: var(--blue-400); }
.hero .lede { margin-bottom: var(--space-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); }

/* hero two-column + live network visual */
.hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-7); } .hero__grid .hero__actions { margin-bottom: 0; } }
.hero__viz { position: relative; min-height: 280px; }
.hero__viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-pipe { fill: none; stroke: var(--steel-500); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.viz-flow { fill: none; stroke: var(--blue-400); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 17; animation: vizflow 1.5s linear infinite; }
@keyframes vizflow { to { stroke-dashoffset: -36; } }
.viz-link { stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 4 5; fill: none; }
.viz-node { fill: var(--blue-500); }
.viz-core { fill: #fff; }
.viz-ring { transform-box: fill-box; transform-origin: center; fill: none; stroke: var(--blue-400); stroke-width: 1.5; animation: vizpulse 2.6s ease-out infinite; }
.viz-ring.r2 { animation-delay: .7s; } .viz-ring.r3 { animation-delay: 1.4s; }
@keyframes vizpulse { 0% { transform: scale(.5); opacity: .9; } 70% { opacity: 0; } 100% { transform: scale(2.4); opacity: 0; } }
.viz-wave { transform-box: fill-box; transform-origin: center; fill: none; stroke: var(--ok); stroke-width: 1.4; animation: vizwave 3s ease-out infinite; }
.viz-wave.w2 { animation-delay: 1s; } .viz-wave.w3 { animation-delay: 2s; }
@keyframes vizwave { 0% { transform: scale(.3); opacity: .8; } 100% { transform: scale(2.8); opacity: 0; } }
.viz-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; fill: var(--text-faint); text-transform: uppercase; }
.viz-dist { font-family: var(--font-mono); font-size: 9px; fill: var(--blue-400); letter-spacing: 0.06em; }
.hero__chip { position: absolute; top: 4px; left: 0; width: 184px; max-width: 56%; }
.hero__chip .panel__body { padding: var(--space-3); }
.hero__chip .readout { padding: 0.45rem 0; }
.hero__chip .readout span { font-size: 0.68rem; }
.hero__chip .readout b { font-size: 0.95rem; }
@media (max-width: 540px) { .hero__chip { display: none; } }

/* status strip */
.statline {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.statline > div { background: var(--ink-700); padding: var(--space-4); }
.statline .num { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); color: #fff; letter-spacing: -0.02em; }
.statline .lbl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
@media (min-width: 720px) { .statline { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid--2 { grid-template-columns: repeat(2,1fr); } .grid--3 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3,1fr); } .grid--4 { grid-template-columns: repeat(4,1fr); } }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--steel-600), var(--ink-700));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(47,107,255,0.12); border: 1px solid rgba(47,107,255,0.3); color: var(--blue-400);
  margin-bottom: var(--space-4);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { color: #fff; }
.card p { margin-bottom: 0; font-size: var(--step--1); }
.card__tag { position: absolute; top: var(--space-4); right: var(--space-4); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--text-faint); }

/* feature card with accent rail */
.feature { padding-left: calc(var(--space-5) + 4px); }
.feature::before { content: ""; position: absolute; left: 0; top: var(--space-5); bottom: var(--space-5); width: 3px; border-radius: 3px; background: linear-gradient(var(--blue-500), transparent); }

/* ---------- Section heading block ---------- */
.section-head { max-width: 60ch; margin-bottom: var(--space-6); }
.section-head h2 { color: #fff; }

/* ---------- Split / showcase ---------- */
.split { display: grid; gap: var(--space-5); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-7); } .split--rev > :first-child { order: 2; } }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--ink-700); box-shadow: var(--shadow);
}
.panel__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem var(--space-4); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.panel__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.panel__body { padding: var(--space-4); }
.readout { display: flex; justify-content: space-between; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px dashed var(--line); }
.readout:last-child { border-bottom: 0; }
.readout span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); letter-spacing: 0.08em; }
.readout b { font-family: var(--font-display); font-size: 1.1rem; color: #fff; }
.readout b.up { color: var(--ok); }
.bar { height: 8px; border-radius: 6px; background: var(--steel-500); overflow: hidden; margin-top: 0.4rem; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-400)); border-radius: 6px; }

.check-list { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-2); }
.check-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--text-dim); }
.check-list svg { flex: none; width: 22px; height: 22px; color: var(--blue-400); margin-top: 2px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: var(--space-7) var(--space-5);
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% -40%, rgba(47,107,255,0.28), transparent 70%),
    linear-gradient(180deg, var(--steel-600), var(--ink-700));
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band .lede { margin-inline: auto; margin-bottom: var(--space-5); }
.cta-band .hero__actions { justify-content: center; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--space-7); background: var(--ink-900); }
.footer-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; padding-block: var(--space-6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: var(--text-dim); font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { font-size: 0.92rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; align-items: center; }
.footer-bottom small { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; }

/* Footer brand logo */
.footer-logo { height: 34px; width: auto; display: block; margin-bottom: var(--space-3); }
.footer-byline { display: inline-flex; align-items: center; color: var(--text-faint); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; }
.footer-byline:hover { color: var(--text-dim); }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { padding-block: var(--space-7) var(--space-5); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero h1 { font-size: var(--step-4); max-width: 18ch; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 0.5rem; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--ink-800); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; min-height: 50px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,107,255,0.2); }
.field--row { display: grid; gap: var(--space-4); }
@media (min-width: 620px) { .field--row { grid-template-columns: 1fr 1fr; } }

.alert { border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-size: 0.95rem; border: 1px solid; }
.alert--ok { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.4); color: #b9f5dc; }
.alert--err { background: rgba(255,106,44,0.1); border-color: rgba(255,106,44,0.4); color: #ffcfb8; }

/* ---------- Misc ---------- */
.muted { color: var(--text-faint); }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: var(--space-6); }
.kicker-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.pill { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.8rem; }

/* reveal on load */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal[style*="--d"] { animation-delay: var(--d); }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
