/* Custom Font Configuration */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Removed invalid CSS selector for Tailwind-style class name;
   JetBrains Mono is already applied via inline utility classes in HTML. */

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

/* Neural Grid Background Animation */
.neural-grid {
  background-image: linear-gradient(
      rgba(37, 99, 235, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  opacity: 0.5;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Learning Core Glow Effect */
.learning-core {
  background: radial-gradient(
    circle at center,
    rgba(37, 99, 235, 0.15) 0%,
    rgba(37, 99, 235, 0.05) 30%,
    transparent 70%
  );
  animation: corePulse 4s ease-in-out infinite;
}

@keyframes corePulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* ==================================
   Hero Section Atmospheric Layers
   ================================== */
/* Soft aurora ribbons using conic/radial blend */
.hero-aurora {
  position: absolute;
  inset: -20% -10%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
      60% 40% at 40% 35%,
      rgba(37, 99, 235, 0.14) 0%,
      rgba(37, 99, 235, 0) 55%
    ),
    conic-gradient(
      from 200deg at 55% 50%,
      rgba(0, 234, 255, 0.06),
      rgba(37, 99, 235, 0.08),
      rgba(0, 234, 255, 0.06),
      rgba(2, 6, 23, 0)
    );
  filter: blur(32px) saturate(105%);
  animation: heroAuroraDrift 28s ease-in-out infinite alternate;
}
@keyframes heroAuroraDrift {
  0% {
    transform: translate3d(0px, -6px, 0) rotate(0.2deg);
    opacity: 0.75;
  }
  50% {
    transform: translate3d(6px, 4px, 0) rotate(-0.2deg);
    opacity: 0.9;
  }
  100% {
    transform: translate3d(-4px, 2px, 0) rotate(0.1deg);
    opacity: 0.8;
  }
}

/* Halo rings—extremely faint concentric outlines */
.hero-rings {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
        closest-side,
        rgba(37, 99, 235, 0.06),
        rgba(37, 99, 235, 0) 60%
      )
      50% 52% / 38% 38% no-repeat,
    radial-gradient(
        closest-side,
        rgba(0, 234, 255, 0.05),
        rgba(0, 234, 255, 0) 60%
      )
      50% 50% / 54% 54% no-repeat;
  mix-blend-mode: screen;
  animation: heroRingPulse 18s ease-in-out infinite;
}
@keyframes heroRingPulse {
  0%,
  85% {
    opacity: 0.18;
    transform: scale(1);
  }
  92% {
    opacity: 0.24;
    transform: scale(1.01);
  }
  100% {
    opacity: 0.18;
    transform: scale(1);
  }
}

/* Sparse floating particles (very low density) */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(
      2px 2px at 20% 30%,
      rgba(148, 163, 184, 0.1) 50%,
      rgba(148, 163, 184, 0) 51%
    ),
    radial-gradient(
      1.5px 1.5px at 75% 55%,
      rgba(148, 163, 184, 0.09) 50%,
      rgba(148, 163, 184, 0) 51%
    ),
    radial-gradient(
      1.5px 1.5px at 40% 70%,
      rgba(148, 163, 184, 0.08) 50%,
      rgba(148, 163, 184, 0) 51%
    );
  background-repeat: no-repeat;
  animation: heroParticlesDrift 40s linear infinite;
}
@keyframes heroParticlesDrift {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Reduced motion—freeze hero effects */
@media (prefers-reduced-motion: reduce) {
  .hero-aurora,
  .hero-rings,
  .hero-particles {
    animation: none !important;
  }
}

/* Button Styles */
.btn-primary {
  background: #2563eb;
  color: white;
  border: 1px solid #2563eb;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

/* Feature Cards */
.feature-card {
  background: rgba(17, 18, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2563eb, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Module Cards */
.module-card {
  background: rgba(17, 18, 22, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.module-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2);
  transform: translateY(-4px);
}

.module-card:hover::after {
  opacity: 1;
}

.module-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: #2563eb;
  opacity: 0.6;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.module-card:hover .module-number {
  opacity: 1;
  transform: translateX(4px);
}

/* Step Numbers */
.step-number {
  width: 80px;
  height: 80px;
  border: 2px solid rgba(37, 99, 235, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: #2563eb;
  margin: 0 auto;
  font-family: "JetBrains Mono", monospace;
  transition: all 0.3s ease;
  position: relative;
}

.step-number::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-number:hover {
  border-color: #2563eb;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  transform: scale(1.1);
}

.step-number:hover::before {
  opacity: 1;
}

/* Badge Items */
.badge-item {
  background: rgba(17, 18, 22, 0.6);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.badge-item:hover {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

/* Pricing Cards */
.pricing-card {
  background: rgba(17, 18, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.pricing-card-pro {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(17, 18, 22, 0.8);
  position: relative;
}

.pricing-card-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.3),
    rgba(37, 99, 235, 0.1)
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

.pricing-card-pro:hover {
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.3);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.pricing-header {
  text-align: center;
}

/* Fade-in Animations */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
  animation-delay: 0.2s;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* Parallax Effect */
@media (prefers-reduced-motion: no-preference) {
  .parallax {
    transition: transform 0.3s ease-out;
  }
}

/* Enhanced Card Hover Effects */
.feature-card,
.module-card,
.pricing-card {
  will-change: transform;
}

/* Staggered Animation for Module Cards */
.module-card:nth-child(1) {
  transition-delay: 0ms;
}
.module-card:nth-child(2) {
  transition-delay: 50ms;
}
.module-card:nth-child(3) {
  transition-delay: 100ms;
}
.module-card:nth-child(4) {
  transition-delay: 150ms;
}
.module-card:nth-child(5) {
  transition-delay: 200ms;
}
.module-card:nth-child(6) {
  transition-delay: 250ms;
}

/* Enhanced Button Glow */
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Improved Feature Icon Animation */
.feature-icon svg {
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
  transition: filter 0.3s ease;
}

.feature-card:hover .feature-icon svg {
  filter: drop-shadow(0 0 16px rgba(37, 99, 235, 0.6));
}

/* Module Card Number Animation */
.module-number {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pricing Card Pro Glow Enhancement */
.pricing-card-pro:hover::before {
  opacity: 0.8;
  animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .neural-grid {
    background-size: 30px 30px;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .pricing-card {
    padding: 1.5rem;
  }

  .feature-card,
  .module-card {
    padding: 1.5rem;
  }

  .learning-core {
    opacity: 0.4;
  }
}

@media (max-width: 640px) {
  .feature-icon svg,
  .module-card .feature-icon svg {
    width: 48px;
    height: 48px;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .neural-grid {
    animation: none;
  }

  .learning-core {
    animation: none;
  }
}

/* Selection Color */
::selection {
  background: rgba(37, 99, 235, 0.3);
  color: white;
}

/* Scrollbar Styling (Webkit) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0c;
}

::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.7);
}

/* ============================
   Atmospheric Texture Layers
   ============================ */
/* Stack container (fixed, behind all content) */
.texture-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.texture-stack > div {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-position: center;
  will-change: transform, opacity;
}

/* a) Base noise/grain (super subtle) */
.texture-noise {
  background-image: url("assets/textures/noise.svg");
  opacity: 0.035; /* ~3.5% */
  mix-blend-mode: normal;
}

/* b) Soft gradient anchors (glow pads) */
.texture-glow {
  background: radial-gradient(
      60% 40% at 50% 38%,
      rgba(37, 99, 235, 0.08) 0%,
      rgba(37, 99, 235, 0) 60%
    ),
    radial-gradient(
      40% 28% at 18% 80%,
      rgba(0, 234, 255, 0.05) 0%,
      rgba(0, 234, 255, 0) 55%
    ),
    radial-gradient(
      50% 30% at 82% 75%,
      rgba(2, 6, 23, 0.28) 0%,
      rgba(2, 6, 23, 0) 60%
    );
  animation: floatGlow 24s ease-in-out infinite alternate;
}

/* c1) Mesh grid overlay */
.texture-mesh {
  background-image: url("assets/textures/mesh-grid.svg");
  opacity: 0.04;
  mix-blend-mode: soft-light;
  animation: meshDrift 60s linear infinite;
}

/* c2) Micro-circuit overlay (very faint pulse) */
.texture-circuit {
  background-image: url("assets/textures/circuit.svg");
  opacity: 0.06;
  mix-blend-mode: overlay;
  animation: circuitPulse 18s ease-in-out infinite;
}

/* d) Low-opacity fog */
.texture-fog {
  background: radial-gradient(
      90% 70% at 50% 50%,
      rgba(2, 6, 23, 0.35) 0%,
      rgba(2, 6, 23, 0) 60%
    ),
    radial-gradient(
      70% 50% at 60% 40%,
      rgba(15, 23, 42, 0.2) 0%,
      rgba(15, 23, 42, 0) 65%
    );
  opacity: 0.5;
  animation: fogMove 80s linear infinite;
}

@keyframes floatGlow {
  from {
    transform: translateY(-2px) translateX(0);
  }
  to {
    transform: translateY(2px) translateX(2px);
  }
}
@keyframes meshDrift {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0px);
  }
}
@keyframes circuitPulse {
  0%,
  88% {
    opacity: 0.03;
    filter: brightness(1);
  }
  92% {
    opacity: 0.07;
    filter: brightness(1.04);
  }
  96% {
    opacity: 0.06;
    filter: brightness(1.02);
  }
  100% {
    opacity: 0.03;
    filter: brightness(1);
  }
}
@keyframes fogMove {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(4px) translateY(-3px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .texture-stack > div {
    animation: none !important;
  }
}

/* ============================
   Subtle Interactive Effects
   ============================ */
/* Brand mark hover */
.brand-mark {
  transition: box-shadow 0.4s ease, filter 0.4s ease, transform 0.2s ease;
}
.brand-mark:hover {
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5), 0 0 24px rgba(37, 99, 235, 0.25);
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.25));
}

/* Button glow rings (tasteful) */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after,
.btn-secondary::after {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 9999px;
  background: radial-gradient(
    closest-side,
    rgba(37, 99, 235, 0.18),
    rgba(37, 99, 235, 0)
  );
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.btn-primary:hover::after,
.btn-secondary:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Section header subtle hover */
.fx-header {
  transition: text-shadow 0.3s ease, color 0.3s ease;
}
.fx-header:hover {
  text-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}

/* Header visual separation */
header.sticky {
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6);
}
