/* Static-deployment navigation and responsive safety layer. */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, svg, video, canvas {
  max-width: 100%;
}

img, video {
  height: auto;
}

.section-shell,
.page-hero-shell,
.footer-shell,
.footer-bottom,
.nav-shell {
  max-width: calc(100vw - 30px);
}

.intro > *,
.platform-advantage > *,
.service-feature-layout > *,
.service-showcase-row > *,
.service-overview > *,
.aicb-intro > *,
.contact-section > *,
.contact-form-section > *,
.history-layout > * {
  min-width: 0;
}

.contact-form input,
.contact-form textarea,
.contact-form select,
.contact-form button {
  max-width: 100%;
  font: inherit;
}

h1, h2, h3, p, a, span, strong, small {
  overflow-wrap: break-word;
}

/* Use more of large desktop screens: the original 1180/1240px shells left
   excessive side gutters. 1.25x preserves the design while increasing scale. */
@media (min-width: 1025px) {
  .section-shell,
  .page-hero-shell,
  .footer-shell,
  .footer-bottom {
    width: min(1475px, calc(100vw - 48px));
    max-width: none;
  }

  .nav-shell {
    width: min(1550px, calc(100vw - 48px));
    max-width: none;
  }
}

@media (max-width: 1024px) {
  .desktop-nav,
  .nav-cta {
    display: none !important;
  }

  .menu-button {
    color: #fff;
    background: transparent;
    border: 0;
    margin-left: auto;
    padding: 10px;
    display: grid !important;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
  }

  .mobile-nav {
    color: #fff;
    background: rgba(2, 22, 47, .98);
    border-top: 1px solid rgba(255, 255, 255, .12);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 28px 24px 32px;
  }

  .site-header:has(.menu-button[aria-expanded="true"]) .mobile-nav {
    display: grid;
  }

  .section-heading,
  .ai-banner-content,
  .service-contact-band .section-shell {
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .section-shell,
  .page-hero-shell,
  .footer-shell,
  .footer-bottom,
  .nav-shell {
    width: calc(100% - 30px);
    max-width: none;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 4rem) !important;
    line-height: 1.08 !important;
  }

  h2 {
    font-size: clamp(1.8rem, 8.5vw, 2.65rem) !important;
    line-height: 1.18 !important;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .hero-actions,
  .news-tabs,
  .service-feature-tabs {
    flex-wrap: wrap;
  }

  .primary-button,
  .outline-button,
  .text-button {
    min-height: 44px;
  }

  .service-grid,
  .service-grid-six,
  .capability-grid,
  .culture-grid,
  .service-mini-grid,
  .service-value-grid {
    grid-template-columns: 1fr !important;
  }

  .ecosystem-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-panel,
  .map-panel-image,
  .service-showcase-visual,
  .service-value-image,
  .scene-image {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
