/* HIDE empty card stages — were mistaken fillers */
.ainexo-card-stage { display: none !important; }

/* =========================================================
   AINEXO page scenes — premium CSS 3D stages (NO layout redesign)
   Injected into .page-hero / .enterprise-card as decorative layers.
   Logo palette only: #242424 #C89B3C #9F2D2D #FAF8F5 #F4EFE8
   ========================================================= */

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero.ainexo-3d-page-hero::before {
  content: "";
  position: absolute;
  inset: -10% -5% auto;
  height: 120%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 78% 35%, rgba(200, 155, 60, 0.08), transparent 42%),
    radial-gradient(circle at 18% 70%, rgba(159, 45, 45, 0.07), transparent 40%),
    radial-gradient(circle at 50% 0%, rgba(36, 36, 36, 0.35), transparent 55%);
}

.page-hero.ainexo-3d-page-hero > *:not(.ainexo-hero-stage) {
  position: relative;
  z-index: 2;
}

/* Decorative hero stage — does not change text/column layout */
.ainexo-hero-stage {
  position: absolute;
  right: max(1rem, 4vw);
  top: 50%;
  transform: translateY(-42%) perspective(900px) rotateY(-12deg) rotateX(6deg);
  width: min(280px, 32vw);
  height: 180px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.ainexo-hero-stage .ahs-screen {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(232, 226, 217, 0.18);
  background: linear-gradient(165deg, #2c2c2c 0%, #242424 55%, #1b1b1b 100%);
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(250, 248, 245, 0.08),
    0 0 0 1px rgba(200, 155, 60, 0.12);
  transform-style: preserve-3d;
}

.ainexo-hero-stage .ahs-bar {
  height: 6px;
  border-radius: 99px;
  background: #9f2d2d;
  width: 42%;
  margin-bottom: 10px;
}

.ainexo-hero-stage .ahs-bar.gold {
  background: #c89b3c;
  width: 28%;
  margin-top: -4px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.ainexo-hero-stage .ahs-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  height: calc(100% - 28px);
}

.ainexo-hero-stage .ahs-side {
  border-radius: 8px;
  background: #1b1b1b;
  border: 1px solid rgba(250, 248, 245, 0.06);
}

.ainexo-hero-stage .ahs-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  background: #f4efe8;
  border: 1px solid rgba(36, 36, 36, 0.12);
}

.ainexo-hero-stage .ahs-chart span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: #242424;
  min-height: 18%;
}

.ainexo-hero-stage .ahs-chart span:nth-child(2) {
  background: #c89b3c;
  height: 62%;
}
.ainexo-hero-stage .ahs-chart span:nth-child(3) {
  background: #242424;
  height: 44%;
}
.ainexo-hero-stage .ahs-chart span:nth-child(4) {
  background: #9f2d2d;
  height: 78%;
}

/* Scene variants */
.ainexo-hero-stage[data-scene="neural"] .ahs-chart span:nth-child(odd) {
  background: #c89b3c;
}
.ainexo-hero-stage[data-scene="shield"] .ahs-screen {
  background: radial-gradient(circle at 50% 40%, #2c2c2c, #242424 70%);
}
.ainexo-hero-stage[data-scene="shield"] .ahs-chart {
  background: transparent;
  border: 2px solid #c89b3c;
  border-radius: 50% 50% 40% 40%;
  align-items: center;
  justify-content: center;
}
.ainexo-hero-stage[data-scene="shield"] .ahs-chart span {
  display: none;
}
.ainexo-hero-stage[data-scene="shield"] .ahs-chart::after {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #9f2d2d;
  box-shadow: 0 0 0 6px rgba(200, 155, 60, 0.2);
}
.ainexo-hero-stage[data-scene="cloud"] .ahs-side {
  border-radius: 40px;
}
.ainexo-hero-stage[data-scene="phone"] .ahs-screen {
  width: 46%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  height: 100%;
}
.ainexo-hero-stage[data-scene="laptop"] .ahs-screen {
  border-radius: 10px 10px 4px 4px;
}
.ainexo-hero-stage[data-scene="laptop"]::after {
  content: "";
  display: block;
  width: 118%;
  margin-left: -9%;
  height: 8px;
  margin-top: 4px;
  border-radius: 0 0 8px 8px;
  background: #1b1b1b;
  border: 1px solid rgba(200, 155, 60, 0.2);
}

/* Card mock stages — fill empty visual space without layout change */
.ainexo-card-stage {
  height: 88px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(232, 226, 217, 0.14);
  background: linear-gradient(160deg, #2c2c2c, #242424);
  position: relative;
  overflow: hidden;
}
.ainexo-card-stage::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36%;
  height: 6px;
  border-radius: 99px;
  background: #9f2d2d;
}
.ainexo-card-stage::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 48%;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #1b1b1b 22%, transparent 22% 26%, #f4efe8 26%),
    linear-gradient(
      90deg,
      transparent 30%,
      #242424 30% 38%,
      #c89b3c 40% 48%,
      #242424 50% 58%,
      #9f2d2d 60% 72%,
      #242424 74% 82%
    );
  background-size: 100% 100%, 100% 70%;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  opacity: 0.95;
}

