/* The Waterboy — mobile-first. Colours are checked against WCAG AA. */

:root {
  /* Sampled from the logo. Build overwrites these from config/business.json brand colours. */
  --navy: #02335c;
  --royal: #016dae;
  --royal-deep: #025893;
  --ink: #02335c;
  --muted: #3c5160;
  --water: var(--royal);
  --deep: var(--royal-deep);
  --foam: #e7f2f8;
  --paper: #f4f7fa;
  --line: #d3e1ea;
  --white: #fff;
  --mist: #d7e6ee;
  --max: 72rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-offset: 5.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.5rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  margin: 0 0 0.75rem;
  scroll-margin-top: var(--header-offset);
}

h3 {
  font-size: 1.28rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--royal);
  text-underline-offset: 0.16em;
}

a:visited {
  color: var(--royal-deep);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 80;
  border-radius: 0.4rem;
  min-height: 48px;
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
}

.lede {
  font-size: 1.15rem;
  max-width: 42rem;
  color: var(--ink);
}

/* Header */

.utility {
  background: var(--navy);
  color: var(--mist);
}

.utility-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 48px;
  font-size: 0.95rem;
}

.utility p {
  margin: 0;
}

.utility a,
.utility a:visited {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.15rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo phone"
    "nav nav";
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0 0.7rem;
}

.logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}

.logo img {
  display: block;
  height: 52px;
  width: auto;
}

.footer-logo {
  display: inline-block;
  background: var(--white);
  border-radius: 0.75rem;
  padding: 0.45rem 0.6rem 0.35rem;
  margin: 0 0 0.75rem;
}

.footer-logo img {
  display: block;
  width: min(220px, 100%);
  height: auto;
}

.header-phone {
  grid-area: phone;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 48px;
  padding: 0.4rem 0.95rem;
  background: var(--water);
  color: var(--white);
  text-decoration: none;
  border-radius: 999px;
  line-height: 1.15;
}

.header-phone:visited,
.header-phone:hover {
  color: var(--white);
  background: var(--deep);
}

.header-phone-label {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-phone-num {
  font-weight: 750;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.nav-slot {
  grid-area: nav;
  position: relative;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nav-slot > label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 0 1rem;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle:focus-visible + label {
  outline: 3px solid var(--water);
  outline-offset: 3px;
}

.nav-list summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 1039px) {
  .nav-slot nav {
    display: none;
  }

  .menu-toggle:checked ~ nav {
    display: block;
  }
}

.nav-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.nav-list a,
.nav-list summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0.7rem;
  color: var(--navy);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.nav-list summary {
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  gap: 0.4rem;
}

.nav-list summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-list details ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.6rem;
}

.nav-list a.nav-emergency,
.nav-list a.nav-emergency:visited,
.nav-list a.nav-emergency:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  border-radius: 999px;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.nav-list a.nav-emergency:hover {
  background: var(--deep);
}

@media (max-width: 420px) {
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "phone"
      "nav";
  }

  .header-phone {
    align-items: center;
    width: 100%;
  }

  .utility {
    display: none;
  }
}

@media (min-width: 1040px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav phone";
    gap: 1rem;
    padding: 0.4rem 0;
  }

  .menu-toggle,
  .nav-slot > label {
    display: none;
  }

  .nav-slot nav {
    display: block;
  }

  .nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    margin: 0;
  }

  .nav-list > li {
    position: relative;
  }

  .nav-emergency {
    margin: 0;
    padding-inline: 0.95rem;
  }

  .nav-list details ul {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: auto;
    min-width: 18.5rem;
    padding: 0.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    box-shadow: 0 16px 40px rgba(11, 31, 51, 0.1);
    z-index: 60;
  }

  .nav-list details ul a {
    border-radius: 0.5rem;
  }

  .nav-list details ul a:hover {
    background: var(--foam);
  }
}

/* Buttons and actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.15rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
}

.btn-primary,
.btn-primary:visited {
  background: var(--water);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--deep);
}

.btn-secondary,
.btn-secondary:visited {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--foam);
}

.btn-on-dark,
.btn-on-dark:visited {
  background: var(--white);
  color: var(--navy);
}

.btn-on-dark:hover {
  background: var(--foam);
}

/* Home hero */

.hero {
  background:
    radial-gradient(900px 420px at 100% -10%, #d5eef6 0%, transparent 60%),
    linear-gradient(180deg, #f7fbfc 0%, var(--paper) 100%);
  padding: 2.2rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 1.15rem;
  padding: 1.35rem 1.3rem 1.4rem;
}

.hero-card .eyebrow {
  color: var(--mist);
}

.hero-card-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

.hero-phone,
.hero-phone:visited {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.8rem;
}

.hero-card ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.hero-card li {
  margin: 0.25rem 0;
}

.facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.facts li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
}

.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
}

.facts span {
  color: var(--muted);
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 3.2rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.8fr);
    align-items: center;
    gap: 2.5rem;
  }
}

/* Sections */

.section {
  padding: 2.4rem 0;
}

