/* ==========================================================================
   MEX — Design tokens
   ========================================================================== */
:root {
  --preto: #0d0d0d;
  --preto-2: #1a1a1a;
  --preto-3: #292929;
  --preto-profundo: #000000;
  --off-white: #f1f1f1;
  --branco: #ffffff;
  --texto-escuro: #141414;
  --texto-muted: #5c5c5c;

  --font-impacto: "Unbounded", "Poppins", sans-serif;
  --font-ui: "Poppins", "Gilroy", "Sora", sans-serif;

  --container-w: 1180px;
  --radius: 18px;
  --transition: 0.35s cubic-bezier(.22,.61,.36,1);
  --ease-pop: cubic-bezier(.16,1,.3,1);
}

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

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--texto-escuro);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0; font-family: var(--font-impacto); line-height: 1.05; }

p { margin: 0; line-height: 1.6; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--preto);
  color: var(--branco);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* Compensa o header fixo ao rolar suavemente até uma âncora do menu */
section[id] { scroll-margin-top: 90px; }

/* ==========================================================================
   Sections — alternância preto / off-white
   ========================================================================== */
.section-dark, .hero, .services-section, .contact-section {
  position: relative;
  background: var(--preto);
  color: var(--off-white);
  padding: 96px 0;
  overflow: hidden;
}

.section-light {
  position: relative;
  background: var(--off-white);
  color: var(--texto-escuro);
  padding: 96px 0;
  overflow: hidden;
}

/* Faixa decorativa com o wordmark repetido, encostada nas bordas das
   seções claras (a arte já vem com o mesmo fundo off-white, então
   emenda sem costura visível). Entra deslizando ao rolar a página até
   a seção, igual o resto do site (mesmo padrão do .fade-in). */
.section-light::before,
.section-light::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  background-image: url("../Imagens/faixa.png");
  background-repeat: repeat-y;
  background-size: 56px auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease-pop), transform 0.9s var(--ease-pop);
}
.section-light::before { left: 0; background-position: top left; transform: translateY(-36px); }
.section-light::after { right: 0; background-position: top right; transform: translateY(36px); transition-delay: 0.12s; }

.section-light.in-view::before,
.section-light.in-view::after {
  opacity: 1;
  transform: translateY(0);
}

.section-light .container { position: relative; z-index: 1; }

/* Subtle "cloud" texture for dark sections */
.texture-cloud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 480px 320px at 12% 15%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(ellipse 560px 380px at 85% 30%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse 500px 340px at 30% 85%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse 420px 300px at 90% 90%, rgba(255,255,255,0.07), transparent 60%);
}

/* Fine grid texture */
.texture-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(241,241,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241,241,241,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 40%, transparent 90%);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s ease, color var(--transition), border-color var(--transition), box-shadow .25s ease;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
}
.btn:active {
  transform: translateY(-2px) scale(0.96);
  transition-duration: .1s;
}
.btn .whatsapp-icon { transition: transform .35s var(--ease-pop); }
.btn:hover .whatsapp-icon { transform: rotate(-14deg) scale(1.1); }

.btn-cta {
  background: var(--branco);
  color: var(--preto);
}

.btn-ghost {
  background: transparent;
  color: var(--off-white);
  border-color: rgba(241,241,241,0.4);
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--branco);
  transform: translateY(101%);
  transition: transform .35s var(--ease-pop);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--branco);
  color: var(--preto);
}
.btn-ghost:hover::before, .btn-ghost:focus-visible::before {
  transform: translateY(0);
}

.btn-lg { padding: 15px 34px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(241,241,241,0.08);
  box-shadow: none;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.97);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  transition: height .3s ease;
}
.site-header.is-scrolled .header-inner { height: 62px; }

.brand { display: flex; align-items: center; }

/* Logo é uma imagem só (wordmark "mex" recortada da arte oficial) —
   uma entrada simples de fade + leve subida, sem etapas. */
.brand-wordmark {
  height: 26px;
  width: auto;
  opacity: 0;
  transform: translateY(6px);
  animation: brandWordmarkIn 0.5s ease-out 0.15s forwards;
}
@keyframes brandWordmarkIn {
  to { opacity: 1; transform: translateY(0); }
}

.footer-brand-wordmark { height: 24px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--off-white);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--branco);
  transition: right var(--transition);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-switch a { color: rgba(241,241,241,0.5); transition: color var(--transition); }
.lang-switch a:hover, .lang-switch a:focus-visible { color: var(--branco); }
.lang-switch a.is-current { color: var(--branco); pointer-events: none; }
.lang-switch span { color: rgba(241,241,241,0.3); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--off-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.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); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 76px;
  background: var(--preto-profundo);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--off-white);
  font-weight: 600;
  margin-bottom: 26px;
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: rgba(241,241,241,0.88);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   O que a gente faz — tópicos explicativos
   ========================================================================== */
