/* About modal and the nav triggers that open it. */

.main-nav .about-nav-trigger,
.footer-nav .about-nav-trigger {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.75rem 0;
  border: 0;
  background: none;
  color: var(--teal, #49bbbd);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-nav .about-nav-trigger {
  padding: 0;
  letter-spacing: -0.02em;
}

@media (max-width: 47.9375rem) {
  .footer-nav .about-nav-trigger {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    min-height: 2.75rem;
    justify-content: flex-start;
    padding: 0.35rem 0;
  }
}

.main-nav .about-nav-trigger:hover,
.main-nav .about-nav-trigger:focus-visible,
.footer-nav .about-nav-trigger:hover,
.footer-nav .about-nav-trigger:focus-visible {
  color: var(--teal, #49bbbd);
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

.about-modal {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(48rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 0.5rem solid var(--teal, #49bbbd);
  border-radius: 1.25rem;
  background: var(--white, #ffffff);
  color: var(--navy, #1f3d64);
  box-shadow: 0 0.75rem 1.85rem rgba(31, 61, 100, 0.3);
  overflow: hidden;
}

.about-modal::backdrop {
  background: rgba(31, 61, 100, 0.64);
}

.about-modal-scroll {
  position: relative;
  box-sizing: border-box;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  padding: 2.5rem 2rem 1.75rem;
}

.about-close {
  position: absolute;
  top: 0.65rem;
  left: 0.55rem;
  right: auto;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--navy, #1f3d64);
  font-family: inherit;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: all 0.3s ease;
}

.about-close:hover,
.about-close:focus-visible {
  background: transparent;
  color: var(--teal, #49bbbd);
}

.about-logo-mark {
  display: block;
  width: min(16rem, 70%);
  height: auto;
  max-width: 100%;
  margin: 0 auto 1.25rem;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.about-title,
.about-vision,
.about-credits,
.about-credits li,
.about-tech {
  max-width: 100%;
  overflow-wrap: break-word;
}

.about-title {
  margin: 0 0 1rem;
  color: var(--teal, #49bbbd);
  font-size: var(--text-h2, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.about-vision {
  margin: 0 0 1.5rem;
  color: var(--navy, #1f3d64);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  text-align: right;
  text-wrap: pretty;
}

.about-credits {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.about-credits li {
  margin: 0;
  color: var(--navy, #1f3d64);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: right;
}

.about-credits strong {
  font-weight: 700;
}

.about-credits a {
  color: var(--teal, #49bbbd);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.about-credits a:hover,
.about-credits a:focus-visible {
  color: var(--navy, #1f3d64);
}

.about-tech {
  margin: 0 0 1.5rem;
  color: var(--navy, #1f3d64);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: right;
}

.about-tech-end {
  white-space: normal;
}

.about-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.about-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
}

.about-logos a:hover,
.about-logos a:focus-visible {
  transform: translateY(-2px);
}

.about-logos img {
  display: block;
  width: auto;
  height: 3.25rem;
  max-width: min(12rem, 42vw);
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

@media (max-width: 40rem) {
  .about-modal {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
  }

  .about-modal-scroll {
    padding: 2.75rem 1.15rem 1.25rem;
  }

  .about-title {
    font-size: 1.5rem;
  }

  .about-logos {
    gap: 1rem 1.25rem;
  }

  .about-logos img {
    height: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-close,
  .about-credits a,
  .about-logos a,
  .about-nav-trigger {
    transition: none;
  }

  .about-logos a:hover,
  .about-logos a:focus-visible {
    transform: none;
  }
}
