Hey, nice game
Im fairly new to c++ too, but i think i can point some stuff out.
Firstly i think sf::Sleep is the wrong way to go, though you have wrote some interesting code lol.
Use sf::Time and sf::Clock.
sf::Time passed_time // outside loop
passed_time += clock.restart(); // inside loop
if(passed_time >= sf::seconds(1.f / 2.f))
//do something
Also i think 'break' statement goes inside the {}.
Passing my reference seems more logical for me, unless you want to take ownership with pointers or something.
and by reference it is: void introduction(sf::RenderWindow& main);
and introduction(window);
What is also important that you should not load the font anew every time.
You load "arial.ttf" twice, thats a waste
Loading resources is usually slow, so better do it outside loop, and pass it in.
It may seem "unclean" because of the number of things you have to pass in, but its okay.
To solve this, you should learn object oriented c++ (classes, inheretence..), it really isnt hard.
With function you could try to sort out things a bit better. Like:
// function definitions
int main()
{
// declare variables
// initialize variables (load resources)
// create game loop
// get input - function
// update logic - function
// render - function
}
And you maybe want to add this: sf::Window::setKeyRepeatEnabled(bool).
If you set it to false, you want receive multiple events for one e.g. key press.
I am not sure where the problem exactly is, but i think you should rewrite every thing.
BEST ADVICE: i really really recommend that you take some c++ book and read about classes, inheretence, polymorphism, abstraction, encapsulation, understand those terms and try to apply them. With them you will be able to create more complicated games EASY.