/* Custom styles for FinEco Review Platform - Dark Elegant Design */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  background-color: #000000;
  color: #ffffff;
}

.serif-font {
  font-family: "Playfair Display", Georgia, serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Glass morphism effect */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
  transform: translateY(-5px);
}

/* Gradient backgrounds */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-stops));
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

/* Fade in elements on scroll */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Service card animations */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px);
}

.service-card.expanded {
  transform: scale(1.02);
  z-index: 10;
}

.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.service-card.flipped .service-card-inner {
  transform: rotateY(180deg);
}

.service-card-front {
  backface-visibility: hidden;
  position: relative;
}

/* Case card effects */
.case-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.case-card:hover {
  transform: translateY(-10px);
}

/* Team member card */
.team-member-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover lift effect */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-12px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #f59e0b, #d97706);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #fbbf24, #f59e0b);
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Button hover effects */
button,
a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image loading effect */
img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

img:not([src]) {
  opacity: 0;
}

/* Mobile menu transition */
#mobileMenu {
  transition: all 0.3s ease-in-out;
}

/* Cookie popup animation */
#cookiePopup {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Text selection */
::selection {
  background-color: #f59e0b;
  color: #000000;
}

::-moz-selection {
  background-color: #f59e0b;
  color: #000000;
}

/* Backdrop blur support */
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookiePopup {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}

/* Accessibility improvements */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    border: 3px solid currentColor;
  }

  .glass-card {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Error state for form fields */
.border-red-500 {
  border-color: #ef4444 !important;
  animation: shake 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

/* Loading state */
.loading {
  opacity: 0.5;
  pointer-events: none;
  cursor: wait;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom underline effect for links */
.custom-underline {
  position: relative;
}

.custom-underline::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-underline:hover::after {
  width: 100%;
}

/* Hero section specific styles */
section:first-of-type {
  position: relative;
  transition: transform 0.1s ease-out;
}

/* Texture overlay */
.texture-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Dark mode enhancements */
body.dark {
  background-color: #000000;
}

/* Glow effects for interactive elements */
.glow-on-hover {
  transition: all 0.3s ease;
}

.glow-on-hover:hover {
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

/* Frosted glass for navbar */
header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Smooth page transitions */
body {
  animation: pageLoad 0.6s ease-out;
}

@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Additional spacing utilities */
.section-padding {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* Enhanced link hover states */
a:not(.no-hover) {
  position: relative;
}

a:not(.no-hover):hover {
  color: #fbbf24;
}

/* Card stacking effect */
.card-stack {
  position: relative;
}

.card-stack::before,
.card-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: inherit;
  transform: translateY(8px);
  z-index: -1;
  transition: transform 0.3s ease;
}

.card-stack::after {
  transform: translateY(16px);
}

.card-stack:hover::before {
  transform: translateY(4px);
}

.card-stack:hover::after {
  transform: translateY(8px);
}
