@import url("https://fonts.googleapis.com/css2?family=Saira:wght@400;500;600;700&display=swap");

@font-face {
  font-family: "Libre Franklin";
  src: url("assets/libre-franklin-300.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("assets/libre-franklin-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("assets/libre-franklin-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand-blue: #0039a5;
  --brand-blue-dark: #002b7f;
  --brand-charcoal: #231f20;
  --brand-white: #fff;
  --brand-mist: #f3f6fb;
  --ink: var(--brand-charcoal);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--brand-white);
  font: 400 16px/1.5 "Saira", "Libre Franklin", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

site-header,
site-footer { display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-blue); text-decoration: none; }
.container { position: relative; width: 96%; max-width: 1200px; margin: 0 auto; }

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  color: var(--brand-white);
  background: var(--brand-blue);
}
.skip-link:focus { top: 12px; }

.site-header { position: relative; z-index: 10; height: 150px; background: var(--brand-white); }
.header-inner { height: 100%; }
.brand {
  float: left;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  color: var(--brand-charcoal);
}
.brand-mark { flex: 0 0 76px; width: 76px; height: 76px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.08; }
.brand-copy strong { color: var(--brand-blue); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.brand-copy span { margin-top: 3px; color: var(--brand-charcoal); font-size: 17px; font-weight: 600; }
.brand-copy small { margin-top: 6px; color: var(--brand-charcoal); font-size: 12px; font-weight: 500; letter-spacing: .02em; }

.contacts { float: right; display: flex; margin-top: 40px; }
.contacts a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-right: 30px;
  padding: 0;
  color: var(--brand-charcoal);
  text-align: center;
  line-height: 20px;
}
.contacts a:last-child { margin-right: 0; }
.contact-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--brand-white);
  background: var(--brand-blue);
  border-radius: 50%;
  font: 700 19px/1 Arial, sans-serif;
}
.contact-icon.mobile { font-size: 22px; }

.primary-nav { clear: both; position: relative; top: 15px; }
.primary-nav ul { display: flex; margin: 0; padding: 0; list-style: none; }
.primary-nav li { flex: 0 0 auto; }
.primary-nav a {
  display: block;
  height: 50px;
  padding: 0 45px;
  color: var(--brand-white);
  background: var(--brand-blue);
  border-right: 1px solid rgba(255,255,255,.28);
  font-size: 18px;
  line-height: 50px;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.active { color: var(--brand-white); background: var(--brand-charcoal); }

.mobile-bar { display: none; }

.hero {
  display: grid;
  height: 300px;
  place-items: center;
  color: #fff;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12)), url("assets/inner.jpg") center/cover no-repeat;
}
.hero h1 {
  margin: 0;
  color: #fff;
  font-size: 44px;
  line-height: 54px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.75);
}

.content { padding: 75px 0; }
.testing-section { margin: 0; }
.testing-section h2 {
  margin: 0 0 20px;
  color: var(--brand-blue);
  font-size: 26px;
  line-height: 36px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 2%;
}
.gallery figure { min-width: 0; margin: 0 0 25px; text-align: center; }
.gallery img { width: 100%; aspect-ratio: 1.5 / 1; object-fit: cover; }
.gallery figcaption,
.caption { margin: 7px 0 0; color: var(--brand-blue); line-height: 24px; }
.thermal-gallery figure { margin-top: 0; }
.thermal-gallery img { aspect-ratio: 4 / 3; }
.caption { margin: -9px 0 20px; }

.download-button {
  display: inline-block;
  margin: 2px 0 20px;
  padding: 10px 20px;
  color: var(--brand-white);
  background: var(--brand-blue);
  transition: background .2s ease;
}
.download-button:hover,
.download-button:focus-visible { background: var(--brand-blue-dark); }

.footer-accreditation { padding: 50px 0; text-align: center; background: var(--brand-mist); }
.footer-accreditation h2 { margin: 0 0 20px; font-size: 40px; line-height: 1.25; font-style: italic; }
.footer-accreditation h3 { margin: 0 0 40px; font-size: 24px; line-height: 1; font-style: italic; font-weight: 400; }
.footer-accreditation p { margin: 0 0 20px; line-height: 24px; }
.footer-accreditation img { margin: 20px auto 0; }
.site-footer { color: var(--brand-white); background: var(--brand-blue); text-align: left; }
.site-footer .container { padding: 32px 0; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.footer-brand { width: 290px; }
.site-footer p { margin: 0; line-height: 24px; }

.home-hero {
  position: relative;
  height: calc(100vh - 150px);
  min-height: 580px;
  overflow: hidden;
  background: #333;
}
.slides,
.slide { position: absolute; inset: 0; }
.slide {
  opacity: 0;
  transition: opacity 1s ease;
}
.slide.active { opacity: 1; }
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .13);
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0 4%;
  text-align: center;
}
.home-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 50px;
  line-height: 1.2;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, .75);
}
.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
  width: 100%;
}
.slider-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.slider-dots button.active { background: var(--brand-blue); }
.services { padding: 50px 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; }
.service-card { position: relative; overflow: hidden; color: #fff; text-align: center; }
.service-card::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .26); transition: background .25s ease; }
.service-card img { width: 100%; aspect-ratio: 363 / 169; object-fit: cover; transition: transform .35s ease; }
.service-card span { position: absolute; top: 50%; left: 0; z-index: 1; width: 100%; padding: 0 12px; font-size: 24px; font-weight: 700; transform: translateY(-50%); }
.service-card:hover::after,
.service-card:focus-visible::after { background: rgba(0, 0, 0, .4); }
.service-card:hover img,
.service-card:focus-visible img { transform: scale(1.03); }

