\documentclass[a4paper]{article}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{fontspec}
\usepackage{import}
\usepackage[table,xcdraw]{xcolor}
\usepackage[parfill]{parskip}
\usepackage{enumitem}
\usepackage{tabularx}
\usepackage{titlesec}
\usepackage{tikz}
\usepackage{stix}
\usetikzlibrary{shapes,shadows,calc}
\usetikzlibrary{positioning,calc}

\pagestyle{fancy}
\fancyhf{}
\fancyheadoffset{0pt}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[R]{\thepage}
\fancypagestyle{plain}{%
    \fancyhf{}%
    \fancyhead[R]{\thepage}%
}

\definecolor{titlecolor}{HTML}{ffb030}
\definecolor{diecolor}{HTML}{0c05e6}
\definecolor{tablecolor1}{HTML}{E0F4FC}
\definecolor{tablecolor2}{HTML}{EEE5CE}


\geometry{
    a4paper,
    left=45pt,
    right=45pt,
    top=20pt,
    bottom=20pt,
    headsep=-10pt
}

\setcounter{secnumdepth}{0}

\setmainfont[BoldFont=Cala W01 Bold]{Cala W01 Regular}
\newfontfamily\titlefont{Fontdiner Swanky}
\newfontfamily\subtitlefont{Futura}
\def\arraystretch{1.2}

\newcommand\SecTitle[1]{%
\begin{tikzpicture}
    \clip (0,0.75)--(15,0.75)--(14,-0.75)--(0,-0.75)--cycle;
    \path [draw=titlecolor,line width=1.5cm](0,0)--(20,0);
    \node [color=black,align=left,anchor=west] at (1,0) {\titlefont\huge#1};

\end{tikzpicture}

}

\titleformat{name=\section}[block]
  {}
  {}
  {0pt}
  {\SecTitle}
\titlespacing*{\section}{-50pt}{0pt}{0pt}

\titleformat{name=\subsection}[block]
  {\LARGE}
  {}
  {0pt}
  {\subtitlefont\MakeUppercase}[\hrule]
\titlespacing*{\subsection}{-10pt}{30pt}{5pt}

\newcommand{\dice}{$\color{diecolor}\mdblksquare$}

\begin{document}
\setcounter{page}{1}
\input{parts/basic.tex}
\newpage
\input{parts/combat_1.tex}
\newpage
\input{parts/combat_2.tex}

\end{document}