/* ============================================================
   EnFoldr auth — Brand Bible v2.0 (Deel A + B, §14)
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fragment-mono-v6-latin-regular.woff2") format("woff2");
}

:root {
  --navy: #131c28;
  --blauw: #0099ff;
  --blauw-diep: #0077cc;
  --blauw-dieper: #005fa3;
  --muted: #7c8797;
  --muted-donker: #5a6675;
  --hairline: #ced8e5;
  --tint: #f0f8ff;
  --halo: #e2f1ff;
  --raster: #e0e7f0;
  --wit: #ffffff;

  --fout: #b3261e;
  --fout-vlak: #fdf2f1;
  --letop: #8a5a00;
  --letop-vlak: #fdf8ed;
  --gelukt: #14724a;
  --gelukt-vlak: #f0f8f4;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, "SFMono-Regular", monospace;

  --fs-h1: 30px;
  --lh-h1: 38px;
  --fs-h3: 17px;
  --lh-h3: 24px;
  --fs-body: 16px;
  --lh-body: 26px;
  --fs-body-sm: 14px;
  --lh-body-sm: 22px;
  --fs-label: 14px;
  --lh-label: 20px;
  --fs-help: 13px;
  --lh-help: 19px;
  --fs-mono: 12px;
  --lh-mono: 16px;
  --tracking-mono: 0.08em;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 18px;

  --border: 1px solid var(--hairline);
  --elev-1: 0 1px 2px rgba(19, 28, 40, 0.06);
  --elev-2: 0 8px 24px rgba(19, 28, 40, 0.1);
  --focus: 0 0 0 3px var(--halo), 0 0 0 1px var(--blauw);

  --duur: 150ms;
  --curve: cubic-bezier(0.2, 0.6, 0.3, 1);
  --control-h: 44px;
  --raakvlak: 44px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--wit);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--navy);
  background: var(--wit);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

/* --- Layout: form left, trust panel right (§14.2) --------------- */

.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

.auth-main {
  display: flex;
  flex-direction: column;
  background: var(--wit);
}

.auth-main-inner {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-6) var(--s-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}

.auth-aside {
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-8);
  border-left: var(--border);
  background-color: var(--tint);
  background-image: radial-gradient(var(--raster) 1.3px, transparent 1.3px);
  background-size: 24px 24px;
}

.auth-aside-inner {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.auth-aside-eyebrow {
  margin: 0 0 var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: lowercase;
  color: var(--muted);
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  color: var(--navy);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  font-weight: 500;
}

.trust-node {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blauw);
  box-shadow: 0 0 0 4px var(--halo);
}

.trust-node svg {
  display: block;
  width: 12px;
  height: 12px;
}

.auth-aside-foot {
  margin: var(--s-7) 0 0;
  padding-top: var(--s-5);
  border-top: var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: lowercase;
  color: var(--muted);
}

@media (min-width: 900px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .auth-main-inner {
    padding: var(--s-8);
  }

  .auth-aside {
    display: flex;
  }
}

/* --- Brand / chrome --------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 40px;
  border-radius: var(--radius-s);
  text-decoration: none;
  align-self: flex-start;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.auth-panel {
  width: 100%;
}

.auth-header {
  margin-bottom: var(--s-5);
}

.eyebrow {
  margin: 0 0 var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: lowercase;
  color: var(--muted);
  font-weight: 400;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro {
  margin: var(--s-2) 0 0;
  color: var(--muted-donker);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
}

.intro strong {
  color: var(--navy);
  font-weight: 600;
}

/* --- Partner block (invite) ------------------------------------- */

.partner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  padding: var(--s-3);
  background: var(--tint);
  border: var(--border);
  border-radius: var(--radius-m);
}

.partner-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--wit);
  background: var(--navy);
  border-radius: var(--radius-s);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.partner-mark--logo {
  background: var(--wit);
  border: var(--border);
}

.partner-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--wit);
}

.partner-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partner-copy strong {
  overflow: hidden;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: lowercase;
  color: var(--muted);
}

/* --- Form ------------------------------------------------------- */

.auth-form,
.field {
  display: flex;
  flex-direction: column;
}

.auth-form {
  gap: 20px;
}

.field {
  gap: 6px;
}

label {
  color: var(--navy);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
}

input {
  width: 100%;
  min-height: var(--control-h);
  padding: 12px 14px;
  color: var(--navy);
  background: var(--wit);
  border: var(--border);
  border-radius: var(--radius-s);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  outline: none;
  transition: border-color var(--duur) var(--curve), box-shadow var(--duur) var(--curve);
}

