/* Keep the palette and the masthead identity stable across both color schemes. */
:root {
  color-scheme: light dark;
  --navy: #0d1b36;
  --gold: #d8ae59;
  --white: #ffffff;
  --black: #000000;
  --surface: var(--white);
  --ink: var(--navy);
  --focus: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
}

.container {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

/* Use outlines, not color alone, so keyboard focus remains unmistakable. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  transform: translateY(calc(-100% - 2rem));
  background: var(--white);
  color: var(--navy);
  --focus: var(--navy);
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  --focus: var(--gold);
  background: var(--navy);
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

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

/* The unmodified lockup keeps its supplied viewBox and aspect ratio.
   At its maximum width the symbol is about 88px tall: 32px surrounding
   space exceeds the guide's quarter-symbol-height clear-space minimum. */
.brand {
  display: block;
  flex: 0 1 26rem;
  min-width: 160px;
  max-width: 100%;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.5rem;
}

.site-nav [aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 0.16em;
}

main {
  flex: 1;
  padding-block: clamp(3rem, 7vw, 6rem);
}

/* A skip-link may focus main without adding it to the normal Tab sequence. */
main:focus {
  outline: none;
}

h1,
h2 {
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.4rem;
  font-weight: 650;
}

p {
  margin: 0 0 1.25rem;
}

.intro {
  max-width: 37ch;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.5;
}

.contact-link {
  display: inline-block;
  min-height: 44px;
  padding-block: 0.5rem;
  font-size: 1.125rem;
}

.prose {
  max-width: 68ch;
}

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--ink);
  font-size: 0.9375rem;
}

.footer-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  overflow-wrap: anywhere;
}

.site-footer address {
  font-style: normal;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 40rem) {
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    flex-basis: auto;
    width: 26rem;
  }

  .footer-details {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--navy);
    --ink: var(--white);
    --focus: var(--gold);
  }
}
