/* ==========================================================================
   BASE.CSS - METSELWERK.NL
   Bouw-stijl: Brick, Charcoal, Orange, Sand
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primair - Brick rood (CTA knoppen, accenten) */
  --color-primary: #C4572A;
  --color-primary-dark: #9E3A17;
  --color-primary-light: #F0D4C5;
  --color-primary-bg: #FAF0EB;
  --color-primary-shadow: rgba(196, 87, 42, 0.3);
  --color-primary-rgb: 196, 87, 42;

  /* Secundair - Charcoal (koppen, structuur) */
  --color-secondary: #1A1A1A;
  --color-secondary-dark: #111;
  --color-secondary-light: #333;
  --color-secondary-bg: #E8E8E8;
  --color-secondary-rgb: 26, 26, 26;

  /* Accent - Orange (highlights, tags) */
  --color-accent: #E8763A;
  --color-accent-dark: #D06530;
  --color-accent-light: #F5D4BB;
  --color-accent-rgb: 232, 118, 58;

  /* Sand */
  --color-sand: #D4A373;

  /* Sterren */
  --color-stars: #E8763A;

  /* Tekst & achtergrond */
  --color-text: #222;
  --color-text-muted: #555;
  --color-text-light: #999;
  --color-border: #DDD5CA;
  --color-bg: #FAF8F5;
  --color-bg-alt: #F5EDE4;

  /* Typografie */
  --font-heading: 'Archivo Black', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Effects */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-sticky: 0 -2px 8px rgba(0, 0, 0, 0.06);
  --shadow-btn-primary: 0 2px 10px rgba(196, 87, 42, 0.35);

  /* Layout */
  --max-width: 1300px;
  --header-height: 108px;
  --sticky-height: 56px;

  /* Premium */
  --font-display: 'Archivo Black', serif;
  --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.06);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

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

a {
  color: var(--color-secondary);
  text-decoration: none;
}

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

ul,
ol {
  list-style: none;
}

/* ---------- Typografie ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-secondary);
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
}

p {
  margin-bottom: var(--space-md);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
}

@media (min-width: 768px) {
  .container {
    padding-left: max(var(--space-lg), env(safe-area-inset-left));
    padding-right: max(var(--space-lg), env(safe-area-inset-right));
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-btn-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(196, 87, 42, 0.4);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn-outline:hover {
  background-color: var(--color-secondary);
  color: #fff;
}

.btn-black {
  background-color: #000000;
  color: #fff;
}

.btn-black:hover {
  background-color: #222222;
  color: #fff;
}

/* ---------- Section Spacing ---------- */
.section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }
}

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

/* ---------- Utility ---------- */
.text-center { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 24px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  text-decoration: none;
}

/* ---------- Mobiel body padding voor sticky CTA ---------- */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* ---------- Touch Targets (WCAG 2.5.5) ---------- */
button, [role="button"], .btn, a, input, textarea, select {
  min-height: 44px;
}
input, textarea, select {
  font-size: 16px;
}

/* ---------- Focus Visible (WCAG 2.4.7) ---------- */
:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* ---------- Reduced Motion (WCAG 2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Coarse Pointer (touch devices) ---------- */
@media (pointer: coarse) {
  .interactive-element, button, .btn, a {
    min-height: 48px;
    padding: 12px 16px;
  }
}
