/* Absolute Metrology Services */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/fonts/open-sans.woff2) format("woff2");
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url(/fonts/open-sans-italic.woff2) format("woff2");
}

:root {
  --red: #720202;
  --red-hover: #af0000;
  --blue: #0070c0;
  --blue-hover: #004678;
  --error: #e80000;
  --panel: rgba(255, 255, 255, 0.8);
  --glow: 0 0 8px #fff, 0 0 8px #fff;
  --container: 1170px;
}

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

body {
  margin: 0;
  font: 15px/1.3 "Open Sans", sans-serif;
  color: #000;
  background: #fff url(/images/background.webp) center top / cover no-repeat fixed;
}

img {
  vertical-align: middle;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover,
a:active {
  color: var(--red-hover);
}

p,
li {
  font-size: 16px;
}

p {
  margin: 0 0 21px;
}

p a,
li a {
  font-weight: 600;
  text-decoration: underline;
}

p a:hover,
li a:hover {
  text-decoration: none;
}

ul {
  margin: 0 0 9px;
  padding-left: 40px;
}

li {
  margin-bottom: 9px;
}

li ul {
  list-style-type: circle;
}

h1,
h3,
h4 {
  margin: 0 0 22px;
  font-weight: 700;
  line-height: 1.1;
}

h1 {
  font-size: 33px;
  color: var(--red);
}

h3 {
  font-size: 1.9vw;
}

h4 {
  font-size: 1.6vw;
}

.icon {
  fill: currentColor;
}

.container {
  position: relative;
  width: var(--container);
  margin: 0 auto;
}

/* Header: a fixed bar with the logo and menu, and the email/phone buttons on top */

.contact-bar {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 50%;
  width: var(--container);
  transform: translateX(-50%);
  padding-top: 21px;
  line-height: 19px;
  text-align: right;
}

.contact-bar a {
  margin-left: 11px;
  padding: 4px 12px 5px 40px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
}

.contact-bar a:hover {
  color: #fff;
  background: var(--blue-hover);
}

.contact-bar .icon {
  width: 18px;
  height: 18px;
  margin: 0 10px 0 -28px;
  vertical-align: -2.1px;
}

.contact-bar .icon-phone {
  width: 15.7px;
  height: 20px;
  margin-left: -25.7px;
  vertical-align: -2.9px;
}

.site-header {
  position: fixed;
  z-index: 2;
  top: 0;
  width: 100%;
  height: 149px;
  background: url(/images/header.png) center top repeat-x;
}

.site-header .container {
  display: flow-root;
}

.logo {
  display: block;
  width: 242px;
  margin: 22px 0;
}

.menu-toggle {
  display: none;
}

.menu {
  position: absolute;
  top: 77px;
  right: 0;
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  position: relative;
  margin: 0;
}

.menu > li {
  padding-left: 24px;
}

.menu a {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 51px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
}

.menu a:hover {
  color: #fff;
  text-shadow: var(--glow);
}

.menu .mobile-only {
  display: none;
}

.submenu {
  position: absolute;
  z-index: 1;
  top: calc(100% - 10px);
  left: 0;
  display: none;
  width: 234px;
  padding: 0;
  list-style: none;
}

.menu li:hover > .submenu {
  display: block;
}

.submenu a {
  padding: 8px 10px 9px;
  border-top: 1px solid #fff;
  line-height: 1.2;
  color: #620000;
  text-transform: none;
  background: #f9f1f1;
}

.submenu a:hover {
  color: #620000;
  background: #fff;
}

/* Page content */

.content {
  display: flow-root;
  width: var(--container);
  margin: 180px auto 0;
  padding: 36px 35px 32px 38px;
  background: var(--panel);
}

.columns {
  display: flow-root;
}

.column {
  float: left;
  width: 49%;
  margin-right: 2%;
}

.column + .column {
  margin-right: 0;
}

.column p {
  margin-bottom: 16px;
}

.column li ul {
  margin-top: 12px;
}

.column .last {
  padding-bottom: 9px;
}

.services h4 {
  margin-bottom: 5px;
}

.spaced {
  padding-top: 24px;
}

ul + h3 {
  margin-top: 22px;
}

.indent {
  padding-left: 40px;
}

.about ul {
  margin-bottom: 21px;
}

.quote-end {
  text-align: right;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

figcaption {
  margin-top: 8px;
  font-size: 13.5px;
}

.figure-right {
  float: right;
  width: 200px;
  margin: 0 0 22.5px 22.5px;
  padding-top: 5px;
}

.figure-center {
  display: table;
  margin: 0 auto;
}

.figure-center figcaption {
  display: table-caption;
  caption-side: bottom;
}

.button {
  margin: 35px auto 42px;
  font-weight: 600;
  text-align: center;
}

.button a {
  display: inline-block;
  max-width: calc(100% - 30px);
  padding: 4px 17px 6px;
  border-radius: 10px;
  font-size: 1.15vw;
  color: #fff;
  background: var(--blue);
}

.button a:hover {
  color: #fff;
  background: var(--blue-hover);
}

.contact-details {
  padding-bottom: 25px;
  font-size: 17px;
  font-weight: 600;
}

.contact-details .icon {
  width: 17px;
  height: 17px;
  vertical-align: -2px;
}

.contact-details a + .icon {
  margin-left: 16px;
}

/* Home page: slider, then the welcome panel */

.home .content {
  padding: 0;
  background: none;
}

.home .content h1 {
  margin-bottom: 16px;
}

.welcome {
  padding: 30px 35px 32px 38px;
  background: var(--panel);
}

.slider {
  display: grid;
  margin-bottom: 30px;
}

/* Slides share one grid cell, so the slider is as tall as its tallest slide */
.slide {
  position: relative;
  grid-area: 1 / 1;
  height: 383px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.8s;
}

.slide.active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.slide img {
  width: 756px;
  height: 366px;
}

.slide-text {
  position: absolute;
  top: 13px;
  right: 0;
  display: flex;
  flex-direction: column;
  width: 426px;
  height: 370px;
  padding: 35px 35px 0;
  color: #fff;
  background: #770412;
}

.slide-text h2 {
  margin: 0 0 30px;
  font-size: 42.75px;
  font-weight: 800;
  line-height: 1.2;
}

.slide-text p {
  margin-bottom: 35px;
  font-size: 18px;
  line-height: 1.5;
}

.slide-text a {
  align-self: flex-start;
  padding: 3px 16px;
  border-radius: 7px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background: var(--blue);
}

.slide-text a:hover {
  color: var(--red-hover);
  background: #fff;
}

/* Forms */

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5641%;
}

.form > * {
  grid-column: 1 / -1;
  margin: 0 0 25px;
}

.form .half {
  grid-column: auto;
  margin-bottom: 30px;
}

.form .half.invalid {
  margin-bottom: 25px;
}

.form .first {
  grid-column: 1;
}

.form .intro {
  font-size: 15px;
}

.required {
  color: var(--error);
}

.field > label,
.checkboxes legend {
  display: inline-block;
  margin-bottom: 3.5px;
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
}

.control {
  position: relative;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 12px;
  border: 1px solid #c4c4c4;
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  line-height: 1.42857;
  color: #6b6b6b;
  background: #f7f7f7;
  transition: 0.5s;
}

.field textarea {
  height: 120px;
  line-height: 1.3;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: #919191;
  outline: none;
  color: #686868;
  background: #fff;
}

.field ::placeholder {
  color: #999;
}

.checkboxes {
  min-width: 0;
  padding: 0;
  border: 0;
}

.checkboxes legend {
  float: left;
  width: 100%;
  margin-bottom: 2px;
  padding: 0;
  font-size: 15px;
  line-height: 19.5px;
}

.checkboxes label {
  position: relative;
  float: left;
  width: 50%;
  margin-bottom: 14px;
  padding-left: 30px;
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
}

.checkboxes input {
  position: absolute;
  opacity: 0;
}

.checkboxes label::before,
.checkboxes label::after {
  content: "";
  position: absolute;
  transition: 0.5s;
}

.checkboxes label::after {
  top: 3px;
  left: 2px;
  width: 18px;
  height: 18px;
  border: 1px solid #c4c4c4;
  background: #f7f7f7;
}

.checkboxes label::before {
  z-index: 1;
  top: -1.5px;
  left: 0;
  width: 24px;
  height: 24px;
  background: url(/images/check.svg) no-repeat;
  opacity: 0;
}

.checkboxes label:has(:checked)::before {
  opacity: 1;
}

.checkboxes label:has(:checked)::after {
  border-color: #b7b7b7;
  box-shadow: 0 0 0 3px #333;
}

.submit {
  height: 50px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  line-height: 1.42857;
  color: #fff;
  background: var(--red);
  cursor: pointer;
}

.submit:hover {
  background: #fa0409;
}

.error-message,
.form-error {
  margin: 5px 10px 0 0;
  font-size: 15px;
  color: var(--error);
}

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

.invalid .control::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 50px;
  height: 48px;
  background: var(--error) url(/images/exclamation.svg) 50% 15px / 7.14px 20px no-repeat;
}

