/* ============================================================
   base.css — Reset and base element styles
   ------------------------------------------------------------
   Sets sensible defaults for the whole page: box-sizing,
   body background, default text, headings and links.
   Mobile-first: base sizes here suit small screens; larger
   screens are enhanced in responsive.css.
   ============================================================ */

/* A small, modern reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* Headings use the heading font, light weight and wide tracking.
   We never use bold (700) anywhere — lightness is luxury. */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  letter-spacing: var(--tracking-wide);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  color: var(--color-text);
}

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

p {
  margin: 0 0 var(--space-md);
  max-width: 70ch; /* keep lines readable */
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Images never overflow their container and keep their aspect ratio */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Visible focus outline for keyboard users (accessibility) */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Screen-reader-only helper (hides text visually but keeps it for assistive tech) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
