:root {
  --brand: #3c52c0;
  --brand-dark: #24367f;
  --brand-deep: #18265f;
  --brand-soft: #eef2ff;
  --brand-mid: #dce4ff;
  --ink: #102033;
  --muted: #667085;
  --line: #d7deea;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --shadow: 0 20px 60px rgba(16, 32, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, auto) 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.brand-mark-frame {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  flex: 0 0 64px;
  border: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(60, 82, 192, 0.24);
}

.brand-mark-image {
  display: block;
  width: 104px;
  height: 104px;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  transform: translateY(-1px);
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-name {
  color: var(--brand-dark);
  font-size: 1.5rem;
  font-weight: 800;
}

.brand-tagline {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  color: #344054;
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a,
.site-footer a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--brand);
}

.site-nav a[href*="calculations"] {
  color: var(--brand);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.header-cta,
.button-primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(60, 82, 192, 0.24);
}

.button-primary:hover,
.header-cta:hover {
  background: var(--brand-dark);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.hero {
  position: relative;
  display: grid;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
}

.hero-image,
.hero-overlay,
.hero-content,
.hero-panel {
  grid-area: 1 / 1;
}

.hero-image {
  background-image: url("assets/water-treatment-hero.png");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(24, 38, 95, 0.96), rgba(36, 54, 127, 0.78) 45%, rgba(60, 82, 192, 0.56)),
    linear-gradient(0deg, rgba(16, 32, 51, 0.52), rgba(16, 32, 51, 0.08));
}

.hero-content {
  position: relative;
  align-self: center;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding: 92px 0 144px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #cfd8ff;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.4vw, 3.55rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

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

.hero-panel {
  position: relative;
  align-self: end;
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  width: min(720px, calc(100% - 36px));
  margin: 0 clamp(18px, 5vw, 72px) 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(10, 20, 37, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel div {
  padding: 22px;
}

.hero-panel div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel strong {
  font-size: 1.4rem;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.72);
}

.section-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(64px, 8vw, 104px) 0;
}

.split,
.compliance-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.intro-section {
  background: linear-gradient(135deg, var(--brand-soft), #ffffff 58%, var(--brand-mid));
}

.intro-section p:last-child,
.section-heading p,
.support-layout p,
.compliance-content p,
.contact-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.services-section {
  background: var(--surface);
}

.sectors-section {
  background: linear-gradient(180deg, #ffffff, var(--brand-soft));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

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

.service-card {
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(60, 82, 192, 0.45);
  box-shadow: 0 18px 40px rgba(16, 32, 51, 0.1);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
}

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

.support-section,
.contact-section {
  background: var(--surface-alt);
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 68px);
}

.support-list {
  display: grid;
  gap: 14px;
}

.support-list div {
  padding: 24px;
  border-top: 5px solid var(--brand);
  border-left: 1px solid rgba(60, 82, 192, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.07);
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sector-grid span {
  padding: 20px;
  border: 1px solid rgba(60, 82, 192, 0.25);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #ffffff;
  font-weight: 700;
}

.equipment-section {
  background: var(--brand);
  color: #ffffff;
}

.equipment-section .eyebrow {
  color: #dce4ff;
}

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

.equipment-grid span {
  min-height: 70px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.compliance-section {
  color: #ffffff;
  background: var(--brand-deep);
}

.compliance-section .eyebrow {
  color: #cfd8ff;
}

.compliance-content p {
  color: rgba(255, 255, 255, 0.76);
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 32px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: transparent;
  background: #cfd8ff;
  font-weight: 900;
  content: "";
}

.check-list li::after {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--brand-deep);
  border-left: 2px solid var(--brand-deep);
  content: "";
  transform: rotate(-45deg);
}

.calculations-promo {
  background: linear-gradient(135deg, var(--brand-soft), #ffffff);
}

.calculations-promo .button {
  margin-top: 18px;
}

.calc-hero {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(24, 38, 95, 0.95), rgba(60, 82, 192, 0.9)),
    url("assets/water-treatment-hero.png") center / cover;
}

.calc-hero .section-inner {
  padding-top: clamp(72px, 9vw, 126px);
  padding-bottom: clamp(72px, 9vw, 126px);
}

.calc-hero .eyebrow {
  color: #dce4ff;
}

.calc-hero h1 {
  max-width: 930px;
}

.calculator-section {
  background: var(--surface-alt);
}

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

.calculator-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 300px;
  padding: 24px;
  border: 1px solid rgba(60, 82, 192, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(16, 32, 51, 0.08);
}

.calculator-card-wide {
  grid-column: span 2;
}

.calculator-card h2 {
  margin-bottom: 2px;
  color: var(--brand-dark);
  font-size: 1.35rem;
}

.calculator-note,
.formula-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.formula-text {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

output {
  display: block;
  min-height: 48px;
  margin-top: 4px;
  padding: 12px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
}

.contact-details {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  font-size: 1.08rem;
  font-weight: 800;
}

.contact-details a {
  color: var(--brand);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(60, 82, 192, 0.18);
  border-color: var(--brand);
}

.full-width {
  grid-column: 1 / -1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.78);
  background: #0d1b2f;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-panel,
  .service-grid,
  .sector-grid,
  .equipment-grid,
  .calculator-grid,
  .split,
  .support-layout,
  .compliance-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    justify-self: center;
  }

  .calculator-card-wide {
    grid-column: auto;
  }

  .hero-panel div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark-frame {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand-mark-image {
    width: 86px;
    height: 86px;
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .brand-tagline {
    display: none;
  }

  .header-cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .site-nav {
    gap: 18px;
    font-size: 0.88rem;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-left: 16px;
    padding-top: 64px;
  }

  .hero-panel {
    width: calc(100% - 32px);
    margin-bottom: 18px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .service-card {
    min-height: auto;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

  .site-footer {
    flex-direction: column;
  }
}
