/* ============================================================
   PORTFÓLIO MARCOS DEZULA
   Altere as cores e fontes aqui no topo. O resto do arquivo
   usa essas variáveis.
   ============================================================ */
:root {
  --preto: #050505;
  --vermelho: #e8432a;        /* vermelho principal (bordas, selo, destaques) */
  --vermelho-escuro: #8a1c0f; /* fundo do final da página */
  --vermelho-vivo: #ff5a3c;
  --branco: #ffffff;
  --cinza: #bdbdbd;
  --fonte-titulo: "Bebas Neue", Impact, sans-serif;
  --fonte-texto: "Montserrat", Arial, sans-serif;
  --fonte-italico: "Playfair Display", Georgia, serif;
  --largura: 1040px;
  --raio: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--fonte-texto);
  color: var(--branco);
  background: var(--preto);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* O fundo vai de preto (topo) para vermelho escuro (final). */
body {
  background:
    linear-gradient(180deg,
      var(--preto) 0%,
      var(--preto) 62%,
      #3a0d07 78%,
      var(--vermelho-escuro) 90%,
      #c2411f 100%);
}

section, .divisor, footer {
  width: min(var(--largura), 100% - 32px);
  margin-inline: auto;
}

strong { font-weight: 700; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--vermelho-vivo); }

/* ---------- Selo "PORTFÓLIO" ---------- */
.topo { text-align: center; }
.selo {
  display: inline-block;
  background: var(--vermelho);
  color: var(--branco);
  font-family: var(--fonte-titulo);
  font-size: 1.1rem;
  letter-spacing: .16em;
  padding: 6px 90px 8px;
  border-radius: 0 0 22px 22px;
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; }

.nome {
  margin: 0 0 40px;
  font-family: var(--fonte-titulo);
  font-size: clamp(4.2rem, 13vw, 9.5rem);
  line-height: .9;
  letter-spacing: .01em;
  display: flex;
  flex-wrap: wrap;
  gap: 0 .22em;
}
.nome-claro {
  background: linear-gradient(180deg, #ffffff 35%, #7a7a7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nome-vermelho {
  background: linear-gradient(180deg, #ff6a4a 25%, #b22b17 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bio { max-width: 820px; font-size: .95rem; }
.bio p { margin: 0 0 14px; }
.bio-nome { font-weight: 700; margin-bottom: 0 !important; }
.bio-cargo { color: var(--cinza); margin-bottom: 22px !important; }

/* ---------- Frase de impacto ---------- */
.frase {
  position: relative;
  padding: 70px 0 30px 20px;
}
.aspas {
  position: absolute;
  left: -30px;
  top: -40px;
  font-family: var(--fonte-italico);
  font-size: 22rem;
  line-height: 1;
  color: var(--vermelho);
  opacity: .9;
  pointer-events: none;
}
.frase h2 {
  position: relative;
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}
.frase-sub {
  display: block;
  font-weight: 400;
  font-size: .72em;
  margin-top: 6px;
}
.frase-sub em {
  font-family: var(--fonte-italico);
  font-style: italic;
  color: var(--vermelho-vivo);
}

/* ---------- Vídeo destaque com fundo pontilhado ---------- */
.destaque {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 40px 0 60px;
}
.pontos {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(560px, 100%);
  height: 100%;
  background-image: radial-gradient(circle, rgba(232,67,42,.75) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  pointer-events: none;
}
.destaque figure.destaque-video {
  position: relative;
  width: 250px;
  flex: none;
  box-shadow: 0 0 60px rgba(232,67,42,.45), 0 0 120px rgba(232,67,42,.25);
}

/* ---------- Galerias ---------- */
.galeria { padding: 50px 0 10px; text-align: center; }
.galeria h3 {
  margin: 0 0 28px;
  font-size: 1.25rem;
  font-weight: 700;
}
.grade {
  display: grid;
  gap: 24px;
  justify-items: center;
}
.grade.horizontal { grid-template-columns: repeat(3, 1fr); }
.grade.vertical  { grid-template-columns: repeat(3, 240px); justify-content: center; }
.grade.vertical.duas { grid-template-columns: repeat(2, 240px); }
.grade.vertical.uma { grid-template-columns: 280px; }
.grade.vertical.quatro { grid-template-columns: repeat(4, minmax(0, 230px)); }
.grade.horizontal.duas { grid-template-columns: repeat(2, 1fr); }

.chamada {
  margin: 36px auto 0;
  font-size: .95rem;
  max-width: 760px;
}

/* ---------- Vídeos ---------- */
figure.video {
  position: relative;
  margin: 0;
  width: 100%;
  border: 1.5px solid var(--vermelho);
  border-radius: var(--raio);
  overflow: hidden;
  background: #0d0d0d;
}
figure.video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d0d0d;
}
figure.video.horizontal { aspect-ratio: 16 / 9; }
figure.video.vertical   { aspect-ratio: 9 / 16; }

/* Botão de play sobre a capa */
figure.video .play {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--vermelho);
  color: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(232,67,42,.5);
  transition: transform .2s ease, background .2s ease;
}
figure.video:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--vermelho-vivo); }
figure.video.horizontal .play { top: 38%; }
figure.video.tocando .play,
figure.video.sem-video .play { display: none; }

