/* De poort: het inloggen, het wachtwoord en elke randstaat (404, 500, een verlopen link, een betaling
   die niet lukte). Eén kamer met het merk, één kaart en een weg terug, zoals de inlogpagina van het
   dashboard. Laad tokens.css, fonts.css en merk.css eerst; zet class="poort" op body. Alles in px,
   want Payload zet de wortel op 13px en een site soms op 62,5 procent. */

.poort {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--grijs);
  color: var(--inkt);
  font: 400 var(--maat-papier)/1.55 var(--sans);
  font-feature-settings: var(--letter-instelling);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.poort *,
.poort *::before,
.poort *::after { box-sizing: border-box; }
.poort :where(h1, p) { margin: 0; }
.poort :where(a) { color: inherit; text-decoration: none; }
.poort :where(button, input, textarea) { margin: 0; font: inherit; color: inherit; }
.poort :where(svg) { display: block; flex: none; }
.poort ::selection { background: var(--blauw); color: #fff; }
.poort :focus-visible { outline: 2px solid var(--blauw); outline-offset: 3px; }

.poort-vlak {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 16px;
}
.poort-merk { position: relative; font-size: 18.4px; }
.poort-merk::after { content: ""; position: absolute; inset: -12px -10px; }

.poort-kaart {
  width: 100%;
  max-width: 440px;
  padding: clamp(28px, 7vw, 40px);
  border-radius: var(--r-vel);
  background: var(--wit);
  box-shadow: var(--schaduw-kaart);
}

.poort-label { display: flex; align-items: center; gap: 9.6px; margin-bottom: 22px; font-family: var(--mono); font-size: 12.48px; line-height: 1; letter-spacing: 0.01em; color: var(--inkt-zacht); }
.poort-label b { padding: 3.84px 8px; border-radius: var(--r-label); background: var(--blauw); color: #fff; font-weight: 500; }
.poort-label--fout b { background: var(--inkt); }

.poort-kop { margin-bottom: 10px; font-size: clamp(29.6px, 24px + 1.2vw, 36px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.poort-lead { margin-bottom: 26px; color: var(--inkt-zacht); text-wrap: pretty; }
.poort-lead:last-child { margin-bottom: 0; }

.poort-form { display: grid; gap: 18px; }
.poort-veldlabel { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 12.48px; line-height: 1.2; letter-spacing: 0.01em; color: var(--inkt-zacht); }
.poort-veld {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-veld);
  background: var(--grijs);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.poort-veld::placeholder { color: var(--inkt-as); opacity: 1; }
.poort-veld:hover { background: #ebebe5; }
.poort .poort-veld:focus { outline: none; background: var(--wit); box-shadow: var(--ring); }
.poort-veld[aria-invalid="true"] { background: var(--fout-zacht); }
/* Ingevuld door de browser of een wachtwoordbeheerder: zonder dit wordt het veld lichtblauw. */
.poort-veld:-webkit-autofill { -webkit-text-fill-color: var(--inkt); box-shadow: inset 0 0 0 100px var(--grijs); }
.poort .poort-veld:-webkit-autofill:focus { box-shadow: inset 0 0 0 100px var(--wit), var(--ring); }

/* Een wachtwoordveld met een oogknop erin, voor wie wil zien wat hij typt. */
.poort-oogveld { position: relative; }
.poort-oogveld .poort-veld { padding-right: 56px; }
.poort-oog { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--inkt-zacht); cursor: pointer; }
.poort-oog:hover { color: var(--inkt); }
.poort-oog svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.poort-knop {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-knop);
  background: var(--blauw);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--gloed-blauw);
  transition: transform 0.5s var(--zet), background-color 0.3s, box-shadow 0.5s var(--zet);
}
.poort-knop:hover { background: var(--blauw-diep); transform: translateY(-2px); box-shadow: var(--gloed-blauw-hoog); }
.poort-knop:active { transform: translateY(0) scale(0.985); transition-duration: var(--duur-druk); }
.poort-knop[aria-busy="true"] { cursor: progress; }
.poort-knop:disabled { background: var(--grijs-diep); color: var(--inkt-vaag); box-shadow: none; transform: none; cursor: default; }
.poort-pijl { display: grid; place-items: center; width: 24px; height: 24px; overflow: hidden; border-radius: 7px; background: rgba(255, 255, 255, 0.14); }
.poort-pijl svg { grid-area: 1 / 1; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.55s var(--zet); }
.poort-pijl svg + svg { transform: translateX(-140%); }
.poort-knop:hover .poort-pijl svg:first-child:not(:only-child) { transform: translateX(140%); }
.poort-knop:hover .poort-pijl svg + svg { transform: none; }
.poort-knop--stil { background: var(--grijs); color: var(--inkt); box-shadow: none; }
.poort-knop--stil:hover { background: var(--grijs-diep); box-shadow: none; }

.poort-acties { display: grid; gap: 12px; margin-top: 26px; }
.poort-acties .poort-knop { margin-top: 0; }

.poort-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7.2px;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  color: var(--blauw);
  font-size: 15.04px;
  font-weight: 600;
  transition: background-size 0.55s var(--zet);
}
.poort-link:hover { background-size: 0% 1.5px; background-position: 100% 100%; }
.poort-link::after,
.poort-onder a::after { content: ""; position: absolute; inset: -10px -6px; }
.poort-terug { margin-top: 24px; }
/* Een kleine link onder een veld, zoals "Wachtwoord vergeten?", rechts uitgelijnd. */
.poort-naast { display: flex; justify-content: flex-end; margin-top: -6px; }

.poort-melding { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; padding: 12px 14px; border-radius: var(--r-knop); font-size: 15.04px; line-height: 1.45; }
.poort-melding svg { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.poort-melding a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.poort-melding--fout { background: var(--fout-zacht); color: var(--fout); }
.poort-melding--goed { background: var(--live-zacht); color: var(--live); }
.poort-kop + .poort-melding { margin-top: 18px; }

.poort-onder { max-width: 440px; font-size: 15.04px; color: var(--inkt-zacht); text-align: center; text-wrap: balance; }
.poort-onder a {
  position: relative;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  color: var(--inkt);
  transition: background-size 0.55s var(--zet);
}
.poort-onder a:hover { background-size: 0% 1px; background-position: 100% 100%; }
/* Wie er niet uitkomt, krijgt Ruud: in mono, zoals een kleine waarheid onder de kaart. */
.poort-hulp { max-width: 400px; font-family: var(--mono); font-size: 12.48px; line-height: 1.6; color: var(--inkt-zacht); text-align: center; text-wrap: balance; }
.poort-hulp a { position: relative; color: var(--inkt); white-space: nowrap; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.poort-hulp a::after { content: ""; position: absolute; inset: -12px -4px; }

@media (prefers-reduced-motion: reduce) {
  .poort-knop, .poort-link, .poort-onder a, .poort-pijl svg, .poort-veld { transition: none; }
  .poort-knop:hover { transform: none; }
}
