:root {
  --ink: #121212;
  --ink-soft: #2d2b28;
  --paper: #f7f8f6;
  --white: #ffffff;
  --stone: #d5d7d0;
  --clay: #6a3c2d;
  --clay-dark: #3d261f;
  --water: #0f5f91;
  --water-dark: #102d60;
  --texas-red: #d80f26;
  --grass: #496c34;
  --shadow: 0 18px 50px rgba(18, 18, 18, 0.14);
  --max: 1180px;
  --header-h: 78px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--texas-red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--white);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.65rem 5vw;
  background: rgba(247, 248, 246, 0.94);
  border-bottom: 1px solid rgba(18, 18, 18, 0.12);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 6px;
  background: var(--white);
}

.brand-text {
  display: block;
  line-height: 1;
}

.brand-text strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1;
  text-transform: uppercase;
}

.brand-text small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  border-radius: 6px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--water-dark);
  background: rgba(15, 95, 145, 0.08);
}

.site-nav .nav-cta {
  margin-left: 0.4rem;
  color: var(--white);
  background: var(--ink);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  color: var(--white);
  background: var(--water-dark);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.18);
  border-radius: 6px;
}

.nav-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 3px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
}

.hero picture,
.hero > picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero > picture img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 18, 18, 0.88) 0%, rgba(18, 18, 18, 0.72) 36%, rgba(18, 18, 18, 0.2) 68%, rgba(18, 18, 18, 0.08) 100%),
    linear-gradient(0deg, rgba(18, 18, 18, 0.68) 0%, rgba(18, 18, 18, 0) 42%);
}

.route-marker {
  position: absolute;
  left: 5vw;
  bottom: 0;
  width: 7px;
  height: 72%;
  background: linear-gradient(180deg, var(--water) 0%, var(--texas-red) 100%);
}

.route-marker::before,
.route-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 19px;
  height: 19px;
  transform: translateX(-50%);
  border: 4px solid var(--white);
  border-radius: 999px;
  background: var(--water);
  box-shadow: 0 0 0 4px rgba(15, 95, 145, 0.2);
}

.route-marker::before {
  top: 0;
}

.route-marker::after {
  bottom: 0;
  background: var(--texas-red);
  box-shadow: 0 0 0 4px rgba(216, 15, 38, 0.2);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(710px, calc(100% - 10vw));
  margin: 0 0 12vh 9vw;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--texas-red);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.not-found h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.8rem;
  line-height: 0.98;
  font-weight: 900;
}

.hero-copy,
.page-hero p {
  max-width: 650px;
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button-primary {
  color: var(--white);
  background: var(--texas-red);
  border-color: var(--texas-red);
}

.button-primary:hover {
  background: #b80c1e;
  border-color: #b80c1e;
}

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

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(910px, calc(100% - 10vw));
  margin: 0 5vw 5vw auto;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel div {
  min-height: 132px;
  padding: 1.1rem;
  border-left: 1px solid var(--stone);
}

.hero-panel div:first-child {
  border-left: 0;
}

.hero-panel strong {
  display: block;
  color: var(--water-dark);
  font-size: 1rem;
}

.hero-panel span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.section,
.section-band {
  padding: 6rem 5vw;
}

.section-band {
  background:
    linear-gradient(90deg, rgba(15, 95, 145, 0.08), transparent 36%),
    var(--white);
}

.section-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.2rem;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1.05;
}

h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

p {
  margin: 0;
}

.intro-grid,
.diagnostic-grid,
.proof-grid,
.split-layout,
.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 4rem;
  align-items: start;
}

.intro-copy,
.proof-columns,
.content-stack {
  display: grid;
  gap: 1rem;
  color: var(--ink-soft);
}

.section-lede {
  max-width: 680px;
  margin-top: 1rem;
  color: var(--ink-soft);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-card,
.detail-grid article {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 18, 18, 0.06);
}

.service-card h3 {
  margin-top: 1.3rem;
}

.service-card p,
.detail-grid p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.service-card a {
  width: fit-content;
  margin-top: auto;
  padding-top: 1.2rem;
  color: var(--water-dark);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link {
  color: var(--water-dark);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.areas-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 3rem;
  align-items: start;
}

.area-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.area-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 95, 145, 0.1), transparent 48%),
    var(--paper);
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.area-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 95, 145, 0.35);
  box-shadow: 0 16px 34px rgba(18, 18, 18, 0.1);
}

.area-card span {
  color: var(--water-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
}

.area-card strong {
  display: block;
  margin-top: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.service-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid rgba(18, 18, 18, 0.14);
}

.service-icon::before,
.service-icon::after {
  content: "";
  position: absolute;
  background: var(--water);
}

.service-icon-pipe::before {
  left: 10px;
  top: 25px;
  width: 32px;
  height: 8px;
  border-radius: 999px;
}

.service-icon-pipe::after {
  left: 16px;
  top: 13px;
  width: 20px;
  height: 26px;
  border: 5px solid var(--clay);
  border-left: 0;
  background: transparent;
  border-radius: 0 999px 999px 0;
}

.service-icon-grade::before {
  left: 8px;
  bottom: 12px;
  width: 36px;
  height: 7px;
  transform: rotate(-13deg);
  background: var(--grass);
}

.service-icon-grade::after {
  right: 10px;
  top: 10px;
  width: 10px;
  height: 25px;
  border-radius: 999px 999px 999px 0;
  background: var(--water);
  transform: rotate(35deg);
}

.service-icon-downspout::before {
  right: 13px;
  top: 8px;
  width: 10px;
  height: 32px;
  border-radius: 999px;
  background: var(--water-dark);
}

.service-icon-downspout::after {
  left: 11px;
  bottom: 10px;
  width: 30px;
  height: 9px;
  border-radius: 999px;
  background: var(--water);
}

.service-icon-basin::before {
  inset: 13px 10px;
  border: 3px solid var(--water-dark);
  border-radius: 4px;
  background: transparent;
}

.service-icon-basin::after {
  left: 13px;
  right: 13px;
  top: 24px;
  height: 4px;
  background: var(--texas-red);
}

.check-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 3px solid var(--water);
  border-radius: 999px;
  background: var(--white);
}