.section-head p,
.section .wrap > p,
.prose p,
.prose li,
.steps,
.steps li {
  max-width: 68ch;
}

.section-foam {
  background: var(--foam);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.section-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

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

.svc,
.area-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem 1rem;
}

.svc-emergency {
  background: var(--foam);
  border-color: #b7d6e2;
}

.svc h3 a,
.area-card h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

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

@media (min-width: 700px) {
  .svc-grid,
  .area-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1040px) {
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Inner pages */

.page-hero {
  padding: 1.4rem 0 0.4rem;
}

.page-hero.is-emergency {
  background: var(--navy);
  color: var(--white);
  padding: 1.6rem 0 2rem;
}

.page-hero.is-emergency h1,
.page-hero.is-emergency .lede {
  color: var(--white);
}

.page-hero.is-emergency .eyebrow {
  color: var(--mist);
}

.page-hero.is-emergency .crumbs a,
.page-hero.is-emergency .crumbs a:visited {
  color: var(--white);
}

.page-hero.is-emergency .crumbs li + li::before {
  color: var(--mist);
}

.page-hero.is-emergency .btn-primary,
.page-hero.is-emergency .btn-primary:visited {
  background: var(--white);
  color: var(--navy);
}

.page-hero.is-emergency .btn-secondary,
.page-hero.is-emergency .btn-secondary:visited {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.emergency-number,
.emergency-number:visited {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  margin: 0.2rem 0 0.2rem;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 1.05;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.08em;
  font-variant-numeric: tabular-nums;
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  align-items: center;
  margin: 0 0 0.8rem;
  padding: 0;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 0 0.55rem;
  color: var(--deep);
}

.crumbs li {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.crumbs li + li::before {
  content: "/";
  color: var(--muted);
  margin-right: 0.35rem;
}

.layout {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1rem;
}

.prose {
  min-width: 0;
}

.prose h2 {
  margin-top: 2rem;
}

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

.prose p,
.prose li {
  max-width: 68ch;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li {
  margin: 0.35rem 0;
}

.steps {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  counter-reset: step;
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 1.15rem 3.4rem;
  max-width: 68ch;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 0.25rem;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
}

.callout {
  background: var(--foam);
  border-left: 4px solid var(--water);
  border-radius: 0 0.85rem 0.85rem 0;
  padding: 1rem 1.1rem 0.4rem;
  margin: 0 0 1.25rem;
}

.callout h2,
.callout h3 {
  margin-top: 0;
}

.page-hero.is-emergency + .section .callout,
.callout-urgent {
  background: #fff6ee;
  border-left-color: #8a4b12;
}

.side-card {
  display: none;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 18.5rem;
    align-items: start;
    gap: 2rem;
  }

  .side-card {
    display: block;
    position: sticky;
    top: 6.2rem;
    background: var(--navy);
    color: var(--white);
    border-radius: 1rem;
    padding: 1.15rem 1.1rem 1.2rem;
  }

  .side-card .eyebrow {
    color: var(--mist);
  }

  .side-card p {
    margin: 0 0 0.7rem;
  }

  .side-phone,
  .side-phone:visited {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: var(--white);
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 0.8rem;
  }

  .side-card .btn {
    width: 100%;
  }
}

/* Link lists, FAQ, CTA */

.link-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.45rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--navy);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.link-list a:hover {
  border-color: var(--water);
  background: var(--foam);
}

.faq {
  display: grid;
  gap: 0.55rem;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.15rem 0.95rem;
}

.faq summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.7rem;
  border-right: 2px solid var(--water);
  border-bottom: 2px solid var(--water);
  transform: rotate(-45deg);
  flex: none;
}

.faq details[open] summary::before {
  transform: rotate(45deg);
}

.faq details p:last-child {
  margin-bottom: 0.85rem;
}

.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 2.4rem 0;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  max-width: 38rem;
  color: var(--mist);
}

/* Contact */

.contact-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem 1.15rem 1.25rem;
  margin: 0 0 1.25rem;
}

.contact-phone,
.contact-phone:visited {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  font-variant-numeric: tabular-nums;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.form-grid label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

.form-grid textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-grid button {
  justify-self: start;
  font: inherit;
  cursor: pointer;
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: var(--mist);
  padding: 2.2rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  gap: 1.4rem;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white);
  margin: 0 0 0.4rem;
}

.site-footer a,
.site-footer a:visited {
  color: var(--white);
}

.footer-phone,
.footer-phone:visited {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.35rem;
  font-weight: 750;
  text-decoration: underline;
  font-variant-numeric: tabular-nums;
}

.site-footer h2 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.8rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.footer-base {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(215, 230, 238, 0.25);
  font-size: 0.95rem;
}

.footer-base p {
  margin: 0;
}

@media (max-width: 420px) {
  .logo img {
    height: 44px;
  }
}

@media (min-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.35fr 1fr 1fr 1fr 0.9fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media print {
  .utility,
  .site-header,
  .menu-toggle,
  .actions,
  .cta-band {
    position: static;
  }

  .site-header {
    border: 0;
  }

  body {
    background: white;
  }

  a[href^="tel:"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
