/* base.css — reset, font stack, spacing vars, container only */

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
  margin: 0;
}

body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}

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

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

/* Color scheme support */
html {
  color-scheme: light dark;
}

/* Placeholder font stack (system UI) */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-1);
}

/* Spacing scale */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --container-max: 1200px;
  
  /* Typography scale */
  --fs-body: 1rem;
  --fs-h1: clamp(1.8rem, 2.2vw, 2.4rem);
  --fs-h2: 1.4rem;
  --fs-h3: 1.1rem;
  --lh-body: 1.6;
  --lh-head: 1.2;
  --measure: 72ch;
  
  /* Neutral theme (light-first) */
  --bg-page: #fafafa;
  --bg-section: #ffffff;
  --bg-surface: #ffffff;
  --text-1: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #6a6a6a;
  --border-subtle: #e5e5e5;
  --focus-ring: #666666;
  
  /* Accent colors (calm, professional) */
  --accent: #0d7377;
  --accent-hover: #0a5d61;
  --accent-contrast: #ffffff;
  --link: #0d7377;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #1a1a1a;
    --bg-section: #1f1f1f;
    --bg-surface: #252525;
    --text-1: #e8e8e8;
    --text-2: #c0c0c0;
    --text-3: #a0a0a0;
    --border-subtle: #3a3a3a;
    --focus-ring: #999999;
    
    /* Accent colors (dark theme — restrained teal) */
    --accent: #0ea5a4;
    --accent-hover: #14b8a6;
    --accent-contrast: #ffffff;
    --link: #14b8a6;
  }
}

/* Default links — quiet by default, accent on hover/focus */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

/* Readable line length in main content */
main p,
main li {
  max-width: var(--measure);
}

/* Container utility: center, max-width, horizontal padding */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
