:root {
  --header-height: 5.5rem;
  --header-height-scrolled: 4rem;
  --rs-blue: #005eb4;
  --rs-green: #8fc741;
  --rs-navy: #02325e;
  --rs-orange: #ff6000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  color: #1e1e1e;
  font-family: Cabin, system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.5;
  margin: 0;
}

a {
  color: var(--rs-blue);
}

h1,
h2 {
  font-weight: 600;
}

.site-header {
  background: transparent;
  color: #fff;
  height: var(--header-height);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transition: background 0.2s, box-shadow 0.2s, height 0.2s;
  z-index: 10;
}

.site-header.scrolled {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  color: #1e1e1e;
  height: var(--header-height-scrolled);
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 3rem;
  height: 100%;
  margin: 0 auto;
  max-width: 78rem;
  padding: 0 5%;
}

.brand {
  display: block;
}

.brand img {
  display: block;
  height: auto;
  width: 13rem;
}

.brand .logo-color {
  display: none;
}

.scrolled .brand .logo-top {
  display: none;
}

.scrolled .brand .logo-color {
  display: block;
}

.nav {
  flex: 1;
}

.nav ul {
  display: flex;
  gap: 2.25rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

.scrolled .nav a:hover,
.scrolled .nav a[aria-current] {
  text-decoration-color: var(--rs-blue);
}

.has-menu {
  position: relative;
}

.caret {
  margin-left: 0.4rem;
}

.menu {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: none !important;
  flex-direction: column;
  gap: 0 !important;
  left: -1rem;
  min-width: 18rem;
  padding: 0.5rem 0 !important;
  position: absolute;
  top: 100%;
}

.has-menu:hover .menu,
.has-menu:focus-within .menu {
  display: flex !important;
}

.menu a {
  color: #1e1e1e;
  display: block;
  padding: 0.5rem 1rem;
}

.menu a:hover {
  background: #eef4fb;
  text-decoration: none;
}

.header-inner::after {
  content: '';
  flex: none;
  width: 13rem;
}

@media (max-width: 50rem) {
  .header-inner::after {
    display: none;
  }
}

.hero {
  align-items: center;
  background: var(--rs-navy) url('../img/home-hero.jpg') center / cover no-repeat;
  color: #fff;
  display: flex;
  justify-content: center;
  min-height: 70vh;
  padding: 10rem 5% 7rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 1.15;
  margin: 0;
  max-width: 70.2rem;
}

.quick-links {
  background: #fff url('../img/quick-links.jpg') center / cover no-repeat;
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(3, 1fr);
  padding: 2rem max(5%, calc((100% - 78rem) / 2 + 5%));
}

.quick-links a {
  align-items: center;
  color: #1e1e1e;
  display: flex;
  font-size: 1rem;
  font-weight: 500;
  gap: 0.75rem;
  text-decoration: none;
}

.quick-links a:hover {
  color: var(--rs-blue);
}

.chevron {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  flex: none;
  height: 1.5rem;
  justify-content: center;
  line-height: 1;
  width: 1.5rem;
}

@media (max-width: 60rem) {
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 40rem) {
  .quick-links {
    grid-template-columns: 1fr;
  }
}

.page-hero {
  background: var(--rs-navy) url('../img/topic.jpg') center / cover no-repeat;
  color: #fff;
  padding: 11rem 5% 6rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
  margin: 0;
}

.topic-feature {
  background: #07121d;
  padding: 6rem 0;
}

.topic-feature-inner {
  display: grid;
  gap: 4.5rem;
  grid-template-columns: 1fr 1fr;
  margin: 0 auto;
  max-width: 78rem;
  padding: 0 5%;
}

.topic-feature-inner img {
  aspect-ratio: 1;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.topic-feature-text {
  align-items: center;
  background: #112a43;
  color: #fff;
  display: flex;
  padding: 4rem;
}

.topic-feature-text {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.topic-feature-text p {
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.topic-feature-text .lead {
  font-size: 1.5rem;
  line-height: 1.5;
}

.topic-feature-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 50rem) {
  .topic-feature-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .topic-feature-text {
    padding: 2rem;
  }
}

.topic-areas {
  margin: 0 auto;
  max-width: 78rem;
  padding: 3rem 5% 5rem;
}

.topic-areas h2 {
  color: var(--rs-navy);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

.topic-areas ul {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
}

.topic-areas li {
  margin-bottom: 0.9rem;
  padding-left: 1.5rem;
  position: relative;
}

.topic-areas li::before {
  background: #9bbfe0;
  content: '';
  height: 1px;
  left: 0;
  position: absolute;
  top: 0.85em;
  width: 0.5rem;
}

.team {
  display: grid;
  gap: 5rem 5rem;
  grid-template-columns: repeat(3, 16rem);
  justify-content: center;
  margin: 0 auto;
  max-width: 78rem;
  padding: 6rem 5%;
}

@media (max-width: 60rem) {
  .team {
    grid-template-columns: repeat(2, 16rem);
  }
}

@media (max-width: 40rem) {
  .team {
    grid-template-columns: minmax(0, 16rem);
  }
}

.person img {
  aspect-ratio: 4 / 5;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.person .titles {
  font-size: 0.8rem;
  margin: 1.25rem 0 0.1rem;
}

.person h2 {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.person .bio {
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 0;
}

.topics {
  background: #dcebf7;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
  padding: 4rem max(5%, calc((100% - 78rem) / 2 + 5%));
}

@media (max-width: 60rem) {
  .topics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 40rem) {
  .topics {
    grid-template-columns: 1fr;
  }
}

.topic {
  background: var(--rs-navy) center / cover no-repeat;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 18rem;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.5rem;
  scroll-margin-top: var(--header-height-scrolled);
  text-align: center;
  text-decoration: none;
}

.topic:hover,
.topic:focus {
  text-decoration: none;
}

.topic {
  position: relative;
}

.topic::before {
  background: linear-gradient(to top, rgba(2, 50, 94, 0.9) 0%, rgba(2, 50, 94, 0.35) 70%);
  content: '';
  inset: 0;
  position: absolute;
  transition: background 0.35s ease;
}

.topic:hover::before,
.topic:focus::before {
  background: rgba(2, 50, 94, 0.85);
}

.topic > * {
  position: relative;
}

.topic .arrow {
  font-size: 1.5rem;
  line-height: 1;
  max-height: 0;
  opacity: 0;
  text-decoration: none;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease;
}

.topic h2 {
  font-size: 1.5rem;
  margin: 0;
}

.topic p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease;
}

.topic:hover p,
.topic:focus p {
  margin-top: 0.75rem;
  max-height: 12rem;
  opacity: 1;
}

.topic:hover .arrow,
.topic:focus .arrow {
  margin-top: 0.75rem;
  max-height: 2rem;
  opacity: 1;
}

.site-footer {
  color: #fff;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-main {
  background: #112a43;
  padding: 4.5rem 0;
}

.footer-inner {
  align-items: flex-start;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 78rem;
  padding: 0 5%;
}

.footer-logo {
  height: auto;
  width: 13rem;
}

.footer-contact p,
.footer-legal p {
  font-family: Roboto, system-ui, sans-serif;
}

.footer-contact h2 {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 1.5rem;
  max-width: 10rem;
}

.footer-contact p {
  margin: 0;
}

.footer-legal {
  background: #07121d;
  font-size: 0.75rem;
  padding: 1.75rem 5%;
  text-align: center;
}

.footer-legal p {
  margin: 0;
}

@media (max-width: 40rem) {
  .footer-inner {
    flex-direction: column;
  }
}
