/* Bode — minimale interface. Alleen systeemlettertypen: geen externe fonts. */

:root {
  --ink: #16181d;
  --muted: #5b6070;
  --line: rgba(22, 24, 29, 0.12);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #ffffff;
  --field: rgba(22, 24, 29, 0.05);
  --accent: #1b3a6b;
  --accent-ink: #ffffff;
  --ok: #2c7a4b;
  --warn: #b5523b;
  --radius: 22px;
  --shadow: 0 30px 80px -20px rgba(10, 14, 30, 0.45), 0 2px 6px rgba(10, 14, 30, 0.08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef0f4;
    --muted: #a3a8b6;
    --line: rgba(238, 240, 244, 0.14);
    --surface: rgba(20, 22, 28, 0.8);
    --surface-solid: #16181d;
    --field: rgba(238, 240, 244, 0.07);
    --accent: #8fb3ea;
    --accent-ink: #0d1a30;
    --ok: #7bd39c;
    --warn: #f0937a;
    color-scheme: dark;
  }
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: #1c2230;
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 24px clamp(16px, 7vw, 120px);
}

[hidden] { display: none !important; }

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

/* ── Achtergrond ──────────────────────────────────────────────── */

.wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.wall canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1.8s ease;
}
.wall canvas.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .wall canvas { transition: none; } }

.artwork {
  position: fixed; right: 16px; bottom: 14px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: rgba(15, 17, 22, 0.42);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.art-sub, .art-lic { opacity: 0.7; }
.art-lic { padding-right: 6px; }
.art-btn {
  display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
}
.art-btn:hover, .art-btn:focus-visible { background: rgba(255, 255, 255, 0.16); }
.art-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Kaart ────────────────────────────────────────────────────── */

.card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  padding: 22px 22px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: var(--surface-solid); }
}

.brand { display: flex; align-items: center; margin-bottom: 18px; }
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none;
  font-weight: 650; font-size: 21px; letter-spacing: -0.02em;
}
.logo svg { width: 26px; height: 26px; }
.logo-ring { fill: var(--accent); }
.logo-mark { fill: var(--surface-solid); }

h1 { margin: 2px 0 14px; font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.eyebrow.ok { color: var(--ok); }
.eyebrow.warn { color: var(--warn); }
.muted { color: var(--muted); margin: 10px 0; font-size: 13.5px; }
.note { margin: 12px 0; font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); }
.hint { margin: 10px 0 0; font-size: 13.5px; color: var(--warn); }

/* ── Dropzone ─────────────────────────────────────────────────── */

.drop {
  position: relative;
  display: grid; justify-items: center; gap: 2px;
  padding: 26px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  background: var(--field);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop:focus-within, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-plus {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 24px; line-height: 1; font-weight: 400;
}
.drop-title { font-weight: 600; }
.drop-sub { font-size: 13px; color: var(--muted); }
.drop.compact { grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 12px; padding: 10px 14px; text-align: left; }
.drop.compact .drop-plus { width: 28px; height: 28px; margin: 0; font-size: 18px; grid-row: span 2; }
.drop.compact .drop-sub { display: none; }

/* ── Bestandslijsten ──────────────────────────────────────────── */

.files { list-style: none; margin: 10px 0 0; padding: 0; max-height: 34vh; overflow: auto; }
.files:empty { display: none; }
.file {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
.file:last-child { border-bottom: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; min-width: 0; }
.file-meta { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.file-action { grid-row: 1 / span 2; grid-column: 2; }
.file .bar { grid-column: 1 / -1; margin: 6px 0 2px; height: 3px; }

.icon-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover:not(:disabled), .icon-btn:focus-visible { background: var(--field); color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.done { color: var(--ok); }

.summary { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.summary.over { color: var(--warn); }

/* ── Velden ───────────────────────────────────────────────────── */

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.options.single { grid-template-columns: 1fr; }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.field-wide { margin-top: 10px; }
select, textarea, .linkbox input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit; font-size: 14px;
  padding: 9px 11px;
  outline: none;
}
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 28px;
}
textarea { resize: vertical; min-height: 42px; }
select:focus-visible, textarea:focus-visible, .linkbox input:focus-visible { border-color: var(--accent); }

/* ── Knoppen ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex; justify-content: center; align-items: center;
  width: 100%; margin-top: 14px;
  padding: 12px 18px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { opacity: 0.92; }
.btn-ghost { background: var(--field); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { color: var(--warn); }
.btn-small { width: auto; margin: 0; padding: 8px 14px; font-size: 13.5px; }
.btn:focus-visible, .icon-btn:focus-visible, .art-btn:focus-visible, .logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.row .btn { flex: 1 1 auto; width: auto; margin-top: 8px; padding: 10px 14px; font-size: 14px; }

/* ── Voortgang ────────────────────────────────────────────────── */

.big { margin: 6px 0 10px; font-size: 44px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--field); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 0.25s ease; }
#progress-detail { font-variant-numeric: tabular-nums; }

/* ── Klaar ────────────────────────────────────────────────────── */

.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; text-overflow: ellipsis; }

.message {
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: 12px; background: var(--field);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px;
}

/* ── Voettekst ────────────────────────────────────────────────── */

.fine {
  display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center;
  margin-top: 18px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}

.fine a { color: inherit; }

/* ── Tekstpagina's ────────────────────────────────────────────── */

.card-text { max-width: 560px; max-height: calc(100dvh - 48px); overflow: auto; }
.card-text h2 { margin: 18px 0 4px; font-size: 15px; font-weight: 650; }
.card-text p, .card-text li { font-size: 14px; color: var(--ink); }
.card-text p { margin: 4px 0 8px; }
.card-text ul { margin: 4px 0 8px; padding-left: 18px; }
.card-text code { font-size: 13px; padding: 1px 5px; border-radius: 6px; background: var(--field); }

/* ── Slepen ───────────────────────────────────────────────────── */

.dragcover {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(15, 20, 35, 0.45);
  color: #fff; font-size: 22px; font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.dragcover span { padding: 18px 28px; border: 2px dashed rgba(255, 255, 255, 0.7); border-radius: 20px; }

.noscript { position: fixed; inset: auto 16px 16px; z-index: 9; background: #fff; color: #111; padding: 12px 16px; border-radius: 12px; }

/* ── Klein scherm ─────────────────────────────────────────────── */

@media (max-width: 560px) {
  body { align-items: flex-end; padding: 16px 16px 64px; }
  .card { max-width: none; padding: 18px 18px 14px; }
  .artwork { left: 16px; right: 16px; bottom: 12px; justify-content: space-between; }
  .art-lic { display: none; }
  .art-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
