/* AtlasForgeX — WOW Enhancement Layer
 * Loaded by every anchor page on top of inline CSS.
 * Adds polish: scroll reveals, glow effects, micro-interactions, smooth transitions.
 * Preserves cyberpunk aesthetic (Orbitron + Share Tech Mono + neon green/cyan).
 */

/* ── Smooth scroll baseline ────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Selection color ──────────────────────────────────────── */
::selection { background: rgba(0, 255, 136, 0.25); color: #fff; }
::-moz-selection { background: rgba(0, 255, 136, 0.25); color: #fff; }

/* ── Custom scrollbar (Webkit) ────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07080f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00ff88 0%, #00d4ff 100%);
  border-radius: 2px;
  opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover { background: #00ff88; }

/* ── Focus visible (accessibility + polish) ───────────────── */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Hero headline glow ───────────────────────────────────── */
h1 {
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.05),
    0 0 30px rgba(0, 212, 255, 0.07);
  letter-spacing: -0.01em;
}
h1 .c, h1 span[style*="cyan"], h1 .cyan {
  text-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
}

/* ── Badge with subtle pulse ──────────────────────────────── */
.badge {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 255, 136, 0.04));
  backdrop-filter: blur(4px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.badge:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15); }

/* ── Buttons: lift + glow on hover ────────────────────────── */
.btn-primary, .btn-p, .btn, button.btn-primary, a.btn-primary {
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, box-shadow;
}
.btn-primary:hover, .btn-p:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 255, 136, 0.25),
    0 0 30px rgba(0, 255, 136, 0.15);
}
.btn-primary:active, .btn-p:active, .btn:active { transform: translateY(0); }

.btn-secondary, .btn-s {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-secondary:hover, .btn-s:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.12);
}

/* ── Cards: gradient borders + lift on hover ─────────────── */
.card, .rc, .feature-card, .pipe-block, .proof-item {
  position: relative;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, border-color, box-shadow;
}
.card:hover, .rc:hover, .feature-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 212, 255, 0.15);
}

/* ── Card icon with subtle bounce on hover ──────────────── */
.card .ci, .feature-card .ci {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.card:hover .ci, .feature-card:hover .ci {
  transform: scale(1.15) rotate(-5deg);
}

/* ── Stat numbers — gradient + slight glow ───────────────── */
.snv, .stat-num, .proof-number {
  background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.15));
}

/* ── FAQ items: smoother expand + hover ──────────────────── */
.fi, .faq-item {
  transition: border-color 0.3s, transform 0.2s;
}
.fi:hover, .faq-item:hover {
  border-color: rgba(0, 212, 255, 0.25);
}
.fq, .faq-q {
  transition: color 0.2s, background 0.2s;
}
.fq:hover, .faq-q:hover {
  background: rgba(0, 212, 255, 0.03);
}

/* ── Markets/regions links — gradient hover ─────────────── */
.gl a, .markets-grid a {
  position: relative;
  overflow: hidden;
  transition: all 0.25s !important;
}
.gl a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(0, 212, 255, 0.08));
  opacity: 0;
  transition: opacity 0.25s;
  z-index: -1;
}
.gl a:hover {
  border-color: #00d4ff !important;
  color: #00ff88 !important;
  transform: translateY(-1px);
}
.gl a:hover::before { opacity: 1; }

/* ── Nav link underline animation ────────────────────────── */
.nav-links a {
  position: relative;
}
.nav-links a:not([style*="green"])::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: #00d4ff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── Scroll reveal — elements fade-up into view ────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  /* Auto-reveal common section children on scroll (via JS hook) */
  section h2, section .fg, section .rg, section .pipe-block, section .fl, .ctas, .sr {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  }
  section h2 { animation-delay: 0.05s; }
  section .fg { animation-delay: 0.15s; }
  section .rg { animation-delay: 0.15s; }
  section .pipe-block { animation-delay: 0.1s; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero entrance ─────────────────────────────────────── */
.hero h1, .hero .badge, .hero .hero-sub, .hero .cg, .hero .sr {
  animation: heroIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.hero .badge { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero .hero-sub { animation-delay: 0.3s; }
.hero .cg { animation-delay: 0.45s; }
.hero .sr { animation-delay: 0.6s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Subtle ambient glow on hero background ────────────── */
.hero {
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

/* ── Footer links polish ──────────────────────────────── */
footer a {
  transition: color 0.2s, text-shadow 0.2s !important;
}
footer a:hover {
  color: #00d4ff !important;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

/* ── Bullet/section dividers ────────────────────────── */
section + section {
  position: relative;
}

/* ── Image lazy-loading polish ──────────────────────── */
img {
  background: rgba(255, 255, 255, 0.02);
}
img[loading="lazy"] {
  transition: opacity 0.4s;
}

/* ── Pipe-block left-border accent (subtle gradient) ── */
.pipe-block {
  position: relative;
  border-left: 3px solid transparent !important;
  background-image: linear-gradient(var(--panel, #0d0f1a), var(--panel, #0d0f1a)),
                    linear-gradient(180deg, #00ff88, #00d4ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.pipe-block:hover {
  transform: translateX(2px);
}

/* ── CTA section: subtle radial pulse on background ────── */
.ctas, .cta-section {
  position: relative;
  overflow: hidden;
}
.ctas::before, .cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 255, 136, 0.06) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.ctas > *, .cta-section > * { position: relative; z-index: 1; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Reduce motion preference (accessibility) ──────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Mobile polish ────────────────────────────────── */
@media (max-width: 768px) {
  .card:hover, .rc:hover {
    transform: none;  /* No hover lift on touch */
  }
  .btn-primary:hover, .btn-p:hover {
    transform: none;
  }
}

/* ── Related pages section (cross-page linking) ─────────────── */
.related-pages {
  font-family: 'Share Tech Mono', monospace;
}
.related-pages .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.related-pages .related-card {
  display: block;
  background: rgba(13, 15, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.related-pages .related-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}
.related-pages .related-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.08);
}
.related-pages .related-card:hover::before {
  transform: translateX(100%);
}
.related-pages .related-tag {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: #0f8;
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 2px 8px;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.related-pages .related-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #eaeaea;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.related-pages .related-card:hover h3 {
  color: #00d4ff;
}
.related-pages .related-card p {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: #9aa;
  margin: 0;
  line-height: 1.5;
}
