/* FLAi visitekaartjes
   Huisstijl: FLAi/LEESMIJ.md. Donker (Carbon) is de hoofdversie van het merk.
   Radius-systeem: vlakken 16px · knoppen 12px · invoervelden 10px · chips volledig rond · avatar rond. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Merkpalet */
  --flai-violet: #7C3AED;
  --flai-indigo: #4F46E5;
  --flai-blue: #2563EB;
  --flai-cyan: #22D3EE;
  --flai-ink: #0A0B14;
  --flai-paper: #F6F7FB;
  --flai-gradient: linear-gradient(105deg, #7C3AED 0%, #4F46E5 34%, #2563EB 66%, #22D3EE 100%);

  /* Interface (uit het merkboek) */
  --bg: #0A0B14;
  --surface: #12141F;
  --line: #232637;
  --text: #E8EAF4;
  --dim: #9AA0BC;
  --ok: #6EE7B7;
  --bad: #FCA5A5;
  --control: #5D6280;              /* rand van invoervelden: ≥ 3:1 op Carbon (WCAG 1.4.11) */
  --surface-hover: #161826;        /* vlak, 1 stap lichter */
  --surface-press: #1A1D2C;
  --line-strong: #33374D;
  --accent: var(--flai-violet);
  --focus: var(--flai-cyan);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --r-surface: 16px;
  --r-btn: 12px;
  --r-input: 10px;
  --pad: 20px;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
.dim { color: var(--dim); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Kaart ---------- */
.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
}

@media (min-width: 560px) {
  body {
    padding: 48px 16px;
    background:
      radial-gradient(60% 50% at 50% 0%, rgba(58, 42, 134, 0.35), transparent 70%),
      radial-gradient(40% 40% at 85% 100%, rgba(37, 99, 235, 0.10), transparent 70%),
      var(--bg);
  }
  .card {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(5, 6, 14, 0.8);
  }
}

/* ---------- Cover + profiel ---------- */
.cover {
  position: relative;
  height: 168px;
  background: url("/assets/img/cover.svg") center / cover no-repeat, var(--bg);
}
/* De "fast lane": één dunne lijn in de merkgradient */
.cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--flai-gradient);
  opacity: 0.7;
}

.profile-body { padding: 0 var(--pad); }

