/* ========================================
   FASTAP - Base Styles & Resets
   Clean, Modern Foundation
   ======================================== */

/* ============= MODERN CSS RESET ============= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

/* ============= TYPOGRAPHY ============= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--purple-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--purple-600);
}

strong,
b {
  font-weight: var(--font-semibold);
}

em,
i {
  font-style: italic;
}

/* ============= SELECTION ============= */
::selection {
  background-color: var(--purple-500);
  color: var(--text-white);
}

::-moz-selection {
  background-color: var(--purple-500);
  color: var(--text-white);
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--purple-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--purple-500);
}

/* ============= SECTION SPACING ============= */
section {
  padding: var(--space-3xl) 0;
  position: relative;
}

section.compact {
  padding: var(--space-2xl) 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
}

/* ============= COMMON UTILITIES ============= */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: var(--text-white);
}

.bg-primary {
  background-color: var(--bg-primary);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.bg-tertiary {
  background-color: var(--bg-tertiary);
}

/* ============= FLEX UTILITIES ============= */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* ============= GRID UTILITIES ============= */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============= SPACING UTILITIES ============= */
.mt-auto {
  margin-top: auto;
}

.mb-auto {
  margin-bottom: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* ============= IMAGE UTILITIES ============= */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

.rounded {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

/* ============= RESPONSIVE UTILITIES ============= */

/* Tablet and below */
@media (max-width: 992px) {
  :root {
    --text-5xl: 2.5rem;   /* 40px */
    --text-4xl: 2rem;     /* 32px */
    --text-3xl: 1.75rem;  /* 28px */
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;     /* 32px */
    --text-4xl: 1.75rem;  /* 28px */
    --text-3xl: 1.5rem;   /* 24px */
    --space-3xl: 4rem;    /* 64px */
    --space-2xl: 3rem;    /* 48px */
  }

  section {
    padding: var(--space-xl) 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-sm);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --text-5xl: 1.75rem;  /* 28px */
    --text-4xl: 1.5rem;   /* 24px */
  }
}

/* ============= VISIBILITY UTILITIES ============= */
.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

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

  .show-mobile {
    display: block;
  }
}

/* ============= WIDTH UTILITIES ============= */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

/* ============= TEXT ALIGNMENT ============= */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* ============= DISPLAY UTILITIES ============= */
.d-block {
  display: block;
}

.d-inline-block {
  display: inline-block;
}

.d-flex {
  display: flex;
}

.d-none {
  display: none;
}

/* ============= OVERLAY ============= */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* ============= SECTION HEADERS ============= */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ============= DIVIDER ============= */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-2xl) 0;
}

.divider-gradient {
  height: 2px;
  background: var(--gradient-multi);
  margin: var(--space-2xl) 0;
}
