/* ===== Custom Animations ===== */

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay support via inline style animation-delay */
.fade-in[style*="animation-delay"] {
  transition-delay: var(--delay, 0s);
}

/* Hero grid pattern */
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Slow pulse for hero orbs */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

/* Navbar solid state */
.navbar-solid {
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

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

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* Selection color */
::selection {
  background-color: rgba(0, 168, 232, 0.3);
  color: white;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid #00A8E8;
  outline-offset: 2px;
}

/* System card shimmer on hover */
.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 168, 232, 0.06),
    transparent 40%
  );
  pointer-events: none;
}

.system-card {
  position: relative;
  overflow: hidden;
}

.system-card:hover::before {
  opacity: 1;
}

/* Phone input mask visual */
input[type="tel"] {
  letter-spacing: 0.5px;
}

/* Form success/error states */
.form-success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.form-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Map grayscale to match dark theme */
iframe[title*="Localização"] {
  filter: grayscale(0.8) invert(0.92) contrast(0.9) brightness(0.8);
}

iframe[title*="Localização"]:hover {
  filter: grayscale(0.5) invert(0.92) contrast(0.9) brightness(0.8);
  transition: filter 0.3s ease;
}
