/**
 * NADIR Apex — tier-specific visual layer
 * Forensic premium · violet accent · depth-oriented motion
 */

[data-tier="apex"] .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 50% at 70% 10%, rgba(167, 139, 250, 0.16), transparent),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(249, 115, 22, 0.06), transparent);
}

[data-tier="apex"] .btn-tier {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #0f0a1a;
  box-shadow: 0 4px 32px var(--apex-glow);
}

[data-tier="apex"] .hero-card--tier {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: var(--shadow-tier), 0 0 80px rgba(167, 139, 250, 0.2);
}

[data-tier="apex"] .metric-ring .ring-progress {
  stroke: var(--apex);
}

[data-tier="apex"] .bento-cell--accent {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.16), var(--charcoal-800));
}

[data-tier="apex"] .cta-band {
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(56, 189, 248, 0.05));
}

[data-tier="apex"] table.compare td:nth-child(4) {
  background: rgba(167, 139, 250, 0.08);
  font-weight: 600;
}

/* Ellipsoid wireframe decoration */
.apex-ellipsoid-deco {
  position: absolute;
  right: 8%;
  top: 100px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 50%;
  transform: rotateX(60deg) rotateZ(20deg);
  pointer-events: none;
  opacity: 0.35;
  animation: apex-ellipsoid-spin 20s linear infinite;
}

.apex-ellipsoid-deco::before,
.apex-ellipsoid-deco::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 50%;
}

.apex-ellipsoid-deco::after {
  inset: 30%;
  transform: rotate(45deg);
}

@keyframes apex-ellipsoid-spin {
  from { transform: rotateX(60deg) rotateZ(0deg); }
  to { transform: rotateX(60deg) rotateZ(360deg); }
}

[data-tier="apex"] .latency-bar-fill {
  background: linear-gradient(90deg, #6d28d9, #a78bfa, #c4b5fd);
}

[data-tier="apex"] .endpoint-method.ws {
  background: rgba(167, 139, 250, 0.22);
  color: #c4b5fd;
}

[data-tier="apex"] .math-tag {
  border-color: rgba(167, 139, 250, 0.35);
  color: #ddd6fe;
}

[data-tier="apex"] .roi-result strong {
  font-size: 32px;
}

/* Forensic story cards */
.apex-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.apex-story-card {
  border-color: rgba(167, 139, 250, 0.22);
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.08), rgba(10, 11, 13, 0.6));
}

.apex-story-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--apex);
  margin-bottom: 8px;
}

.apex-story-card h3 {
  color: var(--text);
}

/* Live benchmark iframe */
.apex-benchmark-embed {
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 14px;
  overflow: hidden;
  background: #0a0b0d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.apex-benchmark-iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  height: 72vh;
  max-height: 720px;
  border: 0;
}

@media (max-width: 768px) {
  .apex-benchmark-iframe {
    min-height: 440px;
    height: 60vh;
  }
}

@media print {
  [data-tier="apex"] .site-header,
  [data-tier="apex"] .apex-ellipsoid-deco,
  [data-tier="apex"] .bg-tier-orb { display: none !important; }
}
