:root {
  --ink-950: #07111f;
  --ink-900: #0c1725;
  --ink-850: #101c2a;
  --ink-800: #152333;
  --line-dark: #26384a;
  --paper: #f4f7fa;
  --white: #ffffff;
  --text: #132235;
  --muted: #5d6b7b;
  --muted-dark: #9fb0c3;
  --blue: #1677e8;
  --blue-hover: #0e66cd;
  --teal: #20bfae;
  --amber: #d68a1f;
  --red: #be3d4a;
  --green: #1f9d6b;
  --shadow: 0 18px 50px rgba(4, 12, 24, 0.18);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.site-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 31, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-size: 18px; font-weight: 700; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.site-navigation { display: flex; align-items: center; gap: 25px; }
.site-navigation form { margin: 0; }
.nav-link { color: #dce7f3; font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-link:hover { color: var(--white); }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line-dark); background: transparent; padding: 10px; }
.menu-button > span:not(.visually-hidden) { display: block; height: 2px; margin: 4px 0; background: var(--white); }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); border-color: #398feb; color: var(--white); }
.button-primary:hover { background: var(--blue-hover); color: var(--white); }
.button-secondary { background: rgba(9, 23, 38, 0.74); border-color: #607994; color: var(--white); }
.button-secondary:hover { background: #15293e; color: var(--white); }
.button-quiet { background: #142437; border-color: #2f4358; color: #e8f1fb; }
.button-light { background: var(--white); color: var(--ink-950); border-color: var(--white); }
.button-danger { background: #8f2631; border-color: #b83b47; color: var(--white); }
.button-small { min-height: 38px; padding: 7px 13px; font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.product-hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--ink-950);
  background-image: url("../images/drainage-intelligence-hero.jpg");
  background-position: center right;
  background-size: cover;
  color: var(--white);
}
.hero-shade { position: absolute; inset: 0; background: rgba(3, 10, 20, 0.24); }
.hero-content { position: relative; z-index: 1; padding-block: 96px 110px; }
.eyebrow { margin: 0 0 13px; color: var(--teal); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.product-hero h1 { max-width: 790px; margin: 0 0 20px; font-size: 72px; line-height: 1; font-weight: 740; letter-spacing: 0; }
.hero-lead { max-width: 720px; margin: 0 0 30px; color: #e4edf7; font-size: 22px; line-height: 1.5; }
.hero-note { max-width: 680px; margin: 24px 0 0; color: #aec1d4; font-size: 14px; }
.signal-band { background: var(--ink-850); color: var(--white); border-top: 1px solid #253a50; border-bottom: 1px solid #253a50; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.signal-grid div { padding: 25px 28px; border-right: 1px solid #2a3d52; }
.signal-grid div:last-child { border-right: 0; }
.signal-grid strong, .signal-grid span { display: block; }
.signal-grid strong { margin-bottom: 3px; font-size: 16px; }
.signal-grid span { color: var(--muted-dark); font-size: 13px; }

.section { padding-block: 96px; }
.section-light { background: var(--paper); }
.section-heading { max-width: 780px; margin-bottom: 48px; }
.section-heading h2, .proof-grid h2, .delivery-grid h2, .cta-inner h2, .page-intro h1 { margin: 0 0 20px; color: var(--ink-950); font-size: 42px; line-height: 1.15; letter-spacing: 0; }
.section-heading > p:last-child, .proof-grid > div > p, .delivery-grid p { color: var(--muted); font-size: 18px; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.capability { min-height: 220px; padding: 27px; background: var(--white); border: 1px solid #d8e0e8; border-radius: 6px; }
.capability-index { display: block; margin-bottom: 42px; color: var(--blue); font-weight: 800; }
.capability h3 { margin: 0 0 10px; font-size: 20px; }
.capability p { margin: 0; color: var(--muted); }
.product-proof { background: var(--ink-900); color: var(--white); }
.proof-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: center; }
.proof-grid h2 { color: var(--white); }
.proof-grid > div > p { color: var(--muted-dark); }
.feature-list { list-style: none; margin: 28px 0; padding: 0; }
.feature-list li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid #213448; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 18px; width: 10px; height: 10px; border: 2px solid var(--teal); border-radius: 50%; }
.decision-visual { min-height: 480px; display: grid; grid-template-rows: auto 1fr auto; padding: 34px; background: #081421; border: 1px solid #31475f; border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; }
.decision-visual-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid #26384a; }
.decision-visual-heading span { color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.decision-visual-heading strong { max-width: 260px; color: #f2f7fc; font-size: 16px; text-align: right; }
.decision-route { display: grid; align-content: center; gap: 12px; padding-block: 34px; }
.decision-stage { display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: center; padding: 18px 20px; background: #101f2e; border: 1px solid #2c4054; border-radius: 5px; }
.decision-stage-final { background: #10283a; border-color: #2977a9; }
.stage-number { display: grid; width: 42px; height: 42px; place-items: center; color: #5ecff3; border: 1px solid #2d789f; border-radius: 50%; font-size: 12px; font-weight: 800; }
.decision-stage strong, .decision-stage small { display: block; }
.decision-stage strong { color: #f3f7fb; font-size: 16px; }
.decision-stage small { margin-top: 3px; color: #9eb0c2; font-size: 13px; }
.decision-connector { display: flex; align-items: center; gap: 6px; height: 18px; padding-left: 38px; }
.decision-connector::before { content: ""; width: 1px; height: 18px; margin-left: 3px; background: #2a91c7; }
.decision-connector i { display: none; }
.decision-signal { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; height: 8px; }
.decision-signal span { background: #1d4260; border-radius: 2px; }
.decision-signal span:nth-child(3n+1) { background: var(--teal); }
.decision-signal span:nth-child(3n+2) { background: var(--blue); }
.delivery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.delivery-grid .button { margin-top: 12px; }
.cta-band { padding-block: 58px; background: #083d78; color: var(--white); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-inner .eyebrow { color: #6ff0dc; }
.cta-inner h2 { max-width: 760px; margin: 0; color: var(--white); font-size: 34px; }

.page-hero { padding-block: 86px 68px; background: var(--ink-900); color: var(--white); border-bottom: 1px solid var(--line-dark); }
.page-intro { max-width: 800px; }
.page-intro h1 { color: var(--white); font-size: 52px; }
.page-intro > p:last-child { color: #b8c8d8; font-size: 20px; }
.content-band { padding-block: 72px; }
.content-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 72px; }
.content-grid h2 { margin: 0; font-size: 32px; }
.copy-stack > *:first-child { margin-top: 0; }
.copy-stack h3 { margin: 30px 0 8px; font-size: 20px; }
.copy-stack p, .copy-stack li { color: var(--muted); }
.workflow-list { display: grid; gap: 0; border-top: 1px solid #cbd6e1; }
.workflow-step { display: grid; grid-template-columns: 84px 1fr; gap: 26px; padding: 30px 0; border-bottom: 1px solid #cbd6e1; }
.workflow-step strong { color: var(--blue); font-size: 24px; }
.workflow-step h3 { margin: 0 0 8px; }
.workflow-step p { margin: 0; color: var(--muted); }

.form-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 46px; align-items: start; }
.form-panel, .side-panel, .portal-panel { background: var(--white); border: 1px solid #d3dde7; border-radius: 6px; }
.form-panel { padding: 34px; }
.side-panel { padding: 28px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--text); background: var(--white); border: 1px solid #aebdcb; border-radius: 5px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(22, 119, 232, 0.18); border-color: var(--blue); }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 22px; }
.checkbox-field input { width: 18px; height: 18px; margin-top: 3px; }
.validation-summary-errors, .field-validation-error { color: #a9202f; }
.status-message { padding: 14px 16px; margin-bottom: 18px; border-radius: 5px; background: #eaf8f3; border: 1px solid #8ad2b8; color: #145f45; }

.portal-page { min-height: 720px; padding-block: 42px 72px; background: #edf2f6; }
.portal-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 26px; }
.portal-heading h1 { margin: 0; font-size: 34px; }
.portal-heading p { margin: 5px 0 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { padding: 20px; background: var(--ink-900); border: 1px solid var(--line-dark); border-radius: 6px; color: var(--white); }
.metric span { display: block; color: var(--muted-dark); font-size: 13px; }
.metric strong { display: block; margin-top: 4px; font-size: 25px; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.portal-panel { padding: 24px; }
.portal-panel h2 { margin: 0 0 16px; font-size: 21px; }
.portal-panel-full { grid-column: 1 / -1; }
.data-table-wrap { overflow-x: auto; border: 1px solid #d0dbe5; border-radius: 5px; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #dbe3ea; vertical-align: top; }
.data-table th { background: #e9eff4; color: #33465a; font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill-green { color: #0d6546; background: #dff5eb; }
.pill-amber { color: #75480b; background: #fff0d5; }
.pill-blue { color: #0958a9; background: #dcecff; }
.secret-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; background: #eef4f9; border: 1px solid #ccdae7; border-radius: 5px; }
.secret-value { overflow-wrap: anywhere; font-family: Consolas, monospace; }
.empty-state { padding: 42px 24px; text-align: center; border: 1px dashed #aebdcb; border-radius: 6px; color: var(--muted); }
.portal-user + .portal-user { margin-top: 20px; padding-top: 20px; border-top: 1px solid #dbe3ea; }
.portal-user .button-row { justify-content: flex-start; }

.site-footer { padding-block: 42px; background: #050c16; color: #a6b6c8; border-top: 1px solid #25384b; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px 50px; align-items: start; }
.footer-brand { color: var(--white); }
.site-footer p { margin: 12px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #d3deea; text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid #1d2d3d; font-size: 13px; }

@media (max-width: 980px) {
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid, .delivery-grid, .content-grid, .form-layout { grid-template-columns: 1fr; }
  .proof-grid { gap: 40px; }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .signal-grid div:nth-child(2) { border-right: 0; }
  .signal-grid div:nth-child(-n+2) { border-bottom: 1px solid #2a3d52; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-panel-full { grid-column: auto; }
}

@media (max-width: 760px) {
  .site-shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .menu-button { display: block; }
  .site-navigation { position: absolute; left: 0; right: 0; top: 64px; display: none; align-items: stretch; padding: 18px 20px 22px; background: var(--ink-950); border-top: 1px solid var(--line-dark); box-shadow: var(--shadow); }
  .site-navigation.is-open { display: grid; gap: 14px; }
  .site-navigation .button, .site-navigation form .button { width: 100%; }
  .product-hero { min-height: 600px; background-position: 62% center; }
  .hero-shade { background: rgba(3, 10, 20, 0.48); }
  .hero-content { padding-block: 78px 86px; }
  .product-hero h1 { font-size: 48px; }
  .hero-lead { font-size: 19px; }
  .section { padding-block: 68px; }
  .section-heading h2, .proof-grid h2, .delivery-grid h2 { font-size: 34px; }
  .capability-grid, .field-grid, .metric-grid { grid-template-columns: 1fr; }
  .cta-inner, .portal-heading { align-items: flex-start; flex-direction: column; }
  .cta-inner h2 { font-size: 29px; }
  .page-hero { padding-block: 62px 50px; }
  .page-intro h1 { font-size: 40px; }
  .form-panel { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .signal-grid { grid-template-columns: 1fr; }
  .signal-grid div { border-right: 0; border-bottom: 1px solid #2a3d52; }
  .signal-grid div:last-child { border-bottom: 0; }
  .capability-grid { grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
  .product-hero h1 { font-size: 41px; }
  .workflow-step { grid-template-columns: 54px 1fr; gap: 16px; }
  .decision-visual { min-height: 420px; padding: 22px; }
  .decision-visual-heading { display: grid; gap: 5px; }
  .decision-visual-heading strong { text-align: left; }
}
