/* ==========================================================================
   Base, layout, header and footer (mobile first)
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--c-navy);
  font-weight: 750;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-2xl);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  font-weight: 700;
}

p {
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}

a {
  color: var(--c-blue);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-blue-dark);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--c-aqua);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 1000;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--sp-3);
  color: var(--c-white);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tint {
  background: var(--c-bg);
}

.section--dark {
  background: var(--c-navy);
  color: var(--c-on-dark);
}

.section--dark h2,
.section--dark h3 {
  color: var(--c-white);
}

.section-head {
  max-width: 680px;
  margin-bottom: var(--sp-7);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head p {
  color: var(--c-text-2);
  font-size: var(--fs-md);
  margin-bottom: 0;
}

.section--dark .section-head p {
  color: var(--c-on-dark-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-sun);
}

.section--dark .eyebrow {
  color: var(--c-aqua-light);
}

.lead {
  font-size: var(--fs-md);
  color: var(--c-text-2);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  /* Solid colour on purpose: backdrop-filter would trap the fixed mobile menu inside the header. */
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--c-border);
  box-shadow: 0 6px 24px -18px rgba(7, 29, 53, 0.35);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}

.brand img {
  width: auto;
  height: 46px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-navy);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--c-white);
  padding: var(--sp-5) var(--gutter) var(--sp-7);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility 0s linear var(--dur);
}

.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 var(--sp-2);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c-navy);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
}

.site-nav__link:hover {
  color: var(--c-blue);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-blue);
}

.site-nav__cta {
  margin-top: var(--sp-5);
  width: 100%;
}

body.nav-open {
  overflow: hidden;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--c-navy);
  color: var(--c-on-dark-2);
  font-size: var(--fs-sm);
  overflow: hidden;
}

.site-footer__wave {
  display: block;
  width: 100%;
  height: 48px;
  color: var(--c-navy);
  background: transparent;
  margin-bottom: -1px;
}

.site-footer__top {
  display: grid;
  gap: var(--sp-6);
  padding-block: var(--sp-7) var(--sp-6);
}

.site-footer__brand img {
  height: 54px;
  width: auto;
  margin-bottom: var(--sp-4);
}

.site-footer__brand p {
  max-width: 340px;
  color: var(--c-on-dark-2);
}

.site-footer h2 {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}

.footer-links {
  list-style: none;
  display: grid;
  gap: var(--sp-1);
}

.footer-links a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--c-on-dark-2);
  text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--c-white);
}

.footer-contact {
  list-style: none;
  display: grid;
  gap: var(--sp-2);
}

.footer-contact li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.footer-contact svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 7px;
  color: var(--c-aqua-light);
}

.footer-contact span {
  padding-top: 4px;
}

.footer-note {
  color: var(--c-on-dark-2);
  opacity: 0.85;
}

.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: 1px solid rgba(144, 224, 239, 0.22);
  color: var(--c-on-dark);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.social-links a:hover {
  background: rgba(144, 224, 239, 0.12);
  border-color: rgba(144, 224, 239, 0.5);
  color: var(--c-white);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-top: 1px solid rgba(144, 224, 239, 0.14);
  font-size: var(--fs-xs);
}

.site-footer__bottom p {
  margin: 0;
}

.legal-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
}

.legal-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--c-on-dark-2);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--c-white);
}
