:root {
  --ink: #111827;
  --muted: #5d6878;
  --line: #dce3ea;
  --surface: #f6f8fb;
  --panel: #ffffff;
  --navy: #172033;
  --blue: #006eb8;
  --cyan: #20c5d8;
  --green: #4cb36a;
  --white: #ffffff;
  --shadow: 0 22px 55px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px clamp(20px, 5vw, 72px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 18px rgba(17, 24, 39, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-size: 15px;
}

.brand-name {
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  opacity: 0.9;
}

.site-nav a:hover {
  opacity: 1;
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: inherit;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  padding: 120px clamp(20px, 5vw, 72px) 76px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: url("assets/automation-hero.png") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 18, 33, 0.94) 0%, rgba(10, 18, 33, 0.78) 42%, rgba(10, 18, 33, 0.2) 100%),
    linear-gradient(0deg, rgba(10, 18, 33, 0.7), rgba(10, 18, 33, 0.05) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin: 20px 0 10px;
  font-size: 21px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 660px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--blue);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

.section,
.band {
  padding: clamp(72px, 9vw, 124px) clamp(20px, 5vw, 72px);
}

.band {
  background: var(--surface);
}

.section-grid,
.feature,
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
}

.section-grid p,
.feature-copy p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 42px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-height: 290px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.04);
}

.service-card p,
.timeline p {
  margin: 0;
  color: var(--muted);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: var(--white);
  background: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.feature {
  background:
    linear-gradient(90deg, rgba(23, 32, 51, 0.95), rgba(23, 32, 51, 0.86)),
    url("assets/automation-hero.png") center / cover no-repeat;
  color: var(--white);
}

.feature .eyebrow,
.feature-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.metrics {
  display: grid;
  gap: 16px;
}

.metrics div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.metrics strong {
  color: var(--cyan);
  font-size: 38px;
  line-height: 1;
}

.metrics span {
  color: rgba(255, 255, 255, 0.82);
}

.industry-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.industry-list a {
  min-height: 104px;
  display: flex;
  align-items: center;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 800;
  background: var(--panel);
}

.industry-list a:hover {
  color: var(--blue);
  background: #eef7fb;
}

.sector-showcase {
  position: relative;
  min-height: 540px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}

.sector-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(11, 18, 32, 0.88), rgba(11, 18, 32, 0.34)),
    var(--sector-image, url("assets/sector-water.png")) center / cover no-repeat;
  transition: background-image 240ms ease, filter 240ms ease;
}

.sector-showcase[data-sector="water"] .sector-backdrop {
  --sector-image: url("assets/sector-water.png");
}

.sector-showcase[data-sector="scada"] .sector-backdrop,
.sector-showcase[data-sector="controls"] .sector-backdrop {
  --sector-image: url("assets/sector-scada.png");
}

.sector-showcase[data-sector="edge"] .sector-backdrop {
  --sector-image: url("assets/sector-edge.png");
}

.sector-showcase[data-sector="controls"] .sector-backdrop {
  --sector-image: url("assets/sector-controls.png");
}

.sector-showcase[data-sector="reporting"] .sector-backdrop {
  --sector-image: url("assets/sector-reporting.png");
}

.sector-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(14, 33, 72, 0.86);
  backdrop-filter: blur(8px);
}

.sector-item {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sector-item:hover,
.sector-item:focus-visible,
.sector-item.is-active {
  color: var(--white);
  background: rgba(32, 197, 216, 0.12);
  outline: none;
}

.sector-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 58px;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-size: 22px;
  opacity: 0.75;
}

.sector-copy {
  position: absolute;
  z-index: 2;
  left: clamp(20px, 5vw, 72px);
  top: clamp(90px, 14vw, 150px);
  max-width: 620px;
}

.sector-copy p:last-child {
  max-width: 540px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.water-system {
  background: #ffffff;
}

.water-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: stretch;
}

.plant-diagram {
  position: relative;
  min-height: 520px;
  padding: 24px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 110, 184, 0.07), rgba(76, 179, 106, 0.08)),
    #f8fbfd;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
}

.plant-diagram svg {
  width: 100%;
  height: 100%;
  min-height: 470px;
}

.flow-line {
  fill: none;
  stroke: rgba(0, 110, 184, 0.3);
  stroke-width: 12;
  stroke-linecap: round;
}

.flow-pulse {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 24 34;
  opacity: 0.45;
  animation: flowMove 1.35s linear infinite;
}

.plant-diagram.is-pumped-off .flow-pulse {
  opacity: 0.08;
  animation-play-state: paused;
}

.plant-tooltip {
  position: absolute;
  z-index: 3;
  width: min(260px, calc(100% - 32px));
  padding: 13px 14px;
  border: 1px solid rgba(32, 197, 216, 0.3);
  border-radius: 8px;
  color: var(--white);
  background: rgba(18, 33, 58, 0.94);
  box-shadow: 0 16px 35px rgba(17, 24, 39, 0.22);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 18px));
}

