/* ==========================================================================
   GLOBAL.CSS — Base resets & shared foundation
   Nursing Success Academy Design System
   ========================================================================== */

/* ---- Box Model Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---- Base ---- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-1);
  background-color: var(--bg);
}

/* ---- Links ---- */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-micro) var(--ease-enter);
}

a:hover {
  color: var(--primary-dim);
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---- Images ---- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Focus Styles ---- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Selection ---- */
::selection {
  background-color: var(--primary-bg);
  color: var(--text-1);
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-2);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* ---- Layout Container ---- */
.nsa-container {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-margin);
  padding-right: var(--page-margin);
}

/* ---- Section Spacing ---- */
.nsa-section {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.nsa-section--sm {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* ---- Grid (12-column marketing) ---- */
.nsa-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

/* ---- Utility: Screen Reader Only ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Utility: Spacing helpers ---- */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  :root {
    --page-margin: 24px;
    --gutter: 24px;
  }
}

@media (max-width: 640px) {
  :root {
    --page-margin: 16px;
    --gutter: 16px;
  }

  .nsa-section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .nsa-grid {
    grid-template-columns: 1fr;
  }
}
