/* ============================================================
   Astec — Ponte Rolante 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: #001228;
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  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 --- */
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* --- Hero headline effects --- */
.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; }

/* --- Solution Cards --- */
.solution-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}
.solution-card.visible { opacity: 1; transform: translateY(0); }
.solution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14) !important;
}

/* --- Solution Image Placeholder --- */
.solution-img-wrap {
  background: linear-gradient(145deg, #EFF6FF, #DBEAFE, #EFF6FF);
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.solution-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;
}

/* --- 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; }
}

/* --- 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;
}

/* --- 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);
}

/* --- 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);
}

/* --- 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 items --- */
.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; }

/* --- Project Gallery (Soluções) --- */
.project-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 300px 250px;
  gap: 8px;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}
.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-item:hover img { transform: scale(1.06); }

.project-item--featured { grid-row: 1 / 3; }
.project-item--wide     { grid-column: 2 / 4; }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,18,40,0.04) 0%,
    transparent 25%,
    rgba(0,18,40,0.45) 62%,
    rgba(0,18,40,0.92) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: background 0.35s ease;
}
.project-item:hover .project-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0,18,40,0.04) 0%,
    transparent 15%,
    rgba(0,18,40,0.35) 58%,
    rgba(0,18,40,0.82) 100%
  );
}

.project-num {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.07);
  font-family: 'Roboto Condensed', system-ui, sans-serif;
  pointer-events: none;
  user-select: none;
}
.project-item--featured .project-num { font-size: 8rem; }

.project-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #F5B800;
  background: rgba(245,184,0,0.13);
  border: 1px solid rgba(245,184,0,0.3);
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 5px;
}

.project-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0;
}
.project-item--featured .project-title { font-size: 1.125rem; }
.project-item--wide .project-title { font-size: 1rem; }

/* Project strip */
.project-strip {
  background: #001228;
  border-radius: 20px;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .project-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  .project-strip-cta { flex-shrink: 0; }
}

.project-strip-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex: 1;
}

.project-fact-value {
  font-size: 1rem;
  font-weight: 800;
  color: #F5B800;
  margin-bottom: 2px;
  font-family: 'Roboto Condensed', system-ui, sans-serif;
  letter-spacing: 0.02em;
}
.project-fact-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

/* Responsive: tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .project-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 200px;
  }
  .project-item--featured { grid-row: auto; }
  .project-item--wide     { grid-column: auto; }
  .project-strip { padding: 24px 28px; }
}

/* Responsive: mobile */
@media (max-width: 639px) {
  .project-gallery {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .project-item { height: 240px; border-radius: 12px; }
  .project-item--featured { height: 280px; }
  .project-strip { padding: 20px; border-radius: 16px; }
  .project-strip-facts { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

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