.services { position: relative; z-index: 1; }

.services-title {
  text-align: center;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  color: var(--off-white);
  margin-bottom: 18px;
}

.services-lead {
  font-family: var(--font-ui);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 52px;
  text-align: center;
  color: rgba(241,241,241,0.75);
}

/* Bento: o primeiro serviço ocupa um bloco 2x2 (o "carro-chefe"), os
   dois seguintes dividem uma coluna, e os três últimos fecham a base
   antes do card largo de encerramento — quebra a grade uniforme. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 1px;
  background: rgba(241,241,241,0.14);
  border: 1px solid rgba(241,241,241,0.14);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-topic {
  background: var(--preto);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  transition: background .3s ease, box-shadow .3s ease, transform .3s var(--ease-pop);
}
.service-topic:hover {
  background: var(--preto-2);
  transform: scale(1.015);
  box-shadow: inset 0 0 0 1px rgba(241,241,241,0.25);
  z-index: 1;
}

.service-topic:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; padding: 36px 32px; }
.service-topic:nth-child(2) { grid-column: 3; grid-row: 1; }
.service-topic:nth-child(3) { grid-column: 3; grid-row: 2; }
.service-topic:nth-child(4) { grid-column: 1; grid-row: 3; }
.service-topic:nth-child(5) { grid-column: 2; grid-row: 3; }
.service-topic:nth-child(6) { grid-column: 3; grid-row: 3; }
.service-topic--wide { grid-column: 1 / -1; }

.service-topic:nth-child(1) .service-topic-title { font-size: 1.5rem; }
.service-topic:nth-child(1) .service-topic-desc { font-size: 1rem; max-width: 420px; }

.service-topic-index {
  font-family: var(--font-impacto);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(241,241,241,0.45);
  transition: color .3s ease, transform .3s var(--ease-pop);
}
.service-topic:hover .service-topic-index {
  color: rgba(241,241,241,0.85);
  transform: translateX(4px);
}

.service-topic-title {
  font-family: var(--font-impacto);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--off-white);
  margin: 0;
}

.service-topic-desc {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(241,241,241,0.75);
  margin: 0;
}

/* ==========================================================================
   Section headings / shared type
   ========================================================================== */
.eyebrow {
  font-family: var(--font-impacto);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(241,241,241,0.6);
  margin-bottom: 18px;
}
.eyebrow--dark { color: rgba(20,20,20,0.6); }

.section-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  color: var(--texto-escuro);
  margin-bottom: 22px;
}
.section-title--onpurple { color: var(--off-white); }

.section-lead {
  font-family: var(--font-ui);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  max-width: 640px;
  color: var(--texto-muted);
  margin-bottom: 52px;
}
.section-lead--onpurple { color: rgba(241,241,241,0.85); }
.section-lead + .section-lead { margin-top: -32px; }

/* ==========================================================================
   Diferencial — pilares
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(20,20,20,0.14);
  border: 1px solid rgba(20,20,20,0.14);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}

.pillar {
  background: var(--off-white);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  transition: background .3s ease, box-shadow .3s ease, transform .3s var(--ease-pop);
}
.pillar:hover {
  background: var(--branco);
  transform: scale(1.015);
  box-shadow: inset 0 0 0 1px rgba(20,20,20,0.25);
  z-index: 1;
}

.pillar:nth-child(1) { grid-column: 1 / 3; grid-row: 1; padding: 32px 30px; }
.pillar:nth-child(1) .pillar-title { font-size: 1.3rem; }
.pillar:nth-child(1) .pillar-desc { font-size: 0.98rem; max-width: 440px; }
.pillar:nth-child(2) { grid-column: 3; grid-row: 1; }
.pillar:nth-child(3) { grid-column: 1; grid-row: 2; }
.pillar:nth-child(4) { grid-column: 2; grid-row: 2; }
.pillar:nth-child(5) { grid-column: 3; grid-row: 2; }

.pillar-title {
  font-family: var(--font-impacto);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--texto-escuro);
  margin: 0;
  transition: transform .3s var(--ease-pop);
}
.pillar:hover .pillar-title { transform: translateX(4px); }

.pillar-desc {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--texto-muted);
  margin: 0;
}

/* ==========================================================================
   Sobre nós
   ========================================================================== */
