/* Dreamz Books — huisstijl: zwart, goud, gebroken wit. Organische vormen, rustige beweging. */

@view-transition { navigation: auto; }

:root {
  --bg: #0a0907;
  --ink: #f4efe4;
  --muted: #a69f8f;
  --gold: #d4a94a;
  --gold-hi: #f3da93;
  --gold-lo: #8f6b22;
  --ok: #7fd1a0;
  --warn: #eba25c;
  --ask: #8fb8f0;
  --danger: #ef7d6f;
  --card: rgba(255, 250, 238, 0.045);
  --card-hi: rgba(255, 250, 238, 0.08);
  --line: rgba(244, 239, 228, 0.1);
  --blob-a: 34px 58px 40px 64px / 56px 38px 60px 36px;
  --blob-b: 60px 36px 62px 40px / 38px 58px 36px 60px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ring: 326.73;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
h1::first-letter { text-transform: uppercase; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
h2::first-letter { text-transform: uppercase; }
a { color: inherit; text-decoration: none; }

/* ---------- Achtergrond: drie trage gouden vormen ---------- */

.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 120%, transparent 40%, var(--bg) 100%);
}
.aurora span {
  position: absolute;
  width: 46vmax; height: 46vmax;
  background: radial-gradient(circle at 35% 35%, var(--gold) 0%, var(--gold-lo) 45%, transparent 72%);
  filter: blur(70px);
  opacity: 0.3;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  animation: drift 26s ease-in-out infinite alternate, morph 18s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { top: -18vmax; left: -12vmax; }
.aurora span:nth-child(2) { top: 30vh; right: -22vmax; opacity: 0.14; animation-duration: 34s, 22s; animation-delay: -8s, -4s; }
.aurora span:nth-child(3) { bottom: -26vmax; left: 22vw; opacity: 0.1; animation-duration: 40s, 26s; animation-delay: -15s, -9s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) rotate(40deg) scale(1.15); }
}
@keyframes morph {
  0%   { border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; }
  50%  { border-radius: 60% 40% 38% 62% / 58% 62% 38% 42%; }
  100% { border-radius: 36% 64% 52% 48% / 40% 52% 48% 60%; }
}

/* ---------- Kop ---------- */

.topbar {
  position: sticky; top: 14px; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px 14px 10px 22px;
  background: rgba(16, 14, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand-tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); padding: 3px 10px; border: 1px solid rgba(212, 169, 74, 0.4); border-radius: 999px;
}
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 500;
  transition: color 0.3s, background 0.3s;
}
.topnav a:hover { color: var(--ink); }
.topnav a.on { color: var(--bg); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
.who { display: flex; align-items: center; gap: 12px; }
.who form { margin: 0; }
.who-name { font-weight: 500; }
.who-role { font-size: 0.78rem; color: var(--muted); }

/* ---------- Pagina ---------- */

.page { flex: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 64px; }
body.centered .page { display: grid; place-items: center; }
.foot { text-align: center; padding: 20px; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; }

.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 1.1rem; font-weight: 300; margin-top: 12px; max-width: 56ch; }
.muted { color: var(--muted); }
.tiny { font-size: 0.75rem; }
.hero { margin-bottom: 36px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 18px; transition: color 0.3s, transform 0.3s var(--ease); }
.back:hover { color: var(--gold-hi); transform: translateX(-4px); }

/* ---------- Kaarten met organische vorm ---------- */

.blob-card {
  position: relative;
  background: linear-gradient(145deg, var(--card-hi), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--blob-a);
  backdrop-filter: blur(14px);
  transition: border-radius 0.9s var(--ease), transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s;
  overflow: hidden;
}
.blob-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(243, 218, 147, 0.13), transparent 60%);
  transition: opacity 0.4s;
}
.blob-card:hover::before { opacity: 1; }
.blob-card > * { position: relative; }

