:root {
    --ink: #3a2a14;
    --muted: #6d5a40;
    --brand: #8a4a12;
    --brand-dark: #6b3a0d;
    --card: #fffaf0;
    --line: #dccaa6;
    --danger: #a32d2d;
    --ok: #3b6d11;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    line-height: 1.5;
    background: #c98f3a;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #c98f3a url("achtergrond.webp") center / cover no-repeat;
}

main { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; }

.hero { text-align: center; padding: 48px 8px 28px; color: var(--ink); }
.eyebrow { margin: 0; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-dark); }
h1 { margin: 6px 0 12px; font-size: 2rem; line-height: 1.2; }
.lead { margin: 0 auto; max-width: 34em; }

.card { background: var(--card); border-radius: 14px; padding: 28px 24px; box-shadow: 0 6px 28px rgba(60, 35, 5, 0.25); }
h2 { margin: 28px 0 12px; font-size: 1.25rem; }
h2:first-child { margin-top: 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--danger); }
.opt, .hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input:not([type]) {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 8px;
}

input:focus-visible, button:focus-visible, a:focus-visible {
    outline: 3px solid #e0a040;
    outline-offset: 2px;
}

input.invalid { border-color: var(--danger); }
.error { display: block; min-height: 0; color: var(--danger); font-size: 0.9rem; margin-top: 4px; }
.error:empty { display: none; }
.banner { padding: 10px 12px; background: #fceaea; border-radius: 8px; margin: 12px 0; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; }

.note { color: var(--muted); }
.small { font-size: 0.85rem; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
    display: inline-block;
    min-height: 48px;
    padding: 10px 22px;
    font: inherit;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid var(--brand);
    cursor: pointer;
}
.btn.primary { display: block; width: 100%; min-height: 56px; margin-top: 16px; font-size: 1.1rem; color: #fff; background: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.secondary { color: var(--brand-dark); background: #fff; }
.btn.secondary:hover { background: #fdf1dc; }
.link { background: none; border: 0; color: var(--brand-dark); text-decoration: underline; font: inherit; cursor: pointer; padding: 8px 0; }

.photo { margin: 0 0 18px; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fffdf7; }
.photo legend { font-weight: 700; padding: 0 8px; }
.drop { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; padding: 14px; border: 2px dashed var(--line); border-radius: 10px; }
.drop.over { background: #fdf1dc; border-color: var(--brand); }
.preview { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex: none; }
.drop-body { flex: 1; min-width: 0; }
.filename { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; margin-top: 8px; background: #eadfc8; border-radius: 4px; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--brand); transition: width 0.15s; }
.status { display: block; margin-top: 4px; font-size: 0.85rem; }
.status.ok { color: var(--ok); }
.status.fail { color: var(--danger); }

#add-photo { margin: 4px 0 8px; }

.center { text-align: center; padding: 12px 0; }
.tick { width: 64px; height: 64px; margin: 0 auto 12px; line-height: 64px; font-size: 34px; color: #fff; background: var(--ok); border-radius: 50%; }
.spinner { width: 44px; height: 44px; margin: 0 auto 12px; border: 5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { margin-top: 16px; text-align: center; font-size: 0.8rem; color: var(--ink); }

[hidden] { display: none !important; }

@media (max-width: 600px) {
    html { font-size: 17px; }
    h1 { font-size: 1.6rem; }
    .grid { grid-template-columns: 1fr; }
    .card { padding: 20px 16px; }
    .drop { flex-direction: column; align-items: stretch; text-align: center; }
    .preview { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 3s; }
    .fill { transition: none; }
}
