:root {
  --site-nav-height: 67px;
}

html {
  background: #fff;
  scroll-behavior: smooth;
}

body {
  background: #fff;
}

body.nav-open {
  overflow: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(196, 30, 32, 0.34);
  outline-offset: 3px;
}

.main-nav::before {
  background: rgba(0, 27, 61, 0.34);
  content: "";
  inset: var(--site-nav-height) 0 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.2s ease;
  z-index: -1;
}

.main-nav.active::before {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.footer-grid.footer-grid-standard {
  grid-template-areas: "company links contact";
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.65fr) minmax(250px, 0.9fr);
  gap: 34px;
}

.footer-grid-standard .footer-info {
  grid-area: company;
}

.footer-grid-standard .footer-links {
  grid-area: links;
}

.footer-grid-standard .footer-contact {
  grid-area: contact;
}

.footer-contact {
  color: #dce7f3;
}

.footer-contact h4 {
  margin-top: 0;
}

.footer-contact p {
  color: #dce7f3;
  line-height: 1.65;
  margin: 0.6rem 0;
}

.footer-contact a {
  font-weight: 700;
}

.footer-contact .footer-contact-action {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  margin-top: 0.65rem;
  min-height: 38px;
  padding: 0 0.85rem;
}

.footer-contact .footer-contact-action:hover {
  background: #c41e20;
  border-color: #c41e20;
}

.homepage-resource-section {
  background: #f7f9fc;
  border-top: 1px solid #e7edf3;
}

.homepage-resource-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.homepage-resource-card {
  background: #fff;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 1.5rem;
}

.homepage-resource-card h3 {
  color: #003366;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 0.7rem;
}

.homepage-resource-card p {
  color: #536170;
  line-height: 1.7;
  margin: 0;
}

.homepage-resource-card a {
  color: #c41e20;
  font-weight: 800;
  margin-top: auto;
  padding-top: 1rem;
  text-decoration: none;
}

@media (max-width: 900px) {
  .footer-grid.footer-grid-standard {
    grid-template-areas: "company links" "contact contact";
    grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.6fr);
  }

  .footer-grid-standard .footer-contact {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 22px;
  }

  .homepage-resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    min-height: var(--site-nav-height);
  }

  .main-nav {
    top: var(--site-nav-height);
  }

  .main-nav::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer-grid.footer-grid-standard {
    grid-template-areas: "company" "links" "contact";
    grid-template-columns: 1fr;
  }

  .footer-grid-standard .footer-contact {
    padding-top: 18px;
  }
}

/* Keep the Chinese homepage promise readable on narrow phone screens. */
@media (max-width: 480px) {
  .hero {
    align-items: flex-start;
    min-height: 0 !important;
    padding: 26px 0 32px;
  }

  .hero h1 {
    font-size: 2.15rem !important;
    line-height: 1.14 !important;
  }

  .hero p {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin: 1.35rem 0 !important;
  }

  .hero-paths {
    gap: 0.75rem !important;
    margin-top: 1.3rem !important;
  }

  .hero-paths a {
    min-height: 82px !important;
    padding: 1rem 1.1rem 0.9rem !important;
  }

  .hero-paths a::before {
    left: 1.1rem !important;
    right: 1.1rem !important;
  }

  .hero-paths span {
    font-size: 0.76rem !important;
  }

  .hero-paths strong {
    font-size: 0.96rem !important;
  }

  #fetech-native-consult {
    right: 8px !important;
  }

  .fetech-consult-button {
    height: 52px !important;
    width: 52px !important;
  }
}