.reveal { animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(26px) scale(0.98); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.month-grid > :nth-child(1), .slot-grid > :nth-child(1) { --i: 1; }
.month-grid > :nth-child(2), .slot-grid > :nth-child(2) { --i: 2; }
.month-grid > :nth-child(3), .slot-grid > :nth-child(3) { --i: 3; }
.month-grid > :nth-child(4), .slot-grid > :nth-child(4) { --i: 4; }
.month-grid > :nth-child(5), .slot-grid > :nth-child(5) { --i: 5; }
.month-grid > :nth-child(6), .slot-grid > :nth-child(6) { --i: 6; }
.month-grid > :nth-child(7), .slot-grid > :nth-child(7) { --i: 7; }
.month-grid > :nth-child(8), .slot-grid > :nth-child(8) { --i: 8; }
.month-grid > :nth-child(9), .slot-grid > :nth-child(9) { --i: 9; }
.month-grid > :nth-child(n + 10), .slot-grid > :nth-child(n + 10) { --i: 10; }

/* ---------- Voortgangsring ---------- */

.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring.big { width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: rgba(244, 239, 228, 0.09); }
.ring-value {
  stroke: var(--gold); stroke-linecap: round;
  stroke-dasharray: var(--ring); stroke-dashoffset: var(--ring);
  filter: drop-shadow(0 0 8px rgba(212, 169, 74, 0.55));
  transition: stroke-dashoffset 1.5s var(--ease) 0.25s, stroke 0.6s;
}
.ring.full .ring-value { stroke: var(--gold-hi); }
.ring-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
}
.ring.big .ring-label { font-size: 2.4rem; }
.ring-label small { font-size: 0.5em; color: var(--muted); font-weight: 400; margin-left: 2px; align-self: center; }
.ring-label { display: flex; justify-content: center; align-items: center; }
.ring-label small { margin-top: 0.5em; }

/* ---------- Overzicht ---------- */

.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.month-card { display: flex; align-items: center; gap: 22px; padding: 26px 28px; }
.month-card:nth-child(even) { border-radius: var(--blob-b); }
.month-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 169, 74, 0.5);
  border-radius: var(--blob-b);
  box-shadow: 0 24px 60px -24px rgba(212, 169, 74, 0.45);
}
.month-card:nth-child(even):hover { border-radius: var(--blob-a); }
.month-card-text { flex: 1; min-width: 0; }
.month-card-text h2 { font-size: 1.35rem; margin-bottom: 8px; white-space: nowrap; }
.arrow { font-size: 1.5rem; color: var(--gold); transition: transform 0.5s var(--ease); }
.month-card:hover .arrow { transform: translateX(8px); }
.empty { padding: 44px; text-align: center; grid-column: 1 / -1; }
.empty p { color: var(--muted); margin-top: 8px; }

/* ---------- Labels ---------- */

.pill, .status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  background: rgba(244, 239, 228, 0.07); color: var(--muted); margin: 0 6px 6px 0; white-space: nowrap;
}
.pill::before, .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok, .status.aanwezig { color: var(--ok); background: rgba(127, 209, 160, 0.12); }
.pill.gold { color: var(--gold-hi); background: rgba(212, 169, 74, 0.16); }
.pill.warn, .status.ontbreekt { color: var(--warn); background: rgba(235, 162, 92, 0.13); }
.pill.ask { color: var(--ask); background: rgba(143, 184, 240, 0.13); }
.pill.tiny { font-size: 0.68rem; padding: 2px 8px; margin: 0; }
.status { margin: 0; }
.status.ontbreekt::before { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }

/* ---------- Knoppen en velden ---------- */

