/*
 * Veqio ontwerpsysteem: tokens en basiscomponenten voor website én dashboard.
 * Bron: huisstijlgids "Huisstijl & websiteontwerp" (ontwerprichting 01, oktober 2026).
 * Oranje leidt naar actie, blauw en paars geven herkenning, Deep Ink draagt de tekst.
 * Marketinglayout staat in /site.css, de dashboardlayout in /admin/admin.css.
 */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
	/* Merkkleuren */
	--orange: #ff7a2f;
	--orange-hover: #f26a1c;
	--blue: #3167ff;
	--purple: #7944e4;
	--ink: #291449;
	--canvas: #fcfbff;

	/* Oppervlakken en tekst */
	--bg: var(--canvas);
	--surface: #ffffff;
	--surface-sunken: #f7f5fd;
	--text: var(--ink);
	--muted: #6d647e;
	--muted-strong: #534a66;
	--border: #e6e2f0;
	--border-strong: #d3cce6;
	--accent-bg: #f1edfc; /* Lilac */
	--blue-bg: #edf2ff;
	--orange-bg: #fff0e6;
	--link: #6334d0;
	--primary: var(--ink);
	--primary-hover: #3a2163;
	--on-primary: #ffffff;

	/* Semantisch: los van de merkkleuren, zodat paars nooit "fout" betekent. */
	--success: #1f6b3a;
	--success-bg: #e6f3ea;
	--warning: #8a4b00;
	--warning-bg: #fff1e1;
	--error: #b3261e;
	--error-bg: #fcebea;
	--info: #2350c8;
	--info-bg: #edf2ff;

	/* Vorm, ruimte en diepte (8px-ritme) */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--radius-sm: 8px;
	--radius-button: 12px;
	--radius: 16px;
	--radius-lg: 24px;
	--shadow-sm: 0 1px 2px rgba(41, 20, 73, 0.05);
	--shadow: 0 1px 2px rgba(41, 20, 73, 0.04), 0 8px 24px -12px rgba(41, 20, 73, 0.14);
	--shadow-lg: 0 2px 4px rgba(41, 20, 73, 0.04), 0 24px 48px -24px rgba(41, 20, 73, 0.28);
	--focus: 0 0 0 3px rgba(121, 68, 228, 0.42);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-heading: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, .brand, .section-title { font-family: var(--font-heading); color: var(--ink); text-wrap: balance; }
h2 { font-size: 1.25rem; margin: 0 0 12px; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; }
::selection { background: #e2d6fb; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: 6px;
}

.visually-hidden, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -120px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top 0.15s var(--ease); }
.skip-link:focus { top: 12px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.tabular, .stat-value, td.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Merk */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { display: block; height: 40px; width: auto; }
.brand .brand-sub { font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--muted); }
/* De oranje vonk als los merkdetail. */
.spark { display: inline-block; width: 14px; height: 14px; background: var(--orange); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); flex: none; }

/* ------------------------------------------------------------------ */
/* Knoppen: primair (oranje, Deep Ink-tekst 6,3:1), secundair, subtiel, destructief */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; font: inherit; font-weight: 600; line-height: 1.2;
	border-radius: var(--radius-button); border: 1px solid transparent;
	background: var(--primary); color: var(--on-primary); cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.button:hover { background: var(--primary-hover); }
.button:active { transform: translateY(1px); }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.button.cta { background: var(--orange); color: var(--ink); box-shadow: 0 1px 0 rgba(41, 20, 73, 0.08), 0 8px 20px -10px rgba(255, 122, 47, 0.75); }
.button.cta:hover { background: var(--orange-hover); }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.button.secondary:hover { background: var(--accent-bg); border-color: #c8b8f2; }
.button.subtle { background: transparent; color: var(--ink); }
.button.subtle:hover { background: var(--accent-bg); }
.button.danger { background: var(--surface); color: var(--error); border-color: #ebc2be; }
.button.danger:hover { background: var(--error-bg); }
.button.danger.solid { background: var(--error); color: #fff; border-color: var(--error); }
.button.small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; border-radius: 10px; }
.button.large { min-height: 52px; padding: 14px 24px; font-size: 1.05rem; }
.button .arrow { font-size: 1.1em; line-height: 1; transition: transform 0.18s var(--ease); }
.button:hover .arrow { transform: translateX(3px); }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.icon-button:hover { background: var(--accent-bg); }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.text-link:hover { color: var(--link); }
.text-link .arrow { transition: transform 0.18s var(--ease); }
.text-link:hover .arrow { transform: translateX(3px); }
.text-link.small { font-size: 0.9rem; color: var(--link); }

/* Bezig: de knop houdt zijn maat en toont een draaiend rondje. */
.button.is-loading { cursor: progress; }
.button.is-loading::before {
	content: ""; width: 1em; height: 1em; border-radius: 50%; flex: none;
	border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
.spinner {
	display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; border-radius: 50%;
	border: 2px solid var(--purple); border-right-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ */
/* Formulieren: labels boven velden, fout bij het veld */
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], input[type="number"], textarea, select {
	width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: inherit; background: var(--surface);
	border: 1px solid var(--border-strong); border-radius: 12px;
	transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:hover, textarea:hover, select:hover { border-color: #b9addb; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--purple); }
input::placeholder, textarea::placeholder { color: #9a92ab; }
textarea { min-height: 112px; resize: vertical; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23291449' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hint { font-size: 0.875rem; color: var(--muted); margin: 0; }
.field-error { font-size: 0.875rem; color: var(--error); margin: 0; font-weight: 500; }
.field-error::before { content: "! "; font-weight: 700; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: 0.92rem; color: var(--muted-strong); }
.consent input, input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--purple); }

/* ------------------------------------------------------------------ */
/* Kaarten, meldingen, badges */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.alert { padding: 12px 14px; border-radius: 12px; margin: 0; border: 1px solid transparent; }
.alert.error { background: var(--error-bg); color: var(--error); border-color: #f2cfcb; }
.alert.warning { background: var(--warning-bg); color: var(--warning); border-color: #f6dcb9; }
.alert.success { background: var(--success-bg); color: var(--success); border-color: #c8e4d1; }
.alert.info { background: var(--info-bg); color: var(--info); border-color: #d3defd; }
.alert.error::before { content: "Let op: "; font-weight: 700; }

.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%237944e4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; }

/* Toasts (dashboard) */
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in 0.24s var(--ease); }
.toast.error { background: var(--error); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Pagina "Bedankt" en eenvoudige pagina's (ook /bot.html) */
.thanks { padding: 56px 0; }
.thanks h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin: 0 0 12px; letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
	.spinner, .button.is-loading::before { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
