/* WIKBORG REIN - ENTRANCE ANIMATIONS & MICRO-INTERACTIONS */

/* Fade + slide up entrance for all main page sections */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes goldLine {
  from { width: 0; }
  to   { width: 60px; }
}

/* Apply entrance to sections when first entering viewport via JS class */
.anim-fade-up {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-fade-in {
  animation: fadeIn 0.6s ease both;
}

.anim-scale-in {
  animation: scaleIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered delay helpers */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.45s; }
.delay-5 { animation-delay: 0.6s; }

/* Hero text stagger */
.hero-section .section-subtitle {
  animation: fadeSlideUp 0.6s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-section .hero-title {
  animation: fadeSlideUp 0.75s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-section .hero-subtext {
  animation: fadeSlideUp 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-section .hero-buttons {
  animation: fadeSlideUp 0.7s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Gold decorative underline under section subtitle */
.section-subtitle::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  background: var(--gold-primary);
  margin-top: 6px;
  animation: goldLine 0.8s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Card hover lift with gold glow */
.news-card,
.lawyer-card,
.expertise-card,
.office-card,
.award-card {
  position: relative;
}

.news-card::after,
.lawyer-card::after,
.expertise-card::after,
.office-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
  transition: box-shadow 0.35s ease;
  pointer-events: none;
}

.news-card:hover::after,
.lawyer-card:hover::after,
.expertise-card:hover::after,
.office-card:hover::after {
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.5), 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Promo banner gold shimmer */
.promo-banner {
  position: relative;
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -80px;
  width: 200px;
  height: 200%;
  background: linear-gradient(105deg, transparent 0%, rgba(197, 160, 89, 0.06) 50%, transparent 100%);
  transform: skewX(-15deg);
  animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { left: -80px; opacity: 0; }
  30%       { opacity: 1; }
  70%       { left: 105%; opacity: 1; }
}

/* Menu item underline grow */
.primary-menu-item a {
  position: relative;
}

.primary-menu-item a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-menu-item a:hover::after {
  width: 100%;
}


/* Drawer menu nav item stagger slide-in animation */
.menu-modal.active .drawer-nav-item {
  animation: fadeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.menu-modal.active .drawer-nav-item:nth-child(1) { animation-delay: 0.1s; }
.menu-modal.active .drawer-nav-item:nth-child(2) { animation-delay: 0.15s; }
.menu-modal.active .drawer-nav-item:nth-child(3) { animation-delay: 0.2s; }
.menu-modal.active .drawer-nav-item:nth-child(4) { animation-delay: 0.25s; }
.menu-modal.active .drawer-nav-item:nth-child(5) { animation-delay: 0.3s; }
.menu-modal.active .drawer-nav-item:nth-child(6) { animation-delay: 0.35s; }
.menu-modal.active .drawer-nav-item:nth-child(7) { animation-delay: 0.4s; }
.menu-modal.active .drawer-nav-item:nth-child(8) { animation-delay: 0.45s; }
.menu-modal.active .drawer-nav-item:nth-child(9) { animation-delay: 0.5s; }

/* Secondary drawer nav fade in */
.menu-modal.active .drawer-secondary-nav {
  animation: fadeIn 0.5s 0.45s ease both;
}



/* Search overlay input cursor pulse */
.search-field {
  caret-color: var(--gold-primary);
}

/* Profile modal slide in */
#profile-modal.active .wr-profile-modal {
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#collab-modal.active .wr-collab-modal {
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Smooth page transitions */
#app-main > section {
  animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Counter pulse on complete */
@keyframes counterPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.counter-number.done {
  animation: counterPop 0.4s ease;
}

/* Button press micro-interaction */
.btn:active {
  transform: scale(0.97) translateY(1px);
}

/* Accordion body smooth content fade */
.accordion-body p {
  animation: fadeIn 0.3s ease both;
}

/* Lawyer image overlay */
.lawyer-card .lawyer-img-wrapper {
  position: relative;
  overflow: hidden;
}

/* News card image zoom */
.news-img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-img {
  transform: scale(1.05);
}

/* Office card image */
.office-image {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: grayscale(15%);
}

.office-card:hover .office-image {
  transform: scale(1.04);
  filter: grayscale(0%);
}

/* Gradient text for hero headline */
.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}


/* Smooth page transitions */

/* Footer links left nudge */
.footer-links a {
  position: relative;
}

.footer-links a::before {
  content: '›';
  position: absolute;
  left: -14px;
  opacity: 0;
  transition: opacity 0.2s ease, left 0.2s ease;
  color: var(--gold-primary);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -10px;
}

/* Gold glow on gold primary button hover */
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
}

/* Filter input focus glow */
.filter-input:focus {
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.25);
}

/* WR Collab button heartbeat on load */
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(197, 160, 89, 0); }
}

.btn-collab {
  animation: pulse-gold 3s 2s ease-in-out 3;
}

/* Responsive improvements */
@media (max-width: 640px) {
  .hero-section .hero-title {
    font-size: 2.5rem;
  }
  
  .menu-grid {
    grid-template-columns: 1fr;
  }
  
  .secondary-menu-box {
    border-left: none;
    border-top: 1px solid var(--border-dark);
    padding-left: 0;
    padding-top: 2rem;
  }
  
  .people-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .profile-hero {
    grid-template-columns: 1fr;
  }
  
  .profile-avatar {
    height: 260px;
  }
}
