/* ══════════════════════════════════════════════════════════════════════
   Veico Gestão - Animations & Effects
   Inspired by Codexa: scroll animations, glassmorphism, hover effects,
   animated gradients, counters, parallax, shimmer
   ══════════════════════════════════════════════════════════════════════ */

/* ── Scroll Animations (IntersectionObserver) ─────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="fade-left"] {
  transform: translateX(-40px);
}

[data-animate="fade-right"] {
  transform: translateX(40px);
}

[data-animate="fade-up"] {
  transform: translateY(30px);
}

[data-animate="fade-down"] {
  transform: translateY(-30px);
}

[data-animate="scale"] {
  transform: scale(0.9);
  filter: blur(4px);
}

[data-animate="scale-up"] {
  transform: scale(0.85) translateY(20px);
  filter: blur(4px);
}

[data-animate="blur-in"] {
  transform: translateY(10px);
  filter: blur(8px);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  filter: blur(0);
}

/* Staggered delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="150"] { transition-delay: 0.15s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="700"] { transition-delay: 0.7s; }
[data-delay="800"] { transition-delay: 0.8s; }
[data-delay="900"] { transition-delay: 0.9s; }
[data-delay="1000"] { transition-delay: 1s; }

/* ── Blob Animation ───────────────────────────────────────────────── */
@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

.animate-blob {
  animation: blob 7s infinite ease-in-out;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* ── Marquee / Banner Animation ───────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* ── Pulse Ring Animation (Video Play Button) ─────────────────────── */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.animate-pulse-ring {
  animation: pulse-ring 2s ease-out infinite;
}

.animate-pulse-ring-delayed {
  animation: pulse-ring 2s ease-out infinite 1s;
}

@keyframes play-breath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 0, 0, 0.3); }
  50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(0, 0, 0, 0.45); }
}

.animate-play-breath {
  animation: play-breath 2.6s ease-in-out infinite;
}

.group:hover .animate-play-breath {
  animation-play-state: paused;
}

#video-modal-player::-webkit-media-controls-overlay-play-button,
#video-modal-player::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
}

#video-modal {
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.88);
}
#video-modal-player {
  max-height: 85vh;
}
#video-modal [data-close-video] {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  background-color: rgba(255, 255, 255, 0.12);
}
#video-modal [data-close-video]:hover {
  background-color: rgba(255, 255, 255, 0.22);
}
@media (min-width: 768px) {
  #video-modal [data-close-video] {
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
  }
}

/* ── Float Animation ──────────────────────────────────────────────── */
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

.animate-float-up {
  animation: float-up 4s ease-in-out infinite;
}

.animate-float-down {
  animation: float-down 5s ease-in-out infinite 1s;
}

/* ── Activity Feed Scroll ─────────────────────────────────────────── */
@keyframes scroll-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50px); }
}

.animate-scroll-feed {
  animation: scroll-up 4s linear infinite;
}

/* ── Bar Chart Animation ──────────────────────────────────────────── */
@keyframes bar-grow {
  0% { height: 0; }
}

.animate-bar {
  animation: bar-grow 1s ease-out forwards;
}

/* ── Dropdown Menu ────────────────────────────────────────────────── */
.dropdown-menu {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Mobile Menu ──────────────────────────────────────────────────── */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.open {
  max-height: 100vh;
  opacity: 1;
}

/* ── FAQ Accordion ────────────────────────────────────────────────── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-chevron.rotated {
  transform: rotate(180deg);
}

/* ── Testimonial Slider ───────────────────────────────────────────── */
.testimonial-slide {
  opacity: 0;
  transform: translateX(20px);
  filter: blur(4px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  position: absolute;
  inset: 0;
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  position: relative;
}

/* ── Module Tabs ──────────────────────────────────────────────────── */
.module-content {
  opacity: 0;
  transform: translateX(20px);
  filter: blur(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.module-content.active {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* ══════════════════════════════════════════════════════════════════════
   ENHANCED LIQUID GLASS (Glassmorphism)
   ══════════════════════════════════════════════════════════════════════ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 12px 40px 0 rgba(31, 38, 135, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.7);
}

.liquid-glass-dark {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass-dark:hover {
  background: rgba(15, 23, 42, 0.55);
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(51, 65, 85, 0.7);
}

/* ══════════════════════════════════════════════════════════════════════
   CARD HOVER EFFECTS (Codexa-style)
   ══════════════════════════════════════════════════════════════════════ */

/* Generic card hover lift + glow */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.15),
              0 8px 20px -8px rgba(0, 0, 0, 0.08);
}

/* Icon container color swap on card hover */
.hover-lift:hover .icon-swap {
  background-color: var(--color-primary-600) !important;
  color: white !important;
  transform: scale(1.1) rotate(3deg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-swap {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Border glow effect on hover */
.hover-glow {
  position: relative;
  transition: all 0.4s ease;
}

.hover-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0));
  z-index: -1;
  transition: background 0.4s ease;
  opacity: 0;
}

.hover-glow:hover::after {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.1));
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════
   ANIMATED GRADIENT TEXT
   ══════════════════════════════════════════════════════════════════════ */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient-text {
  background: linear-gradient(
    90deg,
    var(--color-primary-600),
    var(--color-blue-500),
    var(--color-blue-300),
    var(--color-primary-600)
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════
   SHIMMER EFFECT (for CTAs and highlights)
   ══════════════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════════
   COUNTER ANIMATION
   ══════════════════════════════════════════════════════════════════════ */
.counter-value {
  display: inline-block;
  transition: all 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════════════
   PARALLAX BACKGROUND (subtle)
   ══════════════════════════════════════════════════════════════════════ */
.parallax-bg {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ══════════════════════════════════════════════════════════════════════
   GLOW PULSE (for badges and highlights)
   ══════════════════════════════════════════════════════════════════════ */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.2),
                0 0 20px rgba(37, 99, 235, 0.1);
  }
  50% {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4),
                0 0 40px rgba(37, 99, 235, 0.2);
  }
}

.glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════
   SOCIAL ICON HOVER
   ══════════════════════════════════════════════════════════════════════ */
.social-icon {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* ══════════════════════════════════════════════════════════════════════
   BUTTON HOVER ENHANCEMENTS
   ══════════════════════════════════════════════════════════════════════ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.35);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

/* ══════════════════════════════════════════════════════════════════════
   NAVBAR GLASS (enhanced scroll state)
   ══════════════════════════════════════════════════════════════════════ */
.navbar-glass {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.8) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
              0 8px 24px rgba(0, 0, 0, 0.04) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-blue-500), var(--color-blue-300));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════════════════════════════════════
   TILT / 3D PERSPECTIVE ON HOVER
   ══════════════════════════════════════════════════════════════════════ */
