/* Ainexo — speed & smooth scroll (no redesign) */

/* Subpages — keep sections visible (no scroll blank gaps) */
.ainexo-company-page .section,
.ainexo-company-page .card,
.ainexo-company-page .enterprise-card,
#company-websites .project-card {
  content-visibility: visible !important;
  contain-intrinsic-size: auto;
}

/* Room for WhatsApp + AI floating buttons */
body {
  padding-bottom: 120px;
}
.ainexo-company-page .section:last-of-type {
  padding-bottom: 48px;
}

body > .loader-ring,
body > .loader-text {
  display: none !important;
}

/* AOS CSS hides [data-aos] until JS runs — keep content visible on subpages */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

#site-header {
  min-height: var(--nav-h);
  contain: layout;
}
#site-header:empty {
  background: rgba(31, 31, 31, 0.6);
  border-bottom: 1px solid var(--border);
}

.hero-typed-wrap {
  min-height: 2.4em;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 72px;
  }
  .float-icon {
    display: none !important;
  }
  #hero-canvas {
    display: none !important;
  }
  .hero {
    background: radial-gradient(ellipse at 72% 48%, rgba(200, 155, 60, 0.12), transparent 58%),
      radial-gradient(ellipse at 28% 62%, rgba(159, 45, 45, 0.1), transparent 55%),
      var(--bg);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--primary);
  color: #1f1f1f;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

.icon-btn,
.nav-trigger,
.nav-toggle {
  min-width: 48px;
  min-height: 48px;
}
.icon-btn {
  width: 48px;
  height: 48px;
}
.nav-item > .nav-trigger {
  padding: 10px 14px;
}

.text-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover {
  color: #fff;
}

#site-footer {
  min-height: 320px;
}
@media (max-width: 768px) {
  #site-footer {
    min-height: 480px;
  }
}

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

/* Phase 16 — focus visibility only (no visual redesign) */
:focus-visible {
  outline: 2px solid var(--primary, #c89b3c);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  .section,
  .card,
  .project-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
  }

  .hero,
  #site-header,
  #site-footer {
    content-visibility: visible;
  }
}

img,
video {
  max-width: 100%;
  height: auto;
}

img[loading="lazy"] {
  content-visibility: auto;
}

.owner-img {
  decoding: async;
}

#preloader.done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.section-sub,
.hero-desc {
  color: rgba(255, 255, 255, 0.82);
}
[data-theme="light"] .section-sub,
[data-theme="light"] .hero-desc {
  color: rgba(36, 36, 36, 0.78);
}

#hero-canvas {
  contain: strict;
  will-change: transform;
  background: radial-gradient(ellipse at 72% 48%, rgba(200, 155, 60, 0.1), transparent 58%),
    radial-gradient(ellipse at 28% 62%, rgba(159, 45, 45, 0.08), transparent 55%);
}

@media (max-width: 768px) {
  #cursor-dot,
  #cursor-ring {
    display: none !important;
  }

  .grid-overlay {
    display: none;
  }
}

/* Light mode polish — internal link bars */
[data-theme="light"] .ainexo-internal-links {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(36, 36, 36, 0.12) !important;
  color: #525252 !important;
}
[data-theme="light"] .ainexo-internal-links a {
  color: #242424 !important;
}
[data-theme="light"] .ainexo-internal-links strong {
  color: #242424 !important;
}