/* ============================================
   BASE — reset, body, base typography defaults
   ============================================ */

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

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

body {
  background: var(--surface-primary);
  color: var(--colour-text-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

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

input,
select,
textarea,
button {
  font-family: inherit;
}

/* Headings — base scale, pages can override per section */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
  color: var(--colour-text-primary);
}

h1 { font-size: var(--font-size-h1); letter-spacing: var(--letter-spacing-display); }
h2 { font-size: var(--font-size-h2-section); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--colour-text-secondary);
}

strong {
  font-weight: var(--font-weight-semibold);
  color: var(--colour-text-primary);
}

/* Selection */
::selection {
  background: var(--colour-teal-light);
  color: var(--colour-charcoal);
}

/* Focus-visible — accessible default for keyboard users */
:focus-visible {
  outline: 2px solid var(--colour-teal-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