.tilt-card {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ══════════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR HIDE, TEXT BALANCE, SMOOTH SCROLL, BASE TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════════ */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.text-balance { text-wrap: balance; }

html { scroll-behavior: smooth; }

body {
  font-family: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.025em;
}

::selection {
  background-color: var(--color-primary-500);
  color: white;
}

/* ── Prose (Privacy Policy) ───────────────────────────────────────── */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--color-slate-600);
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ul li {
  margin-bottom: 0.5rem;
  color: var(--color-slate-600);
}

.prose a {
  color: var(--color-primary-600);
  font-weight: 600;
  text-decoration: none;
}

.prose a:hover {
  color: var(--color-primary-700);
}

/* ══════════════════════════════════════════════════════════════════════
   HERO RAINBOW GLOW (Vercel/Linear-style rotating conic border)
   ══════════════════════════════════════════════════════════════════════ */
@property --hero-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: true;
}

@keyframes hero-rainbow-spin {
  to { --hero-angle: 360deg; }
}

.hero-rainbow-wrap {
  position: relative;
  border-radius: 28px;
  padding: 3px;
  background: transparent;
  animation: hero-rainbow-spin 8s linear infinite;
  --rainbow: conic-gradient(
    from var(--hero-angle),
    transparent 0deg,
    #7aa8ff 20deg,
    #b088e8 55deg,
    transparent 85deg,
    transparent 110deg,
    #ff7aa8 140deg,
    #ffae8f 175deg,
    transparent 200deg,
    transparent 225deg,
    #ffd875 250deg,
    #7be0bc 280deg,
    transparent 310deg,
    transparent 335deg,
    #7fcde0 355deg,
    transparent 360deg
  );
}

/* Camada 1 — glow borrado (vaza além da borda, estilo AI Studio) */
.hero-rainbow-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: var(--rainbow);
  filter: blur(18px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

/* Camada 2 — stroke nítido na borda */
.hero-rainbow-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: var(--rainbow);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.5;
  filter: blur(1.5px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-rainbow-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 30px 80px -20px rgba(15, 23, 42, 0.22),
    0 10px 30px -10px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

.hero-rainbow-card video {
  width: 100%;
  height: auto;
}

/* Mobile: card acompanha o shape do iPhone (sem moldura branca em volta) */
@media (max-width: 767px) {
  .hero-rainbow-wrap {
    display: inline-block;
    border-radius: 50px;
    padding: 2px;
  }
  .hero-rainbow-wrap::before {
    border-radius: inherit;
  }
  /* O container pai precisa centralizar o wrap inline-block */
  /* Padding lateral dá espaço pro glow blur não ser cortado pelo overflow:hidden da section */
  .hero-rainbow-wrap-parent {
    text-align: center;
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero-rainbow-card {
    background: transparent;
    border-radius: 48px;
    box-shadow:
      0 20px 50px -15px rgba(15, 23, 42, 0.22),
      0 8px 20px -8px rgba(15, 23, 42, 0.12);
  }
  .hero-rainbow-card video.block {
    width: auto;
    max-width: 280px;
    display: block;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE: Reduce motion for accessibility
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .animate-blob,
  .animate-marquee,
  .animate-pulse-ring,
  .animate-float-up,
  .animate-float-down,
  .animate-scroll-feed,
  .animated-gradient-text,
  .shimmer::before,
  .glow-pulse,
  .hero-rainbow-wrap::before,
  .hero-rainbow-wrap::after,
  .hero-rainbow-wrap:hover::before,
  .hero-rainbow-wrap:hover::after {
    animation: none !important;
  }
}
