@import "base/variables.css";
@import "base/reset.css";
@import "base/typography.css";
@import "layouts/header.css";
@import "layouts/footer.css";
@import "components/buttons.css";
@import "components/cards.css";
@import "pages/home.css";

html {
  scroll-behavior: smooth;
}

/* =============================================
  GLOBAL PAGE LOADER
============================================= */

/* Loader overlay */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-gray-900);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Spinner  */
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-white);
  border-top-color: var(--color-gray-900);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Alternative: Pulsing dots (more modern) */
.loader-dots {
  display: flex;
  gap: 8px;
}

.loader-dot {
  width: 12px;
  height: 12px;
  background: #1f2937;
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Prevent content shift during load */
body.loading {
  overflow: hidden;
}

/* Fade in content after load */
.page-content {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded .page-content {
  opacity: 1;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}
