/* ============================================
   SMART LEGALS — Premium Design System
   ============================================ */

/* --- Scroll-triggered animations --- */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="slide-left"] {
  transform: translateX(-60px);
}

[data-animate="slide-right"] {
  transform: translateX(60px);
}

[data-animate="zoom-in"] {
  transform: scale(0.9);
}

[data-animate].animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* --- Stagger delays --- */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }
[data-delay="700"] { transition-delay: 700ms; }
[data-delay="800"] { transition-delay: 800ms; }

/* --- Hero entrance (no IntersectionObserver needed, loads immediately) --- */
.hero-animate {
  opacity: 0;
  transform: translateY(30px);
  animation: heroEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-animate-delay-1 { animation-delay: 0.15s; }
.hero-animate-delay-2 { animation-delay: 0.3s; }
.hero-animate-delay-3 { animation-delay: 0.45s; }
.hero-animate-delay-4 { animation-delay: 0.6s; }

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #2e8b57, #1a7a6d, #c9a84c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-light {
  background: linear-gradient(135deg, #ffffff, #c9a84c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Nav link hover underline --- */
.nav-link-hover {
  position: relative;
}

.nav-link-hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #2e8b57;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link-hover:hover::after {
  width: 100%;
  left: 0;
}

/* --- Enhanced button styles --- */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(46, 139, 87, 0.3);
}

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

/* Button shine sweep on hover */
.btn-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-premium:hover::after {
  left: 100%;
}

/* Secondary/outline button */
.btn-outline-premium {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* --- Card premium hover --- */
.card-premium {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

/* --- Shimmer effect for badges --- */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}

/* --- Floating animation --- */
.float {
  animation: float 6s ease-in-out infinite;
}

.float-delay {
  animation: float 6s ease-in-out 2s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

/* --- Pulse glow for CTA --- */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 139, 87, 0.4); }
  50% { box-shadow: 0 0 20px 8px rgba(46, 139, 87, 0.15); }
}

/* --- Animated gradient background --- */
.animated-gradient {
  background: linear-gradient(135deg, #0a1929 0%, #1e3a5f 25%, #0f2744 50%, #1a7a6d 75%, #0a1929 100%);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

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

/* --- Noise texture overlay --- */
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* --- Section wave divider --- */
.wave-divider {
  position: relative;
}

.wave-divider::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23ffffff' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,30 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
  pointer-events: none;
}

.wave-divider-gray::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23f9fafb' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,30 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
}

.wave-divider-navy::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%230a1929' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,30 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
}

/* --- Counter animation --- */
.counter-value {
  display: inline-block;
}

/* --- Icon box glow on hover --- */
.icon-box-glow {
  transition: all 0.3s ease;
}

.icon-box-glow:hover {
  box-shadow: 0 0 30px rgba(46, 139, 87, 0.2);
}

/* --- Glassmorphism card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- Form input focus glow --- */
.input-glow:focus {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* --- Social icon hover --- */
.social-icon-premium {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3);
}

/* --- Premium Header --- */
.header-premium {
  background: linear-gradient(180deg, rgba(10, 25, 41, 0.98) 0%, rgba(15, 39, 68, 0.96) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-premium.header-scrolled {
  background: rgba(10, 25, 41, 0.99);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-premium .nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.header-premium .nav-link:hover {
  color: #ffffff;
}

.header-premium .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2e8b57, #c9a84c);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 1px;
}

.header-premium .nav-link:hover::after {
  width: 70%;
  left: 15%;
}

/* --- Premium Dropdown Menu --- */
.nav-dropdown-menu {
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dropdown-premium {
  background: rgba(10, 25, 41, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dropdown-premium a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.dropdown-premium a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #2e8b57;
}

/* --- Premium CTA Button --- */
.btn-cta-header {
  background: linear-gradient(135deg, #2e8b57 0%, #256d45 100%);
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-cta-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(46, 139, 87, 0.4);
}

.btn-cta-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}

.btn-cta-header:hover::after {
  left: 100%;
}

/* --- Logo styling --- */
.logo-premium {
  transition: opacity 0.3s ease;
}

.logo-premium:hover {
  opacity: 0.85;
}

/* --- Parallax helper --- */
.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* --- Image hover zoom --- */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-hover-zoom:hover img {
  transform: scale(1.08);
}

/* --- Accent glow on dark cards --- */
.accent-glow {
  box-shadow: 0 0 60px rgba(46, 139, 87, 0.08);
}

/* --- Responsive: reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
  [data-animate],
  .hero-animate,
  .float,
  .float-delay,
  .shimmer::after,
  .animated-gradient,
  .pulse-glow,
  .btn-premium::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
