@font-face {
  font-family: Geist;
  src: url("./assets/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #101e31;
  --muted: #4a5868;
  --page: #fbfcfd;
  --line: #d6dce3;
  --accent: #a12228;
  --accent-hover: #7e171d;
  --wash: #f6ecec;
  --surface: #eef1f4;
  --focus: #0757a0;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
}

body[data-site="drain"] {
  --accent: #1c6264;
  --accent-hover: #124a4c;
  --wash: #e8f2f1;
}

body[data-site="excavation"] {
  --accent: #3d526b;
  --accent-hover: #293d54;
  --wash: #eaf0f6;
}

body[data-site="fondations"] {
  --accent: #85443c;
  --accent-hover: #68332d;
  --wash: #f4edeb;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Geist, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.62;
}

a {
  color: var(--accent-hover);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

button,
input {
  font: inherit;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.99;
  text-wrap: balance;
}
h1 {
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(2.55rem, 5.6vw, 4.2rem);
  letter-spacing: -0.017em;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 680;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell {
  width: min(calc(100% - 3rem), 75rem);
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.7rem 1rem;
  background: white;
  border: 2px solid var(--focus);
  transform: translateY(-155%);
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem 1.4rem;
  min-height: 4.9rem;
  padding-block: 0.65rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  width: fit-content;
}
.brand-logo {
  width: 12rem;
  height: auto;
  max-height: 3.5rem;
  object-fit: contain;
  object-position: left center;
}
.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  justify-content: center;
}
.navigation a,
.header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 620;
  text-decoration: none;
}
.navigation a:hover,
.header-phone:hover {
  text-decoration: underline;
}
.header-phone {
  justify-self: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.quote :focus-visible {
  outline-color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.3rem);
  padding-block: clamp(2.2rem, 5.8vw, 5.4rem);
}
.hero-copy {
  container-type: inline-size;
  min-width: 0;
  padding-bottom: 1rem;
}
body[data-site="fondations"] h1 {
  font-size: clamp(2.1rem, 14cqi, 5.15rem);
  overflow-wrap: anywhere;
}
.service-area {
  font-size: 0.92rem;
  color: var(--accent-hover);
  font-weight: 680;
  margin-bottom: 0.95rem;
}
.hero-introduction {
  color: var(--muted);
  font-size: clamp(1.01rem, 1.65vw, 1.2rem);
  max-width: 33rem;
  margin-top: 1.25rem;
}
.hero-image {
  min-width: 0;
}
.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 0.5rem;
  background: var(--surface);
}
.hero-image figcaption {
  color: var(--muted);
  font-size: 0.79rem;
  margin: 0.5rem 0 0;
}
.hero-image figcaption a {
  color: inherit;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.hero .actions {
  margin-top: 1.65rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.28;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary {
  color: #fff;
  background: var(--accent);
}
.button-primary:hover {
  background: var(--accent-hover);
}
.button-outline {
  color: var(--ink);
  border-color: #9aa8b5;
  background: transparent;
}
.button-outline:hover {
  background: var(--surface);
}

.summary {
  background: var(--wash);
}
.summary-inner {
  display: grid;
  grid-template-columns: minmax(9.2rem, 0.55fr) minmax(0, 2fr);
  gap: 0.8rem 2rem;
  align-items: start;
  padding-block: 1.65rem;
}
.summary h2 {
  font-size: 2rem;
}
.summary p {
  max-width: 53rem;
  color: var(--ink);
}

.tool-section {
  padding-block: clamp(2.8rem, 7vw, 5.6rem);
  border-bottom: 1px solid var(--line);
}
.tool-layout,
.guide,
.project-inner,
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4.25rem);
}
.section-heading h2 {
  text-wrap: pretty;
}
.section-heading > p {
  max-width: 24rem;
  margin-top: 1rem;
  color: var(--muted);
}
.tool-box {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #fff;
  min-width: 0;
}
.tool-box form {
  display: grid;
  gap: 1.3rem;
}
.tool-box button {
  justify-self: start;
}
.choices {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.choices legend {
  padding: 0;
  margin-bottom: 0.6rem;
  font-weight: 680;
}
.choices-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice {
  display: inline-flex;
  position: relative;
  cursor: pointer;
}
.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  inset: 50% auto auto 0;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.44rem 0.8rem;
  border: 1px solid #9ba9b7;
  border-radius: 0.35rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.33;
}
.choice:hover span {
  background: var(--surface);
}
.choice input:checked + span {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: var(--wash);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.measurements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.measurements label {
  display: grid;
  align-content: end;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 640;
}
.measurements input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #9ba9b7;
  border-radius: 0.35rem;
  padding: 0.6rem 0.75rem;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
}
.measurements input[aria-invalid="true"] {
  border-color: #a11d30;
}
.tool-result {
  grid-row: auto;
  margin-top: -1.3rem;
}
.tool-result:has(.result-title:not(:empty)) {
  margin-top: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--wash);
}
.result-title {
  font-weight: 720;
}
.tool-result p:not(:empty) + p:not(:empty) {
  margin-top: 0.25rem;
}
.tool-result a:not([hidden]) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.tool-box noscript p {
  margin-top: 1rem;
  color: var(--muted);
}

