/* Header and footer styles, written by hand.
 *
 * These replace the Tailwind utility classes that previously carried the shared
 * chrome. Values are taken from the generated stylesheet they replace, so the
 * rendering is unchanged: navy #1B244F, green #59D895, light green #EEFBF4,
 * spacing on a 0.25rem scale, and the desktop breakpoint at 1024px.
 *
 * Base element resets still come from styles.css. Font Awesome icon classes
 * (svg-inline--fa, fa-*) are unchanged and still defined there.
 */

/* ---------------------------------------------------------------- header --- */

.site-header {
  padding-top: 2rem;
  padding-bottom: 2rem;
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke;
  transition-timing-function: linear;
  transition-duration: 150ms;
}

.site-header--home {
  background-color: #eefbf4;
  color: #1b244f;
  --header-focus-ring: #1b244f;
}

.site-header--inner {
  background-color: #1b244f;
  color: #fff;
  --header-focus-ring: #fff;
}

.header-bar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo {
  display: inline-block;
  border-radius: 0.375rem;
  transform: scale(0.75);
  transform-origin: left;
}

.header-logo-mark {
  height: 100%;
  width: auto;
}

/* --------------------------------------------------------- desktop nav --- */

.primary-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  font-weight: 700;
}

.nav-link {
  border-radius: 0.375rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-chevron {
  margin-left: 0.5rem;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

[data-state~='open'] .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.solutions-menu {
  position: absolute;
  left: 50%;
  z-index: 10;
  display: grid;
  gap: 1rem;
  transform: translateX(-50%) translateY(1rem);
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 2rem;
  color: #1b244f;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.solutions-menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
  font-weight: 400;
}

.solutions-menu-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: #f9fafb;
  color: #1b244f;
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

[data-state~='active'] .solutions-menu-icon {
  background-color: #59d895;
}

/* ---------------------------------------------------------- mobile nav --- */

.mobile-nav {
  position: relative;
}

.mobile-nav-icon {
  font-size: 1.5rem;
  line-height: 2rem;
}

.mobile-nav-icon-close {
  display: none;
}

.mobile-nav-toggle[data-state~='open'] .mobile-nav-icon-open {
  display: none;
}

/* block, not inline-block: inline-block would add baseline descender space and
 * make the toggle 3px taller, shifting the menu panel's top offset. */
.mobile-nav-toggle[data-state~='open'] .mobile-nav-icon-close {
  display: block;
}

.mobile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 2rem);
  z-index: 10;
  display: grid;
  width: calc(100vw - 4rem);
  gap: 2rem;
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 2rem;
  white-space: nowrap;
  font-weight: 700;
  color: #1b244f;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: scale(1);
  opacity: 1;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.375rem;
}

@media (min-width: 1024px) {
  .site-header {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .header-logo {
    transform: scale(1);
  }

  .primary-nav {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }
}

/* ---------------------------------------------------------------- footer --- */

.site-footer {
  background-color: #1b244f;
  color: #fff;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.footer-copyright {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: rgb(255 255 255 / 0.5);
  white-space: nowrap;
}

.footer-nav {
  display: grid;
  align-content: flex-start;
  align-items: flex-start;
  gap: 4rem;
}

.footer-column {
  display: grid;
  align-content: flex-start;
  justify-items: start;
  gap: 1rem;
}

.footer-heading {
  font-weight: 700;
}

.footer-link {
  display: inline-block;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-contact-icon {
  font-size: 1rem;
  line-height: 1.5rem;
}

.footer-email {
  display: inline-block;
  border-radius: 0.375rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  text-decoration-line: underline;
}

@media (min-width: 1024px) {
  .site-footer-inner {
    flex-direction: row;
  }

  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ----------------------------------------------------------- focus rings --- */

.header-logo:focus,
.nav-link:focus,
.solutions-menu:focus,
.solutions-menu-item:focus,
.mobile-nav-toggle:focus,
.mobile-menu:focus,
.footer-link:focus,
.footer-email:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.header-logo:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--header-focus-ring);
  outline-offset: 8px;
}

.footer-link:focus-visible,
.footer-email:focus-visible {
  outline: 3px solid #59d895;
  outline-offset: 4px;
}
