/* @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap'); */
@import './google-fonts.css';

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

html {
  --primary-colr: #fff;

  --h-colr: #4b7eff;
  --c-colr: #ff6464;
  --j-colr: #ffd966;
  --v-colr: #42b883;
  --r-colr: #8e67cd;

  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: var(--primary-colr);
}

body {
  font-family: 'Ubuntu', sans-serif;
}

.warning {
  position: fixed;
  bottom: 0;

  width: 100%;
  text-align: center;
  color: var(--primary-colr);
  font-size: 1.25rem;
  padding: 20px 0;
}
.warning::before {
  content: "*";
  position: absolute;
  color: #f00;
  transform: translateX(-10px);
}

nav {
  position: fixed;

  width: 100vw;
  height: 50px;
  line-height: 50px;
  background-color: #343434;

  display: flex;
  align-items: center;
}

nav a {
  flex: 1;
  
  font-size: 1.4rem;
  text-align: center;
  border: 2px solid #000;
  border-top-width: 0;
  border-bottom-width: 4px;
  transition: background-color 0.5s;
}

nav::after {
  content: "";
  position: absolute;
  z-index: -1;

  width: 20vw;
  height: 100%;
  background: linear-gradient(
    90deg, 
    var(--h-colr) 0 20vw, 
    var(--c-colr) 0 40vw, 
    var(--j-colr) 0 60vw, 
    var(--v-colr) 0 80vw, 
    var(--r-colr) 0 100vw
  );
  animation: scrollProgress linear;
  animation-timeline: scroll(root);  
}
@keyframes scrollProgress {
  100% {
    width: 100%;
  }
}

nav a:nth-child(2):hover {
  background-color: var(--c-colr);
}
nav a:nth-child(3):hover {
  background-color: var(--j-colr);
}
nav a:nth-child(4):hover {
  background-color: var(--v-colr);
}
nav a:nth-child(5):hover {
  background-color: var(--r-colr);
}

.hint {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
}

.hint i {
  font-size: 3rem;
  color: var(--primary-colr);
}

.hint::after {
  content: "Scroll";
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary-colr);
}

div.section {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background-color: var(--bg-colr);
  border-bottom: 3px solid #000;
  color: var(--primary-colr);
  font-size: 3.5rem;  
}
.section p {
  font-size: 1.25rem;
}


@media screen and (max-width: 768px) {
  html {
    font-size: 12px;
  }

  .hint::after {
    content: "";
  }
}

@media screen and (max-width: 576px) {
  html {
    font-size: 10px;
  }
}
