:root {
  --navy: #193d4a;
  --navy-deep: #0f2a33;
  --teal: #399bac;
  --teal-text: #26717e;
  --grey: #52666d;
  --paper: #ffffff;
  --mist: #f2f7f8;
  --rule: #d6e3e6;
  --on-dark: #c9e2e7;
  --max: 1200px;
  --gutter: 24px;
  --radius: 3px;
  --font: "Segoe UI", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--teal-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--navy); padding: 8px 16px; z-index: 10;
}
.skip:focus { left: 16px; top: 16px; }

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

/* Type */
h1, h2, h3, h4 { margin: 0; color: var(--navy); }
h1 { font-weight: 700; font-size: clamp(2.75rem, 6.2vw, 5.25rem); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.625rem); line-height: 1.12; letter-spacing: -0.015em; }
h3, h4 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.5; max-width: 36em; }

/* Buttons and links */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 32px; }
.button {
  display: inline-block; background: var(--navy); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem; line-height: 1.2; padding: 15px 26px; border-radius: var(--radius);
}
.button:hover { background: var(--navy-deep); color: #fff; }
.button.light { background: #fff; color: var(--navy); }
.button.light:hover { background: var(--mist); color: var(--navy); }
.button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.text-link { color: #fff; font-weight: 600; }
.text-link:hover { color: var(--on-dark); }
.more { margin: 36px 0 0; }
.more a { font-weight: 600; }

/* Masthead: photo behind header and page title */
.masthead { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-deep); color: #fff; }
.mast-photo {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%; transform: scaleX(-1);
}
.masthead::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.masthead.home::before {
  background:
    linear-gradient(0deg, rgba(15, 42, 51, 0.96) 0%, rgba(15, 42, 51, 0.7) 20%, rgba(15, 42, 51, 0) 46%),
    linear-gradient(90deg, rgba(15, 42, 51, 0.9) 0%, rgba(15, 42, 51, 0.62) 38%, rgba(15, 42, 51, 0.12) 70%, rgba(15, 42, 51, 0) 100%);
}
.masthead.page::before {
  background: linear-gradient(90deg, rgba(15, 42, 51, 0.95) 0%, rgba(15, 42, 51, 0.86) 50%, rgba(15, 42, 51, 0.62) 100%);
}
.masthead.page .mast-photo { object-position: 50% 40%; }
.masthead h1, .masthead h2 { color: #fff; }
.masthead .lead { color: var(--on-dark); }

/* Header */
.site-header { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px 32px; flex-wrap: wrap; min-height: 88px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: block; line-height: 0; }
.brand img { width: 176px; height: auto; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; }
.nav a { color: #fff; text-decoration: none; font-size: 0.9375rem; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.5); }
.nav a[aria-current="page"] { border-bottom-color: var(--teal); }

/* Home hero */
.masthead.home { display: flex; flex-direction: column; min-height: clamp(660px, 94vh, 940px); }
.hero { flex: 1; display: flex; align-items: center; padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.hero .wrap { width: 100%; }
.hero h1 { max-width: 11.5em; }
.hero .lead { margin-top: 26px; }
.mast-phases { width: 100%; padding-bottom: clamp(36px, 5vw, 56px); }

/* Phase line (HERMES 2022) */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.phase { position: relative; padding: 30px 28px 0 0; }
.phase::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--teal); transform-origin: left center;
}
.phase::after {
  content: ""; position: absolute; left: -7px; top: -5px; width: 14px; height: 14px;
  background: var(--paper); border: 3px solid var(--navy); transform: rotate(45deg);
}
.phase .goal {
  position: absolute; right: 0; top: -7px; width: 18px; height: 18px;
  background: var(--navy); transform: rotate(45deg);
}
.phase-name { display: block; font-weight: 600; font-size: 1.125rem; }
.phase-text { display: block; color: var(--grey); font-size: 0.9375rem; line-height: 1.5; margin-top: 6px; max-width: 18em; }
.phases.wide .phase-text { max-width: 22em; font-size: 1rem; }
.section.mist .phase::after { background: var(--mist); }
.phases.on-dark .phase::after { background: var(--navy-deep); border-color: #fff; }
.phases.on-dark .goal { background: var(--teal); }
.phases.on-dark .phase-name { color: #fff; }
.phases.on-dark .phase-text { color: var(--on-dark); }

@media (prefers-reduced-motion: no-preference) {
  .phase::before { animation: draw 0.55s ease-out both; }
  .phase:nth-child(2)::before { animation-delay: 0.5s; }
  .phase:nth-child(3)::before { animation-delay: 1s; }
  .phase .goal { animation: appear 0.3s ease-out 1.55s both; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Page head on subpages */
.page-head { padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 8vw, 104px); }
.page-head h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
.page-head .lead { margin-top: 22px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.mist { background: var(--mist); }
.intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px var(--gutter); align-items: start; margin-bottom: clamp(36px, 5vw, 56px); }
.intro h2 { grid-column: 1 / span 5; }
.intro .lead { grid-column: 6 / span 7; margin: 4px 0 0; color: var(--navy); }
.sub { margin: 0 0 18px; font-size: 1rem; font-weight: 600; color: var(--teal-text); }

/* Tiles with the chevron from the logo */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.tile { background: var(--mist); border-radius: var(--radius); padding: 34px 30px 30px; }
.section.mist .tile { background: #fff; }
.tile::before {
  content: ""; display: block; width: 16px; height: 16px; margin: 6px 0 24px 4px;
  border-top: 4px solid var(--teal); border-left: 4px solid var(--teal); border-radius: 2px 0 0 0;
  transform: rotate(45deg);
}
.tile h2, .tile h3, .tile h4 { font-size: 1.25rem; font-weight: 600; margin: 0 0 10px; }
.tile p { margin: 0; color: var(--grey); }

/* Project cards on the homepage */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.project { background: #fff; border-top: 4px solid var(--navy); border-radius: 0 0 var(--radius) var(--radius); padding: 28px 28px 30px; }
.project .tag { display: block; font-size: 0.875rem; font-weight: 600; color: var(--teal-text); }
.project h3 { margin: 10px 0 10px; }
.project p { margin: 0; color: var(--grey); }

/* Lists with a forward chevron */
.ticks { list-style: none; margin: 10px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 24px; margin: 8px 0; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px;
  border-top: 2px solid var(--teal); border-right: 2px solid var(--teal); transform: rotate(45deg);
}
.ticks.cols { columns: 2; column-gap: calc(var(--gutter) * 2); margin: 0; }
.ticks.cols li { break-inside: avoid; margin: 0 0 14px; font-size: 1.0625rem; }

/* References */
.case { padding: clamp(44px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.case:first-child { padding-top: 0; border-top: 0; }
.case-head { margin-bottom: 28px; }
.case-head .sector { display: block; font-weight: 600; color: var(--teal-text); margin-bottom: 6px; }
.case-head h2 { font-size: clamp(1.625rem, 2.8vw, 2.25rem); }
.case-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px var(--gutter); align-items: start; }
.case-main { grid-column: 1 / span 7; }
.case-main h3 { font-size: 1rem; margin: 22px 0 4px; }
.case-main h3:first-child { margin-top: 0; }
.case-main p { margin: 0; max-width: 40em; }
.lessons { grid-column: 8 / span 5; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 30px 30px 26px; }
.lessons h3 { color: #fff; font-size: 1.125rem; margin: 0 0 6px; }
.lessons .ticks li { color: var(--on-dark); }

/* Profile */
.profile { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px var(--gutter); align-items: center; }
.profile .photo { grid-column: 1 / span 5; }
.profile .photo img { width: 100%; max-width: 440px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--rule); }
.profile .text { grid-column: 6 / span 7; }
.profile .role { color: var(--teal-text); font-weight: 600; margin: 6px 0 18px; }
.profile dl { margin: 28px 0 0; display: grid; grid-template-columns: 10em 1fr; gap: 10px 24px; border-top: 1px solid var(--rule); padding-top: 22px; }
.profile dt { color: var(--grey); }
.profile dd { margin: 0; }

/* Legal pages */
.legal { max-width: 44em; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 8px; }
.legal p { margin-bottom: 0.75em; }

/* Closing call to action */
.cta-band { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; padding: clamp(72px, 10vw, 128px) 0; }
.cta-band::after {
  content: ""; position: absolute; z-index: -1; right: -4%; top: 50%; width: min(560px, 70vw); aspect-ratio: 1;
  transform: translateY(-50%); background: url("mark-white.svg") center / contain no-repeat; opacity: 0.08;
}
.cta-band h2 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.25rem); }
.cta-band .lead { color: var(--on-dark); margin-top: 18px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark); padding: 56px 0 64px; font-size: 0.9375rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px var(--gutter); }
.site-footer .f-brand { grid-column: 1 / span 5; }
.site-footer .f-brand img { width: 160px; height: auto; margin-bottom: 14px; }
.site-footer .f-brand p { margin: 0; }
.site-footer .f-contact { grid-column: 6 / span 4; }
.site-footer .f-links { grid-column: 10 / span 3; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 4px; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer address { font-style: normal; margin-bottom: 8px; }

@media (max-width: 900px) {
  .intro h2, .intro .lead { grid-column: 1 / -1; }
  .tiles, .projects { grid-template-columns: 1fr; }
  .case-main, .lessons { grid-column: 1 / -1; }
  .profile .photo, .profile .text { grid-column: 1 / -1; }
  .profile .photo img { max-width: 360px; }
  .site-footer .f-brand, .site-footer .f-contact, .site-footer .f-links { grid-column: 1 / -1; }
  .ticks.cols { columns: 1; }
  .masthead.home::before {
    background:
      linear-gradient(0deg, rgba(15, 42, 51, 0.96) 0%, rgba(15, 42, 51, 0.75) 35%, rgba(15, 42, 51, 0.35) 70%, rgba(15, 42, 51, 0.55) 100%);
  }
  .masthead.home { min-height: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 1rem; }
  .brand img { width: 148px; }
  .nav ul { gap: 4px 18px; }
  .nav a { font-size: 0.9375rem; }
  .phases { grid-template-columns: 1fr; row-gap: 34px; }
  .phase { padding-right: 0; }
  .profile dl { grid-template-columns: 1fr; gap: 2px; }
  .profile dd { margin-bottom: 10px; }
  .tile { padding: 28px 24px 26px; }
  .lessons { padding: 26px 22px 22px; }
}
