/* ==========================================================================
   bydex.ca 2.0 — Base layer
   Consumes the authoritative brand tokens; adds reset + primitives.
   ========================================================================== */

@import url('./fonts.css');
@import url('./colors.css');
@import url('./typography.css');
@import url('./spacing.css');
@import url('./effects.css');

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body-l);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--dm-black); color: var(--dm-white); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.measure { max-width: var(--measure); }

.section { padding-block: var(--pad-section); }

/* Dark ("inverse") surface context — flips text + border vars for children */
.on-dark {
  background: var(--surface-inverse);
  color: var(--text-on-dark);
  --text-primary: var(--text-on-dark);
  --text-secondary: var(--text-on-dark-soft);
  --text-label: var(--text-on-dark-mute);
  --border-hairline: var(--border-on-dark);
}
