/* =============================================================
   UFC ANIMATION SYSTEM
   animation.css — Global animation engine for the entire site
   ============================================================= */

/* ─── 1. KEYFRAMES ─────────────────────────────────────────── */

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

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

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

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

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

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

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

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

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

/* ─── 2. PAGE-LOAD (AUTO-FIRE) UTILITY CLASSES ─────────────── */
/* Use these directly on elements that should animate immediately on load */

.anim-fade-in-down {
  animation: fadeInDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-fade-in-left {
  animation: fadeInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-fade-in-right {
  animation: fadeInRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.anim-scale-in {
  animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-slide-in-right {
  animation: slideInRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── 3. ANIMATION DELAYS ───────────────────────────────────── */

.anim-delay-1 {
  animation-delay: 0.1s;
}
.anim-delay-2 {
  animation-delay: 0.2s;
}
.anim-delay-3 {
  animation-delay: 0.3s;
}
.anim-delay-4 {
  animation-delay: 0.4s;
}
.anim-delay-5 {
  animation-delay: 0.5s;
}
.anim-delay-6 {
  animation-delay: 0.6s;
}
.anim-delay-7 {
  animation-delay: 0.7s;
}
.anim-delay-8 {
  animation-delay: 0.8s;
}
.anim-delay-9 {
  animation-delay: 0.9s;
}
.anim-delay-10 {
  animation-delay: 1s;
}

/* ─── 4. SCROLL-REVEAL SYSTEM (Intersection Observer) ───────── */
/* Elements start hidden; .is-visible triggers the animation     */

[data-reveal] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.7s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="up"] {
  transform: translateY(36px);
}

[data-reveal="down"] {
  transform: translateY(-36px);
}

[data-reveal="left"] {
  transform: translateX(-48px);
}

[data-reveal="right"] {
  transform: translateX(48px);
}

[data-reveal="scale"] {
  transform: scale(0.9);
}

[data-reveal="fade"] {
  /* only opacity */
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays for reveal children */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal-stagger].is-visible > *:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
[data-reveal-stagger].is-visible > *:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}
[data-reveal-stagger].is-visible > *:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}
[data-reveal-stagger].is-visible > *:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}
[data-reveal-stagger].is-visible > *:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 0.45s;
}
[data-reveal-stagger].is-visible > *:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}
[data-reveal-stagger].is-visible > *:nth-child(7) {
  opacity: 1;
  transform: none;
  transition-delay: 0.65s;
}

/* ─── 5. HEADER ANIMATIONS ──────────────────────────────────── */

.site-nav {
  animation: fadeInDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Logo fade-in */
.nav-brand {
  animation: fadeIn 0.8s ease 0.2s both;
}

/* Nav links stagger */
.nav-menu li {
  opacity: 0;
  animation: fadeInDown 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.nav-menu li:nth-child(1) {
  animation-delay: 0.25s;
}
.nav-menu li:nth-child(2) {
  animation-delay: 0.32s;
}
.nav-menu li:nth-child(3) {
  animation-delay: 0.39s;
}
.nav-menu li:nth-child(4) {
  animation-delay: 0.46s;
}
.nav-menu li:nth-child(5) {
  animation-delay: 0.53s;
}
.nav-menu li:nth-child(6) {
  animation-delay: 0.6s;
}

/* CTA button slide in */
.site-nav > div > a.btn-r {
  animation: fadeInDown 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

/* Hamburger button */
.nav-ham {
  /* Removed fadeIn animation to fix mobile visibility issues */
  opacity: 1;
}

/* Nav drawer slide down */
.nav-drawer.is-open {
  animation: fadeInDown 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}



/* ─── 6. ASIDE (SIDEBAR) ANIMATIONS ────────────────────────── */

aside.position-fixed {
  animation: slideInRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
}

/* Stagger the contact icons */
.contact-sidebar .contact-icon:nth-child(1) {
  animation: fadeIn 0.5s ease 1.4s both;
}
.contact-sidebar .contact-icon:nth-child(2) {
  animation: fadeIn 0.5s ease 1.6s both;
}
.contact-sidebar .contact-icon:nth-child(3) {
  animation: fadeIn 0.5s ease 1.8s both;
}

/* ─── 7. FOOTER ANIMATIONS ──────────────────────────────────── */

/* Footer columns are scroll-revealed via data-reveal in PHP  */
/* These styles reinforce the footer link hover */
.footer-link {
  position: relative;
  display: inline-block;
}
.footer-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--maroon);
  transition: width 0.3s ease;
}
.footer-link:hover::after {
  width: 100%;
}

/* ─── 8. GLOBAL HOVER MICRO-ANIMATIONS ─────────────────────── */

/* Buttons */
.btn-r,
.btn-w,
.btn-o {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease !important;
}
.btn-r:hover,
.btn-w:hover {
  transform: translateY(-2px);
}

/* ─── 9. REDUCE MOTION ACCESSIBILITY ────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── 10. ABOUT SECTION ─────────────────────────────────────── */

/* Heading cards — hover lift + overlay reveal */
.heading-card {
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}
.heading-card:hover {
  transform: translateY(-6px) scale(1.025);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Overlay slides up on hover */
.heading-card .heading-overlay {
  transition: opacity 0.4s ease;
}
.heading-card:hover .heading-overlay {
  opacity: 0.55;
}

/* Card title slides up from bottom */
.heading-card .heading-content {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.heading-card:hover .heading-content {
  transform: translateY(-6px);
}

/* Background image subtle zoom on hover */
.heading-card .heading-bg {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.heading-card:hover .heading-bg {
  transform: scale(1.06);
}

/* ─── 11. CERTIFICATIONS ─────────────────────────────────────── */

.cert-badge {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.cert-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(128, 0, 0, 0.2);
}

/* ─── 12. HERO EXTRAS ───────────────────────────────────────── */

/* Animated tag line (the horizontal rule beside eyebrow text) */
.hero-ey-line {
  transition: width 0.6s ease;
}

/* Hero overlay subtle breathing pulse */
.hero-overlay {
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.45;
  }
}
