/* ==========================================================================
   base.css - reset, element defaults, layout primitives, utilities

   No component styling here. Just a predictable baseline and the handful of
   reusable primitives (.px-container, .px-section, typography helpers).
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--px-header-h) + 1rem);
}

body {
  font-family: var(--px-font);
  font-size: var(--px-fs-base);
  line-height: var(--px-leading);
  color: var(--px-text);
  background: var(--px-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color var(--px-transition); }
a:hover { color: var(--px-link); }

ul, ol { list-style: none; padding: 0; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--px-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Typography scale --------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--px-weight-semibold);
  line-height: var(--px-leading-tight);
  color: inherit;
  text-wrap: balance;
}

.px-h1 { font-size: var(--px-fs-h1); }
.px-h2 { font-size: var(--px-fs-h2); }
.px-h3 { font-size: var(--px-fs-h3); }
.px-h4 { font-size: var(--px-fs-h4); }

p { text-wrap: pretty; }

.px-lead   { font-size: var(--px-fs-lead); color: var(--px-text-muted); }
.px-text-sm { font-size: var(--px-fs-sm); }
.px-muted  { color: var(--px-text-muted); }

.px-eyebrow {
  font-size: var(--px-fs-eyebrow);
  font-weight: var(--px-weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--px-teal);
}

/* ---- Layout primitives ------------------------------------------ */
.px-container {
  width: 100%;
  max-width: var(--px-container);
  margin-inline: auto;
  padding-inline: var(--px-gutter);
}

.px-container--narrow { max-width: var(--px-container-narrow); }

.px-section { padding-block: var(--px-section-y); }
.px-section--sm     { padding-block: var(--px-section-y-sm); }
.px-section--muted  { background: var(--px-bg-muted); }
.px-section--surface { background: var(--px-surface); }
.px-section--invert {
  background: var(--px-bg-invert);
  color: var(--px-text-invert);
}
.px-section--bordered { border-top: 1px solid var(--px-border); }

.px-center { text-align: center; }
.px-stack-narrow { max-width: var(--px-container-narrow); margin-inline: auto; }

/* ---- Utilities ------------------------------------------------ */
.px-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;
}

.px-skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--px-navy);
  color: var(--px-text-invert);
  border-radius: var(--px-radius-sm);
  transition: top var(--px-transition);
}
.px-skip-link:focus { top: 1rem; }
