:root {
  /* Navy bands stay dark in both themes; paper sections follow the theme */
  --navy: #0e1b2c;
  --navy-deep: #0a1421;
  --on-navy: #f2f5f8;
  --on-navy-muted: #a9b6c4;
  --steel: #9fb8d4;

  --paper: #ffffff;
  --mist: #f2f4f7;
  --ink: #142233;
  --muted: #536274;
  --rule: #dde3ea;
  --accent: #2f5b8a;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --band-pad: clamp(64px, 9vw, 120px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a27;
    --mist: #13202f;
    --ink: #e6ecf2;
    --muted: #9aa8b7;
    --rule: #233244;
    --accent: #9fb8d4;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  z-index: 10;
  left: var(--gutter);
  top: -100px;
  padding: 8px 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Width set by margin, not padding, so rules and images align with the text */
.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Hero: full-bleed photograph under a navy wash */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(92vh, 900px);
  color: var(--on-navy);
  background-color: var(--navy);
  background-image:
    linear-gradient(90deg, rgba(10, 20, 33, 0.9) 0%, rgba(10, 20, 33, 0.55) 50%, rgba(10, 20, 33, 0) 100%),
    url("/images/hero.webp");
  background-size: cover;
  background-position: center right;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-block: 28px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.nav a {
  font-size: 0.9375rem;
  color: var(--on-navy-muted);
  text-decoration: none;
}
.nav a:hover { color: var(--on-navy); }

.hero-body {
  margin-top: auto;
  padding-block: clamp(64px, 10vw, 120px) clamp(56px, 8vw, 104px);
}

.hero h1 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 6.8vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}

.lede {
  margin: clamp(24px, 3.5vw, 40px) 0 0;
  max-width: 34rem;
  font-size: 1.1875rem;
  color: var(--on-navy-muted);
}

.button {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 26px;
  border: 1px solid rgba(242, 245, 248, 0.5);
  border-radius: 2px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.button:hover {
  background: var(--on-navy);
  border-color: var(--on-navy);
  color: var(--navy);
}

/* Bands */

.band { padding-block: var(--band-pad); }
.band-paper { background: var(--paper); }
.band-mist { background: var(--mist); }

.band-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: 32px;
  align-items: baseline;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.band-intro {
  margin: 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* Services */

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 40px);
}

.service img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.8);
}

.service h3 {
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.service p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* About: photograph beside a navy panel */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--navy);
  color: var(--on-navy);
}

.about-image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.about-body {
  align-self: center;
  max-width: 36rem;
  padding: var(--band-pad) var(--gutter);
}
.about-body .band-title { color: var(--on-navy-muted); margin-bottom: 24px; }
.about-body p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
}
.about-body p + p { margin-top: 1em; }

/* Footer */

.footer {
  background: var(--navy-deep);
  color: var(--on-navy-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  column-gap: 32px;
  padding-block: 40px 48px;
}
.footer p, .footer address { margin: 0; font-style: normal; }
.footer-name { color: var(--on-navy); font-weight: 500; }

.email {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--on-navy);
  text-decoration: underline;
  text-decoration-color: rgba(242, 245, 248, 0.35);
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration-color: var(--on-navy); }
.copyright { text-align: right; }

/* Simple pages (404) */

.page-plain .hero { min-height: 100vh; }

@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; gap: 48px; }
  .service img { aspect-ratio: 16 / 9; }

  .about { grid-template-columns: 1fr; }
  .about-image { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .nav { display: none; }

  .hero {
    background-image:
      linear-gradient(180deg, rgba(10, 20, 33, 0.6) 0%, rgba(10, 20, 33, 0.88) 55%),
      url("/images/hero.webp");
  }

  .band-head { grid-template-columns: 1fr; row-gap: 16px; }

  .footer-inner { grid-template-columns: 1fr; row-gap: 16px; }
  .copyright { text-align: left; }
}

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