/**
 * @file base.css
 * @description Base/global styles for Forefront Vision Consulting website.
 *              Contains font definitions, reset styles, loading screen,
 *              scroll-to-top button, and scroll-triggered animation keyframes.
 * @project Forefront Vision Consulting
 * @version 2.0
 */

/* ---- Font Face Definitions ---- */

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Open/OpenSans-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Open/OpenSans-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'YAGL3gCQ';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/YAGL3gCQ.woff2') format('woff2');
}

/* ---- Global Reset & Base Styles ---- */

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: #000;
  margin: 0;
  padding: 0;
  background-color: #333333;
}

h1,
h2,
h3,
h4 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700 !important;
  margin: 0;
  padding: 0;
  color: #000;
  line-height: 1.2;
  letter-spacing: 1px;
}

#logo {
  font-family: 'YAGL3gCQ', sans-serif;
}

.btn,
.subtitle,
strong {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
}

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

a {
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: none;
}

/* ---- Loading Screen ---- */

.loading-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-spinner {
  width: 50px;
  height: 50px;
}

.loading-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
}

/* ---- Scroll to Top Button ---- */

.scroll-top {
  position: fixed;
  bottom: 10px;
  right: 2%;
  width: 40px;
  height: 40px;
  font-size: 12px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  backface-visibility: hidden;
  z-index: 10;
}

/* ---- Scroll-Triggered Animations ---- */

.animation-fadeInLeft.active {
  animation: fadeInLeft 1s ease forwards;
}

.animation-fadeInRight.active {
  animation: fadeInRight 1s ease forwards;
}

.animation-fadeInUp.active {
  animation: fadeInUp 1s ease forwards;
}

.animation-fadeInTop.active {
  animation: fadeInTop 1s ease forwards;
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInTop {
  0% {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
