/* =====================================================================
   FAUJ — VOORBEELDSITES: gedeelde basis
   Elke voorbeeldsite (bakkerij, kapsalon, restaurant, bouw) heeft een eigen
   ontwerp in haar eigen index.html. Hier staat enkel wat ze delen:
   lettertypes, een nette beginstand, de zwarte "voorbeeld"-balk bovenaan,
   schuifpanelen, meldingen en formuliervelden.
   Kleuren en vormen komen uit variabelen die elke site zelf invult:
     --bg --ink --mute --accent --on-accent --soft --card --line --line-2
     --field --radius --radius-sm --radius-lg --radius-btn
     --font-head --font-body
   ===================================================================== */

/* ---------- Lettertype van de zwarte balk bovenaan (FAUJ) ----------
   Elke voorbeeldsite laadt haar eigen lettertypes in haar eigen index.html. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../../fonts/archivo-latin-wdth-normal.woff2") format("woff2"); }

/* ---------- Beginstand ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --demo-h: 38px;
  --head-h: 68px;
  --font-body: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--demo-h) + var(--head-h) + 14px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg, #fff);
  color: var(--ink, #111);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }      /* de hoogte volgt de breedte, ook als er width/height in de html staat */
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent, #2B62FF); outline-offset: 3px; }
::selection { background: var(--accent, #2B62FF); color: var(--on-accent, #fff); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(var(--wrap, 1160px), 100% - 2 * var(--gutter, clamp(18px, 4vw, 40px))); margin-inline: auto; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- De zwarte balk bovenaan: "dit is een voorbeeld" ---------- */
.demo-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  min-height: var(--demo-h);
  padding: 5px 12px;
  background: #111110;
  color: #fff;
  font: 500 .8125rem/1.3 "Archivo", system-ui, sans-serif;
}
.demo-bar__txt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.demo-bar__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #FFE24A; }
.demo-bar b { font: 800 .86rem/1 "Archivo", system-ui, sans-serif; font-stretch: 108%; letter-spacing: -.01em; }
.demo-bar__long { color: #B9B9B1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar a {
  flex: none;
  padding: 5px 12px;
  border-radius: 3px;
  background: #2B62FF;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.demo-bar a:hover { background: #fff; color: #111110; }
@media (max-width: 720px) {
  .demo-bar { justify-content: space-between; }
  .demo-bar__long { display: none; }
}

/* ---------- Knoppen (elke site kleurt ze zelf) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-btn, 4px);
  background: var(--accent);
  color: var(--on-accent, #fff);
  font: 600 1rem/1.1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, opacity .2s;
}
.btn .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .55); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2, var(--line)); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: .93rem; }
.btn--block { width: 100%; }
.btn.is-busy { pointer-events: none; opacity: .8; }
.btn.is-busy::after { content: ""; width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: demoSpin .7s linear infinite; }
@keyframes demoSpin { to { transform: rotate(360deg); } }

/* ---------- Schuifpaneel (mandje, boeking, formulier) ----------
   .sheet--drawer  schuift van rechts in (op gsm van onderen)
   .sheet--modal   staat in het midden (op gsm van onderen)          */
.sheet { position: fixed; inset: 0; z-index: 120; display: grid; visibility: hidden; pointer-events: none; transition: visibility 0s .4s; }
.sheet.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.sheet__veil { position: absolute; inset: 0; background: rgba(22, 16, 10, .52); opacity: 0; transition: opacity .35s; }
.sheet.is-open .sheet__veil { opacity: 1; }
.sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card, #fff);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  transition: transform .45s var(--ease), opacity .3s;
}
.sheet--drawer { justify-items: end; }
.sheet--drawer .sheet__panel { width: min(460px, 100%); height: 100%; transform: translateX(104%); }
.sheet--drawer.is-open .sheet__panel { transform: none; }
.sheet--modal { place-items: center; padding: 20px; }
.sheet--modal .sheet__panel { width: min(var(--sheet-w, 720px), 100%); max-height: min(90vh, 880px); border-radius: var(--radius-lg, 24px); overflow: hidden; transform: translateY(26px) scale(.98); opacity: 0; }
.sheet--modal.is-open .sheet__panel { transform: none; opacity: 1; }
.sheet__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.sheet__title { flex: 1; min-width: 0; font: var(--sheet-title, 700 1.2rem/1.2 var(--font-head)); }
.sheet__close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-close, 50%); background: var(--soft); color: var(--ink); }
.sheet__close .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet__foot { flex: none; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card, #fff); }
@media (max-width: 640px) {
  .sheet--modal { padding: 0; align-items: end; }
  .sheet--modal .sheet__panel,
  .sheet--drawer .sheet__panel { width: 100%; height: auto; max-height: 94vh; max-height: 94dvh; border-radius: var(--radius-sheet, 14px) var(--radius-sheet, 14px) 0 0; transform: translateY(102%); opacity: 1; }
  .sheet--drawer { align-items: end; }
  .sheet--tall .sheet__panel { height: 94vh; height: 94dvh; }
  .sheet__body { padding: 16px; }
  .sheet__foot { padding-inline: 16px; }
}

/* stappenbalkje in een paneel */
.steps-bar { display: flex; gap: 6px; }
.steps-bar i { flex: 1; height: 5px; border-radius: 999px; background: var(--soft); transition: background-color .4s; }
.steps-bar i.is-on { background: var(--accent); }

/* ---------- Meldingen onderaan ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 200; display: grid; gap: 8px; width: min(92vw, 440px); transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm, 4px);
  background: #111110;
  color: #fff;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
  font: 500 .92rem/1.4 var(--font-body);
  animation: toastIn .45s var(--spring);
}
.toast b { font-weight: 700; }
.toast__tag { flex: none; margin-top: 1px; padding: 2px 8px; border-radius: 2px; background: #FFE24A; color: #111110; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
/* op gsm bovenaan, zodat een melding nooit een knop onderaan bedekt */
@media (max-width: 720px) {
  .toasts { top: calc(var(--demo-h) + 10px); bottom: auto; }
}

/* ---------- Formuliervelden ---------- */
.fld { display: grid; gap: 6px; margin-bottom: 14px; }
.fld > label, .fld__label { font-size: .92rem; font-weight: 600; }
.fld small.fld__hint { font-size: .82rem; font-weight: 400; color: var(--mute); }
.fld em { font-style: normal; font-weight: 400; color: var(--mute); }
.fld input, .fld select, .fld textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-sm, 12px);
  background: var(--field, #fff);
  box-shadow: inset 0 0 0 1.5px var(--line-2, var(--line));
  font-size: 1rem;       /* 16px: anders zoomt de iPhone in bij het typen */
  line-height: 1.4;
  transition: box-shadow .2s;
}
.fld textarea { min-height: 88px; resize: vertical; }
.fld select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.fld ::placeholder { color: var(--mute); opacity: .75; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.fld.is-bad input, .fld.is-bad select, .fld.is-bad textarea { box-shadow: inset 0 0 0 2px #C22F12; }
.fld__err { color: #C22F12; font-size: .85rem; font-weight: 500; }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 480px) { .fld-row { grid-template-columns: minmax(0, 1fr); } }

/* briefje "dit is een demo" in een bevestiging */
.demo-note { display: flex; gap: 10px; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm, 12px); background: var(--soft); font-size: .88rem; line-height: 1.45; }
.demo-note .ico { width: 18px; height: 18px; margin-top: 2px; }

/* vinkje dat zichzelf tekent (bevestiging) */
.tick { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); animation: tickPop .6s var(--spring) both; }
.tick svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 26; stroke-dashoffset: 26; animation: tickDraw .5s .3s var(--ease) forwards; }
@keyframes tickPop { from { transform: scale(.5); opacity: 0; } }
@keyframes tickDraw { to { stroke-dashoffset: 0; } }

/* ---------- Verschijnen bij scrollen ---------- */
[data-motion="full"] .rise { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
[data-motion="full"] .rise.is-in { opacity: 1; transform: none; }

/* ---------- Rustige weergave: geen beweging ---------- */
[data-motion="calm"] { scroll-behavior: auto; }
[data-motion="calm"] *, [data-motion="calm"] *::before, [data-motion="calm"] *::after { animation: none !important; transition-duration: .01ms !important; }
[data-motion="calm"] .tick svg { stroke-dashoffset: 0; }

@media print { .demo-bar, .toasts, .sheet { display: none !important; } }
