/* =====================================================================
   NACD Base — reset, element defaults, typography
   All values reference tokens so changing tokens.css reshapes the base.
   ===================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img{
  display: inline-block;
}
svg,
video {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

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

a:hover {
  color: var(--color-link-hover);
}

/* ---- Typography hierarchy — unified via tokens ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-heading);
  margin-block-start: var(--title-margin-block-start);
  margin-block-end: var(--title-margin-block-end);
  letter-spacing: var(--ls-tight);
}

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

p {
  margin-block-start: 0;
  margin-block-end: var(--space-4);
  line-height: var(--lh-normal);
}

p:last-child {
  margin-block-end: 0;
}

small,
.text-small {
  font-size: var(--fs-small);
}

/* ---- Lists — unified bullet styling across the site ---- */
ul,
ol {
  margin-block-start: 0;
  margin-block-end: var(--space-4);
  padding-inline-start: var(--space-5);
}

ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

li {
  margin-block-end: var(--list-item-gap);
}

li:last-child {
  margin-block-end: 0;
}

/* Bulleted lists use the brand color marker */
ul li::marker {
  color: var(--list-marker-color);
}

/* ---- Forms ---- */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ---- Tables ---- */
table {
  border-collapse: collapse;
}

/* ---- Accessibility ---- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.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;
}

/* ---- Selection ---- */
::selection {
  background-color: var(--color-primary-100);
  color: var(--color-primary-700);
}

/* ---- Scrollbar (WebKit) ---- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-sand-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-200);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-500);
}