/* Inner markup fallback (works even if ::pseudo paints fail) */
.ainexo-card-stage:has(.acs-bar)::before,
.ainexo-card-stage:has(.acs-bar)::after {
  display: none;
}
.ainexo-card-stage .acs-bar {
  display: block;
  width: 36%;
  height: 6px;
  margin: 10px 0 0 10px;
  border-radius: 99px;
  background: #9f2d2d;
}
.ainexo-card-stage .acs-bar.gold {
  width: 22%;
  margin-top: 6px;
  background: #c89b3c;
  opacity: 0.85;
}
.ainexo-card-stage .acs-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 48%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: #f4efe8;
}
.ainexo-card-stage .acs-panel span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: #242424;
  min-height: 28%;
}
.ainexo-card-stage .acs-panel span:nth-child(2) {
  background: #c89b3c;
  height: 62%;
}
.ainexo-card-stage .acs-panel span:nth-child(3) {
  height: 44%;
}
.ainexo-card-stage .acs-panel span:nth-child(4) {
  background: #9f2d2d;
  height: 78%;
}

[data-theme="light"] .ainexo-card-stage {
  background: linear-gradient(160deg, #faf8f5, #f4efe8);
  border-color: #e8e2d9;
}
[data-theme="light"] .ainexo-hero-stage .ahs-screen {
  background: linear-gradient(165deg, #faf8f5, #f4efe8);
  border-color: #e8e2d9;
}
[data-theme="light"] .ainexo-hero-stage .ahs-side {
  background: #ffffff;
  border-color: #e8e2d9;
}

@media (max-width: 900px) {
  .ainexo-hero-stage {
    width: min(200px, 40vw);
    height: 130px;
    opacity: 0.55;
    right: 0.5rem;
    transform: translateY(-38%) perspective(700px) rotateY(-8deg);
  }
}

@media (max-width: 640px) {
  .ainexo-hero-stage {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(260px, 88%);
    height: 140px;
    margin: 0 auto 1.25rem;
    opacity: 0.9;
    order: -1;
  }
  .page-hero.ainexo-3d-page-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ainexo-hero-stage {
    transform: none;
    filter: none;
  }
}

/* Location SEO map — replace blank placeholder look with premium panel */
.seo-map {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  border-radius: 18px;
  border: 1px solid rgba(200, 155, 60, 0.22);
  background:
    radial-gradient(circle at 30% 40%, rgba(200, 155, 60, 0.12), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(159, 45, 45, 0.1), transparent 40%),
    linear-gradient(160deg, #2c2c2c, #242424);
  color: #faf8f5;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .seo-map {
  background:
    radial-gradient(circle at 30% 40%, rgba(200, 155, 60, 0.1), transparent 45%),
    linear-gradient(160deg, #faf8f5, #f4efe8);
  color: #1f1f1f;
  border-color: #e8e2d9;
}

/* Unique card stage tints by page scene (logo palette only) */
body[data-ainexo-scene="neural"] .ainexo-card-stage::before,
body[data-ainexo-scene="chip"] .ainexo-card-stage::before {
  background: #c89b3c;
}
body[data-ainexo-scene="shield"] .ainexo-card-stage::before {
  background: #9f2d2d;
}
body[data-ainexo-scene="cloud"] .ainexo-card-stage::before,
body[data-ainexo-scene="phone"] .ainexo-card-stage::before {
  width: 55%;
}