.about-copy {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: rgba(241,241,241,0.85);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.contact-copy {
  max-width: 620px;
  text-align: center;
}
.contact-copy .section-lead { margin-left: auto; margin-right: auto; }

.contact-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.whatsapp-btn { box-shadow: 0 12px 30px rgba(255,255,255,0.18); }
.whatsapp-btn:hover, .whatsapp-btn:focus-visible { box-shadow: 0 14px 34px rgba(255,255,255,0.28); }

.whatsapp-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 24px;
  margin: 0;
}
.social-links a {
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.social-links a:hover { color: var(--branco); border-color: var(--branco); }

/* ==========================================================================
   Sobre nós — time
   ========================================================================== */
#sobre { padding: 64px 0; }

.team {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 12px;
}

.team-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  transition: transform .3s var(--ease-pop);
}
.team-card:hover { transform: translateY(-4px); }

.team-photo-wrap { position: relative; flex-shrink: 0; width: 108px; }
.team-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 7px -7px -7px 7px;
  background: rgba(20,20,20,0.06);
  border: 1px solid rgba(20,20,20,0.16);
  border-radius: 14px;
  z-index: 0;
}
.team-photo {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.16);
}

.team-card-body { min-width: 0; }

.team-name {
  font-size: 0.98rem;
  color: var(--texto-escuro);
  margin-bottom: 1px;
}

.team-role {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--texto-muted);
  margin-bottom: 6px;
}

.team-bio {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--texto-muted);
  margin: 0;
  max-width: 640px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--preto-2);
  color: rgba(241,241,241,0.75);
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(241,241,241,0.12);
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a:hover { color: var(--branco); }

.footer-social { display: flex; gap: 20px; }
.footer-social a:hover { color: var(--branco); }

.footer-bottom {
  padding: 20px 24px 28px;
  text-align: center;
  font-size: 0.85rem;
}
.footer-bottom .lang-switch { margin-top: 10px; }

/* ==========================================================================
   Scroll-reveal animation
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.8s var(--ease-pop), transform 0.8s var(--ease-pop);
}
.fade-in.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Títulos: o texto entra deslizando de baixo pra cima, escondido atrás
   de uma máscara (efeito mais forte que o fade simples). */
.reveal-text { display: block; overflow: hidden; }
.reveal-text-inner {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s var(--ease-pop);
}
.reveal-text.in-view .reveal-text-inner {
  transform: translateY(0);
}

/* Cards em grid entram em cascata: cada item espera um pouco mais que
   o anterior (--stagger definido inline por item via JS). */
.services-grid .service-topic,
.pillars-grid .pillar {
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition: opacity 0.6s var(--ease-pop), transform 0.6s var(--ease-pop);
  transition-delay: calc(var(--stagger, 0) * 70ms);
}
.services-grid.in-view .service-topic,
.pillars-grid.in-view .pillar {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in, .reveal-text-inner, .service-topic, .pillar, .team-card {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .section-light::before, .section-light::after {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  /* Feedback de hover/clique continua existindo, só sem a transição
     animada — troca de estado instantânea em vez de suave. */
  .btn, .btn-ghost::before, .site-header, .header-inner {
    transition: none !important;
  }
  /* Logo do header/rodapé: mostra pronta direto, sem a entrada. */
  .brand-wordmark {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .pillar { padding: 26px 20px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--preto-2);
    padding: 18px 24px 26px;
    border-bottom: 1px solid rgba(241,241,241,0.12);
  }
  .main-nav.is-open ul { flex-direction: column; gap: 18px; }

  .header-actions .btn-cta { padding: 10px 18px; font-size: 0.88rem; }

  /* Sem espaço de sobra nas bordas em telas estreitas — a faixa
     atrapalharia o texto, então some. */
  .section-light::before, .section-light::after { display: none; }

  /* Bento vira grade 2 colunas mais simples: só o card 1 continua
     em destaque (mais largo), o resto flui em ordem normal. */
  .services-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .service-topic:nth-child(n) { grid-column: auto; grid-row: auto; }
  .service-topic:nth-child(1) { grid-column: 1 / -1; }
  .service-topic--wide { grid-column: 1 / -1; }

  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(n) { grid-column: auto; grid-row: auto; }
  .pillar:nth-child(1) { grid-column: 1 / -1; }

}

@media (max-width: 620px) {
  .section-dark, .hero, .services-section, .contact-section, .section-light {
    padding: 72px 0;
  }
  .team-card { flex-direction: column; gap: 14px; }
  .team-photo-wrap, .team-photo { width: 88px; height: 88px; }
  .services-grid, .pillars-grid { grid-template-columns: 1fr; }
  .service-topic:nth-child(1), .pillar:nth-child(1) { grid-column: auto; }
  .hero { padding-top: 120px; }
}
