.section-heading {
  margin-bottom: 3rem;
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0.35rem 0 0;
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--color-heading);
}

.section-heading h2::after {
  display: inline-block;
  width: 0.9rem;
  height: 0.7rem;
  margin-left: 0.6rem;
  vertical-align: 0.1em;
  content: "";
  background:
    linear-gradient(var(--color-accent), var(--color-accent)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) 0 50% / 70% 2px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) 0 100% / 40% 2px no-repeat;
}

.section {
  padding: 6rem var(--bleed);
}

.intro {
  overflow: hidden;
  background:
    radial-gradient(circle at 6% 22%, rgb(58 123 213 / 8%) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 14% 8%, rgb(58 123 213 / 6%) 0 3rem, transparent 3.1rem),
    radial-gradient(circle at 96% 88%, rgb(252 217 59 / 12%) 0 6rem, transparent 6.1rem),
    linear-gradient(#fff, var(--color-surface));
}

.intro-body {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4.5rem;
  align-items: center;
}

.intro-media {
  position: relative;
  margin: 0;
}

.intro-media::before {
  position: absolute;
  inset: -1.25rem 1.25rem 1.25rem -1.25rem;
  content: "";
  border: 2px solid #cfe0f7;
  border-radius: var(--radius);
}

.intro-media::after {
  position: absolute;
  right: -1.75rem;
  bottom: -1.75rem;
  width: 6rem;
  height: 6rem;
  content: "";
  background-image: radial-gradient(var(--color-accent) 2px, transparent 2.5px);
  background-size: 0.75rem 0.75rem;
}

.intro-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.6s var(--ease);
}

.intro-media:hover img {
  transform: translateY(-0.4rem);
}

.intro-text:only-child {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 48rem;
}

/* The padding leaves room for the card shadows, which the scroll box clips. */
.area-panels {
  display: grid;
  grid-auto-columns: minmax(min(80%, 16rem), 1fr);
  grid-auto-flow: column;
  gap: 1.5rem;
  margin: -1.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  scroll-padding-inline: 1.5rem;
  scroll-snap-type: x mandatory;
}

.area {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.area:hover {
  box-shadow: 0 1.25rem 2.75rem rgb(19 58 120 / 18%);
  transform: translateY(-0.5rem);
}

.area-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.area-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.area:hover .area-image {
  transform: scale(1.07);
}

.area-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem 1.75rem 1.75rem;
}

.area .number {
  margin: 0 0 0.5rem;
  font-family: var(--font-latin);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-primary);
}

.area h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--color-heading);
}

.area h3 a {
  color: inherit;
}

.area h3 a::before {
  position: absolute;
  inset: 0;
  content: "";
}

.area h3::after {
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.6rem;
  content: "";
  background: var(--color-accent);
  transition: width 0.4s var(--ease);
}

.area:hover h3::after {
  width: 5rem;
}

.area-description {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.area-description p:last-child {
  margin-bottom: 0;
}

.area-more {
  margin: auto 0 0;
  padding-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
}

.area-more span {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.3s var(--ease);
}

.area:hover .area-more span {
  transform: translateX(0.3rem);
}

.stats {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(
    120deg,
    var(--color-primary-deep),
    var(--color-primary-dark) 55%,
    var(--color-primary)
  );
}

.stats::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: radial-gradient(rgb(255 255 255 / 16%) 1px, transparent 1.6px);
  background-size: 1.4rem 1.4rem;
  mask-image: linear-gradient(transparent, #000);
}

.stats .eyebrow {
  color: var(--color-accent);
}

.stats h2 {
  color: #fff;
}

.stats ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 3rem rgb(5 20 50 / 25%);
  backdrop-filter: blur(6px);
}

.stats li {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid;
  border-bottom: 1px solid;
  border-color: rgb(255 255 255 / 12%);
  border-radius: 0.5rem;
  transition:
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.stats li:hover {
  background: rgb(255 255 255 / 12%);
}

.stats .value {
  display: block;
  font-size: clamp(1.25rem, 6.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.stats .label {
  display: block;
  margin-top: 0.35rem;
  color: rgb(255 255 255 / 82%);
  overflow-wrap: anywhere;
}

.stats li:nth-child(3n) {
  border-right: 0;
}

.stats li:nth-last-child(-n + 3):nth-child(3n + 1),
.stats li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li {
  border-bottom: 0;
}

.research-areas {
  background: var(--ground);
}

@media (max-width: 64rem) {
  .section {
    padding-block: 4rem;
  }

  .intro-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 40rem) {
  .stats li {
    padding: 1.25rem 0.5rem;
  }

  .stats .label {
    font-size: 0.8rem;
  }
}
