/* Elegant effects layer for the CAFRI landing page */
:root {
  --fx-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fx-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --fx-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
  --fx-shadow-strong: 0 18px 34px rgba(0, 0, 0, 0.32);
  --fx-ring: 0 0 0 2px rgba(112, 183, 255, 0.52);
  --fx-scroll-progress: linear-gradient(90deg, #49c3ff 0%, #f59a2a 100%);
}

body {
  animation: pageFadeIn 0.48s var(--fx-ease-out) both;
}

.site-header {
  transition: background-color 0.25s var(--fx-ease-smooth), border-color 0.25s var(--fx-ease-smooth), box-shadow 0.25s var(--fx-ease-smooth);
}

body.scrolled .site-header,
body.scrolled .top {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 380px;
  height: 380px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(245, 154, 42, 0.2) 0%, rgba(245, 154, 42, 0) 72%);
  filter: blur(1px);
  animation: ambientFloat 8.5s ease-in-out infinite;
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -150px;
  left: -110px;
  background: radial-gradient(circle, rgba(102, 176, 255, 0.18) 0%, rgba(102, 176, 255, 0) 72%);
  filter: blur(1px);
  animation: ambientFloat 9.8s ease-in-out infinite reverse;
}

.hero h1,
.hero p,
.hero-actions {
  animation: riseIn 0.55s var(--fx-ease-out) both;
}

.hero-logo-card {
  transition: transform 0.3s var(--fx-ease-out), box-shadow 0.3s var(--fx-ease-out), border-color 0.3s var(--fx-ease-out);
  will-change: transform;
}

.hero-logo-card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--fx-shadow-strong);
  border-color: rgba(245, 154, 42, 0.4);
}

.btn,
.header-cta {
  transition: transform 0.22s var(--fx-ease-out), box-shadow 0.22s var(--fx-ease-out), filter 0.22s var(--fx-ease-out);
}

.btn:hover,
.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--fx-shadow-soft);
  filter: saturate(1.05);
}

.btn:focus-visible,
.header-cta:focus-visible,
.btn-link:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--fx-ring);
}

.card {
  transition: transform 0.28s var(--fx-ease-out), box-shadow 0.28s var(--fx-ease-out), border-color 0.28s var(--fx-ease-out);
  will-change: transform;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--fx-shadow-strong);
  border-color: rgba(245, 154, 42, 0.48);
}

.card img,
.panel img {
  transition: transform 0.45s var(--fx-ease-out), filter 0.35s var(--fx-ease-out);
}

.card:hover img,
.panel:hover img {
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.02);
}

.panel {
  transition: transform 0.24s var(--fx-ease-out), box-shadow 0.24s var(--fx-ease-out), border-color 0.24s var(--fx-ease-out);
  will-change: transform;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  border-color: rgba(141, 178, 220, 0.36);
}

.whatsapp {
  animation: whatsappPulse 2.6s ease-in-out infinite;
  transition: transform 0.2s var(--fx-ease-out), box-shadow 0.2s var(--fx-ease-out), filter 0.2s var(--fx-ease-out);
}

.whatsapp:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
  filter: saturate(1.08);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--fx-scroll-progress);
  z-index: 9999;
  pointer-events: none;
}

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

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

@keyframes ambientFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-10px, 8px, 0);
  }
}

@keyframes whatsappPulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0.24);
  }
  50% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(37, 211, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .scroll-progress {
    display: none !important;
  }
}

/* Global reveal utility (shared across all pages) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.62s var(--fx-ease-out), transform 0.62s var(--fx-ease-out);
}

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

.reveal-left {
  transform: translateX(-22px);
}

.reveal-right {
  transform: translateX(22px);
}

.reveal-left.in,
.reveal-right.in {
  transform: translateX(0);
}
