/* =========================================================
   Maas en Vrienden — Design System
   Base: variables, reset, typography, layout, utilities, motion
   ========================================================= */

:root {
  /* Colors */
  --color-bg: #FAF3E6;
  --color-bg-soft: #F4E9D6;
  --color-bg-deep: #EDE0C7;
  --color-dark: #263724;
  --color-dark-700: #1D2B1B;
  --color-dark-600: #223320;
  --color-dark-400: #3C5138;
  --color-dark-200: #6E8368;
  --color-wood: #7C4E28;
  --color-wood-light: #C99A66;
  --color-beige: #E9DBBE;
  --color-white: #FFFFFF;
  --color-gold: #B8924A;
  --color-text: #241F18;
  --color-text-muted: #52473A;
  --color-line: rgba(38, 55, 36, 0.14);
  --color-success: #3E6B4A;
  --color-error: #A6432F;

  /* Typography */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-script: "Caveat", cursive;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 36px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(38, 30, 15, 0.08);
  --shadow-md: 0 12px 32px rgba(38, 30, 15, 0.12);
  --shadow-lg: 0 24px 60px rgba(29, 43, 27, 0.18);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* Layout */
  --container-w: 1240px;
  --header-h: 104px; /* initiële schatting; js/main.js zet de exacte hoogte */

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.45s;
  --dur-slow: 0.8s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-dark);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 4vw + 1rem, 4.6rem); }
h2 { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); }
h3 { font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem); }
h4 { font-size: 1.15rem; }

p { color: var(--color-text); }

::selection { background: var(--color-dark); color: var(--color-bg); }

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--color-dark);
  color: var(--color-bg);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(56px, 8vw, 120px);
}

.section-tight { padding-block: clamp(40px, 5vw, 72px); }

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

.section-dark {
  background: var(--color-dark);
  color: var(--color-bg);
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--color-bg); }
.section-dark p { color: rgba(250, 243, 230, 0.82); }

.grid { display: grid; gap: 32px; min-width: 0; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.gap-lg { gap: 40px; }

/* ---------- Section header ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-wood);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-gold);
  display: inline-block;
  border-radius: 2px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--color-text-muted); font-size: 1.08rem; margin-top: 14px; }

.script-accent {
  font-family: var(--font-script);
  color: var(--color-wood);
  font-size: 1.6em;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  min-height: 56px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  overflow: hidden;
  isolation: isolate;
}
.btn svg { flex-shrink: 0; }

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  z-index: -1;
  pointer-events: none;
}
.btn:active::after { opacity: 1; transform: scale(1.6); transition: 0s; }

.btn-primary {
  background: var(--color-dark);
  color: var(--color-bg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-dark-600);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-dark);
  border: 1.5px solid var(--color-dark);
}
.btn-outline:hover {
  background: var(--color-dark);
  color: var(--color-bg);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-on-dark {
  background: var(--color-bg);
  color: var(--color-dark);
}
.btn-on-dark:hover { background: var(--color-white); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.btn-outline-on-dark {
  background: transparent;
  color: var(--color-bg);
  border: 1.5px solid rgba(250, 243, 230, 0.5);
}
.btn-outline-on-dark:hover { border-color: var(--color-bg); background: rgba(250,243,230,0.08); transform: translateY(-3px); }

.btn-sm { padding: 11px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Wave divider ---------- */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  position: relative;
}
.wave-divider svg { width: 100%; height: auto; display: block; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: transform, opacity;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 48px; }
.no-scroll { overflow: hidden; }

.divider-line {
  height: 1px;
  background: var(--color-line);
  border: none;
  margin-block: 32px;
}

/* Float animation for subtle hero motifs */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.float { animation: floatSlow 6s ease-in-out infinite; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
