/*
 * Shared foundation for the five BTN Group websites: reset, type scale, skip link, focus,
 * buttons, navigation, footer and the small shared blocks. Each site sets its own palette
 * through the custom properties below and composes its own layout in styles/<site>.css.
 * System fonts only: nothing is loaded from another server.
 */
:root {
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #142028;
  --muted: #4a5652;
  --line: #dcd8cf;
  --accent: #215536;
  --accent-strong: #19432a;
  --accent-ink: #ffffff;
  --focus: #1b6fd1;
  --masthead-bg: #ffffff;
  --masthead-ink: #142028;
  --footer-bg: #08131d;
  --footer-ink: #c9d2d6;
  --footer-strong: #ffffff;
  --wrap: 72rem;
  --gutter: 1rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.3rem;
}

p,
ul,
ol,
dl {
  margin: 0;
}

* + p,
* + ul,
* + ol,
* + dl {
  margin-top: 1rem;
}

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 46rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: #ffffff;
  color: #142028;
  font-weight: 600;
  border-radius: 0.375rem;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 0.375rem;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.text-link {
  font-weight: 600;
  color: var(--accent);
  text-underline-offset: 0.2em;
}

/* Masthead: brand, section links that wrap on a phone, and one action or endorsement. */
.masthead {
  background: var(--masthead-bg);
  color: var(--masthead-ink);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  border-radius: 0.25rem;
}

.section-nav {
  order: 3;
  width: 100%;
}

.section-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  list-style: none;
}

.section-nav li {
  margin: 0;
}

.section-nav a {
  display: inline-block;
  padding-block: 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.section-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.endorsement {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.25rem;
}

.endorsement-badge {
  display: inline-flex;
  padding: 0.25rem 0.35rem;
  background: #ffffff;
  border-radius: 0.25rem;
}

.endorsement-logo {
  width: 3rem;
  height: auto;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
  }

  .section-nav {
    order: 0;
    width: auto;
    flex: 1;
  }

  .section-nav ul {
    justify-content: flex-end;
  }
}

@media (min-width: 64rem) {
  :root {
    --gutter: 2rem;
  }
}

/* Shared blocks */
.band {
  padding-block: 4rem;
}

@media (min-width: 64rem) {
  .band {
    padding-block: 6rem;
  }
}

.checklist {
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-top: 0.6rem;
  padding-left: 1.6rem;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--accent);
  border-radius: 2px;
}

.mail-hint,
.note {
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 1.5rem;
}

.contact-list dt,
.contact-columns dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list dd,
.contact-columns dd {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
}

.address-line {
  display: block;
}

.photo {
  width: 100%;
  object-fit: cover;
}

.prose-page {
  max-width: 46rem;
  padding-block: 4rem 6rem;
}

.prose-page h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.prose-page ul {
  padding-left: 1.25rem;
}

.prose-page li + li {
  margin-top: 0.5rem;
}

/* Footer: the same structure on every site, in that site's colours. */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 3rem 2rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-name,
.footer-heading {
  color: var(--footer-strong);
  font-weight: 650;
}

.site-footer ul {
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-top: 0.35rem;
}

.site-footer a {
  text-underline-offset: 0.2em;
}

.site-footer [aria-current] {
  color: var(--footer-strong);
  font-weight: 650;
}

.footer-base {
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
