/* ============================================================
   NEUREN — MICRO-IMPROVEMENTS & ANIMATIONS
   Versão: 1.1 — Compatível com o CSS existente
   ============================================================ */

/* === SMOOTH PAGE LOAD === */
@keyframes nr-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nr-slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nr-scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes nr-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* === HERO ENHANCED ANIMATIONS === */
.nr-hero-stage {
  animation: nr-fadeIn 0.6s ease-out;
}

.nr-hero-stage > * {
  animation: nr-slideUp 0.7s var(--nr-ease-out, cubic-bezier(.16,1,.3,1)) both;
}

.nr-hero-stage > *:nth-child(1) { animation-delay: 0.05s; }
.nr-hero-stage > *:nth-child(2) { animation-delay: 0.12s; }
.nr-hero-stage > *:nth-child(3) { animation-delay: 0.2s; }
.nr-hero-stage > *:nth-child(4) { animation-delay: 0.28s; }
.nr-hero-stage > *:nth-child(5) { animation-delay: 0.36s; }

/* Preview card entrance */
.nr-preview {
  animation: nr-scaleIn 0.8s var(--nr-ease-out, cubic-bezier(.16,1,.3,1)) 0.3s both;
}

/* === BUTTON MICRO-INTERACTIONS === */
.nr-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
}

.nr-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nr-btn:hover::after {
  opacity: 1;
}

.nr-btn:active {
  transform: translateY(1px) scale(0.98) !important;
}

/* Primary button glow on hover */
.nr-btn--primary {
  box-shadow: 0 6px 18px rgba(93,125,75,0.28);
}

.nr-btn--primary:hover {
  box-shadow: 0 8px 28px rgba(93,125,75,0.35), 0 0 0 1px rgba(93,125,75,0.1);
}

/* Ghost button border animation */
.nr-btn--ghost {
  transition: transform 0.2s ease, box-shadow 0.3s ease, color 0.2s ease;
}

.nr-btn--ghost:hover {
  box-shadow: inset 0 0 0 2px var(--brand), 0 4px 12px rgba(93,125,75,0.15);
}

/* === CARD ENHANCED HOVER === */
.nr-aud {
  transition: transform 0.35s cubic-bezier(.16,1,.3,1), box-shadow 0.35s ease;
}

.nr-aud:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 50px rgba(60,48,30,0.12), 0 8px 20px rgba(60,48,30,0.08);
}

/* Card shimmer on hover */
.nr-aud::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}

.nr-aud:hover::before {
  opacity: 1;
  animation: nr-shimmer 1.5s ease infinite;
}

/* === STEP NUMBERS ANIMATION === */
.nr-step-num {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nr-step:hover .nr-step-num {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(93,125,75,0.3);
}

/* === BADGE FLOAT ON HOVER === */
.nr-badge {
  transition: transform 0.3s cubic-bezier(.16,1,.3,1), box-shadow 0.3s ease;
}

.nr-badge:not(.locked):hover {
  transform: translateY(-6px) rotate(-4deg) scale(1.05);
  box-shadow: 0 12px 28px rgba(60,48,30,0.15);
}

/* === XP BAR ANIMATION === */
.nr-xpbar i,
.nr-bar i {
  position: relative;
  overflow: hidden;
}

.nr-xpbar i::after,
.nr-bar i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  background-size: 200% 100%;
  animation: nr-shimmer 2s ease-in-out infinite;
}

/* === FAQ ACCORDION SMOOTH === */
.nr-qa-body {
  animation: nr-slideUp 0.3s ease;
}

.nr-qa summary {
  transition: color 0.2s ease, padding 0.2s ease;
}

.nr-qa[open] summary {
  padding-bottom: 8px;
}

/* === PRICING CARD GLOW === */
.nr-plan--feat {
  position: relative;
}

.nr-plan--feat::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--sage-300), var(--clay-300), var(--sage-300));
  border-radius: 32px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}

.nr-plan--feat:hover::before {
  opacity: 0.5;
}

/* === CTA SECTION PARALLAX FEEL === */
.nr-cta {
  transition: transform 0.4s ease;
}

.nr-cta:hover {
  transform: translateY(-2px);
}

/* === MESH BACKGROUND SMOOTH ANIMATION === */
.nr-mesh {
  will-change: transform;
}

.nr-mesh-a {
  animation: nr-float1 22s ease-in-out infinite;
}

.nr-mesh-b {
  animation: nr-float2 26s ease-in-out infinite;
}

.nr-mesh-c {
  animation: nr-float1 30s ease-in-out infinite reverse;
}

/* === LESSON ITEM HOVER === */
.nr-lesson {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nr-lesson:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(60,48,30,0.06);
}

/* === MINI CARD HOVER === */
.nr-mini {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nr-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60,48,30,0.08);
}

/* === FOCUS STATES (ACCESSIBILITY) === */
.nr-btn:focus-visible,
.nr-aud:focus-visible,
.nr-qa:focus-within summary,
[data-go]:focus-visible,
[data-action]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Remove outline for mouse users */
.nr-btn:focus:not(:focus-visible) {
  outline: none;
}

/* === LOADING STATE FOR BUTTONS === */
.nr-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.nr-btn.loading::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: nr-spin 0.6s linear infinite;
  left: 12px;
}

@keyframes nr-spin {
  to { transform: rotate(360deg); }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .nr-mesh {
    animation: none !important;
  }
  
  .nr-fab {
    animation: none !important;
  }
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 768px) {
  .nr-hero-stage > * {
    animation-duration: 0.5s;
  }
  
  .nr-preview {
    animation-delay: 0.2s;
  }
  
  .nr-aud:hover {
    transform: translateY(-4px);
  }
}

/* === DARK MODE SUBTLE ADJUSTMENTS === */
:root[data-theme="dark"] .nr-btn--primary {
  box-shadow: 0 6px 18px rgba(151,182,126,0.25);
}

:root[data-theme="dark"] .nr-btn--primary:hover {
  box-shadow: 0 8px 28px rgba(151,182,126,0.35), 0 0 0 1px rgba(151,182,126,0.15);
}

:root[data-theme="dark"] .nr-aud:hover {
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 8px 20px rgba(0,0,0,0.15);
}

:root[data-theme="dark"] .nr-mini:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

:root[data-theme="dark"] .nr-lesson:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
