/* ============================================================
   Astec — Talha Elétrica LP | Custom Styles
   ============================================================ */

/* --- Fonts --- */
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.font-condensed { font-family: 'Roboto Condensed', system-ui, sans-serif; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Base --- */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.4); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes blob {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(30px, -50px) scale(1.1); }
  66%  { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

/* --- Hero --- */
.hero-bg {
  /* background-color separado: não é sobrescrito por background-image de outras classes */
  background-color: #001228;
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  /* grid sutil + gradiente tonal + acentos de cor — tudo aqui para não conflitar */
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(145deg, rgba(0,13,28,0) 0%, rgba(0,30,64,0.5) 55%, rgba(0,42,88,0.85) 100%),
    radial-gradient(circle at 22% 48%, rgba(0,78,162,0.45) 0%, transparent 55%),
    radial-gradient(circle at 78% 18%, rgba(245,184,0,0.09) 0%, transparent 45%),
    radial-gradient(circle at 55% 88%, rgba(249,115,22,0.07) 0%, transparent 55%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto, auto;
  pointer-events: none;
}

/* --- Blob helpers (design system 2.0) --- */
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* --- Hero headline effects (design system 2.0 typography) --- */
.hero-headline-outline {
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.32);
  color: transparent;
}
.text-gradient-warm {
  background: linear-gradient(135deg, #F5B800 0%, #F97316 65%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Navbar Glass --- */
#navbar { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 1px 32px rgba(15, 23, 42, 0.08);
}
#navbar.scrolled .nav-link { color: #0F172A; }
#navbar.scrolled .nav-link:hover { color: #004EA2; }

/* --- Mobile Menu --- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { max-height: 480px; }

/* --- Hero Logo Float --- */
.hero-logo-float {
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.25));
}

/* --- Emergency pulse dot --- */
.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* --- Stat items --- */
.hero-stat {
  animation: fadeInUp 0.6s ease both;
}

/* --- Section reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Product Cards --- */
.product-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease,
              box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card.visible { opacity: 1; transform: translateY(0); }
.product-card.hidden-card { display: none !important; }
.product-card:hover { transform: translateY(-4px); }

/* --- Product Image Placeholder --- */
.product-img-wrap {
  background: linear-gradient(145deg, #EFF6FF, #DBEAFE, #EFF6FF);
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.product-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}

/* --- Filter Buttons --- */
.filter-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1.5px solid #CBD5E1;
  background: white;
  color: #64748B;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.filter-btn:hover { border-color: #004EA2; color: #004EA2; }
.filter-btn.active {
  background: #004EA2;
  color: white;
  border-color: #004EA2;
  box-shadow: 0 2px 12px rgba(0, 78, 162, 0.25);
}

/* --- Service Cards --- */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14) !important;
}

/* --- How it works stepper --- */
.step-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #004EA2, #4267AA);
  opacity: 0.3;
}
@media (max-width: 767px) {
  .step-connector { display: none; }
}

/* --- Testimonial Cards --- */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14) !important;
}

/* --- FAQ Accordion --- */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-content.open { max-height: 600px; }
.faq-icon { transition: transform 0.35s ease; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-trigger {
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
}

/* --- Form Inputs --- */
.form-input {
  border: 1.5px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #0F172A;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: #004EA2;
  box-shadow: 0 0 0 3px rgba(0, 78, 162, 0.12);
}
.form-input::placeholder { color: #94A3B8; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

/* --- CTA Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #004EA2;
  color: white;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 78, 162, 0.3);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
}
.btn-primary:hover {
  background: #003872;
  box-shadow: 0 8px 32px rgba(0, 78, 162, 0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: #004EA2;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  border: 2px solid #004EA2;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
}
.btn-secondary:hover {
  background: #EFF6FF;
  transform: translateY(-1px);
}

/* --- Glassmorphism --- */
.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #004EA2, #4267AA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- WhatsApp Float Button --- */
#whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
#whatsapp-float.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
#whatsapp-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.45), 0 1px 8px rgba(0,0,0,0.15);
  animation: float 3.5s ease-in-out infinite;
  color: white;
  text-decoration: none;
}
#whatsapp-float a:hover {
  background: #1db954;
  animation: none;
  transform: scale(1.1);
}
#whatsapp-float a:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 3px;
}

/* --- Active nav links --- */
.nav-link.active { color: #004EA2 !important; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F8FAFC; }
::-webkit-scrollbar-thumb { background: #4267AA; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #004EA2; }

/* --- Map container --- */
.map-container iframe {
  border-radius: 1rem;
  width: 100%;
  height: 380px;
  border: 0;
}

/* --- Client logo placeholders --- */
.client-logo-placeholder {
  background: #F1F5F9;
  border: 1.5px dashed #CBD5E1;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
  height: 56px;
  min-width: 120px;
}

/* --- Client logo items (real logos) --- */
.client-logo-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  min-width: 130px;
  height: 64px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  filter: grayscale(1) opacity(0.65);
}
.client-logo-item:hover {
  filter: grayscale(0) opacity(1);
  border-color: #CBD5E1;
  box-shadow: 0 4px 16px rgba(15,23,42,0.08);
}

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #004EA2;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
  #whatsapp-float { bottom: 20px; right: 20px; }
  #whatsapp-float a { width: 52px; height: 52px; }
}
