/*
 * Didakta Base Styles
 * Reset + typografie. Importeer na variables.css.
 * Geen hardcoded waarden — alles via CSS vars.
 */

/* ============================================================
 * RESET
 * ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-family);
}

/* ============================================================
 * TYPOGRAFIE
 * ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  color: var(--color-black);
}

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

p {
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--font-weight-semibold);
}

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

/* ============================================================
 * LAYOUT HELPERS
 * ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--sm {
  padding-block: var(--section-padding-y-sm);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-text-light);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Sectietitel patroon */
.section-header {
  margin-bottom: var(--space-8);
}

.section-header--center {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-4);
}

.section-intro {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: var(--line-height-relaxed);
}

.section-header--center .section-intro {
  margin-inline: auto;
}

/* ============================================================
 * RESPONSIVE MEDIA QUERIES
 * ============================================================ */

@media (max-width: 768px) {
  :root {
    --font-size-h1:     2rem;
    --font-size-h2:     1.75rem;
    --font-size-h3:     1.5rem;
    --font-size-h4:     1.25rem;
    --section-padding-y: var(--space-8);
    --container-padding: var(--space-4);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --font-size-h1:     2.5rem;
    --font-size-h2:     2rem;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