.avatar {
  position: relative;
  width: 116px; height: 116px;
  margin-top: -58px;
  border-radius: 50%;
  padding: 3px;
  background: var(--flai-gradient);
}
.avatar picture { display: block; width: 100%; height: 100%; }
.avatar img, .avatar .initials {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
}
.avatar img { object-fit: cover; background: var(--surface); }
.initials {
  display: grid;
  place-items: center;
  background: var(--flai-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 38px;
  letter-spacing: 0.02em;
}

.name {
  margin-top: 18px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.role {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.role-2 {
  margin-top: 1px;
  font-size: 15px;
  color: var(--dim);
}
.city {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--dim);
}
.city .icon { width: 16px; height: 16px; }
.bio {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  max-width: 36ch;
  text-wrap: pretty;
}

/* ---------- Knoppen ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-btn);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  color: #fff;
  background: var(--flai-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-quiet {
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 100vmax rgba(255, 255, 255, 0.06); }
  .btn-quiet:hover { border-color: var(--line-strong); background: var(--surface-hover); }
}

.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 28px var(--pad) 0;
}

/* ---------- Contactlijst ---------- */
.links { padding: 16px var(--pad) 0; }
.links ul {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  overflow: hidden;
}
.row { display: flex; align-items: stretch; }
.row + .row { border-top: 1px solid var(--line); }

.link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 200ms ease;
}
.link:active { background: var(--surface-press); }
.link:focus-visible { outline-offset: -2px; border-radius: 0; }
.ico {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
  transition: transform 160ms var(--ease-out);
}
.link:active .ico { transform: scale(0.94); }
.txt { display: flex; flex-direction: column; min-width: 0; }
.lbl { font-weight: 600; font-size: 16px; line-height: 1.3; }
.val {
  font-size: 14px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.trail { margin-left: auto; color: var(--dim); width: 18px; height: 18px; transition: transform 200ms var(--ease-out), color 200ms ease; }

.copy {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  flex: none;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms ease, background-color 200ms ease;
}
.copy:focus-visible { outline-offset: -2px; border-radius: 0; }
.copy .icon { grid-area: 1 / 1; transition: opacity 180ms ease, transform 220ms var(--ease-out); }
.copy .icon-done { opacity: 0; transform: scale(0.6); color: var(--ok); }
.copy.is-done .icon:not(.icon-done) { opacity: 0; transform: scale(0.6); }
.copy.is-done .icon-done { opacity: 1; transform: scale(1); }
.copy:active .icon { transform: scale(0.9); }
.copy.is-done:active .icon-done { transform: scale(0.9); }

@media (hover: hover) and (pointer: fine) {
  .link:hover { background: var(--surface-hover); }
  .link:hover .trail { transform: translate(2px, -2px); color: var(--text); }
  .copy:hover { color: var(--text); background: var(--surface-hover); }
}

/* ---------- Blokken ---------- */
.block { padding: 36px var(--pad) 0; }
.block h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.block + .block { padding-top: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

/* ---------- Mijn bedrijven & projecten ----------
   Eén kaart per venture. Kleur komt uit data.mjs (--v-accent) en blijft een zachte tint,
   zodat elk logo en elke merkkleur op de Carbon-basis werkt. */
.ventures { display: grid; gap: 10px; }
.venture {
  --v-accent: var(--flai-violet);
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--v-accent) 13%, transparent), transparent 62%),
    var(--surface);
  overflow: hidden;
}
/* Dunne accentlijn bovenaan in de kleur van de venture */
.venture::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--v-accent) 70%, transparent), transparent);
}
.venture-head { display: flex; align-items: center; gap: 14px; }
.venture-logo {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex: none;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--v-accent) 35%, var(--line));
}
.venture-logo img { width: 36px; height: 36px; object-fit: contain; }
/* Geen logo: initialen van het bedrijf, getint in de eigen accentkleur */
.venture-mono {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--v-accent) 40%, var(--text));
}
.venture-id { display: flex; flex-direction: column; min-width: 0; }
.venture-name { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.venture-role { font-size: 14px; color: var(--dim); }
.venture-tagline { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; gap: 8px; }
.venture-link { margin-top: 14px; }
.venture-link .trail { margin-left: 2px; }
@media (hover: hover) and (pointer: fine) {
  .venture-link:hover .trail { transform: translate(2px, -2px); color: var(--text); }
}
@media (min-width: 560px) {
  .ventures-multi { grid-template-columns: 1fr 1fr; }
}

/* ---------- Meer over mij (uitklapper) ---------- */
:root { interpolate-size: allow-keywords; }
.about {
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--surface);
}
.about summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-surface);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 200ms ease;
}
.about summary::-webkit-details-marker { display: none; }
.about-hint { font-size: 14px; font-weight: 400; color: var(--dim); }
.about summary .icon { margin-left: auto; color: var(--dim); transition: transform 240ms var(--ease-out); }
.about[open] summary .icon { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
  .about summary:hover { background: var(--surface-hover); }
}
.about-inner { padding: 2px 16px 18px; }
.about-inner h3 {
  margin: 14px 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
}
.about-inner h3:first-child { margin-top: 4px; }

/* Openen: hoogte glijdt mee (waar ondersteund), inhoud fade + kleine schuif. Sluiten sneller. */
.about::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 180ms var(--ease-out), content-visibility 180ms allow-discrete;
}
.about[open]::details-content {
  block-size: auto;
  transition-duration: 260ms;
}
@media (prefers-reduced-motion: no-preference) {
  .about[open] .about-inner { animation: reveal 260ms var(--ease-out) both; }
  @keyframes reveal { from { opacity: 0; transform: translateY(-6px); } }
}
.timeline li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 10px 0;
}
.timeline li + li { border-top: 1px solid var(--line); }
.t-what { font-size: 15px; font-weight: 500; }
.t-where { grid-row: 2; font-size: 14px; color: var(--dim); }
.t-when {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.t-note { grid-column: 1 / -1; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text); }
/* Opdrachten onder een job: ingesprongen, verbonden door één dunne lijn */
.t-projects {
  grid-column: 1 / -1;
  margin: 10px 0 2px 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}
.timeline .t-projects li { padding: 5px 0; border-top: 0; }
.t-projects .t-what { font-size: 14px; }
.t-projects .t-where, .t-projects .t-when { font-size: 13px; }

/* ---------- Formulier ---------- */
.form { display: grid; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text); }
.field input:not([type="checkbox"]), .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--control);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* voorkomt inzoomen op iOS */
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field textarea { resize: vertical; min-height: 116px; line-height: 1.5; }
.field input:not([type="checkbox"]):focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
  border-radius: var(--r-input);
}
.field [aria-invalid="true"] { border-color: var(--bad) !important; }
.err { font-size: 13px; color: var(--bad); min-height: 0; }
.err:empty { display: none; }

