/* FreeSCIM stability layer
   Last-loaded defensive rules for navigation, content visibility, hero sizing,
   and media containment. Keep this intentionally boring and predictable. */

/* Core content must never disappear because a reveal script did not run. */
.fade-up,
.fade-up.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Navigation is a product control, not an optional enhancement. */
.site-header nav,
.site-header nav.scrolled {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 62px;
  background: #050b14 !important;
  border-bottom: 1px solid rgba(126,171,207,.18) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-shell {
  width: min(1360px, calc(100% - 2rem));
  min-height: 62px !important;
  gap: .9rem;
  overflow: visible;
}

.nav-links {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: .15rem;
  margin-left: auto;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: .48rem .5rem !important;
  font-size: .78rem !important;
}

/* Search is deliberately removed from the primary nav. It was crowding the
   static navigation and is not required for primary-site operation. */
.site-search,
.search-results {
  display: none !important;
}

/* Homepage: compact enterprise header rather than a viewport-sized billboard. */
.visual-enterprise .home-hero {
  min-height: 0 !important;
  padding: clamp(2rem, 3.4vw, 3.25rem) 0 clamp(2.1rem, 3.4vw, 3.35rem) !important;
  overflow: hidden !important;
}

.visual-enterprise .hero-grid {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
  gap: clamp(1.5rem, 3vw, 3rem) !important;
  align-items: center !important;
  min-width: 0;
  overflow: hidden;
}

.visual-enterprise .hero-copy {
  min-width: 0;
  max-width: 660px !important;
}

.visual-enterprise .hero-brand-lockup {
  margin-bottom: .8rem !important;
}

.visual-enterprise .hero-brand-lockup img {
  width: 42px !important;
  height: 42px !important;
}

.visual-enterprise .hero-brand-lockup strong {
  font-size: 1.18rem !important;
}

.visual-enterprise .hero-brand-lockup span {
  font-size: .6rem !important;
}

.visual-enterprise .home-hero h1 {
  max-width: 20ch !important;
  font-size: clamp(2.35rem, 3.25vw, 3.65rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
  text-wrap: pretty;
}

.visual-enterprise .hero-subline {
  font-size: clamp(1rem, 1.35vw, 1.3rem) !important;
  margin-top: .65rem !important;
}

.visual-enterprise .hero-summary {
  margin-top: .8rem !important;
  max-width: 58ch !important;
  font-size: clamp(.96rem, 1vw, 1.06rem) !important;
  line-height: 1.58 !important;
}

.visual-enterprise .hero-proof-row {
  margin-top: .9rem !important;
}

.visual-enterprise .hero-actions {
  margin-top: 1rem !important;
}

/* Absolutely no hero artwork may escape its allocated column. */
.visual-enterprise .hero-art-shell {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 0;
  overflow: hidden !important;
  overflow: clip !important;
  contain: paint;
  isolation: isolate;
  border-radius: 18px;
  justify-self: stretch;
}

.visual-enterprise .hero-art {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 520px;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center;
  border-radius: 18px !important;
  transform: none !important;
  filter: none !important;
}

.visual-enterprise .hero-art-caption {
  left: 4% !important;
  right: auto !important;
  bottom: 4% !important;
  max-width: 86%;
}

/* Keep the rest of the homepage dense and immediately visible. */
.home-content {
  gap: 0 !important;
}

.visual-section {
  padding-top: clamp(2rem, 3vw, 3.3rem) !important;
  padding-bottom: clamp(2rem, 3vw, 3.3rem) !important;
}

.surface-media,
.visual-frame,
.map-canvas,
.ops-command-panel,
.security-console,
.integration-cloud,
.atlas-board,
.page-hero-visual,
figure {
  min-width: 0;
  max-width: 100%;
  overflow: hidden !important;
  overflow: clip !important;
  contain: paint;
  isolation: isolate;
}

.surface-media img,
.visual-frame img,
.map-canvas img,
.ops-command-panel img,
.security-console img,
.page-hero-visual img,
figure > img,
figure > svg {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  transform: none !important;
}

@media (max-width: 1120px) {
  .nav-links a {
    padding-inline: .34rem !important;
    font-size: .73rem !important;
  }

  .visual-enterprise .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) !important;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: .45rem;
  }

  .nav-links {
    display: none !important;
    position: absolute;
    top: calc(100% + 1px);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .55rem;
    background: #07111e;
    border: 1px solid rgba(126,171,207,.2);
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-links a {
    width: 100%;
    padding: .7rem .8rem !important;
    font-size: .86rem !important;
  }

  .visual-enterprise .hero-grid {
    grid-template-columns: 1fr !important;
  }

  .visual-enterprise .hero-copy {
    max-width: 760px !important;
  }

  .visual-enterprise .home-hero h1 {
    max-width: 22ch !important;
    font-size: clamp(2.15rem, 7vw, 3rem) !important;
  }

  .visual-enterprise .hero-art {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    width: min(100% - 1rem, 1360px);
  }

  .visual-enterprise .home-hero {
    padding: 1.5rem 0 1.9rem !important;
  }

  .visual-enterprise .home-hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.5rem) !important;
    max-width: none !important;
  }

  .visual-enterprise .hero-art-caption {
    display: none !important;
  }
}
