/* ═══════════════════════════════════════════════════════════════════════════
   FIB DATABASE - BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Reset & Box Sizing ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── HTML & Body ─── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--fib-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
}

/* ─── Lists ─── */
ul, ol {
  list-style: none;
}

/* ─── Images ─── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Form Elements ─── */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input:focus, textarea:focus, select:focus, button:focus {
  outline: none;
}

/* ─── Buttons Base ─── */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Selection ─── */
::selection {
  background: var(--fib-gold);
  color: var(--bg-primary);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fib-gold-dim);
}

/* ─── Accessibility ─── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Utility Classes ─── */
.text-gold { color: var(--fib-gold); }
.text-success { color: var(--status-success); }
.text-danger { color: var(--status-danger); }
.text-warning { color: var(--status-warning); }
.text-muted { color: var(--text-muted); }

.bg-gold { background: var(--fib-gold-bg); }
.bg-success { background: var(--status-success-bg); }
.bg-danger { background: var(--status-danger-bg); }

.mono { font-family: var(--font-mono); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* ─── Container ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ─── Grid System ─── */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ─── Flex Utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ─── Spacing Utilities ─── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  from { left: -120%; }
  to { left: 140%; }
}

@keyframes glow {
  0%, 100% { 
    box-shadow: 0 0 20px var(--fib-gold-glow);
  }
  50% { 
    box-shadow: 0 0 40px var(--fib-gold-glow), 0 0 60px var(--fib-gold-glow);
  }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideUp { animation: slideUp 0.4s ease; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