.plant-tooltip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
}

.plant-tooltip span {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.35;
}

.plant-node {
  cursor: pointer;
  color: var(--navy);
}

.plant-node rect,
.plant-node circle {
  fill: #ffffff;
  stroke: #b9c7d4;
  stroke-width: 3;
  transition: fill 160ms ease, stroke 160ms ease, filter 160ms ease;
}

.plant-node path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pump-run-light {
  fill: #b9c7d4;
  stroke: #ffffff;
  stroke-width: 2;
}

.plant-diagram.is-pumped .pump-run-light {
  fill: var(--green);
  filter: drop-shadow(0 0 8px rgba(76, 179, 106, 0.75));
}

.plant-node text,
.data-cloud text {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
}

.plant-node:hover rect,
.plant-node:hover circle,
.plant-node:focus rect,
.plant-node:focus circle,
.plant-node:focus-visible rect,
.plant-node:focus-visible circle,
.plant-node.is-active rect,
.plant-node.is-active circle {
  fill: #e9fbfd;
  stroke: var(--cyan);
  filter: drop-shadow(0 10px 16px rgba(0, 110, 184, 0.18));
}

.plant-diagram.is-pumped .plant-node .pump-run-light,
.plant-diagram.is-pumped .plant-node:hover .pump-run-light,
.plant-diagram.is-pumped .plant-node:focus .pump-run-light,
.plant-diagram.is-pumped .plant-node.is-active .pump-run-light {
  fill: var(--green);
  stroke: #ffffff;
  filter: drop-shadow(0 0 8px rgba(76, 179, 106, 0.75));
}

.plant-node:focus,
.plant-node:focus-visible {
  outline: none;
}

.data-cloud rect {
  fill: #12213a;
}

.data-cloud path {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 2;
}

.data-cloud text {
  fill: #ffffff;
  font-size: 16px;
}

.plant-card {
  padding: 28px;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(18, 33, 58, 0.92), rgba(18, 33, 58, 0.98)),
    url("assets/wastewater-automation.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.water-side {
  display: grid;
  gap: 18px;
}

.pump-console {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.pump-console h3 {
  margin-top: 0;
}

.pump-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pump-button {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid #cfd9e3;
  border-radius: 8px;
  color: var(--ink);
  background: #f7fafc;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pump-button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.pump-button strong {
  font-size: 18px;
}

.pump-button.is-running {
  border-color: rgba(76, 179, 106, 0.7);
  background: #edf9f1;
}

.pump-button.is-running strong {
  color: #207d3f;
}

.pump-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.live-values {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.live-values div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.live-values span {
  color: var(--muted);
  font-weight: 700;
}

.live-values strong {
  color: var(--blue);
}

.plant-card h3 {
  margin-top: 0;
  font-size: 28px;
}

.plant-card p {
  color: rgba(255, 255, 255, 0.78);
}

.plant-card dl {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
}

.plant-card div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.plant-card dt {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plant-card dd {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.timeline li {
  position: relative;
  min-height: 210px;
  padding: 28px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.timeline li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 28px;
  color: var(--green);
  font-weight: 800;
}

.timeline span {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 800;
}

.contact {
  background: var(--navy);
}

.contact-panel {
  padding: clamp(28px, 5vw, 58px);
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.74);
}

.contact-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 14px 15px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px clamp(20px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.74);
  background: #0b1220;
}

.site-footer .brand {
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
  font-size: 13px;
}

@keyframes flowMove {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -58;
  }
}

@media (max-width: 980px) {
  .service-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industry-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sector-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .water-grid {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .feature,
  .contact-panel,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 68px;
    padding: 13px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 24px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 35px rgba(17, 24, 39, 0.13);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 88vh;
    padding-top: 106px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(10, 18, 33, 0.96), rgba(10, 18, 33, 0.72)),
      linear-gradient(0deg, rgba(10, 18, 33, 0.62), rgba(10, 18, 33, 0.08));
  }

  .service-grid,
  .timeline,
  .industry-list,
  .sector-strip {
    grid-template-columns: 1fr;
  }

  .sector-showcase {
    min-height: 760px;
  }

  .sector-copy {
    position: relative;
    left: auto;
    top: auto;
    padding: 92px 20px 34px;
  }

  .sector-strip {
    align-self: end;
  }

  .sector-item {
    min-height: 96px;
    grid-template-columns: 64px 1fr;
    justify-items: start;
    padding: 0 20px;
  }

  .sector-icon {
    width: 54px;
    height: 44px;
    font-size: 16px;
  }

  .plant-diagram {
    min-height: 390px;
    padding: 12px;
    overflow-x: auto;
  }

  .plant-diagram svg {
    width: 760px;
    min-height: 390px;
  }

  .service-card,
  .timeline li {
    min-height: auto;
  }

  .metrics div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pump-buttons {
    grid-template-columns: 1fr;
  }
}
