/* staged · pipeline-operator sales site — pipeline-operator sales site
   Dark industrial theme, large stat counters, dense technical content.
   Single stylesheet, no framework, no external fonts (system stack). */

:root {
  --bg: #0a0e14;
  --surface: #131820;
  --surface-2: #1a212c;
  --surface-3: #20293a;
  --fg: #e6e9ee;
  --fg-soft: #c5cad3;
  --muted: #8a939f;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);

  --brand: #38bdf8;
  --brand-deep: #0284c7;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --good: #10b981;
  --danger: #ef4444;

  --max-w: 1200px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #7dd3fc; text-decoration: underline; }
code, kbd { font-family: var(--mono); font-size: .92em; }

/* ─── Nav ─────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,20,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}
header.site .inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
header.site .brand { display: flex; align-items: center; gap: 12px; color: #fff; }
header.site .brand img { height: 38px; }
header.site .brand-text { font-weight: 700; letter-spacing: .04em; font-size: 15px; }
header.site .brand-text small { color: var(--muted); font-weight: 400; margin-left: 6px; }
header.site nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
header.site nav a {
  color: var(--fg-soft); padding: 8px 14px; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; font-weight: 500;
  border-radius: 4px; transition: background .15s;
}
header.site nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
header.site nav a.cta {
  background: var(--accent); color: #0a0e14;
  margin-left: 10px; font-weight: 700;
}
header.site nav a.cta:hover { background: var(--accent-deep); color: #fff; }
@media (max-width: 880px) {
  header.site nav a { padding: 6px 10px; font-size: 11px; }
  header.site .brand-text { display: none; }
}

/* ─── Hero (massive) ──────────────────────────────────── */
section.hero {
  position: relative; overflow: hidden;
  min-height: 620px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
}
section.hero .bg-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.32) saturate(1.1);
}
section.hero .bg-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(56,189,248,.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(10,14,20,.6) 0%, rgba(10,14,20,.95) 100%);
}
section.hero .inner {
  position: relative; z-index: 2;
  max-width: var(--max-w); margin: 0 auto; padding: 100px 24px 60px;
  width: 100%;
}
section.hero .eyebrow {
  display: inline-block; padding: 5px 14px; margin-bottom: 22px;
  background: rgba(56,189,248,.1); color: var(--brand);
  border: 1px solid rgba(56,189,248,.3); border-radius: 999px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}
