/* REI Data Solutions — Dark Theme */

/* ============================================
   BASE
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  background: #0a0f1a;
  color: #e2e8f0;
}

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

/* ============================================
   HERO — ANIMATED DARK
   ============================================ */

.hero-gradient {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0f1a 0%, #0f172a 50%, #0a0f1a 100%);
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
  animation: hero-shift 20s ease-in-out infinite;
}

@keyframes hero-shift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -1%) scale(1.02); }
  66% { transform: translate(-1%, 2%) scale(0.98); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.1) 1px, transparent 0);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: orb-float 15s ease-in-out infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.15);
  top: -150px;
  right: 5%;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(99, 102, 241, 0.12);
  bottom: -100px;
  left: 10%;
  animation-delay: -5s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(59, 130, 246, 0.1);
  top: 30%;
  left: 5%;
  animation-delay: -10s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(20px, -15px); }
  50% { transform: translate(-10px, 20px); }
  75% { transform: translate(15px, 10px); }
}

/* ============================================
   SECTION BACKGROUNDS
   ============================================ */

.section-dark {
  background: #0a0f1a;
}

.section-dark-alt {
  background: #0f172a;
}

.section-dark-card {
  background: #111827;
}

/* Dot pattern */
.bg-dots {
  position: relative;
}

.bg-dots::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Grid fade */
.bg-grid-fade {
  position: relative;
}

.bg-grid-fade::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
  pointer-events: none;
}

/* CTA gradient section */
.bg-gradient-blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.bg-gradient-blue::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

/* ============================================
   GRADIENT TEXT
   ============================================ */

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ACCENT LINE
   ============================================ */

.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 2px;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  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);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* ============================================
   CARDS — DARK
   ============================================ */

.card-dark {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-dark:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4), 0 0 30px -10px rgba(59, 130, 246, 0.1);
}

/* Card with gradient glow on hover */
.card-glow {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.card-glow:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

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

/* ============================================
   BUTTONS — DARK THEME
   ============================================ */

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-secondary {
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ARROW ANIMATION
   ============================================ */

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

.arrow-slide:hover .arrow-icon {
  transform: translateX(4px);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

/* ============================================
   FAQ — DARK
   ============================================ */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.2);
}

.faq-item.open {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px -5px rgba(59, 130, 246, 0.1);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   PRICING — DARK
   ============================================ */

.pricing-highlight {
  position: relative;
}

.pricing-highlight::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
  border-radius: 1rem;
  z-index: -1;
}

.pricing-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BADGE
   ============================================ */

.badge-gradient {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* ============================================
   NAV — DARK
   ============================================ */

.nav-active {
  color: #3b82f6 !important;
  position: relative;
}

.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  border-radius: 1px;
}

.nav-scrolled {
  background: rgba(10, 15, 26, 0.9) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ============================================
   PULSE DOT
   ============================================ */

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ============================================
   FORMS — DARK
   ============================================ */

input, textarea, select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.spinner {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   ICON GLOW
   ============================================ */

.icon-glow {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.icon-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-orb {
    display: none;
  }
}
