/* =========================================================
   AICLAX — Design Spells v1.0
   Skill: design-spells
   Princípio: Delight, Don't Distract · 60fps+ · GPU only
   ========================================================= */

/* ─── 1. SCROLL PROGRESS BAR ─────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
  background-size: 200% 100%;
  z-index: 9999;
  transition: width 0.1s linear;
  animation: progressShimmer 3s linear infinite;
}

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

/* ─── 2. CUSTOM CURSOR (desktop only) ───────────────────── */
#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out),
              width 0.3s var(--ease-spring),
              height 0.3s var(--ease-spring),
              opacity 0.3s var(--ease-out),
              background 0.3s var(--ease-out);
  mix-blend-mode: multiply;
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(94, 8, 138, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out),
              width 0.35s var(--ease-spring),
              height 0.35s var(--ease-spring),
              border-color 0.3s var(--ease-out),
              opacity 0.3s var(--ease-out);
}

/* Cursor expand on interactive elements */
body.cursor-hover #cursor-dot {
  width: 14px;
  height: 14px;
  background: var(--primary);
}

body.cursor-hover #cursor-ring {
  width: 52px;
  height: 52px;
  border-color: rgba(94, 8, 138, 0.35);
}

body.cursor-click #cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

body.cursor-click #cursor-ring {
  width: 28px;
  height: 28px;
  border-color: var(--accent);
}

@media (max-width: 1024px) {
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* ─── 3. BUTTON RIPPLE EFFECT ───────────────────────────── */
.btn, .sol-card-btn-orange, .hero-cta-neon, .nav-cta {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleOut 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes rippleOut {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ─── 4. SHIMMER SWEEP on CTA Buttons ───────────────────── */
.btn-accent,
.hero-cta-neon,
.footer-consult-btn,
.cookie-btn {
  position: relative;
  overflow: hidden;
}

.btn-accent::after,
.hero-cta-neon::after,
.footer-consult-btn::after,
.cookie-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );
  transform: skewX(-15deg);
  transition: none;
  pointer-events: none;
}

.btn-accent:hover::after,
.hero-cta-neon:hover::after,
.footer-consult-btn:hover::after,
.cookie-btn:hover::after {
  animation: shimmerSweep 0.6s ease-in-out forwards;
}

@keyframes shimmerSweep {
  0%   { left: -75%; }
  100% { left: 150%; }
}

/* ─── 5. MAGNETIC NAV UNDERLINE ─────────────────────────── */
/* Enhanced version — spring underline with color pulse */
.nav-links a::after {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 2px;
  transform-origin: left center;
}

/* ─── 6. CARD SPOTLIGHT / GLOW FOLLOW ────────────────────── */
.sol-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.sol-card .card-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(94, 8, 138, 0.06),
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  z-index: 0;
}

.sol-card:hover .card-spotlight {
  opacity: 1;
}

/* ─── 7. LOGO MICRO-WOBBLE ──────────────────────────────── */
@keyframes logoWobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25%       { transform: rotate(-1.5deg) scale(1.02); }
  75%       { transform: rotate(1.5deg) scale(1.02); }
}

.logo img:hover {
  animation: logoWobble 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── 8. FAQ SPRING ICON ────────────────────────────────── */
/* Override para spring physics na rotação */
.faq-icon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s var(--ease-out),
              color 0.3s var(--ease-out) !important;
}

/* ─── 9. INPUT AURORA GLOW ──────────────────────────────── */
.form-control {
  transition: border-color 0.3s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              transform 0.2s var(--ease-spring);
}

.form-control:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(94, 8, 138, 0.1),
              0 8px 24px rgba(94, 8, 138, 0.08) !important;
}

/* ─── 10. WHATSAPP FLOAT — TOOLTIP SPELL ─────────────────── */
/* IMPORTANTE: NÃO redefinir position aqui — o fixed já está em styles.css */
.whatsapp-float::before {
  content: 'Fale conosco! 👋';
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(30, 0, 60, 0.92);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out),
              transform 0.4s var(--ease-spring);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 10001;
}

.whatsapp-float:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ─── 11. WHATSAPP FLOAT ENTRANCE ANIMATION ──────────────── */
@keyframes wppBounceIn {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(5deg); opacity: 1; }
  80%  { transform: scale(0.92) rotate(-3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* forwards (não both) garante que o botão fique visível ANTES da animação iniciar */
.whatsapp-float {
  opacity: 1; /* base sempre visível */
  animation:
    wppBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards,
    wppPulse 2.5s ease-out 1.8s infinite;
}

/* ─── 12. SECTION DIVIDER — DRAW LINE ───────────────────── */
.spell-divider {
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  margin: 0 auto var(--sp-8);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.spell-divider.revealed {
  width: 80px;
}

/* ─── 13. STAT COUNTER CARDS ────────────────────────────── */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
  transition: color 0.3s var(--ease-out);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin-top: var(--sp-2);
  display: block;
}

.stat-card {
  text-align: center;
  padding: var(--sp-6);
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.stat-card:hover .stat-value {
  color: var(--accent);
}

/* ─── 14. HERO BADGE PILL — FADE GLOW ───────────────────── */
.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--sp-4);
  backdrop-filter: blur(8px);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,140,0,0); border-color: rgba(255,255,255,0.2); }
  50%       { box-shadow: 0 0 16px 2px rgba(255,140,0,0.2); border-color: rgba(255,140,0,0.4); }
}

/* ─── 15. TILT CARD EFFECT ───────────────────────────────── */
.sol-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ─── 16. STICKY HEADER SLIDE-IN ────────────────────────── */
.header {
  transform: translateY(0);
  transition: transform 0.35s var(--ease-out),
              padding 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out),
              background 0.3s var(--ease-out) !important;
}

