/* ===========================================================================
   ZENTRA TALENT SOLUTIONS — BASE LAYER
   Reset, base element styling, and accessibility primitives.
   Loads after tokens.css and before style.css.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-body);
  background: var(--bg-page);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text-heading);
  margin: 0;
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

/* Base type scale — mirrors the H1–H6 hierarchy defined in tokens.css.
   Page-specific inline overrides are being retired in favour of the
   utility modifier classes below (see "Type utility modifiers"). */
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); font-weight: var(--weight-semibold); }
h6 {
  font-size: var(--text-h6);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

/* -------------------------------------------------------------------
   Type utility modifiers
   Replace one-off inline `style="font-size:28px"`-type overrides that
   previously appeared throughout the page markup. Apply these classes
   directly on the existing h1–h4 elements instead.
   ------------------------------------------------------------------- */
.text-display { font-size: var(--text-display); }
.text-h1-sm { font-size: clamp(1.75rem, 1.55rem + 0.9vw, 2.375rem); }
.text-h2-sm { font-size: clamp(1.375rem, 1.28rem + 0.4vw, 1.75rem); }
.text-body-lg { font-size: var(--text-body-lg); }
.text-body-sm { font-size: var(--text-small); }
.text-caption {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-bold);
}
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.items-start { align-items: start; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.max-w-sm { max-width: 520px; }
.max-w-md { max-width: 560px; }
.max-w-lg { max-width: 720px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }

/* -------------------------------------------------------------------
   Layout primitive
   ------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* -------------------------------------------------------------------
   Accessibility primitives
   ------------------------------------------------------------------- */

/* Visually hidden but available to assistive tech */
.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;
}

/* Skip-to-content link — hidden until keyboard-focused */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: var(--z-toast);
  background: var(--color-primary-900);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: var(--weight-semibold);
  font-size: var(--text-small);
  transition: top var(--duration-base) var(--ease-standard);
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent-300);
  outline-offset: 2px;
}

/* Consistent, visible focus treatment for every interactive element.
   Uses :focus-visible so mouse/touch users don't see a ring on click,
   while keyboard users always do. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Fallback for browsers without :focus-visible support */
a:focus,
button:focus {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Respect reduced-motion preference site-wide. Individual components
   may also add their own reduced-motion overrides for specific
   transform/animation rules — this covers the general case. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------
   Icon primitive — pairs with assets/icons/sprite.svg
   ------------------------------------------------------------------- */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-fill {
  fill: currentColor;
  stroke: none;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 28px; height: 28px; }
