@font-face {
  font-family: 'Encode Sans';
  src: url(/assets/fonts/encode-sans.woff2) format('woff2');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --ground: #fff;
  --field: #f1f2f3;
  --ink: #111315;
  --muted: #555b61;
  --muted-on-ink: #b9bdc2;
  --accent: #ff6a13;
  --accent-hover: #f05c06;
  --error: #b3261e;
  --gutter: clamp(20px, 3.4vw, 48px);
  --section: clamp(64px, 8.3vw, 120px);
}

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

body {
  margin: 0;
  font: 400 1.125rem/1.5 'Encode Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

picture {
  display: block;
}

picture img {
  width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

h1,
h2,
.wide {
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.75rem, 6.7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

h2 {
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 600;
}

.lead {
  font-size: clamp(1.125rem, 1.55vw, 1.375rem);
}

.small {
  font-size: 0.9375rem;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.button:hover {
  background: var(--accent-hover);
  box-shadow: inset 0 -4px 0 var(--ink);
}

.button.quiet {
  background: var(--field);
}

.button.quiet:hover {
  background: #e4e6e8;
}

/* One phone icon for every place a number is shown, coloured by the text around it. */
.phone::before {
  content: '';
  flex: none;
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-right: 10px;
  vertical-align: -0.15em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.button.phone::before {
  margin-right: 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 40px;
  padding: 18px var(--gutter);
}

.site-header img {
  width: clamp(208px, 21vw, 300px);
  height: auto;
}

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(20px, 2.8vw, 40px);
  font-size: 1rem;
  font-weight: 500;
}

.site-header a {
  text-decoration: none;
}

/* The underline is a background so it can grow from the left. */
.site-header nav a {
  padding-bottom: 6px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.2s;
}

.site-header nav a:hover,
.site-header nav .active {
  background-size: 100% 2px;
}

.site-header .phone {
  font-weight: 600;
}

.section {
  padding: var(--section) var(--gutter);
}

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

.section.band {
  background: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 64px;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero {
  padding: 32px var(--gutter) clamp(56px, 6.7vw, 96px);
}

.hero h1 {
  font-size: clamp(3.25rem, 9.35vw, 8.45rem);
}

.hero .split {
  margin-top: 48px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
}

.hero .lead {
  font-size: clamp(1.25rem, 2.3vw, 2.125rem);
  line-height: 1.3;
}

.hero img {
  width: 100%;
  height: clamp(380px, 33vw, 480px);
  object-fit: cover;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero .actions {
  margin-top: 36px;
}

.actions .phone {
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.actions .phone:hover {
  text-decoration: underline;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
}

.facts dt {
  font-size: 0.9375rem;
  color: var(--muted);
}

.facts dd {
  font-weight: 500;
}

.service-list {
  columns: 2 13rem;
  column-gap: 64px;
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  font-weight: 600;
}

.service-list li {
  break-inside: avoid;
}

.service-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
}

/* A chevron drawn from two borders, so the row reads as something to press. */
.service-list a::after {
  content: '';
  flex: none;
  width: 0.45em;
  height: 0.45em;
  margin-right: 8px;
  border: solid currentColor;
  border-width: 3px 3px 0 0;
  rotate: 45deg;
  transition: translate 0.15s;
}

.service-list a:hover::after {
  translate: 6px 0;
}

.band .split {
  grid-template-columns: 1fr 1fr;
}

.band h2 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 3.9vw, 3.5rem);
  font-weight: 700;
}

.phone-large {
  display: block;
  font-size: clamp(1.875rem, 2.5vw, 2.25rem);
  font-weight: 600;
  text-decoration: none;
}

.phone-large:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.map {
  width: 100%;
  height: 420px;
  margin-top: 64px;
  border: 0;
  background: var(--field);
}

.page {
  padding: 32px var(--gutter) var(--section);
}

.page h1 {
  margin-bottom: clamp(32px, 3.9vw, 56px);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 64px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 0.15s;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

.recaptcha-notice {
  margin-top: 16px;
}

/* Its text stands under the send button instead. */
.grecaptcha-badge {
  visibility: hidden;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  border-color: var(--ink);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--error);
}

#licensePlate {
  text-transform: uppercase;
}

.info {
  padding: 40px;
  background: var(--field);
}

.info h2 {
  font-size: 1.75rem;
}

/* The error list comes from IO::writeErrors with Bootstrap markup; its close button needs Bootstrap's script. */
.alert {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--ink);
  color: var(--ground);
}

.alert h4 {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.alert ul {
  padding-left: 20px;
  list-style: disc;
}

.alert .btn-close {
  display: none;
}

.article .container {
  max-width: calc(720px + 2 * var(--gutter));
  padding: 32px var(--gutter) var(--section);
}

.article .heading {
  margin-bottom: 32px;
  font-size: clamp(1.75rem, 5vw, 4.5rem);
  overflow-wrap: anywhere;
}

.article picture {
  margin-bottom: 32px;
}

.article .heading.h3 {
  margin: 40px 0 8px;
  font-size: 1.375rem;
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-footer {
  padding: clamp(56px, 6.7vw, 96px) var(--gutter) 40px;
  background: var(--ink);
  color: var(--ground);
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 40px clamp(40px, 6.7vw, 96px);
}

.footer-columns h2 {
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--muted-on-ink);
}

.footer-columns li,
.footer-columns p {
  line-height: 1.75;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Sized so the name runs the full width between the gutters. */
.footer-name {
  margin: clamp(40px, 5vw, 72px) 0;
  font-size: calc((100vw - 2 * var(--gutter)) * 0.115);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  font-size: 0.9375rem;
  color: var(--muted-on-ink);
}

.call-bar {
  display: none;
}

@media (max-width: 899px) {
  .split,
  .band .split,
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .site-header .phone,
  .hero .actions {
    display: none;
  }

  .site-header ul {
    font-size: 0.9375rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 13.6vw, 5rem);
  }

  .hero .split {
    margin-top: 24px;
    gap: 24px;
  }

  .hero img {
    height: 300px;
  }

  .service-list {
    columns: 1;
  }

  .map {
    height: 300px;
    margin-top: 40px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .info {
    padding: 24px 20px;
  }

  /* Call and book stay one tap away while the page scrolls. */
  .call-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: var(--ground);
    box-shadow: 0 -8px 24px rgb(17 19 21 / 0.1);
  }

  .call-bar .button {
    flex: 1;
    padding: 16px 12px;
  }

  .has-call-bar .site-footer {
    padding-bottom: 112px;
  }
}

@media (min-width: 1200px) {
  /* The text starts where the right-hand column starts on the front page. */
  .article .container {
    display: grid;
    grid-template-columns: 520px minmax(0, 720px);
    column-gap: 64px;
    max-width: none;
  }

  .article .container > * {
    grid-column: 2;
  }

  .article .container > h1 {
    grid-column: 1 / -1;
  }

  /* The photo fills the left column beside the first paragraphs. */
  .article .container > picture {
    grid-column: 1;
    grid-row: 2 / span 6;
    align-self: start;
  }
}

/* Motion is short and never repeats. Visitors who have asked their device for less motion get none. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      translate: 0 24px;
    }
  }

  @keyframes appear {
    from {
      opacity: 0;
    }
  }

  @keyframes unveil {
    from {
      clip-path: inset(0 0 100%);
    }

    to {
      clip-path: inset(0);
    }
  }

  @keyframes widen {
    from {
      font-stretch: 75%;
    }
  }

  .hero h1,
  .hero-text,
  .page > *,
  .article .container > * {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero-text,
  .page > :not(h1),
  .article .container > :not(h1) {
    animation-delay: 0.1s;
  }

  /* reCAPTCHA pins its badge inside the form, and a moving ancestor would drag it sideways out of the page. */
  .form-layout {
    animation-name: appear;
  }

  .hero img {
    animation: unveil 0.8s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  /* Tied to the scroll position, so browsers without scroll timelines show everything at once. */
  @supports (animation-timeline: view()) {
    .section .split > :not(.service-list),
    .section > .map,
    .service-list li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 18%;
    }

    /* Ends early enough to finish before the page runs out of scroll. */
    .footer-name {
      animation: widen linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 15%;
    }
  }
}
