/* ==========================================================================
   AGR Consultores — styles.css
   Port fiel de src/index.css (camadas @layer base/components/utilities do
   Tailwind expandidas para CSS puro, pois o Tailwind via CDN não processa
   arquivos .css externos nem @apply).
   Fontes (Outfit + Inter) são carregadas no <head> de cada HTML.
   ========================================================================== */

/* ---------- Variáveis (idênticas ao :root original) ---------- */
:root {
  --navy: #001D32;
  --off-white: #F5F1EB;
  --white: #FFFFFF;
  --black: #1A1A1A;
  --green: #A1CD46;
  --muted: rgba(255,255,255,0.6);
  --muted-light: rgba(5,17,45,0.5);
  --gold: #C4A265;
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted-color: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.625rem;
}

/* ---------- Base (@layer base) ----------
   Seletores com especificidade levemente maior (html …) para vencer o
   preflight do Tailwind CDN, que é injetado depois deste arquivo. As classes
   utilitárias (.text-white, .font-bold…) continuam vencendo normalmente. */
html *,
html *::before,
html *::after {
  border-color: hsl(var(--border));
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: auto;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

html body {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  background-color: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html h1,
html h2,
html h3,
html h4,
html h5,
html h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

/* ---------- Componentes (@layer components) ---------- */
.font-display { font-family: 'Outfit', sans-serif; }
.font-body    { font-family: 'Inter', sans-serif; }

.text-navy     { color: var(--navy); }
.bg-navy       { background-color: var(--navy); }
.text-green    { color: var(--green); }
.bg-green      { background-color: var(--green); }
.text-off-white { color: var(--off-white); }
.bg-off-white  { background-color: var(--off-white); }
.text-muted-w  { color: var(--muted); }
.text-muted-n  { color: var(--muted-light); }

.section-padding {
  padding-top: 120px;
  padding-bottom: 120px;
}

.container-main {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1024px) {
  .container-main {
    padding-left: 48px;
    padding-right: 48px;
  }
}

.btn-light {
  display: inline-block;
  border: 1px solid white;
  background: transparent;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
}

.btn-light:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
}

.btn-dark {
  display: inline-block;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
}

.btn-dark:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
}

.btn-green {
  display: inline-block;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
}

.btn-green:hover {
  background: transparent;
  color: var(--green);
}

.caption {
  font-family: 'Inter', sans-serif;
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-hero {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
}

.text-section {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.15;
}

.text-card {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.3;
}

.text-body {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.65;
}

/* ---------- Utilidades customizadas (@layer utilities) ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-shadow {
  box-shadow: 0 4px 24px rgba(5, 17, 45, 0.08);
}

.card-shadow-hover,
.hover\:card-shadow-hover:hover {
  box-shadow: 0 8px 40px rgba(5, 17, 45, 0.12);
}

/* ---------- Smooth scroll com Lenis ---------- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ---------- Marquee de clientes (4 fileiras) ---------- */
.marquee-row {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation-name: marquee-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.marquee-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(1) brightness(2.2);
  opacity: 0.55;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.marquee-item:hover .marquee-logo {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: scale(1.08);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

@media (max-width: 768px) {
  .marquee-logo { height: 32px; max-width: 110px; }
  .marquee-item { padding: 0 1.25rem; }
}

/* ---------- Marquee animation ---------- */
@keyframes marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.animate-marquee {
  animation: marquee 25s linear infinite;
  will-change: transform;
}

/* ---------- Float animation (dashboard) ---------- */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .animate-float {
    animation: none;
  }
}

/* ---------- DotField (src/components/DotField.css) ---------- */
.dot-field-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---------- Spinner do PageLoader (App.tsx) ---------- */
/* .animate-spin já vem do Tailwind; nada extra necessário. */


/* ==========================================================================
   Case Eficiência — estilos específicos da página
   Adicione ao final do styles.css existente
   ========================================================================== */

/* Estado inicial dos elementos .animate-in (antes do GSAP assumir) */
.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Quando JS não carrega ou prefere-se reduced motion, garante visibilidade */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Botão ativo dos projetos (navegação horizontal) */
.projeto-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.projeto-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.projeto-btn.ativo {
  background: #A1CD46;
  color: #001D32;
  font-weight: 500;
  border-color: #A1CD46;
}

/* Item da lista de "Na prática, ajudamos..." */
.projeto-lista-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.projeto-lista-item .check-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: rgba(161, 205, 70, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.projeto-lista-item .check-icon svg {
  width: 0.75rem;
  height: 0.75rem;
  color: #A1CD46;
}

.projeto-lista-item span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

/* Ajuste do botão light para uso inline no dark bg */
.btn-light svg {
  transition: transform 0.2s ease;
}

.btn-light:hover svg {
  transform: translateX(3px);
}

/* Garantir quebra de linha correta no título hero em mobile */
@media (max-width: 640px) {
  .text-hero {
    font-size: clamp(32px, 9vw, 48px);
  }
}