/* ==========================================================================
   ServiceLine — Global Foundation
   --------------------------------------------------------------------------
   Reset, base defaults, and a small set of truly global utilities. Consumes
   tokens from tokens.css — no raw color/spacing/motion values here.

   This file is deliberately NOT page-specific. Homepage, hero, and
   service-page design do not belong here — see typography.css, layout.css,
   and materials.css for the rest of the system, and resources/pages/ for
   actual page content.
   ========================================================================== */

/* ---- Reset / normalization --------------------------------------------- */

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

html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

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

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

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

/* ---- Base body ---------------------------------------------------------- */

body {
  min-height: 100vh;
  font-family: var(--font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
  background-color: var(--surface-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Selection styling ---------------------------------------------------- */

::selection {
  background-color: var(--accent);
  color: var(--color-obsidian);
}

/* ---- Image / media defaults ---------------------------------------------- */

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

/* ---- Link reset ------------------------------------------------------------ */

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Button reset ------------------------------------------------------------ */

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ---- Accessible focus foundation --------------------------------------------
   Focus is never removed outright — only the default browser ring is
   swapped for one that fits the visual system, and only shown for
   keyboard/assistive navigation via :focus-visible. */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--line-hairline) solid var(--accent);
  outline-offset: 3px;
}

/* ---- Container utility ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-standard);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

/* ---- Basic layout utilities ---------------------------------------------- */

.flow > * + * {
  margin-top: var(--space-5);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
