/* Perly Consulting — base element defaults.
   Light, non-invasive resets + brand defaults for raw HTML. */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-body);
  background-color: var(--surface-page);
  background-image: var(--grain);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: var(--weight-black);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); font-weight: var(--weight-bold); }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

a {
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--gold-500);
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--gold-600); }

strong, b { font-weight: var(--weight-bold); color: var(--text-heading); }

em { font-family: var(--font-italic); font-style: italic; }

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

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

::selection { background: var(--gold-200); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: var(--space-6) 0;
}

img { max-width: 100%; display: block; }