/* Aviso exibido só quando o arquivo de vídeo ainda não existe */
.video-aviso {
  display: none;
  position: absolute;
  inset: 0;
  padding: 16px;
  flex-wrap: wrap;
  gap: 0 .35em;
  align-content: center;
  justify-content: center;
  text-align: center;
  font-size: .75rem;
  color: var(--cinza);
  background: repeating-linear-gradient(45deg, #111 0 10px, #161616 10px 20px);
}
.video-aviso code { color: var(--vermelho-vivo); }
figure.video.sem-video video { display: none; }
figure.video.sem-video .video-aviso { display: flex; }

/* ---------- Divisor com ícone ---------- */
.divisor {
  position: relative;
  height: 2px;
  background: var(--branco);
  margin-top: 40px;
  margin-bottom: 10px;
}
.divisor-icone {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--preto);
  color: var(--vermelho);
  padding: 0 14px;
  display: flex;
}
.divisor.fino { background: rgba(255,255,255,.9); margin: 50px auto 40px; }

/* ---------- Antes x Depois ---------- */
.antes-depois { padding-top: 70px; }
.titulo-grande {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 30px;
  line-height: 1.1;
}
.galeria h3.titulo-grande { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
.vermelho { color: var(--vermelho-vivo); }

/* ---------- Ferramentas ---------- */
.ferramentas {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: start;
  padding: 90px 0 10px;
}
.ferramentas .titulo-grande { font-size: clamp(1.9rem, 5vw, 2.9rem); }
.ferramentas em {
  font-family: var(--fonte-italico);
  font-style: italic;
  color: var(--vermelho-vivo);
  font-weight: 500;
}
.lista-ferramentas {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: .9rem;
}
.lista-ferramentas li { margin-bottom: 14px; }
.ferramentas-texto p { font-size: .9rem; margin: 0; }

.icones {
  display: grid;
  grid-template-columns: 70px 70px;
  gap: 10px;
  margin-top: 50px;
  transform: rotate(-6deg);
}
.icone {
  width: 76px;
  height: 76px;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.45));
}
.icone-ae  { grid-column: 2; }
.icone-fcp { transform: translate(10px, -22px); }

/* ---------- Contato ---------- */
.contato { padding: 10px 0 40px; }
.lista-contato {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
}
.lista-contato li {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.lista-contato a { display: flex; align-items: center; gap: 14px; }
.contato-icone {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ---------- Rodapé com marca d'água ---------- */
.rodape {
  width: 100%;
  overflow: hidden;
  text-align: center;
  padding-top: 40px;
}
.marca-dagua {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-size: clamp(5rem, 15vw, 12rem);
  line-height: .85;
  white-space: nowrap;
  color: rgba(255,255,255,.16);
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .grade.vertical { grid-template-columns: repeat(3, minmax(0, 220px)); }
  .grade.vertical.quatro { grid-template-columns: repeat(2, minmax(0, 240px)); }
  .ferramentas { grid-template-columns: 1fr; }
  .icones { margin-top: 10px; justify-content: start; }
}
@media (max-width: 680px) {
  .selo { padding-inline: 50px; }
  .grade.horizontal, .grade.horizontal.duas { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .grade.vertical, .grade.vertical.duas, .grade.vertical.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade.vertical.uma { grid-template-columns: minmax(0, 260px); }
  .aspas { font-size: 10rem; left: -10px; top: 20px; }
  .frase { padding-left: 10px; }
  .destaque figure.destaque-video { width: 220px; }
}
@media (max-width: 420px) {
  .grade.vertical, .grade.vertical.quatro { grid-template-columns: minmax(0, 260px); }
}

/* ---------- Carrossel 3D no celular ---------- */
.pontos-carrossel { display: none; }
.grade > .slot { display: contents; }   /* no computador a caixa some e a grade fica igual */
@media (max-width: 680px) {
  section.galeria .grade.carrossel {
    display: flex;
    justify-content: flex-start;
    justify-items: initial;
    gap: 0;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(50% - 50vw);
    max-width: none;
    /* Espaço extra em cima e embaixo para a sombra laranja não ser cortada pela rolagem;
       as margens negativas devolvem esse espaço para o layout continuar igual. */
    padding: 40px calc((100vw - var(--item)) / 2) 72px;
    margin-top: -22px;
    margin-bottom: -50px;
    --item: 64vw;
  }
  section.galeria .grade.carrossel::-webkit-scrollbar { display: none; }
  section.galeria .grade.carrossel.horizontal { --item: 82vw; }
  section.galeria .grade.carrossel > .slot {
    display: block;
    position: relative;
    flex: 0 0 var(--item);
    width: var(--item);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  section.galeria .grade.carrossel > .slot > figure.video {
    width: 100%;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-origin: 50% 50%;
  }
  /* Brilho do vídeo central, sem transição para não pesar no celular */
  section.galeria .grade.carrossel > .slot > figure.video.ativo { box-shadow: 0 16px 40px rgba(232,67,42,.32); }
  section.galeria .grade.carrossel > .slot > figure.video .play { transition: opacity .25s ease, transform .2s ease, background .2s ease; }
  section.galeria .grade.carrossel > .slot > figure.video:not(.ativo) .play { opacity: 0; pointer-events: none; }

  .pontos-carrossel {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }
  .pontos-carrossel button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
  }
  .pontos-carrossel button.ativo { width: 22px; background: var(--vermelho); }
}
