/* metalguy.app — base.css
   Reset, typography, layout primitives. Token-driven only. */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: var(--line-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--line-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 { font-size: var(--size-3xl); }
h2 { font-size: var(--size-2xl); }
h3 { font-size: var(--size-xl); }
h4 { font-size: var(--size-lg); }
h5 { font-size: var(--size-md); }
h6 { font-size: var(--size-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); }

p { margin: 0 0 var(--space-4); }

small { font-size: var(--size-sm); color: var(--color-text-muted); }

/* Links */
a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--duration-1) var(--ease-out);
}
a:hover { color: var(--color-accent); }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Mono / data */
code, kbd, samp, pre, .mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Lists */
ul, ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
li + li { margin-top: var(--space-1); }

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

/* Forms baseline (components.css adds the chrome) */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* Hidden but accessible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-5); }

.row { display: flex; gap: var(--space-3); align-items: center; }
.row-between { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }

.divider {
  height: 1px;
  background: var(--color-border);
  border: 0;
  margin-block: var(--space-5);
}

/* App scaffolding */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; padding-block: var(--space-5) var(--space-7); }
footer { flex-shrink: 0; }
