/* Small custom touches on top of Tailwind (loaded via CDN in base.html) */
html { scroll-behavior: smooth; }

/* ---------- Scroll-reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="left"].is-visible  { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal="zoom"].is-visible  { transform: scale(1); }

/* stagger children of a [data-reveal-group] automatically */
[data-reveal-group] > [data-reveal] { transition-delay: calc(var(--reveal-i, 0) * 90ms); }

/* ---------- 3D tilt cards ---------- */
.tilt-card {
  perspective: 1000px;
}
.tilt-card-inner {
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-card:hover .tilt-card-inner {
  box-shadow: 0 25px 50px -12px rgba(11,18,32,0.35);
}

/* ---------- Buttons ---------- */
.btn-anim {
  position: relative;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, filter .25s ease;
}
.btn-anim:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px -8px rgba(245,179,1,0.55);
}
.btn-anim:active { transform: translateY(-1px) scale(0.98); }

/* ---------- Nav / logo ---------- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: #F5B301;
  transition: width .3s cubic-bezier(.22,1,.36,1);
}
.nav-link:hover::after { width: 100%; }

#site-header {
  transition: box-shadow .3s ease, backdrop-filter .3s ease, background-color .3s ease;
}
#site-header.scrolled {
  box-shadow: 0 8px 24px -12px rgba(11,18,32,0.25);
}

/* ---------- Hero blobs / floating shapes ---------- */
@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(3deg); }
}
.animate-float { animation: float-y 6s ease-in-out infinite; }
.animate-float-slow { animation: float-y 9s ease-in-out infinite; }
.animate-float-delay { animation: float-y 7s ease-in-out infinite; animation-delay: 1.2s; }

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: .6; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
.pulse-ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 9999px;
  background: currentColor;
  animation: pulse-ring 2.2s cubic-bezier(0,0,.2,1) infinite;
  z-index: -1;
}

/* Floating WhatsApp button — styled without Tailwind so it works even if the CDN fails */
.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #25D366;
  color: #25D366; /* drives the pulse-ring colour */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.whatsapp-fab:hover { background: #1ebe57; }
.whatsapp-fab svg { display: block; }

/* Floating Call button, sits just above the WhatsApp button */
.call-fab {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #F5B301;
  color: #F5B301; /* drives the pulse-ring colour */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.call-fab:hover { background: #d99e00; }
.call-fab svg { display: block; }

/* Social icons in the top bar — Tailwind-independent */
.social-bar {
  align-items: center;
  gap: 10px;
  color: #e5e7eb;
  font-size: 12px;
}
.social-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: background 0.2s ease, color 0.2s ease;
}
.social-bar a:hover {
  background: #F5B301;
  color: #0B1220;
}
.social-bar svg { display: block; }

@keyframes gradient-pan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-pan 8s ease infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.shimmer-wrap { position: relative; overflow: hidden; }
.shimmer-wrap::after {
  content: "";
  position: absolute; top: 0; left: 0; height: 100%; width: 50%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

/* Fade the whole page in on load */
body { animation: page-fade .5s ease both; }
@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Number counters just need a hook class, JS drives the value */
.counter { font-variant-numeric: tabular-nums; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .animate-float, .animate-float-slow, .animate-float-delay, .animate-gradient, .shimmer-wrap::after, .pulse-ring::before {
    animation: none !important;
  }
  .tilt-card-inner { transition: none !important; }
}
