/**
 * AJUPY AI Enterprise WordPress Theme - Core Stylesheet
 * High performance dark cyberpunk & neural enterprise styling with zero external dependencies
 *
 * @package AJUPY_AI
 * @version 1.0.0
 */

:root {
  --ajupy-bg: #06091a;
  --ajupy-surface: #0b1129;
  --ajupy-card: #0c1433;
  --ajupy-card-hover: #111c47;
  --ajupy-border: #1f2e59;
  --ajupy-border-bright: #39559c;
  --ajupy-blue: #5084ff;
  --ajupy-cyan: #62dfff;
  --ajupy-emerald: #56e3aa;
  --ajupy-purple: #9d6eff;
  --ajupy-amber: #ffb86c;
  --ajupy-rose: #ff5c7c;
  --ajupy-text: #e8edff;
  --ajupy-muted: #8ea4d2;
  --ajupy-font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ajupy-font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base resets & typography */
html {
  background-color: var(--ajupy-bg);
  color: var(--ajupy-text);
  font-family: var(--ajupy-font-sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--ajupy-bg);
  color: var(--ajupy-text);
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #06091a;
}
::-webkit-scrollbar-thumb {
  background: #1e2c52;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2b3f74;
}

/* ----------------------------------------------------
   STAGGERED SCROLL-REVEAL SYSTEM (Matching Framer Motion)
---------------------------------------------------- */
.ajupy-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.ajupy-reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.ajupy-reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.ajupy-reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.ajupy-reveal.is-revealed,
.ajupy-reveal-left.is-revealed,
.ajupy-reveal-right.is-revealed,
.ajupy-reveal-scale.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger delay offsets for children */
.ajupy-stagger-grid > *:nth-child(1) { transition-delay: 50ms; }
.ajupy-stagger-grid > *:nth-child(2) { transition-delay: 120ms; }
.ajupy-stagger-grid > *:nth-child(3) { transition-delay: 190ms; }
.ajupy-stagger-grid > *:nth-child(4) { transition-delay: 260ms; }
.ajupy-stagger-grid > *:nth-child(5) { transition-delay: 330ms; }
.ajupy-stagger-grid > *:nth-child(6) { transition-delay: 400ms; }
.ajupy-stagger-grid > *:nth-child(7) { transition-delay: 470ms; }
.ajupy-stagger-grid > *:nth-child(8) { transition-delay: 540ms; }

@media (prefers-reduced-motion: reduce) {
  .ajupy-reveal,
  .ajupy-reveal-left,
  .ajupy-reveal-right,
  .ajupy-reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ----------------------------------------------------
   GLOWS, GRADIENTS & CYBERNETIC VISUALS
---------------------------------------------------- */
.glow-cyan {
  box-shadow: 0 0 25px rgba(98, 223, 255, 0.25);
}

.glow-blue {
  box-shadow: 0 0 25px rgba(80, 132, 255, 0.25);
}

.glow-emerald {
  box-shadow: 0 0 20px rgba(86, 227, 170, 0.2);
}

.border-glow-cyan {
  border-color: rgba(98, 223, 255, 0.5) !important;
  box-shadow: 0 0 15px rgba(98, 223, 255, 0.2);
}

.gradient-text-brand {
  background: linear-gradient(135deg, #ffffff 20%, #62dfff 70%, #5084ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-mesh {
  background: linear-gradient(135deg, #62dfff 0%, #5084ff 50%, #9d6eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cyber grid background */
.bg-cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(31, 46, 89, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 46, 89, 0.25) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-cyber-dots {
  background-image: radial-gradient(rgba(98, 223, 255, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* Pulsing radar dots */
@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(98, 223, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(98, 223, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(98, 223, 255, 0); }
}
.pulse-indicator {
  animation: pulse-ring 2.2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* ----------------------------------------------------
   WORDPRESS CORE ALIGNMENT & GUTENBERG INTEGRATION
---------------------------------------------------- */
.alignwide {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}
.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}
.wp-caption text {
  font-size: 0.8em;
  color: #8ea4d2;
  margin-top: 0.5em;
}

/* WordPress Comments & Pagination */
.ajupy-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.ajupy-pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 8px;
  background: #0d1636;
  border: 1px solid #243769;
  color: #8ea4d2;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--ajupy-font-mono);
  font-size: 13px;
}
.ajupy-pagination .page-numbers.current,
.ajupy-pagination .page-numbers:hover {
  background: #142858;
  border-color: #62dfff;
  color: #fff;
}

/* Entry content & rich typography */
.entry-content p {
  line-height: 1.75;
  color: #c5cee8;
  margin-bottom: 1.25rem;
}
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
  color: #ffffff;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.entry-content pre, .entry-content code {
  font-family: var(--ajupy-font-mono);
  background: #090f26;
  border: 1px solid #1c2b52;
  border-radius: 6px;
  color: #62dfff;
}
.entry-content pre {
  padding: 16px;
  overflow-x: auto;
}
.entry-content code {
  padding: 2px 6px;
  font-size: 0.9em;
}
.entry-content blockquote {
  border-left: 3px solid #5084ff;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #8ea4d2;
  font-style: italic;
}

/* ----------------------------------------------------
   MODAL & OVERLAY UTILITIES
---------------------------------------------------- */
.ajupy-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 9, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ajupy-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.ajupy-modal-panel {
  background: #0b1129;
  border: 1px solid #1f2e59;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ajupy-modal-backdrop.is-open .ajupy-modal-panel {
  transform: scale(1);
}
