/* ============================================
   ATO GLOBAL BASE STYLES
   Applied on top of the token layer.
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-fg);
  background-color: var(--color-bg);
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-fg);
  text-wrap: balance;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); font-weight: var(--font-bold); }
h5 { font-size: var(--text-xl);  font-weight: var(--font-bold); }
h6 { font-size: var(--text-lg);  font-weight: var(--font-semibold); }

/* --- Body copy --- */
p {
  max-width: 68ch;
  text-wrap: pretty;
}

strong { font-weight: var(--font-bold); }
em     { font-style: italic; }

/* --- Links --- */
a {
  color: var(--color-fg-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-colors);
}

a:hover {
  color: var(--color-orange-500);
}

/* --- Lists --- */
ul, ol {
  padding-left: var(--space-6);
}

li + li {
  margin-top: var(--space-2);
}

/* --- Code --- */
code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

/* --- Horizontal rule --- */
hr {
  border: none;
  border-top: var(--border-thin) solid var(--color-border);
  margin: var(--space-8) 0;
}

/* --- Focus ring --- */
:focus-visible {
  outline: 2px solid var(--color-fg-brand);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* --- Selection --- */
::selection {
  background-color: var(--color-orange-400);
  color: var(--color-fg-on-brand);
}

/* --- Utility classes --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
