@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Rubik+Glitch&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: 1s;
}

/***  VARIABLES & THEMES ***/
:root {
  --primary-color: #cf0f0f;
  --primary-color-contrast: #ffffff;
  --field-background-color: #000;
}

.light-theme {
  --page-background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 65%,
    rgba(255, 255, 255, 0.75) 100%
  );
  --header-background-color: #e3e3e3;
  --highlight-color: #000000;
  --featured-font-family: "Archivo", sans-serif;
  --character-top-image-src: url("../images/characters/kids-on-the-bike.svg");
  --character-top-image-color: #ffffff;
  --character-bottom-image-src: url("../images/characters/inverted-world-monster.svg");
  --character-bottom-image-color: #e5e5e5;
  --background-lamp-image: url("../images/backgrounds/lamps.png");
  --footer-background-color: #b5bbbf;
}

.dark-theme {
  --page-background: linear-gradient(
    180deg,
    #050000 0%,
    #130404 65%,
    rgba(19, 1, 1, 0.75) 100%
  );
  --header-background-color: #220f0f;
  --highlight-color: #ffffff;
  --featured-font-family: "Rubik Glitch", sans-serif;
  --character-bottom-image-src: url("../images/characters/kids-on-the-bike.svg");
  --character-bottom-image-color: rgba(255, 255, 255, 0.1);
  --character-top-image-src: url("../images/characters/inverted-world-monster.svg");
  --character-top-image-color: #000;
  --background-lamp-image: url("../images/backgrounds/lamps-inverted.png");
  --footer-background-color: #000;
}
/***  GLOBAL STYLES ***/

.dark-theme button,
.dark-theme h1,
.dark-theme h2,
.dark-theme h3 {
  letter-spacing: 5px;
  font-weight: normal;
}
h1,
h2,
h3 {
  font-family: var(--featured-font-family);
  font-size: 3rem;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.dark-theme .invert-element {
  transform: rotateZ(180deg) scaleX(-1);
}

p {
  color: var(--highlight-color);
}

p,
input,
textarea,
label {
  font-family: "Libre Baskerville", serif;
}

button {
  padding: 16px 32px;
  background-color: transparent;
  font-weight: 900;
  font-family: var(--featured-font-family);
  font-size: 1.25rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 1s;
}

input,
textarea {
  border: 2px solid var(--primary-color-contrast);
  background-color: var(--field-background-color);
  color: var(--primary-color-contrast);
  padding: 8px;
  margin-bottom: 24px;
  font-size: 1rem;
}

label {
  margin-bottom: 8px;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: black;
}

/***  HEADER ***/

header {
  background-color: var(--header-background-color);
  min-height: 850px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative; /* faz com que a imagem de fundo respeite a limitação do header */
}

header::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: url(../images/banner/florest.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 90%;
  filter: saturate(0); /* Remove saturation for dark theme */
  opacity: 0.2; /* Adjust opacity for better visibility */
}

.header-content {
  max-width: 700px;
  padding: 80px 20px;
  text-align: center;
  z-index: 2; /* Ensures content is above the imagem de fundo */
}

.header-content img {
  width: 80%;
}

.header-content p {
  margin: 30px 0 50px;
}

.header-content button {
  border: 3px solid var(--primary-color);
  color: var(--primary-color);
}

.header-content button:hover {
  background-color: var(--primary-color);
  color: var(--primary-color-contrast);
}

/***  WORLD CHARACTERS STYLES  ***/

.world-characters {
  position: absolute;
  width: 100%;
  max-width: 900px;
}

.world-characters#top-characters {
  height: 100%;
  background-color: var(--character-top-image-color);

  mask: var(--character-top-image-src) bottom / contain no-repeat; /* máscara para a imagem possibilita a mudança de cor do svg com background-color */
  -webkit-mask: var(--character-top-image-src) bottom / 100% no-repeat; /* máscara para a imagem no Safari */
}

.world-characters#bottom-characters {
  top: 3px;
  height: 500px;
  background-color: var(--character-bottom-image-color);

  transform: rotateZ(180deg) scaleX(-1); /* inverte a imagem horizontalmente */
  position: relative; /* faz com que a imagem de fundo  fique abaixo de .world-characters#top-characters*/

  mask: var(--character-bottom-image-src) top / contain no-repeat; /* máscara para a imagem possibilita a mudança de cor do svg com background-color */
  -webkit-mask: var(--character-bottom-image-src) top / contain no-repeat; /* máscara para a imagem no Safari */
}