.check-list.compact {
  gap: 0.55rem;
}

.flow-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.flow-line::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 32px;
  height: 6px;
  background: linear-gradient(90deg, var(--water-dark), var(--water), var(--texas-red));
}

.flow-line article {
  position: relative;
  min-height: 210px;
  padding: 5rem 1.2rem 1.2rem;
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 8px;
}

.flow-line span {
  position: absolute;
  top: 0;
  left: 1.2rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border: 5px solid var(--paper);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
}

.flow-line p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

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

.contact-strip {
  padding: 5rem 5vw;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(16, 45, 96, 0.96), rgba(18, 18, 18, 0.94)),
    var(--water-dark);
}

.contact-strip .section-kicker {
  color: #ff6372;
}

.contact-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact-inner h2 {
  font-size: 2.5rem;
}

.contact-inner p:last-child {
  max-width: 700px;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.84);
}

.page-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 7rem 5vw 5rem;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(16, 45, 96, 0.92)),
    var(--ink);
}

.page-hero-photo picture,
.page-hero-photo picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.page-hero-photo picture img {
  object-fit: cover;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 18, 18, 0.88), rgba(18, 18, 18, 0.32));
}

.page-hero-content {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  margin: 0 auto;
}

.page-hero-content.solid {
  width: min(var(--max), 100%);
}

.page-hero .button {
  margin-top: 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.detail-grid article {
  min-height: 210px;
}

.contact-grid {
  grid-template-columns: 0.85fr 1.15fr;
}

.contact-aside {
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 8px;
  padding: 1.5rem;
}

.contact-aside h2 {
  font-size: 2.25rem;
}

.small-note {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.small-note code {
  color: var(--water-dark);
  font-weight: 800;
}

.estimate-form {
  display: grid;
  gap: 0.8rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.conditional-field {
  display: grid;
  gap: 0.8rem;
}

.conditional-field[hidden] {
  display: none;
}

.estimate-form label {
  color: var(--ink);
  font-weight: 850;
}

.estimate-form input,
.estimate-form select,
.estimate-form textarea {
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(18, 18, 18, 0.2);
  border-radius: 6px;
  padding: 0.72rem 0.8rem;
}

.estimate-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  color: var(--water-dark);
  font-weight: 750;
}

.microcopy {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  margin: 2rem 0 0.6rem;
  font-size: 2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--ink-soft);
}

.site-footer {
  padding: 4rem 5vw;
  color: rgba(255, 255, 255, 0.82);
  background: var(--ink);
}

.footer-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 1.05fr;
  gap: 3rem;
}

.site-footer img {
  width: 220px;
  height: auto;
  padding: 0.3rem;
  background: var(--white);
  border-radius: 6px;
}

.site-footer p {
  margin-top: 1rem;
  max-width: 430px;
}

.site-footer nav {
  display: grid;
  gap: 0.55rem;
}

.site-footer a {
  color: var(--white);
  font-weight: 750;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-meta p {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 1rem;
  padding: 5vw;
  background: var(--paper);
}

.not-found img {
  width: 260px;
  margin-bottom: 1rem;
}

.not-found p {
  max-width: 600px;
  color: var(--ink-soft);
}

@media (max-width: 1020px) {
  .site-header {
    align-items: center;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    left: 5vw;
    right: 5vw;
    top: calc(100% + 0.5rem);
    display: none;
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.75rem;
    background: var(--white);
    border: 1px solid rgba(18, 18, 18, 0.12);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav .nav-cta {
    margin-left: 0;
  }

  .hero h1,
  .page-hero h1,
  .not-found h1 {
    font-size: 3.45rem;
  }

  .hero-content {
    margin-left: 10vw;
  }

  .hero-panel,
  .service-grid,
  .flow-line,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .flow-line::before {
    display: none;
  }

  .intro-grid,
  .diagnostic-grid,
  .proof-grid,
  .split-layout,
  .contact-grid,
  .areas-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header {
    min-height: 68px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text small {
    font-size: 0.66rem;
  }

  .hero {
    min-height: auto;
    padding-top: 28rem;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(18, 18, 18, 0.92) 0%, rgba(18, 18, 18, 0.76) 44%, rgba(18, 18, 18, 0.24) 100%);
  }

  .route-marker {
    left: 5vw;
    height: 46%;
  }

  .hero-content {
    width: calc(100% - 12vw);
    margin: 0 6vw 2.5rem 11vw;
  }

  .hero h1,
  .page-hero h1,
  .not-found h1 {
    font-size: 2.55rem;
    line-height: 1.03;
  }

  .hero-copy,
  .page-hero p {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    width: calc(100% - 10vw);
    margin: 0 5vw 2rem;
  }

  .hero-panel div {
    min-height: 112px;
    border-left: 0;
    border-top: 1px solid var(--stone);
  }

  .hero-panel div:first-child {
    border-top: 0;
  }

  .section,
  .section-band {
    padding: 4rem 5vw;
  }

  h2,
  .contact-inner h2 {
    font-size: 2.1rem;
  }

  .service-grid,
  .flow-line,
  .detail-grid,
  .proof-columns,
  .area-card-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .contact-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    min-height: 430px;
    padding-top: 5rem;
    padding-bottom: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
