/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

/* Import color palette first */
@import url('color-palette.css');

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

/* Base Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--white);
  /* Prevent flash of unstyled content */
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

body.loaded {
  opacity: 1;
}

/* Loading State - Prevents flash of unstyled content */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.loading-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--forest-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Import component styles */
@import url('components.css');
@import url('utilities.css');