button, .button {
  font: inherit; font-weight: 600; cursor: pointer; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, background 0.3s, color 0.3s, border-color 0.3s;
}
button:active, .button:active { transform: scale(0.96); }
.gold {
  color: #1a1407;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #b98a2d);
  box-shadow: 0 10px 30px -12px rgba(212, 169, 74, 0.8);
}
.gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(212, 169, 74, 0.95); }
.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.small { padding: 7px 16px; font-size: 0.85rem; }
.link { background: none; padding: 4px 2px; color: var(--muted); font-weight: 500; font-size: 0.85rem; border-radius: 4px; }
.link:hover { color: var(--gold-hi); }
.icon { width: 30px; height: 30px; padding: 0; background: transparent; color: var(--muted); font-size: 1.2rem; }
.icon:hover { color: var(--danger); background: rgba(239, 125, 111, 0.12); }
button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.stack { display: grid; gap: 16px; margin-top: 22px; }
label { display: grid; gap: 7px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px 16px; width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
}
textarea { resize: vertical; border-radius: 22px 22px 22px 8px; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 169, 74, 0.16); }
label.button { color: var(--ink); }

/* ---------- Meldingen ---------- */

.notes { display: grid; gap: 10px; margin-bottom: 24px; }
.note {
  padding: 14px 20px; border-radius: 22px 22px 22px 6px;
  background: var(--card-hi); border: 1px solid var(--line);
  animation: rise 0.6s var(--ease) both;
}
.note.ok { border-color: rgba(127, 209, 160, 0.35); }
.note.error { border-color: rgba(239, 125, 111, 0.5); color: #ffd3cc; }
.note.released { border-color: var(--gold); color: var(--gold-hi); font-weight: 600; }
.note.secret { border-color: var(--gold); user-select: all; font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }

/* ---------- Inloggen ---------- */

.login-card { width: min(440px, 100%); padding: 48px 42px 44px; text-align: center; border-radius: 64px 44px 70px 40px / 44px 66px 42px 68px; }
.login-card h1 { font-size: 2.2rem; }
.login-card .lead { margin: 6px auto 0; font-size: 1rem; }
.login-card .stack { text-align: left; }
.login-card .button { margin-top: 24px; }
.login-logo { width: 240px; max-width: 80%; margin-bottom: 18px; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- Maand ---------- */

.month-hero { display: flex; align-items: center; gap: 34px; padding: 34px 40px; margin-bottom: 22px; flex-wrap: wrap; }
.month-hero-text { flex: 1; min-width: 240px; }
.month-hero-text h1 { margin-bottom: 14px; }
.month-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.month-hero-actions form { margin: 0; }

.dropzone {
  position: relative; display: flex; align-items: center; gap: 24px;
  padding: 26px 34px; margin-bottom: 22px;
  border: 1.5px dashed rgba(212, 169, 74, 0.45);
  border-radius: var(--blob-b);
  transition: border-color 0.4s, background 0.4s, transform 0.5s var(--ease), border-radius 0.9s var(--ease);
}
.dropzone-blob {
  width: 64px; height: 64px; flex: none;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
  animation: morph 7s ease-in-out infinite alternate;
  box-shadow: 0 0 40px -6px rgba(212, 169, 74, 0.7);
}
.dropzone-text { display: grid; gap: 4px; }
.dropzone-text strong { font-size: 1.1rem; font-weight: 600; }
.dropzone-text span { color: var(--muted); font-size: 0.92rem; }
.dropzone-text .button { justify-self: start; margin-top: 8px; }
.dropzone.is-over { background: rgba(212, 169, 74, 0.1); border-color: var(--gold-hi); transform: scale(1.012); border-radius: var(--blob-a); }
.dropzone.is-over .dropzone-blob { animation-duration: 1.4s; transform: scale(1.2); }
.dropzone.is-busy { opacity: 0.6; pointer-events: none; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; margin-bottom: 22px; }
.slot { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.slot:nth-child(3n + 2) { border-radius: var(--blob-b); }
.slot:nth-child(3n) { border-radius: 48px 40px 58px 36px / 40px 56px 38px 58px; }
.slot:hover { border-color: rgba(212, 169, 74, 0.35); transform: translateY(-3px); }
.slot header { display: flex; align-items: flex-start; gap: 14px; }
.slot header > div { flex: 1; min-width: 0; }
.slot-number { font-size: 0.8rem; font-weight: 600; color: var(--gold); letter-spacing: 0.1em; padding-top: 4px; }
.slot-source { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.slot.is-aanwezig { border-color: rgba(127, 209, 160, 0.22); }
.slot.is-nvt, .slot.is-optioneel { opacity: 0.72; }
.slot-actions { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.slot-actions form { margin: 0; }

.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.files form { margin: 0; }
.file {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px;
  padding: 9px 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.28);
  transition: background 0.3s, transform 0.4s var(--ease);
}
.file:hover { background: rgba(212, 169, 74, 0.14); transform: translateX(4px); }
.file-ext { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; color: var(--bg); background: var(--gold); padding: 3px 7px; border-radius: 8px; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.file-meta { flex-basis: 100%; color: var(--muted); font-size: 0.75rem; }

/* ---------- Panelen: vragen, logboek, toegang ---------- */

.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.panel { padding: 30px 32px; }
.panel h2 { margin-bottom: 18px; font-size: 1.3rem; }
.panel.narrow { max-width: 520px; margin: 0 auto; }
.panel.narrow h1 { font-size: 2rem; }
.panel > .muted { margin-top: 16px; font-size: 0.9rem; }

.thread { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.thread:first-of-type { border-top: 0; padding-top: 0; }
.thread.resolved { opacity: 0.55; }
.bubble { padding: 12px 18px; border-radius: 22px 22px 22px 6px; background: rgba(0, 0, 0, 0.3); max-width: 88%; }
.bubble.owner { justify-self: end; border-radius: 22px 22px 6px 22px; background: rgba(212, 169, 74, 0.14); }
.bubble-meta { font-size: 0.74rem; color: var(--muted); margin-bottom: 2px; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-actions { display: flex; align-items: center; gap: 12px; }
.thread-actions form { margin: 0; }
.reply-form { flex: 1; display: flex; gap: 8px; }
.reply-form input { padding: 8px 14px; }
.ask-form { border-top: 1px solid var(--line); padding-top: 20px; }
.ask-form button { justify-self: start; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-height: 460px; overflow-y: auto; }
.timeline li { display: flex; gap: 14px; font-size: 0.9rem; }
.timeline p::first-letter { text-transform: uppercase; }
.dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.vrijgeven { background: var(--gold-hi); box-shadow: 0 0 12px var(--gold); }
.dot.upload { background: var(--ok); }
.dot.verwijderd, .dot.intrekken { background: var(--danger); }
.dot.vraag, .dot.reactie { background: var(--ask); }

.accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.accounts li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.accounts li:first-child { border-top: 0; }
.accounts li > div { flex: 1; min-width: 0; }
.accounts li.off { opacity: 0.5; }
.accounts form { margin: 0; }
.accounts .muted { font-size: 0.85rem; overflow-wrap: anywhere; }

/* ---------- Gouden vonken bij vrijgave ---------- */

.spark {
  position: fixed; left: 50%; top: 30%; width: 10px; height: 10px; z-index: 50; pointer-events: none;
  background: var(--gold-hi); border-radius: 60% 40% 55% 45%;
  animation: spark 1.5s var(--ease) forwards;
}
@keyframes spark {
  from { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  to   { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(240deg); }
}

/* ---------- Smal scherm ---------- */

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; border-radius: 30px; gap: 10px; padding: 12px 16px; position: static; }
  .topnav { margin-left: 0; order: 3; width: 100%; }
  .who { margin-left: auto; }
  .who-role { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .month-hero { padding: 26px; gap: 20px; }
  .month-hero-actions { justify-content: flex-start; }
  .ring.big { width: 110px; height: 110px; }
  .ring.big .ring-label { font-size: 1.8rem; }
  .month-grid, .slot-grid { grid-template-columns: 1fr; }
  .dropzone { padding: 22px; }
  .page { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ring-value { transition: none; }
}
