/* ===============================
   BASE GLOBAL
================================ */

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;

  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-regular);
  line-height: 1.7;

  background-color: var(--color-black);
  color: var(--color-white);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===============================
   TEXTOS
================================ */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md);
  font-weight: var(--font-semibold);
  line-height: 1.2;
}

h1 {
  font-size: var(--font-size-xxl);
}

h2 {
  font-size: var(--font-size-xl);
  position: relative;
  text-align: center;
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) 0;
}

h2::before,
h2::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
}

h2::before {
  left: calc(50% - 140px);
}

h2::after {
  right: calc(50% - 140px);
}

h3 {
  font-size: var(--font-size-lg);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--color-gray-light);
}

/* Destaque (ex: hero) */
.highlight {
  color: var(--color-primary);
}

/* ===============================
   LINKS
================================ */

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

a:hover {
  opacity: 0.8;
}

/* ===============================
   IMAGENS & VÍDEOS
================================ */

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   LISTAS
================================ */

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

/* ===============================
   BOTÕES
================================ */

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

/* ===============================
   CONTAINER PADRÃO
================================ */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ===============================
   SEÇÕES
================================ */

section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

section:not(#hero) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

/* ===============================
   RESPONSIVO
================================ */

@media (max-width: 767px) {
  h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }

  h2::before,
  h2::after {
    position: static;
    width: 40px;
    flex: 0 0 40px;
    top: auto;
    transform: none;
  }
  
  h2::before {
    left: auto;
  }
  
  h2::after {
    right: auto;
  }
}

/* ===============================
   ACESSIBILIDADE
================================ */

button:focus,
a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}
