/* Premium motion/responsive layer for Apex IT Solutions. */
:root {
  --apex-blue: #1478be;
  --apex-cyan: #6ee7f9;
  --apex-ink: #05070b;
  --apex-panel: rgba(7, 13, 22, 0.68);
  --apex-line: rgba(255, 255, 255, 0.16);
}

html,
body {
  overflow-x: clip;
}

.mil-banner {
  isolation: isolate;
  min-height: 100svh;
  background:
    radial-gradient(circle at 78% 22%, rgba(20, 120, 190, 0.22), transparent 32%),
    radial-gradient(circle at 18% 72%, rgba(110, 231, 249, 0.12), transparent 34%),
    #000;
}

.mil-banner.mil-dark-bg::before {
  display: none;
}

/* The hero canvas (.apex-hero-canvas) is owned by apex-motion.css/js
   (swup-aware, desktop-gated, with its own z-index:2 stacking). Codex's
   duplicate canvas rules were removed here to avoid a stacking/opacity fight. */

.mil-banner .mi-invert-fix,
.mil-banner .container,
.mil-banner .mil-banner-content {
  position: relative;
  z-index: 3;
}

.mil-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.76) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
}

.mil-banner .mil-banner-content h1 {
  max-width: min(980px, calc(100vw - 48px));
  text-wrap: balance;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.mil-banner .mil-banner-content p {
  max-width: min(560px, calc(100vw - 48px));
}

.apex-command-strip {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
  margin: 24px 0 34px;
}

.apex-command-chip {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--apex-line);
  background: var(--apex-panel);
  backdrop-filter: blur(14px);
  color: #fff;
}

.apex-command-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(120deg, transparent, rgba(110, 231, 249, 0.16), transparent);
  transform: translateX(-100%);
  animation: apex-chip-scan 5s ease-in-out infinite;
}

.apex-command-chip b,
.apex-command-chip span {
  position: relative;
  display: block;
}

.apex-command-chip b {
  color: var(--apex-cyan);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.apex-command-chip span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.35;
}

/* .apex-shimmer is owned by apex-motion.css, which guards background-clip:text
   behind @supports and falls back to solid white (so the headline text never
   goes invisible). Codex's unguarded duplicate (color:transparent) removed. */

.mil-button,
.mil-link,
.mil-menu-btn,
.apex-wa-btn {
  touch-action: manipulation;
}

[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

[data-motion="reveal"] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-motion="reveal"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes apex-text-shimmer {
  to { background-position: 220% center; }
}

@keyframes apex-chip-scan {
  0%, 35% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
  .mil-banner {
    min-height: 760px;
  }

  .mil-banner .container {
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
    align-items: flex-start !important;
  }

  .mil-banner .mil-banner-content {
    width: min(100%, 310px);
    max-width: 310px;
    padding-top: 126px !important;
    padding-bottom: 54px !important;
  }

  .mil-banner .mil-banner-content h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 8.6vw, 2.65rem);
    line-height: 1.12;
    margin-bottom: 34px;
  }

  .mil-banner .mil-banner-content p {
    width: min(100%, 300px);
    max-width: 300px;
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 34px;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .apex-command-strip {
    grid-template-columns: 1fr;
    width: min(100%, 300px);
    max-width: 300px;
    margin: 4px 0 28px;
  }

  .mil-banner .mil-button,
  .mil-banner .mil-link {
    width: min(100%, 260px);
    margin-right: 0;
    margin-bottom: 18px;
  }

  .mil-banner .mil-circle-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apex-hero-canvas,
  .interactive-scene,
  .apex-command-chip::before {
    display: none !important;
  }

  .apex-shimmer,
  .apex-command-chip::before {
    animation: none !important;
  }

  [data-motion="reveal"] {
    opacity: 1;
    transform: none;
  }
}