/***  MAIN STYLES ***/

main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  background: var(--page-background) no-repeat,
    url(../images/backgrounds/florest.png) no-repeat;
  background-size: cover;
  z-index: -1;
}

/***  SECTIONS STYLES ***/

section {
  display: flex;
  justify-content: space-between;
  margin-bottom: 95px;
}

/***  SECTION 1 STYLES INVERTED WORLD ***/

.container {
  max-width: 1200px;
}

#section-inverted-world {
  align-items: center;
}

#section-inverted-world .section-texts {
  width: 50%;
}

#section-inverted-world .section-texts h2 {
  max-width: 300px;
}

/* SECTION 2 STYLES INVERTED WORLD */

#section-stranger-things-trailer .section-texts {
  width: 50%;
  text-align: right;
}

#section-stranger-things-trailer .section-texts h2 {
  max-width: 425px; /* para que o h2 quebre a çinha conforme o design */
  display: inline-block; /* para que o h2 respeite o alinhamento a direita */
}

#section-stranger-things-trailer .video-frame {
  background-color: var(--primary-color);
}

#section-stranger-things-trailer .video-frame iframe {
  position: relative;
  bottom: 24px;
  left: 24px;
  border: 2px solid;
  border-image: linear-gradient(
    var(--primary-color),
    var(--primary-color-contrast)
  );
  border-image-slice: 100; /* para que a borda tenha o gradiente */
}

/***  SECTION 3 STYLES STRANGER THINGS GALLERY ***/

#section-stranger-things-gallery {
  width: 100%;
  justify-content: center;
  background: var(--background-lamp-image) 120% /50% no-repeat;
}

#section-stranger-things-gallery .container {
  width: 100%; /* para que a galeria ocupe toda a largura do container */
}

#section-stranger-things-gallery .container h2 {
  width: 800px; /* para que o h2 quebre a linha conforme o design */
}

#section-stranger-things-gallery .gallery-container {
  display: flex;
  gap: 50px; /* espaçamento entre as imagens (Usado apenas em conjunto com display flex)*/
}

#section-stranger-things-gallery .gallery-image {
  width: 250px;
  height: 250px;
  outline: 10px solid var(--highlight-color);
  border: 3px solid var(--primary-color);
  box-sizing: initial; /* faz com que o outline não aumente o tamanho da imagem */
}

#section-stranger-things-gallery .gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* faz com que a imagem preencha todo o espaço do container sem distorcer */
  border: 10px solid var(--highlight-color);
}

/***  SECTION 4 STYLES  D&D FORM ***/

#section-form {
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

#section-form h2 {
  width: 600px;
}

#section-form .form-content h3 {
  color: var(--highlight-color);
  flex-basis: 30%; /* para que o h3 ocupe 30% do espaço disponível */
  text-align: left;
  margin: 0;
}

#section-form .form-content h3 span {
  color: var(--primary-color);
}

#section-form .form-content {
  display: flex;
  flex-direction: space-between;
  align-items: center;
}

#section-form .form-container {
  flex-basis: 50%;
  position: relative;
}

#section-form .form-container::after {
  content: "";
  background-color: var(--highlight-color);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: -1; /* faz com que o background fique atrás do formulário */
}

#section-form .form-container form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background-color: var(--primary-color);
  color: var(--primary-color-contrast);
  text-align: left;
}

#section-form .form-container form button {
  border: none;
  background-color: var(--field-background-color);
  color: var(--primary-color-contrast);
  max-width: 300px;
  align-self: center; /* para que o botão fique centralizado */
}

#section-form .form-container form button:hover {
  background-color: var(--primary-color-contrast);
  color: var(--field-background-color);
}

/***  FOOTER STYLES ***/
footer {
  padding: 60px 0;
  background-color: var(--footer-background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative; /* faz com que a imagem de fundo respeite a limitação do footer */
  overflow: hidden; /* para que a imagem de fundo não ultrapasse os limites do footer */
}

footer p {
  max-width: 700px;
  margin-bottom: 24px;
}

footer::before,
footer::after {
  content: "";
  width: 300px;
  height: 200px;
  position: absolute;
  background-image: url(../images/footer/tape.svg);

  background-size: contain;
  position: absolute;
  bottom: -30px;
}

footer::before {
  left: -50px;
  transform: rotateZ(-10deg);
}

footer::after {
  right: -50px;
  transform: rotateZ(10deg);
}
