To solve this problem, we need to define the decision variables, the objective function, and the constraints. Let's break down the information given:

- Decision variables: 
  - \(S\): Number of superhero costumes made.
  - \(F\): Number of fantasy costumes made.

- Objective function: Maximize total profit.
  - Profit per superhero costume: $24
  - Profit per fantasy costume: $32
  - Total profit = \(24S + 32F\)

- Constraints:
  1. Time constraint: It takes 20 minutes to make a superhero costume and 15 minutes to make a fantasy costume. The company has about 3000 minutes available.
     - \(20S + 15F \leq 3000\)
  2. Market research constraint: Make at least 3 times as many fantasy costumes as superhero costumes.
     - \(F \geq 3S\)
  3. Non-negativity constraints: The number of costumes cannot be negative.
     - \(S \geq 0\), \(F \geq 0\)

Given these definitions, we can now formulate the optimization problem in Gurobi code.

```python
from gurobipy import *

# Create a new model
m = Model("Costume_Optimization")

# Define variables
S = m.addVar(lb=0, vtype=GRB.INTEGER, name="Superhero_Costumes")
F = m.addVar(lb=0, vtype=GRB.INTEGER, name="Fantasy_Costumes")

# Objective function: Maximize total profit
m.setObjective(24*S + 32*F, GRB.MAXIMIZE)

# Constraints
m.addConstr(20*S + 15*F <= 3000, "Time_Constraint")
m.addConstr(F >= 3*S, "Market_Research_Constraint")

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Superhero Costumes: {S.x}")
    print(f"Fantasy Costumes: {F.x}")
    print(f"Total Profit: ${24*S.x + 32*F.x}")
else:
    print("No optimal solution found.")
```