/* ==========================================================================
   PERFECT TAX SERVICES - ANIMATIONS & 3D MICRO-INTERACTIONS
   ========================================================================== */

/* 3D Floating Motion */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-1deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.08);
  }
}

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

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

@keyframes badgePop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Shimmer Highlight on Primary Buttons */
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 80%
  );
  transform: rotate(30deg);
  animation: shimmerSweep 4s infinite linear;
}

/* Scroll Reveal classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* 3D Glass Specular Glare overlay on tilted elements */
.glare-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.tilt-card:hover .glare-effect {
  opacity: 1;
}

/* Spinner for Form Submitting */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -11px, 0) rotate(1deg); }
}

@keyframes heroOrbit {
  from { transform: rotate(0deg) translateX(12px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(12px) rotate(-360deg); }
}

@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(71, 116, 232, .18); opacity: .7; }
  50% { box-shadow: 0 0 0 12px rgba(71, 116, 232, 0); opacity: 1; }
}

@keyframes sheenPass {
  0% { transform: translateX(-130%) rotate(18deg); }
  45%, 100% { transform: translateX(160%) rotate(18deg); }
}

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

@keyframes lineReveal {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@keyframes stepGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(71, 116, 232, 0); }
  50% { box-shadow: 0 0 0 7px rgba(71, 116, 232, .08); }
}

@keyframes softPulse {
  0%, 100% { opacity: .48; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.06); }
}

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

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

@keyframes photoReveal {
  from { opacity: 0; transform: translate3d(30px, 0, 0) scale(.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes swooshDraw {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes heroRingPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.025); }
}

.hero-visual-card { animation: photoReveal .9s var(--ease) both, heroVisualFloat 7s ease-in-out .9s infinite; }
.hero-photo-swoosh { animation: swooshDraw 1.1s var(--ease) both; }
.hero-score-card { animation: heroVisualFloat 5.5s ease-in-out -1s infinite; }
.hero-status-card { animation: heroVisualFloat 6s ease-in-out -2.2s infinite; }
.hero-support-card { animation: heroVisualFloat 5.8s ease-in-out -.8s infinite; }
.hero-visual-ring-two { animation: heroRingPulse 5s ease-in-out infinite; }
.service-tax-preview { animation: heroVisualFloat 5.5s ease-in-out infinite; }

.hero-art-card { animation: heroFloat 6s ease-in-out infinite; }
.hero-data-card { animation: heroFloat 5s ease-in-out infinite; }
.data-card-side { animation-delay: -2.2s; }
.hero-orbit { animation: heroOrbit 18s linear infinite; }
.hero-orbit-label span { animation: heroPulse 2.8s ease-in-out infinite; }
.dashboard-sheen { animation: sheenPass 7s ease-in-out infinite; }

.reveal-on-scroll {
  animation: revealIn .8s var(--ease) both;
  opacity: 1;
  transform: none;
}

.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
.delay-400 { animation-delay: .4s; }

.services-section,
.bookkeeping-section,
.support-section,
.faq-section {
  position: relative;
}

.bookkeeping-section {
  isolation: isolate;
  overflow: hidden;
}

.bookkeeping-section:before,
.bookkeeping-section:after {
  border: 1px solid rgba(71, 116, 232, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.bookkeeping-section:before {
  animation: sectionDrift 8s ease-in-out infinite;
  height: 360px;
  right: -120px;
  top: -150px;
  width: 360px;
}

.bookkeeping-section:after {
  animation: sectionDrift 10s ease-in-out -3s infinite reverse;
  bottom: -180px;
  height: 430px;
  left: -190px;
  width: 430px;
}

.bookkeeping-intro .eyebrow-line {
  animation: lineReveal 1s .25s both;
}

.bookkeeping-card {
  animation: bookkeepingCardIn .75s var(--ease) both;
  overflow: hidden;
  position: relative;
}

.bookkeeping-card:nth-child(2) { animation-delay: .1s; }
.bookkeeping-card:nth-child(3) { animation-delay: .2s; }
.bookkeeping-card:nth-child(4) { animation-delay: .3s; }
.bookkeeping-card:nth-child(5) { animation-delay: .4s; }
.bookkeeping-card:nth-child(6) { animation-delay: .5s; }

.bookkeeping-card:after {
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .72) 50%, transparent 75%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-140%);
  transition: transform .7s var(--ease);
}

.bookkeeping-card:hover:after {
  transform: translateX(140%);
}

.bookkeeping-number {
  animation: bookkeepingNumberIn .6s .35s both;
  display: inline-block;
  position: relative;
}

.bookkeeping-number:after {
  background: var(--gold);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: -9px;
  opacity: .7;
  position: absolute;
  top: -5px;
  width: 5px;
}

@keyframes bookkeepingCardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.services-section:before,
.support-section:before,
.faq-section:before {
  background: var(--blue);
  border-radius: 50%;
  content: "";
  filter: blur(1px);
  height: 7px;
  opacity: .35;
  position: absolute;
  right: 7%;
  top: 16%;
  width: 7px;
  animation: softPulse 4s ease-in-out infinite;
}

.section-heading .eyebrow-line,
.process-intro .eyebrow-line,
.support-copy .eyebrow-line,
.faq-heading .eyebrow-line {
  animation: lineReveal .8s .25s var(--ease) both;
  transform-origin: left;
}

.service-card,
.team-card {
  will-change: transform;
}

.service-card:nth-child(2),
.team-card:nth-child(2) {
  transition-delay: .04s;
}

.service-card:nth-child(3),
.team-card:nth-child(3) {
  transition-delay: .08s;
}

.service-card:nth-child(4),
.team-card:nth-child(4) {
  transition-delay: .12s;
}

.service-icon {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.service-card:hover .service-icon {
  box-shadow: 0 9px 18px rgba(39, 72, 131, .13);
  transform: rotate(-8deg) scale(1.1);
}

.service-art {
  transition: transform .5s var(--ease), opacity .35s ease;
}

.service-card:hover .service-art {
  opacity: 1;
  transform: translate3d(-8px, -7px, 0) rotate(-3deg) scale(1.04);
}

.step {
  position: relative;
  transition: background-color .3s ease, padding-left .35s var(--ease);
}

.step:before {
  background: var(--blue);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: -3px;
  opacity: 0;
  position: absolute;
  top: 38px;
  transform: scale(0);
  transition: opacity .3s ease, transform .3s var(--ease);
  width: 5px;
}

.step:hover {
  background: rgba(255, 255, 255, .35);
  padding-left: 12px;
}

.step:hover:before {
  opacity: 1;
  transform: scale(1);
}

.step-index {
  transition: color .3s ease, transform .3s var(--ease);
}

.step:hover .step-index {
  color: var(--green);
  transform: translateX(5px);
}

.support-image {
  overflow: hidden;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}

.support-image:hover {
  box-shadow: 0 22px 40px rgba(36, 67, 117, .12);
  transform: translateY(-6px);
}

.support-image img {
  transition: transform .7s var(--ease);
}

.support-image:hover img {
  transform: scale(1.035) rotate(1deg);
}

.training-section:after {
  animation: sectionDrift 9s ease-in-out infinite;
}

.training-badge {
  transition: transform .4s var(--ease), box-shadow .4s ease;
}

.training-details:hover .training-badge {
  box-shadow: 0 0 0 8px rgba(244, 186, 83, .08);
  transform: rotate(0deg) scale(1.06);
}

.faq-list details {
  transition: padding-left .3s var(--ease), border-color .3s ease;
}

.faq-list details:hover,
.faq-list details[open] {
  border-color: rgba(71, 116, 232, .45);
  padding-left: 10px;
}

.faq-list summary span {
  transition: transform .3s var(--ease), color .3s ease;
}

.faq-list details:hover summary span {
  color: var(--green);
}

.team-photo {
  position: relative;
}

.team-photo:after {
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28), transparent 70%);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}