.header.hide-header {
  transform: translateY(-100%);
}

/* ─── 17. SMOOTH PAGE LOADER ────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

#page-loader.loaded {
  opacity: 0;
}

.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── 18. FLOATING LABELS ON INPUTS ──────────────────────── */
.form-field {
  position: relative;
  margin-bottom: var(--sp-4);
}

.form-field .form-control {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.form-field label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-base);
  color: var(--text-light);
  pointer-events: none;
  transition: top 0.25s var(--ease-spring),
              font-size 0.25s var(--ease-spring),
              color 0.25s var(--ease-out),
              transform 0.25s var(--ease-spring);
}

.form-field .form-control:focus ~ label,
.form-field .form-control:not(:placeholder-shown) ~ label {
  top: 0.65rem;
  transform: translateY(0);
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
}

/* ─── 19. HERO SCROLL INDICATOR ─────────────────────────── */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  animation: heroFadeIn 1s var(--ease-out) 2s both;
}

.hero-scroll-hint .scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 11px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.hero-scroll-hint .scroll-wheel {
  width: 3px;
  height: 7px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  animation: scrollWheel 1.6s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.3; }
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
  .hero-scroll-hint { display: none; }
}

/* ─── 20. SECTION TAG PILLS — hover lift ─────────────────── */
.eyebrow {
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s var(--ease-out),
              background 0.3s var(--ease-out);
  cursor: default;
}

.eyebrow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,140,0,0.2);
  background: rgba(255,140,0,0.18);
}

/* ─── 21. NAV CTA GLOW PULSE ────────────────────────────── */
@keyframes navCtaGlow {
  0%, 100% { box-shadow: 0 3px 14px rgba(255,140,0,0.25); }
  50%       { box-shadow: 0 3px 24px rgba(255,140,0,0.55), 0 0 40px rgba(255,140,0,0.15); }
}

.nav-links .nav-cta,
a.nav-cta {
  animation: navCtaGlow 2.5s ease-in-out infinite !important;
}

/* ─── 22. FOOTER LINKS — slide indicator ────────────────── */
.footer-links a {
  position: relative;
}

.footer-links a::before {
  content: '→';
  position: absolute;
  left: -16px;
  opacity: 0;
  color: var(--accent);
  font-size: var(--text-xs);
  transition: opacity 0.2s var(--ease-out),
              left 0.3s var(--ease-spring);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -12px;
}

/* ─── 23. CARD REVEAL — scale spring ────────────────────── */
[data-reveal].sol-card,
[data-reveal].card,
[data-reveal].stat-card {
  transform: scale(0.96) translateY(20px);
  transition: opacity 0.55s var(--ease-out),
              transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
}

[data-reveal].sol-card.revealed,
[data-reveal].card.revealed,
[data-reveal].stat-card.revealed {
  transform: scale(1) translateY(0);
}

/* ─── 24. DROPDOWN — elastic open ────────────────────────── */
.dropdown-content {
  transform-origin: top center;
}

.dropdown-content.show {
  animation: dropdownOpen 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dropdownOpen {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ─── 25. TESTIMONIAL CARD — quote accent ───────────────── */
.testimonial-card::before,
.card[style*="bg-color"]::before {
  content: '"';
  position: absolute;
  top: 12px;
  left: 20px;
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.testimonial-card,
.card[style*="bg-color"] {
  position: relative;
  overflow: hidden;
}

/* ─── 26. SCROLL SNAPPING — section transitions ──────────── */
/* Subtle — tidak full snap agar usabilidade */
.section {
  scroll-margin-top: 80px;
}

/* ─── 27. GLOWING DIVIDERS on dark sections ─────────────── */
.section-dark .section-header::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: var(--sp-5) auto 0;
  border-radius: 2px;
  transition: width 1.2s var(--ease-out);
}

.section-dark .section-header.revealed::after {
  width: 120px;
}

/* ─── 28. MOBILE MENU SLIDE ITEMS ────────────────────────── */
.nav-links.active .nav-links > *:nth-child(1) { animation: navItemIn 0.4s var(--ease-spring) 0.05s both; }
.nav-links.active .nav-links > *:nth-child(2) { animation: navItemIn 0.4s var(--ease-spring) 0.10s both; }
.nav-links.active .nav-links > *:nth-child(3) { animation: navItemIn 0.4s var(--ease-spring) 0.15s both; }
.nav-links.active .nav-links > *:nth-child(4) { animation: navItemIn 0.4s var(--ease-spring) 0.20s both; }
.nav-links.active .nav-links > *:nth-child(5) { animation: navItemIn 0.4s var(--ease-spring) 0.25s both; }
.nav-links.active .nav-links > *:nth-child(6) { animation: navItemIn 0.4s var(--ease-spring) 0.30s both; }

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

/* ─── 29. ACTIVE PAGE GLOW in Nav ───────────────────────── */
.nav-links a.active {
  position: relative;
  color: var(--primary) !important;
}

/* ─── 30. REDUCED MOTION RESPECT ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #cursor-dot, #cursor-ring { display: none !important; }
  .btn-ripple { display: none !important; }
  .btn-accent::after,
  .hero-cta-neon::after,
  .footer-consult-btn::after { display: none !important; }
  .whatsapp-float { animation: none !important; }
  .nav-links.active > * { animation: none !important; }
  .sol-card { transform: none !important; will-change: auto; }
  #scroll-progress { display: none; }
  .logoWobble { animation: none !important; }
}