.guide,
.faq {
  padding-block: clamp(2.8rem, 7vw, 5rem);
}
.guide-entries {
  display: grid;
  gap: 1.4rem;
}
.guide-entry {
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.guide-entry:first-child {
  padding-top: 0;
  border-top: 0;
}
.guide-entry p,
.project-detail p,
.faq details p {
  max-width: 51rem;
  color: var(--muted);
  margin-top: 0.55rem;
}
.guide-entry .supporting-link a {
  font-weight: 620;
}
.project {
  background: var(--surface);
}
.project-inner {
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.project-detail p:first-child {
  margin-top: 0;
}
.project-detail a {
  font-weight: 620;
}

.faq details {
  border-block-start: 1px solid var(--line);
}
.faq details:last-child {
  border-block-end: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  gap: 1rem;
  padding: 0.8rem 0;
  font-weight: 680;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.details-symbol {
  position: relative;
  flex: 0 0 1rem;
  height: 1rem;
}
.details-symbol::before,
.details-symbol::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}
.details-symbol::after {
  transform: translateY(-50%) rotate(90deg);
}
.faq details[open] .details-symbol::after {
  display: none;
}
.faq details p {
  margin: 0 0 1rem;
}

.quote {
  background: var(--ink);
  color: #fff;
}
.quote-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, auto);
  gap: 1.3rem 2rem;
  align-items: center;
  padding-block: clamp(2.4rem, 6vw, 4.25rem);
}
.quote h2 {
  font-size: clamp(2.15rem, 4.9vw, 3.45rem);
  text-wrap: pretty;
}
.quote p {
  margin-top: 0.6rem;
}
.quote p a,
.button-outline-light {
  color: #fff;
}
.button-light {
  color: var(--ink);
  background: #fff;
}
.button-light:hover {
  background: #e7eef5;
}
.button-outline-light {
  border-color: #aeb8c5;
}
.button-outline-light:hover {
  background: #293a4f;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  gap: 1.1rem 2.2rem;
  padding-block: 1.8rem 2.3rem;
  font-size: 0.86rem;
}
.footer ul {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}
.footer p {
  margin-top: 0.25rem;
}
.footer li + li {
  margin-top: 0.35rem;
}

@media (max-width: 58rem) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0 0.65rem;
  }
  .navigation {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .header-phone {
    grid-column: 2;
    grid-row: 1;
  }
  .hero {
    gap: 1.7rem;
  }
}

@media (max-width: 45rem) {
  .shell {
    width: calc(100% - 2.3rem);
  }
  .brand-logo {
    width: min(10.2rem, 45vw);
  }
  .navigation {
    gap: 0 0.95rem;
  }
  .navigation a,
  .header-phone {
    font-size: 0.82rem;
  }
  .hero,
  .summary-inner,
  .tool-layout,
  .guide,
  .project-inner,
  .faq,
  .quote-inner,
  .footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    padding-bottom: 0;
  }
  .hero-image img {
    aspect-ratio: 1.57;
  }
  .summary-inner {
    padding-block: 1.25rem 1.5rem;
  }
  .section-heading > p {
    margin-top: 0.7rem;
  }
  .quote-inner {
    align-items: start;
  }
}

@media (max-width: 30rem) {
  .shell {
    width: calc(100% - 1.9rem);
  }
  h1 {
    font-size: clamp(2.6rem, 13vw, 3.2rem);
    overflow-wrap: anywhere;
  }
  .measurements {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero .actions,
  .quote .actions {
    align-items: stretch;
    flex-direction: column;
  }
  .tool-box button {
    justify-self: stretch;
  }
}
