/* ===== 123Tax — Premium Styles ===== */

/* --- Ambient gradient orbs --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.orb-blue {
  background: radial-gradient(circle, #1A3C6E 0%, transparent 70%);
}

.orb-indigo {
  background: radial-gradient(circle, #E87722 0%, transparent 70%);
}

.orb-emerald {
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
}

/* --- Gradient text utility --- */
.gradient-text {
  background: linear-gradient(135deg, #1A3C6E 0%, #E87722 50%, #1A3C6E 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

/* --- WhatsApp mockup --- */
.whatsapp-mockup {
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-mockup:hover {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg);
}

/* --- Trust signal strip --- */
.trust-strip {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.trust-strip::-webkit-scrollbar {
  display: none;
}

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

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

/* --- Hero grid pattern --- */
.hero-grid-bg {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* --- Navbar states --- */
.nav-transparent {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid transparent;
}

.nav-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Scroll-reveal animation --- */
[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero rotating words --- */
.hero-word {
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-word.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-word.is-exiting {
  opacity: 0;
  transform: translateY(-100%);
}

/* --- Service cards --- */
.service-card {
  position: relative;
  overflow: hidden;
  border: none;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,250,251,1) 100%);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gradient border via inset shadow + outline trick */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(180deg, var(--card-accent, #e2e8f0) 0%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light sweep on hover */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.4) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
  z-index: 2;
}

.service-card:hover::after {
  left: 150%;
  transition: left 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 0 0 1px var(--card-accent-muted, rgba(37, 99, 235, 0.08)),
    0 8px 16px var(--card-glow, rgba(37, 99, 235, 0.06)),
    0 24px 48px var(--card-glow, rgba(37, 99, 235, 0.08)),
    0 32px 64px rgba(0, 0, 0, 0.04);
}

/* Icon container upgrade */
.service-icon {
  position: relative;
  overflow: hidden;
}

.service-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.6) 100%);
  pointer-events: none;
}

/* Per-card colour accents */
.service-card--blue {
  --card-accent: #3b82f6;
  --card-accent-muted: rgba(59, 130, 246, 0.12);
  --card-glow: rgba(59, 130, 246, 0.08);
}

.service-card--emerald {
  --card-accent: #10b981;
  --card-accent-muted: rgba(16, 185, 129, 0.12);
  --card-glow: rgba(16, 185, 129, 0.08);
}

.service-card--amber {
  --card-accent: #f59e0b;
  --card-accent-muted: rgba(245, 158, 11, 0.12);
  --card-glow: rgba(245, 158, 11, 0.08);
}

/* Subtle accent line at top of card */
.service-card .card-accent-line {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, transparent, var(--card-accent, #3b82f6), transparent);
  opacity: 0.5;
  transition: opacity 500ms, left 500ms, right 500ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .card-accent-line {
  opacity: 1;
  left: 5%;
  right: 5%;
}

/* --- Feature grid items hover --- */
.feature-item {
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  border-color: rgba(37, 99, 235, 0.1);
}

/* --- How-it-works progress line --- */
.progress-line {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 120px);
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.progress-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #25D366, #1A3C6E);
  transition: width 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-line-fill.is-filled {
  width: 100%;
}

/* --- Pricing card glow --- */
.pricing-glow {
  position: relative;
}

.pricing-glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 2rem;
  background: linear-gradient(135deg, #1A3C6E 0%, #E87722 50%, #1A3C6E 100%);
  background-size: 200% auto;
  opacity: 0.12;
  z-index: -1;
  filter: blur(32px);
  animation: shimmer 6s linear infinite;
}

/* --- Testimonial card --- */
.testimonial-card {
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card:hover {
  transform: translateY(-3px);
}

/* --- CTA button glow --- */
.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: inherit;
  opacity: 0;
  filter: blur(16px);
  z-index: -1;
  transition: opacity 400ms;
}

.btn-glow:hover::after {
  opacity: 0.4;
}

/* --- Mobile menu overlay --- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

/* --- Hamburger animation --- */
.hamburger-line {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Floating WhatsApp button pulse --- */
#whatsapp-float {
  animation: wa-pulse 3s ease-in-out infinite;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5), 0 0 40px rgba(37, 211, 102, 0.15); }
}

/* --- Scroll-to-top button --- */
#scroll-top {
  transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Smooth scroll --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-word {
    transition: none;
  }

  .service-card,
  .feature-item,
  .testimonial-card {
    transition: none;
  }

  .service-card::after {
    display: none;
  }

  .service-card .card-accent-line {
    transition: none;
  }

  .progress-line-fill {
    transition: none;
  }

  .mobile-menu {
    transition: none;
  }

  .hamburger-line {
    transition: none;
  }

  .gradient-text {
    animation: none;
  }

  .pricing-glow::before {
    animation: none;
  }

  .btn-glow::after {
    transition: none;
  }

  #whatsapp-float {
    animation: none;
  }

  #scroll-top {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