.field-check {
  grid-template-columns: 24px 1fr;
  align-items: start;
  column-gap: 12px;
}
.field-check input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid var(--control);
  border-radius: 6px;
  background: var(--surface) center / 14px no-repeat;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}
.field-check input:active { transform: scale(0.92); }
.field-check input:checked {
  border-color: transparent;
  background-color: var(--flai-violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='28' stroke-linecap='round' stroke-linejoin='round' d='M40 136l56 56L216 72'/%3E%3C/svg%3E");
}
.field-check label { font-weight: 400; color: var(--dim); line-height: 1.5; cursor: pointer; }
.field-check .err { grid-column: 2; }

.btn-submit { width: 100%; }
.btn-submit .icon-spin { display: none; }
.btn-submit.is-loading { pointer-events: none; }
.btn-submit.is-loading .icon:not(.icon-spin) { display: none; }
.btn-submit.is-loading .icon-spin { display: block; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { font-size: 14px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-bad { color: var(--bad); }
.form-status a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.foot {
  margin-top: 48px;
  padding: 22px var(--pad) 4px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}

/* ---------- 404 ---------- */
.card-404 .name { margin-top: 20px; }
.card-404 .bio { color: var(--dim); }
.cta-single { grid-template-columns: 1fr; }
.cta-single .btn { justify-content: center; }

/* ---------- Deel-venster ---------- */
.sheet {
  width: min(360px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.6);
}
.sheet::backdrop { background: rgba(5, 6, 14, 0.72); }
.sheet-inner { padding: 18px 18px 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 17px; font-weight: 600; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin: -8px -10px -8px 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--dim); cursor: pointer;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--text); } }
.qr {
  padding: 14px;
  border-radius: var(--r-surface);
  background: var(--flai-paper);
}
.qr-svg { width: 100%; height: auto; }
.sheet-url { margin-top: 12px; text-align: center; font-size: 14px; color: var(--dim); word-break: break-all; }
.sheet-actions { display: grid; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { width: 100%; }

.sheet[open] {
  opacity: 1;
  transform: scale(1);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete;
}
@starting-style { .sheet[open] { opacity: 0; transform: scale(0.96); } }
.sheet { opacity: 0; transform: scale(0.98); transition: opacity 150ms ease, transform 150ms ease, overlay 150ms allow-discrete, display 150ms allow-discrete; }
.sheet::backdrop { transition: opacity 220ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete; opacity: 0; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-press);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(100% + 24px));
  transition: transform 180ms ease, opacity 160ms ease;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: transform 320ms var(--ease-out), opacity 200ms ease;
}
.toast-ico { color: var(--ok); }
.toast-ico .icon { width: 18px; height: 18px; }

/* ---------- Entree (gestaffeld, eenmalig bij laden) ---------- */
.d0 { --d: 0; } .d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; } .d5 { --d: 5; } .d6 { --d: 6; }
.v0 { --vd: 0; } .v1 { --vd: 1; } .v2 { --vd: 2; } .v3 { --vd: 3; } .v4 { --vd: 4; } .v5 { --vd: 5; }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 380ms var(--ease-out) both; animation-delay: calc(var(--d) * 40ms); }
  .cover.rise { animation-name: fade; animation-duration: 500ms; }
  /* Bedrijfskaarten: eigen kleine cascade (50 ms per kaart) na de kop van het blok */
  .venture { animation: rise 380ms var(--ease-out) both; animation-delay: calc(240ms + var(--vd) * 50ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes fade { from { opacity: 0; } }
}

/* Minder beweging: geen verplaatsing of schaal, wel zachte opacity-overgangen
   zodat statuswissels (gekopieerd, venster open) zichtbaar blijven. */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .link:active .ico, .copy:active .icon,
  .icon-btn:active, .field-check input:active { transform: none; }
  .copy .icon, .copy .icon-done, .copy.is-done .icon:not(.icon-done) { transform: none; }
  .link:hover .trail, .venture-link:hover .trail { transform: none; }
  .about::details-content { transition: none; }
  .about summary .icon { transition: none; }
  .toast, .toast.is-on { transform: translate(-50%, 0); transition: opacity 200ms ease; }
  .sheet, .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { transform: none; } }
  .btn-submit.is-loading .icon-spin { animation: none; }
}

@media (max-width: 359px) {
  :root { --pad: 16px; }
  .name { font-size: 27px; }
  .cta { grid-template-columns: 1fr; }
}

/* ---------- Ventures: accentkleuren (gegenereerd uit data.mjs) ---------- */
.venture-flai { --v-accent: #7C3AED; }
.venture-hu-consultancy { --v-accent: #2563EB; }