.team-card:hover .team-photo:after {
  transform: translateX(120%);
}

.team-photo img {
  transition: transform .65s var(--ease), filter .4s ease;
}

.team-card:hover .team-photo img {
  filter: saturate(1.08);
  transform: scale(1.06);
}

.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section:before {
  border: 1px solid rgba(71, 116, 232, .12);
  border-radius: 50%;
  content: "";
  height: 360px;
  pointer-events: none;
  position: absolute;
  right: -120px;
  top: -80px;
  width: 360px;
}

.inquiry-form {
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}

.inquiry-form:hover {
  box-shadow: 0 25px 48px rgba(57, 85, 134, .17);
  transform: translateY(-4px);
}

.form-submit {
  position: relative;
  overflow: hidden;
}

.form-submit:after {
  background: rgba(255, 255, 255, .2);
  content: "";
  height: 200%;
  left: -80%;
  position: absolute;
  top: -50%;
  transform: rotate(24deg);
  transition: left .55s var(--ease);
  width: 35%;
}

.form-submit:hover:after {
  left: 140%;
}

@media (prefers-reduced-motion: reduce) {
  .bookkeeping-section:before,
  .bookkeeping-section:after,
  .bookkeeping-card,
  .bookkeeping-number,
  .bookkeeping-intro .eyebrow-line {
    animation: none !important;
  }

  .bookkeeping-card:after {
    display: none;
  }
}
  .hero-art-card, .hero-data-card, .hero-orbit, .hero-orbit-label span, .dashboard-sheen,
  .hero-visual-card, .hero-score-card, .hero-status-card, .hero-support-card, .hero-visual-ring-two {
    animation: none;
  }

  .services-section:before,
  .support-section:before,
  .faq-section:before,
  .training-section:after,
  .section-heading .eyebrow-line,
  .process-intro .eyebrow-line,
  .support-copy .eyebrow-line,
  .faq-heading .eyebrow-line {
    animation: none;
  }

  .service-card:hover,
  .team-card:hover,
  .support-image:hover,
  .inquiry-form:hover {
    transform: none;
  }
}
