:root {
  --brand: #67b0d1;
  --brand-strong: #2a7799;
  --brand-tint: #e6f2f8;
  --ink: #1f2a33;
  --ink-soft: #55636e;
  --surface: #fff;
  --surface-alt: #f1f5f8;
  --line: #d9e3ea;
  --header-h: 64px;
  --font-body: "Open Sans", system-ui, sans-serif;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-script: "Bilbo", cursive;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
}

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

a {
  color: var(--brand-strong);
}

h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.container {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
}

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

/* The default outline is the same blue as these backgrounds, so use white. */
.is-scrolled :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.site-header.is-scrolled {
  background: var(--brand-strong);
  border-color: rgb(0 0 0 / 10%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand {
  font: 700 1rem/1.2 var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  font: 500 0.85rem/1 var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  border-bottom-color: var(--brand-strong);
}

.is-scrolled .brand,
.is-scrolled .site-nav a {
  color: #fff;
}

.is-scrolled .site-nav a:hover,
.is-scrolled .site-nav a[aria-current="true"] {
  border-bottom-color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.is-scrolled .nav-toggle-bar {
  background: #fff;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (width <= 760px) {
  .brand {
    font-size: 0.8rem;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    background: var(--brand-strong);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 8px 16px 16px;
  }

  .site-nav a {
    padding: 14px 0;
    color: #fff;
    border-bottom: 1px solid rgb(255 255 255 / 15%);
  }

  .site-nav a:hover,
  .site-nav a[aria-current="true"] {
    border-bottom-color: #fff;
  }

  .site-nav :focus-visible {
    outline-color: #fff;
    outline-offset: -3px;
  }
}

/* Hero slider */

.hero {
  position: relative;
  padding-top: var(--header-h);
  background: #fff;
  overflow: hidden;
}

.slides {
  display: grid;
}

.slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 820fr) minmax(0, 320fr);
  align-items: center;
  gap: 0 32px;
  max-width: 1140px;
  width: 100%;
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0s linear 0.8s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease;
}

.slide img {
  width: 100%;
}

.slide-text {
  padding-right: 16px;
}

.slide-title {
  margin: 0 0 16px;
  font: 400 clamp(2.6rem, 5vw, 4.2rem) / 1 var(--font-script);
  color: var(--ink);
}

.slide-title strong {
  font-weight: 400;
  color: var(--brand-strong);
}

.slide-body {
  margin: 0;
  color: var(--ink-soft);
}

.slide-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
}

.slide-dot {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.slide-dot::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: auto;
  border: 2px solid var(--brand-strong);
  border-radius: 50%;
}

.slide-dot[aria-current="true"]::before {
  background: var(--brand-strong);
}

.scroll-down,
.to-top {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid currentcolor;
  border-radius: 50%;
}

.scroll-down {
  position: absolute;
  right: 24px;
  bottom: 16px;
  color: var(--brand-strong);
}

.scroll-down svg,
.to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Below 960px the text column gets too narrow and runs under the
   scroll-down button, so stack the text under the photo. */
@media (width <= 960px) {
  .slide {
    grid-template-columns: 1fr;
  }

  .slide-text {
    padding: 16px 16px 64px;
  }

  .scroll-down {
    display: none;
  }
}

/* Sections */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-title {
  margin-bottom: 56px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 20px auto 0;
  background: var(--brand);
}

.values,
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value {
  padding: 28px 24px 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  background: var(--surface-alt);
}

.value h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.value p {
  margin: 6px 0 20px;
  color: var(--ink-soft);
}

.value img {
  width: 160px;
  margin-inline: auto;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.service {
  text-align: center;
}

.service-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  padding: 20px;
  border-radius: 50%;
  background: var(--brand-strong);
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.service p {
  margin: 0;
  color: var(--ink-soft);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: start;
}

.contact-details h3 {
  margin-bottom: 16px;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-details address {
  font-style: normal;
}

.contact-details dl {
  margin: 20px 0 0;
}

.contact-details dt {
  font-weight: 600;
}

.contact-details dd {
  margin: 0 0 12px;
}

.contact-map {
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

@media (width <= 760px) {
  .section {
    padding: 64px 0;
  }

  .contact {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.site-footer {
  padding: 40px 0;
  background: var(--brand-strong);
  color: #fff;
  text-align: center;
}

.to-top {
  margin: 0 auto 20px;
  color: #fff;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* Reveal on scroll, only once JS has confirmed it can run */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