.form-error {
  margin: 0;
}

.website {
  position: absolute;
  left: -9999px;
}

.form-status {
  font-size: 16px;
}

/* Footer */

.site-footer {
  display: flow-root;
  width: var(--container);
  margin: 40px auto 15px;
  font-weight: 600;
  line-height: 27px;
  color: #fff;
  filter: drop-shadow(1px 1px 3px #000);
}

.site-footer p {
  float: left;
  width: 50%;
  margin: 0 0 21px;
  font-size: 15px;
}

.site-footer p + p {
  text-align: right;
}

.site-footer a,
.site-footer a:hover {
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

/* Responsive, widest to narrowest */

@media (min-width: 1400px) and (max-width: 1600px) {
  h3 { font-size: 26px; }
  h4 { font-size: 22px; }
}

@media (min-width: 1601px) {
  p, li { font-size: 17px; }
  h3 { font-size: 26px; }
  h4 { font-size: 22px; }
}

@media (min-width: 1800px) {
  h1 { font-size: 2vw; }
  .button a { font-size: 1.05vw; }
}

@media (min-width: 1901px) {
  p, li { font-size: 18px; }
}

@media (min-width: 2200px) {
  .button a { font-size: 18px; }
  p em { font-size: 19px; }
}

@media (max-width: 1200px) {
  :root { --container: 990px; }
  h3 { font-size: 24px; }
  h4 { font-size: 18px; }

  .menu { top: 81px; }
  .menu > li { padding-left: 27px; }
  .menu a { font-size: 16px; }
  .menu > li > a { line-height: 48px; }

  .slide { left: 1.5px; height: 320px; }
  .slide img { width: 638.7px; height: 309.2px; }
  .slide-text { width: 359.3px; height: 307px; padding: 25px 30px 0; }
  .slide-text h2 { margin-bottom: 24px; font-size: 36px; }
  .slide-text p { margin-bottom: 28px; font-size: 15px; }
  .slide-text a { font-size: 18px; }
}

@media (max-width: 1019px) {
  :root { --container: 950px; }
  .menu { flex-wrap: wrap; max-width: 500px; }
}

/* Under 1020px the slider stacks its picture over its text and scales with the window */
@media (max-width: 1020px) {
  p { font-size: 17px; margin-bottom: 24px; }

  .slide { left: 0; height: auto; }
  .slide img,
  .slide-text { width: 96vw; margin-left: calc(50% - 48vw); }
  .slide img { display: block; height: auto; }
  .slide-text {
    position: static;
    height: auto;
    padding: 4vw 5vw 3.5vw;
  }
  .slide-text h2 { margin-bottom: 3vw; font-size: 6.75vw; }
  .slide-text p { margin-bottom: 4vw; font-size: 3vw; }
  .slide-text a { margin-bottom: 2vw; font-size: 4vw; }
}

@media (min-width: 1020px) and (max-width: 1200px) {
  p { font-size: 16px; margin-bottom: 21px; }
}

@media (max-width: 991px) {
  :root { --container: 96vw; }

  .contact-bar { left: auto; right: 2%; width: auto; transform: none; }
  .content { margin-top: 170px; }

  .logo { margin-left: 2%; }

  .menu-toggle {
    position: absolute;
    top: 82px;
    right: 1%;
    display: block;
    padding: 0 10px;
    border: 0;
    font: 34px/44.2px "Open Sans", sans-serif;
    color: #eee;
    background: none;
    cursor: pointer;
  }
  .menu-toggle .icon { width: 29.1px; height: 34px; vertical-align: -5px; }
  .menu-toggle:hover { color: #fff; filter: drop-shadow(0 0 4px #fff); }

  .site-header .container { width: 100%; }
  .menu {
    top: 147px;
    right: auto;
    left: calc(59% + 11px);
    display: none;
    width: 40%;
  }
  .menu-open .menu { display: block; }
  .menu > li { padding-left: 0; }
  .menu > li > a {
    padding: 7px 12px 7px 5%;
    border-top: 1px solid #943744;
    font-size: 17px;
    line-height: 1.6;
    background: #740101;
  }
  .menu .mobile-only { display: inline; }
  .submenu { position: static; display: block; width: auto; margin: -4px 0 0; }
  .submenu a {
    padding: 8px 10px 9px 10%;
    border-top-color: #943744;
    font-size: 17px;
    color: #fff;
    background: #740101;
  }
  .submenu a::before { content: "\2013"; position: absolute; margin-left: -15px; }
  .submenu a:hover { color: #fff; background: #740101; }

  .button a { font-size: 1.8vw; }

  .site-footer p { float: none; width: auto; margin-bottom: 24px; text-align: center; }
  .site-footer p + p { text-align: center; }
}

@media (max-width: 800px) {
  .form { grid-template-columns: 1fr; }
  .form .half { margin-bottom: 25px; }
}

@media (max-width: 700px) {
  .contact-bar {
    left: 0;
    right: 0;
    height: 51px;
    padding: 14px 0 0 3px;
    background: #340006;
    text-align: center;
  }
  .contact-bar a { margin: 0 0 0 15px; }
  .contact-bar a:first-child { margin-left: 0; }

  .site-header { top: 50px; height: 111px; background-position: 0 -23px; }
  .logo { margin-top: 0; margin-bottom: 0; }
  .logo img:hover { box-shadow: 0 0 8px #fff; transition: 0.1s; }

  .menu-toggle { top: 56px; }
  .menu { top: 111px; }

  .content { margin-top: 180px; }
  .figure-right { float: none; margin: 0 0 25px; }
}

@media (max-width: 659px) {
  .menu { left: 0; width: 100%; }
  .menu > li > a { padding-left: 2%; }
  .submenu a { padding-left: 4%; }
}

@media (max-width: 600px) {
  body { background-image: url(/images/background-mobile.webp); }
  .column { display: flow-root; float: none; width: 100%; margin-bottom: 15px; }
  .welcome { margin-bottom: 15px; }
  .submenu a { padding-left: 6%; }
  .button a { font-size: 2.6vw; }
}

@media (max-width: 480px) {
  .site-footer p:first-child { width: 300px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 450px) {
  .button a { font-size: 3.2vw; }
  .contact-details { padding-bottom: 10px; font-size: 15px; line-height: 2; }
}

@media (max-width: 410px) {
  .contact-bar { padding: 15px 12px 0 0; }
  .contact-bar a { margin-left: 2px; padding: 4px 12px 5px 25px; font-size: 15px; }
  .contact-bar .icon { width: 15px; height: 15px; margin: 0 5px 0 -20px; vertical-align: -2.1px; }
  .contact-bar .icon-phone { width: 12.6px; height: 16px; margin-left: -17.6px; vertical-align: -2.3px; }
}