section.hero h1 {
  font-size: clamp(34px, 5.5vw, 64px); line-height: 1.05; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 20px;
  max-width: 1000px;
  background: linear-gradient(180deg, #fff 0%, #c5cad3 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
section.hero h1 .highlight {
  background: linear-gradient(90deg, var(--brand) 0%, #7dd3fc 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
section.hero p.lede {
  font-size: clamp(17px, 1.9vw, 22px); line-height: 1.5;
  max-width: 760px; color: var(--fg-soft); margin: 0 0 36px;
}
section.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 8px;
  font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: .04em;
  text-transform: uppercase; border: 2px solid transparent;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: var(--accent); color: #0a0e14; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn.ghost:hover { background: rgba(255,255,255,.08); border-color: var(--brand); color: var(--brand); }
.btn.brand { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.btn.brand:hover { background: var(--brand); border-color: var(--brand); color: #0a0e14; }

/* ─── Stats bar (animated counters) ─────────────────── */
section.stat-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 36px 24px;
}
section.stat-bar .inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.stat {
  text-align: center;
  border-left: 1px solid var(--line);
  padding: 0 14px;
}
.stat:first-child { border-left: 0; }
.stat .value {
  font-size: clamp(28px, 3.5vw, 44px); font-weight: 800; line-height: 1;
  color: var(--brand); font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.stat .value .unit { color: var(--fg-soft); font-size: .6em; font-weight: 600; margin-left: 2px; }
.stat .label {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-top: 10px; font-weight: 600;
}
@media (max-width: 720px) { .stat { border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } .stat:first-child { border-top: 0; padding-top: 0; } }

/* ─── Content sections ────────────────────────────────── */
main { background: var(--bg); }
section.block {
  padding: 90px 24px; border-bottom: 1px solid var(--line);
}
section.block .inner { max-width: var(--max-w); margin: 0 auto; }
section.block.alt { background: var(--surface); }
section.block.alt-2 { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
section.block .eyebrow {
  display: inline-block;
  color: var(--brand); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 10px;
}
section.block h2 {
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; font-weight: 800;
  letter-spacing: -.015em; margin: 0 0 18px;
  max-width: 900px;
}
section.block .section-lede {
  font-size: clamp(16px, 1.6vw, 19px); color: var(--fg-soft); max-width: 760px;
  margin-bottom: 48px;
}
section.block h3 { font-size: 22px; margin: 28px 0 10px; color: #fff; }
section.block p { margin: 0 0 14px; color: var(--fg-soft); }

/* Threat row — three-column risk framing */
.threat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px; margin-top: 12px;
}
.threat {
  background: var(--surface-2);
  border: 1px solid var(--line); border-left: 4px solid var(--danger);
  border-radius: 10px; padding: 26px;
}
.threat h3 { margin-top: 0; color: #fff; font-size: 19px; }
.threat .figure {
  font-family: var(--mono); color: var(--danger);
  font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 12px;
}
.threat p { margin: 0; font-size: 14px; }

/* Solution cards (3-up) */
.solution-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.solution {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 28px;
  transition: transform .15s, border-color .15s;
}
.solution:hover { transform: translateY(-3px); border-color: var(--brand); }
.solution .icon {
  width: 44px; height: 44px;
  background: rgba(56,189,248,.12); color: var(--brand);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px; font-weight: 800;
}
.solution h3 { margin: 0 0 10px; color: #fff; font-size: 20px; }
.solution p { font-size: 14px; }

/* Split layout */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.split .visual img {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }

/* Case-study comparison */
.compare {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 36px;
}
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin-top: 20px;
}
.compare-grid > div { padding: 24px; }
.compare-grid .before { background: rgba(239,68,68,.08); border-right: 1px solid var(--line); }
.compare-grid .after { background: rgba(16,185,129,.08); }
.compare-grid h4 {
  margin: 0 0 8px; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.compare-grid .before h4 { color: var(--danger); }
.compare-grid .after h4 { color: var(--good); }
.compare-grid .figure {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1;
  margin-bottom: 6px;
}
.compare-grid .before .figure { color: var(--danger); }
.compare-grid .after .figure { color: var(--good); }
.compare-grid .caption { font-size: 13px; color: var(--fg-soft); }
@media (max-width: 720px) {
  .compare-grid { grid-template-columns: 1fr; }
  .compare-grid .before { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Architecture diagram block */
.arch-block {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 32px; margin-top: 28px;
  font-family: var(--mono); font-size: 13px;
  white-space: pre; overflow-x: auto;
  color: var(--fg-soft); line-height: 1.45;
}

/* Feature checklist */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; list-style: none; padding: 0; margin: 24px 0;
}
.feature-grid li {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; font-size: 14px;
  display: flex; align-items: flex-start; gap: 10px;
}
.feature-grid li::before {
  content: "→"; color: var(--brand); font-weight: 800;
  flex-shrink: 0; margin-top: 1px;
}

/* Compliance row */
.compliance-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; margin-top: 22px;
}
.reg {
  background: var(--surface-2);
  border: 1px solid var(--line); border-top: 3px solid var(--brand);
  border-radius: 10px; padding: 22px;
}
.reg .code {
  font-family: var(--mono); font-size: 13px; color: var(--brand);
  font-weight: 700; letter-spacing: .04em;
}
.reg h3 { margin: 8px 0 6px; font-size: 16px; color: #fff; }
.reg p { font-size: 13px; margin: 0; }

/* Big CTA strip */
section.cta-strip {
  padding: 80px 24px;
  background:
    linear-gradient(135deg, rgba(56,189,248,.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
section.cta-strip h2 {
  font-size: clamp(28px, 3vw, 40px); margin: 0 0 16px;
  color: #fff; font-weight: 800; letter-spacing: -.01em;
}
section.cta-strip p { color: var(--fg-soft); max-width: 660px; margin: 0 auto 32px; }

/* ROI calculator */
.roi-form {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 32px; margin-top: 32px;
}
.roi-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px; align-items: end;
}
.roi-row label { display: block; font-size: 13px; color: var(--fg-soft); font-weight: 600; }
.roi-row input, .roi-row select {
  width: 100%; padding: 12px 14px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--fg);
  border-radius: 8px; font: inherit;
}
.roi-row input:focus, .roi-row select:focus { outline: none; border-color: var(--brand); }
@media (max-width: 720px) { .roi-row { grid-template-columns: 1fr; } }

.roi-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 28px; margin-top: 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px;
}
.roi-output .out {
  text-align: center; padding: 0 12px;
  border-left: 1px solid var(--line);
}
.roi-output .out:first-child { border-left: 0; }
.roi-output .out .v {
  font-family: var(--mono); font-size: 28px; font-weight: 800;
  color: var(--brand); margin-bottom: 6px;
}
.roi-output .out .v.danger { color: var(--danger); }
.roi-output .out .v.good { color: var(--good); }
.roi-output .out .l {
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600;
}
@media (max-width: 720px) { .roi-output .out { border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } .roi-output .out:first-child { border-top: 0; padding-top: 0; } }

/* Contact form */
form.lead {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 30px;
}
form.lead label {
  display: block; margin-top: 16px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--fg-soft);
}
form.lead input, form.lead textarea {
  width: 100%; padding: 12px 14px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--fg);
  border-radius: 8px; font: inherit;
}
form.lead input:focus, form.lead textarea:focus { outline: none; border-color: var(--brand); }
form.lead button {
  margin-top: 22px; padding: 14px 28px;
  background: var(--accent); color: #0a0e14; border: 0;
  border-radius: 8px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; font-size: 13px; cursor: pointer;
}
form.lead button:hover { background: var(--accent-deep); color: #fff; }
form.lead .form-note { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-grid .info h3 { color: #fff; margin-top: 0; }
.contact-grid .info p { color: var(--fg-soft); }
.contact-grid .info .label {
  color: var(--brand); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700; margin-top: 24px;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Footer */
footer.site {
  background: #06090e; color: var(--fg-soft);
  padding: 56px 24px 32px; border-top: 1px solid var(--line);
}
footer.site .inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  font-size: 14px;
}
footer.site .col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: #fff; margin-bottom: 14px;
}
footer.site a { color: var(--fg-soft); display: block; padding: 4px 0; }
footer.site a:hover { color: #fff; }
footer.site .brand-block img { height: 50px; margin-bottom: 16px; }
footer.site .legal {
  max-width: var(--max-w); margin: 36px auto 0; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); text-align: center;
}
@media (max-width: 880px) { footer.site .inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { footer.site .inner { grid-template-columns: 1fr; } }

/* ─── Demo page (SCADA-style operations view) ───────────── */
.demo-shell {
  background: #06090e;
  border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
  margin-top: 28px;
}
.demo-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(56,189,248,0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--line);
}
.demo-toolbar .left, .demo-toolbar .right { display: flex; align-items: center; gap: 18px; }
.demo-toolbar .title { font-family: var(--mono); font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.04em; }
.demo-toolbar .pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 10px var(--good);
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(.8); } }

.demo-kpis {
  display: flex; gap: 24px;
  font-family: var(--mono); font-size: 12px;
}
.demo-kpis .k { color: var(--muted); }
.demo-kpis .k strong { color: var(--brand); font-size: 13px; }

.demo-body {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 0;
}
@media (max-width: 1000px) { .demo-body { grid-template-columns: 1fr; } }

#demoMap { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.demo-traces-col {
  border-right: 1px solid var(--line);
  padding: 0;
}
.demo-traces-col > .col-title-bar,
.demo-alerts-col > .col-title-bar {
  padding: 12px 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted);
  text-transform: uppercase; font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: rgba(56,189,248,0.03);
}
#demoTraces { padding: 8px 12px 14px; }

.trace-panel {
  border-bottom: 1px solid var(--line);
  padding: 12px 4px;
}
.trace-panel:last-child { border-bottom: 0; }
.trace-panel .seg-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.trace-panel .seg-label {
  font-family: var(--mono); font-size: 12px; color: #fff; font-weight: 700;
}
.trace-panel .seg-meta {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.good   { background: var(--good); box-shadow: 0 0 6px var(--good); }
.dot.warn   { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.dot.danger { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: pulseDanger 0.9s infinite; }
@keyframes pulseDanger { 0%,100% { transform:scale(1); } 50% { transform:scale(1.4); } }

.trace-panel .seg-readout {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 8px; padding: 0 2px;
}
.trace-panel .ro { font-family: var(--mono); }
.trace-panel .ro-l { font-size: 9px; color: var(--muted); letter-spacing: .12em; }
.trace-panel .ro-v { font-size: 14px; color: var(--fg); font-weight: 700; line-height: 1.1; }
.trace-panel .ro-v small { font-size: 9px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.trace-panel .trace {
  width: 100%; height: 90px; display: block;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
}

.demo-alerts-col { display: flex; flex-direction: column; min-height: 0; }
#demoAlerts {
  flex: 1; overflow-y: auto;
  padding: 4px 4px;
  max-height: 720px;
}
.alert-row {
  display: grid; grid-template-columns: auto 1fr;
  gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px;
  animation: alertSlide 0.4s ease;
}
@keyframes alertSlide {
  from { transform: translateY(-8px); opacity: 0; background: rgba(56,189,248,0.1); }
  to   { transform: translateY(0); opacity: 1; background: transparent; }
}
.alert-row .alert-time { color: var(--muted); white-space: nowrap; }
.alert-row .alert-type { color: #fff; font-weight: 700; margin-bottom: 4px; }
.alert-row .alert-detail { color: var(--fg-soft); font-size: 11px; line-height: 1.4; }
.alert-badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  margin-right: 6px;
}
.alert-badge.danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid var(--danger); }
.alert-badge.warn   { background: rgba(245,158,11,0.15); color: var(--accent); border: 1px solid var(--accent); }
.alert-badge.info   { background: rgba(56,189,248,0.15); color: var(--brand); border: 1px solid var(--brand); }
.alert-badge.good   { background: rgba(16,185,129,0.15); color: var(--good); border: 1px solid var(--good); }

.alert-row.danger { border-left: 3px solid var(--danger); }
.alert-row.warn   { border-left: 3px solid var(--accent); }
.alert-row.info   { border-left: 3px solid var(--brand); }
.alert-row.good   { border-left: 3px solid var(--good); }

/* Map flow animation — dashes drift across the pipe to show "live data flowing" */
.pipe-flow {
  stroke-dashoffset: 0;
  animation: pipeFlow 1.2s linear infinite;
}
@keyframes pipeFlow { to { stroke-dashoffset: -100; } }

.map-alert circle.map-pin {
  animation: pinPulse 1s ease-in-out infinite;
}
@keyframes pinPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.6); opacity: 0.6; }
}
