/* ═══════════════════════════════════════════════════════
   FULLTREINA — Componentes reutilizáveis (todas as páginas)
   Botões · Header · Section-head · Catálogo/cards de serviço
   Footer · Reveals de scroll · Responsivo · Motion reduzido
   ═══════════════════════════════════════════════════════ */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  border-radius: 60px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--tr);
  letter-spacing: 0.02em;
}

.btn-sm { padding: 0.6rem 1.5rem; font-size: 0.85rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: white;
  box-shadow: 0 4px 30px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(59,130,246,0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.08);
}

.btn-whats {
  background: #25d366;
  color: #05240f;
}
.btn-whats:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(37,211,102,0.3); }

.btn-block { display: flex; width: 100%; }


/* ═══════════════════ HEADER ═══════════════════ */
header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--tr);
}

header.scrolled {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}
.logo span { color: var(--accent); }

.nav-links {
  display: none;
  list-style: none;
  gap: 2.2rem;
  margin-left: auto;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  z-index: 1001;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  transition: var(--tr-fast);
  display: block;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}
.nav-cta { display: none; }
@media (min-width: 1024px) {
  .nav-cta { display: inline-flex; }
}

/* Mobile nav */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100dvh;
  background: var(--bg);
  justify-content: center;
  align-items: center;
  gap: 2rem;
  z-index: 999;
  margin: 0;
}
.nav-links.open a { font-size: 1.5rem; color: var(--white); }


/* ═══════════════════ SECTION COMMON ═══════════════════ */
section {
  padding: 8rem 0;
  position: relative;
}

.section-head {
  margin-bottom: 4rem;
}
.section-head.centered { text-align: center; }

.section-label { margin-bottom: 1rem; }

.badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  border-radius: 60px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 1px solid rgba(59,130,246,0.15);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.2rem;
}
.section-head .section-title { margin-bottom: 1.2rem; }

.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 720px;
}
.section-head.centered .section-desc { margin-inline: auto; }


/* ═══════════════════ 4. CATÁLOGO DE SERVIÇOS ═══════════════════ */
#servicos { padding: 9rem 0; }

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.filtro {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 60px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--tr-fast);
}
.filtro .swatch {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.filtro:hover { color: var(--white); border-color: var(--slate); }
.filtro[aria-pressed="true"] {
  color: var(--white);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 10%, transparent);
}
.filtro[data-filtro="todos"] { --c: var(--accent); }

.servicos-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.servico-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), opacity 0.3s ease;
}
.servico-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent));
}
.servico-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 22px 60px rgba(0,0,0,0.45), 0 0 34px color-mix(in srgb, var(--c) 15%, transparent);
}
.servico-card.hidden { display: none; }

.servico-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.servico-icon {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 1.3rem;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}

.servico-num {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--c) 30%, transparent);
  line-height: 1;
}

.servico-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--c);
  margin-bottom: 0.6rem;
  display: block;
}

.servico-card h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin-bottom: 0.8rem;
}
.servico-card h3 a { display: block; }
.servico-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.servico-resumo {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.servico-foot {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.servico-foot .ver {
  color: var(--c);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.servico-card:hover .ver .icon { transform: translateX(3px); }
.servico-foot .ver .icon { transition: transform 0.3s var(--ease); }

.catalogo-vazio {
  text-align: center;
  color: var(--muted);
  padding: 3rem 0;
}


/* ═══════════════════ FOOTER ═══════════════════ */
footer {
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
}

.footer-brand p {
  color: var(--muted);
  margin-top: 0.8rem;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--slate);
  font-size: 0.85rem;
}


/* ═══════════════════ SCROLL REVEAL ═══════════════════ */
.reveal-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-fade.active { opacity: 1; transform: translateY(0); }

.reveal-slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-slide-up.active { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }


/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 640px) {
  section { padding: 5rem 0; }
  #hero { min-height: auto; padding: 8rem 0 5rem; }
  .hero-title { min-height: auto; }
  .hero-btns { flex-direction: column; gap: 0.9rem; }
  .hero-btns .btn { width: 100%; }
  .hero-meta { gap: 1.5rem; }
  .hero-scroll-indicator { display: none; }
  .testimonial-card { padding: 1.8rem; }
  .authority-block { padding: 2rem; }
  .case-grid { grid-template-columns: repeat(10, 1fr); }
  .servico-aside { position: static; }
}


/* ═══════════════════ MOTION REDUZIDO ═══════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-fade, .reveal-slide-up, .case-cell {
    opacity: 1 !important;
    transform: none !important;
  }
  #hero-canvas, #differentials-canvas { display: none; }
  .typewriter-cursor { display: none; }
}
