/* base.css */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

[data-theme='dark'] ::selection {
  background-color: var(--color-primary-dark);
  color: #ffffff;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-normal);
}

/* Accessibility: Focus outlines */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.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;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  overflow-wrap: break-word;
}

/* On a phone some translated heading words (Datenschutzerklärung, Gebruiksvoorwaarden,
   responsabilidad) are wider than the screen at heading size: hyphenate long words
   rather than breaking them at an arbitrary letter. English headings are unchanged. */
@media (max-width: 480px) {
  html:not([lang="en"]) :is(h1, h2, h3, h4, h5, h6) {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
  }
}

h1 { font-size: var(--text-5xl); font-weight: 700; line-height: 1.1; }
h2 { font-size: var(--text-3xl); font-weight: 700; line-height: 1.2; }
h3 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; }
h4 { font-size: var(--text-xl); font-weight: 600; line-height: 1.4; }
h5 { font-size: var(--text-lg); font-weight: 600; line-height: 1.5; }

p { margin-bottom: var(--space-4); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-muted { color: var(--color-muted); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