.prose p { margin: 0 0 20px; line-height: 24px; }
.prose ul { margin: 0 0 20px 25px; padding: 0; }
.page-gallery { margin-top: 8px; }
.image-only-gallery { margin-bottom: 0; }

.blog-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 7%; min-height: 180px; }
.empty-state h2,
.blog-sidebar h2,
.contact-details h2 { margin: 0 0 15px; color: var(--brand-blue); font-size: 24px; line-height: 1.35; }
.empty-state p,
.blog-sidebar p { margin: 0; }
.blog-sidebar { padding-left: 32px; border-left: 1px solid #e0e0e0; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 55%) minmax(280px, 40%); justify-content: space-between; gap: 5%; }
.contact-form { display: grid; }
.contact-form label { margin-bottom: 5px; }
.contact-form input:not([type="file"]),
.contact-form textarea {
  width: 100%;
  margin: 0 0 15px;
  padding: 10px;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0;
  font: inherit;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--brand-blue); outline-offset: 1px; }
.contact-form input[type="file"] { margin: 0 0 20px; font: inherit; }
.required { color: #c70000; }
.form-submit {
  justify-self: start;
  padding: 10px 25px;
  color: #fff;
  background: var(--brand-blue);
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.form-submit:hover,
.form-submit:focus-visible { background: var(--brand-blue-dark); }
.form-status { margin: 14px 0 0; color: var(--brand-blue); }
.contact-details { margin-top: 50px; }
.contact-details p { margin: 0 0 20px; }
.contact-details address { margin: 24px 0 20px; font-style: normal; }

@media (max-width: 1270px) {
  .contacts a { margin-right: 20px; }
  .primary-nav a { padding: 0 35px; font-size: 16px; }
}

@media (max-width: 1024px) {
  .mobile-bar { display: block; position: fixed; inset: 0 0 auto; z-index: 1000; height: 50px; background: var(--brand-charcoal); }
  .menu-toggle { display: flex; align-items: center; gap: 10px; margin: 6px 12px; padding: 7px 10px; color: var(--brand-white); background: var(--brand-blue); border: 0; border-radius: 4px; font: 700 14px/20px "Saira", Arial, sans-serif; cursor: pointer; }
  .menu-icon { display: grid; width: 17px; gap: 3px; }
  .menu-icon i { display: block; height: 2px; background: currentColor; }
  .site-header { height: auto; margin-top: 50px; text-align: center; }
  .header-inner { height: auto; }
  .brand { float: none; display: inline-flex; margin: 15px 0; }
  .contacts { float: none; display: block; margin: 5px 0; padding-bottom: 15px; }
  .contacts a { justify-content: center; align-items: center; width: 100%; margin: 0 0 2px; padding: 5px 0; }
  .contact-icon { flex-basis: 20px; width: 20px; height: 20px; font-size: 11px; }
  .contact-icon.mobile { font-size: 13px; }
  .primary-nav { display: none; position: fixed; top: 50px; left: 0; z-index: 999; width: 100%; text-align: left; box-shadow: 0 5px 12px rgba(0,0,0,.25); }
  .primary-nav.open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { height: auto; padding: 11px 18px; border: 0; border-bottom: 1px solid rgba(255,255,255,.35); line-height: 22px; }
  .content { padding: 40px 0; text-align: center; }
  .home-hero { height: 600px; min-height: 0; }
  .home-hero-copy h1 { font-size: 34px; }
  .prose ul { display: inline-block; text-align: left; }
  .contact-details { margin-top: 0; }
  .footer-grid { flex-direction: column; gap: 20px; text-align: center; }
  .footer-brand { width: min(290px, 82vw); }
}

@media (max-width: 800px) {
  .hero { height: 200px; }
  .hero h1 { font-size: 30px; line-height: 40px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure { width: 96%; margin: 0 2% 25px; }
  .footer-accreditation h2 { font-size: 26px; }
  .footer-accreditation h3 { margin-bottom: 20px; font-size: 18px; }
  .home-hero { height: 520px; }
  .home-hero-copy h1 { font-size: 28px; }
  .service-grid { grid-template-columns: 1fr; gap: 15px; }
  .service-card { width: 96%; margin: 0 2%; }
  .blog-layout,
  .contact-layout { grid-template-columns: 1fr; gap: 35px; }
  .blog-sidebar { padding: 30px 0 0; border-top: 1px solid #e0e0e0; border-left: 0; }
  .contact-form { text-align: left; }
  .contact-details { text-align: center; }
}

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