/* ============================================
   DE PLATFORM - Visual Effects Styles v2
   Gradient mesh, scroll reveals, glow cards,
   shimmer text, professional animations
============================================ */

/* ==========================================
   STARFIELD CANVAS BACKGROUND
========================================== */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

[data-theme="light"] #starfield {
  opacity: 0.3;
}

@media (prefers-reduced-motion: reduce) {
  #starfield {
    display: none !important;
  }
}

/* ==========================================
   GRADIENT MESH BACKGROUND
   Subtle, professional ambient glow
========================================== */
.gradient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.gradient-mesh__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.gradient-mesh__orb--1 {
  width: 600px;
  height: 600px;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, rgba(92, 182, 249, 0.08) 0%, transparent 70%);
  animation: meshFloat1 20s ease-in-out infinite;
}

.gradient-mesh__orb--2 {
  width: 500px;
  height: 500px;
  top: 40%;
  right: -10%;
  background: radial-gradient(circle, rgba(92, 182, 249, 0.05) 0%, transparent 70%);
  animation: meshFloat2 25s ease-in-out infinite;
}

.gradient-mesh__orb--3 {
  width: 400px;
  height: 400px;
  bottom: -5%;
  left: 30%;
  background: radial-gradient(circle, rgba(92, 182, 249, 0.06) 0%, transparent 70%);
  animation: meshFloat3 22s ease-in-out infinite;
}

@keyframes meshFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, 30px); }
  66% { transform: translate(-20px, -20px); }
}

@keyframes meshFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, -40px); }
  66% { transform: translate(20px, 20px); }
}

@keyframes meshFloat3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-40px, 30px); }
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
========================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger > .revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   GLOW CARD EFFECT (mouse-following)
========================================== */
.gate-card,
.feature-card,
.pricing-card,
.track-card,
.impact-card {
  --glow-x: 50%;
  --glow-y: 50%;
  position: relative;
  overflow: hidden;
}

.gate-card::after,
.feature-card::after,
.pricing-card::after,
.track-card::after,
.impact-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    250px circle at var(--glow-x) var(--glow-y),
    rgba(92, 182, 249, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  border-radius: inherit;
}

.gate-card:hover::after,
.feature-card:hover::after,
.pricing-card:hover::after,
.track-card:hover::after,
.impact-card:hover::after {
  opacity: 1;
}

/* Card content above glow */
.gate-card > *,
.feature-card > *,
.pricing-card > *,
.track-card > *,
.impact-card > * {
  position: relative;
  z-index: 2;
}

/* ==========================================
   TEXT SHIMMER ANIMATION
========================================== */
.shimmer-text {
  background-size: 200% auto;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ==========================================
   HERO ENTRANCE ANIMATIONS
========================================== */
.hero__badge {
  animation: fadeSlideDown 0.6s ease 0.2s both;
}

.hero__title {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero__description {
  animation: fadeSlideUp 0.6s ease 0.5s both;
}

.hero__cta {
  animation: fadeSlideUp 0.6s ease 0.65s both;
}

.hero__stats {
  animation: fadeSlideUp 0.6s ease 0.8s both;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ==========================================
   CARD HOVER EFFECTS
========================================== */
.gate-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-highlight);
}

.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-highlight);
}

.feature-card:hover .feature-card__icon {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.track-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.track-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.impact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ==========================================
   PROCESS STEPS HOVER
========================================== */
.process__number {
  transition: all 0.3s ease;
}

.process__item:hover .process__number {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 20px rgba(92, 182, 249, 0.15);
  transform: scale(1.05);
}

/* ==========================================
   HERO BADGE PULSE
========================================== */
.hero__badge-dot {
  animation: dotPulse 2s ease infinite;
}

@keyframes dotPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    transform: scale(1.2);
  }
}

/* ==========================================
   NAV EFFECTS
========================================== */
.nav__link:hover {
  color: var(--accent);
}

.nav__btn--primary {
  transition: all 0.3s ease;
}

.nav__btn--primary:hover {
  box-shadow: 0 4px 16px rgba(92, 182, 249, 0.25);
}

/* ==========================================
   AUTH PAGE EFFECTS
========================================== */
.auth-card {
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

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

.auth-back {
  animation: fadeSlideUp 0.5s ease 0.3s both;
}

/* ==========================================
   BUTTON HOVER
========================================== */
.btn--primary,
.auth-submit {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn--primary:hover,
.auth-submit:hover {
  box-shadow: 0 4px 16px rgba(92, 182, 249, 0.3);
  transform: translateY(-1px);
}

/* ==========================================
   SECTION DIVIDER
========================================== */
.section {
  position: relative;
}

.section::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 182, 249, 0.2), transparent);
}

/* ==========================================
   BODY LAYERING
========================================== */
body {
  position: relative;
}

.nav,
.hero,
.section,
.cta,
.footer,
.auth-page,
.auth-theme-toggle,
.dashboard {
  position: relative;
  z-index: 1;
}

/* ==========================================
   LIGHT THEME ADJUSTMENTS
========================================== */
[data-theme="light"] .gradient-mesh__orb--1 {
  background: radial-gradient(circle, rgba(92, 182, 249, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .gradient-mesh__orb--2 {
  background: radial-gradient(circle, rgba(92, 182, 249, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .gradient-mesh__orb--3 {
  background: radial-gradient(circle, rgba(92, 182, 249, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .gate-card::after,
[data-theme="light"] .feature-card::after {
  background: radial-gradient(
    250px circle at var(--glow-x) var(--glow-y),
    rgba(92, 182, 249, 0.08) 0%,
    transparent 70%
  );
}

/* ==========================================
   REDUCED MOTION
========================================== */
@media (prefers-reduced-motion: reduce) {
  .gradient-mesh {
    display: none !important;
  }

  .scroll-reveal,
  .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .shimmer-text {
    animation: none !important;
  }

  .hero__badge,
  .hero__title,
  .hero__description,
  .hero__cta,
  .hero__stats,
  .auth-card {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================
   MOBILE
========================================== */
@media (max-width: 768px) {
  .gradient-mesh__orb {
    filter: blur(80px);
    opacity: 0.7;
  }

  .gate-card::after,
  .feature-card::after,
  .pricing-card::after {
    display: none;
  }
}
