/* Deft Software — compact styles inspired by the original site. */
:root {
  --blue: #4e79a7;
  --blue-dark: #365f8c;
  --ink: #303638;
  --charcoal: #373838;
  --pale: #f2f5f7;
  --content: 944px;
}

* { box-sizing: border-box; }
html { font: 16px/1.6 Arial, Helvetica, sans-serif; color: var(--blue); }
body { margin: 0; background: #fff; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

/* Dark brand area and the original-style black navigation bar. */
.site-header { background: var(--charcoal); }
.masthead {
  width: min(100% - 32px, var(--content));
  height: 195px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { display: block; width: 140px; height: auto; }
.header-contact { text-align: center; line-height: 1.6; }
.header-contact a { display: block; }
.main-nav { background: #050505; }
.nav-list {
  width: min(100%, 976px);
  min-height: 46px;
  margin: auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  list-style: none;
}
.nav-list > li { position: relative; display: flex; }
.nav-list a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.nav-list > li > a:hover,
.nav-list > li:first-child > a { background: var(--blue); text-decoration: none; }
.subnav {
  position: absolute;
  z-index: 2;
  top: 100%;
  left: 0;
  display: none;
  width: 185px;
  padding: 0;
  background: rgba(78, 121, 167, .96);
  list-style: none;
}
.subnav a { min-height: 44px; font-weight: 400; }
.has-menu:hover .subnav,
.has-menu:focus-within .subnav { display: block; }

/* Shared page typography and comfortable reading measure. */
main {
  width: min(100% - 32px, var(--content));
  margin: auto;
  padding: 54px 0 72px;
}
main h1, main h2, main h3 { color: var(--blue); line-height: 1.35; }
main h1 { margin: 0 0 22px; font-size: clamp(29px, 3vw, 38px); }
main h2 { margin: 42px 0 16px; font-size: clamp(23px, 2.5vw, 29px); }
main h3 { margin: 27px 0 10px; font-size: 21px; }
main p { margin: 0 0 18px; }
main ul, main ol { margin: 0 0 22px; padding-left: 22px; }
main li { padding-left: 3px; }
main img { max-width: 100%; height: auto; }
main.inner > p:first-of-type:has(img) { margin: 0 0 28px; text-align: center; }
main.inner > p:first-of-type img { max-height: 380px; object-fit: contain; }
main.inner h1:first-child { margin-top: 0; }

/* Homepage hero: its image is the first paragraph in the existing content. */
.home { width: 100%; padding: 0 0 70px; }
.home > h1 {
  position: absolute;
  z-index: 1;
  top: 270px;
  left: 50%;
  width: min(900px, 90%);
  transform: translateX(-50%);
  color: #fff;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}
.home > p:first-of-type {
  height: min(550px, 45vw);
  min-height: 330px;
  margin: 0;
  overflow: hidden;
  background: #111;
}
.home > p:first-of-type img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .76;
}
.home > h2, .home > h3, .home > p:not(:first-of-type), .home > ul, .home > ol {
  width: min(100% - 32px, var(--content));
  margin-right: auto;
  margin-left: auto;
}
.home > h2 { margin-top: 50px; }
.home > h3 { margin-top: 26px; }
.home > section {
  max-width: none !important;
  margin: 52px 0 !important;
  padding: 54px max(calc((100% - var(--content)) / 2), 24px) !important;
  background-position: center !important;
  background-size: cover !important;
}
.home > section h2 { margin: 0 0 18px; color: inherit; }
.home > section ul { padding-left: 22px; }
.home > h2:last-of-type { margin-top: 54px; }

/* Dark two-column contact footer. */
.site-footer {
  display: flex;
  justify-content: space-around;
  gap: 40px;
  padding: 44px max(calc((100% - var(--content)) / 2), 24px);
  color: #fff;
  background: var(--charcoal);
  text-align: center;
}
.site-footer h2 { margin: 0 0 14px; color: var(--blue); font-size: 23px; }
.site-footer p { margin: 8px 0; }
.site-footer a { color: #fff; }
.site-footer address { font-style: normal; }

@media (max-width: 700px) {
  .masthead { height: auto; min-height: 132px; padding: 18px 4px; }
  .brand img { width: 110px; }
  .header-contact { font-size: 14px; }
  .nav-list { justify-content: center; flex-wrap: wrap; }
  .nav-list a { padding: 12px 10px; font-size: 12px; }
  .main-nav { min-height: 45px; }
  main { width: min(100% - 40px, var(--content)); padding: 36px 0 50px; }
  .home { width: 100%; }
  .home > h1 { top: 205px; }
  .home > p:first-of-type { height: 330px; min-height: 0; }
  .home > h2, .home > h3, .home > p:not(:first-of-type), .home > ul, .home > ol {
    width: min(100% - 40px, var(--content));
  }
  .home > section { padding: 36px 22px !important; }
  .site-footer { flex-direction: column; gap: 28px; padding: 36px 22px; }
}