input::placeholder {
  color: var(--muted);
}

input:hover {
  border-color: #b7c4d4;
}

input:focus-visible {
  border-color: var(--blauw);
  box-shadow: var(--focus);
}

.field-help {
  margin: 0;
  color: var(--muted-donker);
  font-size: var(--fs-help);
  line-height: var(--lh-help);
}

button {
  width: 100%;
  min-height: var(--control-h);
  padding: 12px 20px;
  color: var(--wit);
  background: var(--blauw-diep);
  border: 0;
  border-radius: var(--radius-s);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--duur) var(--curve),
    transform var(--duur) var(--curve),
    box-shadow var(--duur) var(--curve);
}

button:hover {
  background: var(--blauw-dieper);
}

button:active {
  background: var(--blauw-dieper);
  transform: translateY(1px);
}

button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button:disabled {
  cursor: not-allowed;
  background: var(--hairline);
  color: var(--muted-donker);
  transform: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.actions button {
  flex: 1 1 8.75rem;
}

.btn-secondary {
  color: var(--navy);
  background: var(--wit);
  border: var(--border);
}

.btn-secondary:hover {
  background: var(--tint);
}

.btn-secondary:active {
  background: var(--halo);
}

.btn-quiet {
  color: var(--blauw-diep);
  background: transparent;
  border: 0;
}

.btn-quiet:hover,
.btn-quiet:active {
  background: var(--halo);
}

/* --- Divider "of" ----------------------------------------------- */

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-3);
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--hairline);
}

/* --- Federated -------------------------------------------------- */

.federated-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.btn-federated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  min-height: var(--control-h);
  padding: 12px 20px;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  background: var(--wit);
  border: var(--border);
  border-radius: var(--radius-s);
  transition:
    background var(--duur) var(--curve),
    border-color var(--duur) var(--curve),
    box-shadow var(--duur) var(--curve);
}

.btn-federated:hover {
  background: var(--tint);
}

.btn-federated:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn-federated__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.btn-federated--ms {
  color: var(--wit);
  background: var(--navy);
  border-color: var(--navy);
}

.btn-federated--ms:hover {
  background: #0c131c;
  border-color: #0c131c;
  color: var(--wit);
}

/* --- Notices ---------------------------------------------------- */

.notice {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font-size: var(--fs-help);
  line-height: var(--lh-help);
}

.notice strong {
  color: inherit;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: 600;
}

.notice--success {
  color: var(--gelukt);
  background: var(--gelukt-vlak);
  border-color: #c5e4d4;
}

.notice--error {
  color: var(--fout);
  background: var(--fout-vlak);
  border-color: var(--fout);
}

/* --- Account picker --------------------------------------------- */

.account-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.account {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  color: var(--navy);
  background: var(--wit);
  border: var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  transition:
    border-color var(--duur) var(--curve),
    background var(--duur) var(--curve);
}

.account:hover {
  border-color: var(--blauw-diep);
  background: var(--tint);
}

.account:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.account strong {
  display: block;
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

.account span {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-help);
  line-height: var(--lh-help);
  color: var(--muted-donker);
}

/* --- Links / footer --------------------------------------------- */

.text-link {
  color: var(--blauw-diep);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  text-underline-offset: 0.18em;
}

.text-link:focus-visible,
.brand:focus-visible,
.legal a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-s);
}

.auth-footer-link {
  margin-top: var(--s-4);
}

.auth-foot {
  margin: var(--s-5) 0 0;
  color: var(--muted-donker);
  font-size: var(--fs-help);
  line-height: var(--lh-help);
}

.auth-foot a {
  color: var(--blauw-diep);
  text-underline-offset: 0.18em;
}

.legal {
  margin: var(--s-5) 0 0;
  color: var(--muted-donker);
  font-size: var(--fs-help);
  line-height: var(--lh-help);
}

.legal a {
  color: var(--blauw-diep);
  text-underline-offset: 0.18em;
}

.form-note {
  margin: 0;
  color: var(--muted-donker);
  font-size: var(--fs-help);
  line-height: var(--lh-help);
}

@media (max-width: 899px) {
  .auth-main-inner {
    padding: var(--s-6) var(--s-4) var(--s-5);
    justify-content: flex-start;
  }

  .brand {
    margin-bottom: var(--s-6);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
