/* =========================================================
   Webshopschool · Klantenhub
   Clean web-app hub — v1.1
========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Stapel";
  src: url("fonts/Stapel_Text-Regular-2.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Stapel";
  src: url("fonts/Stapel_Medium-1.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Stapel";
  src: url("fonts/Stapel_Extra-Bold-1.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink:        #0F1623;
  --ink-2:      #1B2536;
  --muted:      #6B7384;
  --muted-2:    #9AA2B1;

  --bg:         #F6F7F9;
  --surface:    #FFFFFF;
  --line:       #ECEEF2;
  --line-2:     #E2E6EC;

  --brand:      #E9752B;
  --brand-soft: #FCE7D4;

  --indigo:  #4F46E5; --indigo-soft:  #E8E7FB;
  --amber:   #D68A1F; --amber-soft:   #FBEFD6;
  --slate:   #475569; --slate-soft:   #E9ECF1;
  --green:   #10A37F; --green-soft:   #DCF3EC;
  --blue:    #2B6FD1; --blue-soft:    #DEE9FA;
  --rose:    #DB3E6F; --rose-soft:    #FBE0E8;
  --violet:  #7C3AED; --violet-soft:  #EDE4FB;
  --google:  #1A73E8; --google-soft:  #DEEAFB;
  --meta:    #1877F2; --meta-soft:    #DCE8FB;

  --radius:     14px;
  --radius-lg:  20px;

  --shadow-xs: 0 1px 2px rgba(15,22,35,.04);
  --shadow-sm: 0 1px 3px rgba(15,22,35,.06), 0 1px 2px rgba(15,22,35,.04);
  --shadow-md: 0 6px 20px -6px rgba(15,22,35,.10), 0 2px 6px rgba(15,22,35,.04);
  --shadow-lg: 0 24px 48px -16px rgba(15,22,35,.18);

  --ease:   cubic-bezier(.2,.7,.2,1);
  --fast:   160ms var(--ease);
  --med:    240ms var(--ease);

  --container: 1040px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Stapel", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
svg { width: 100%; height: 100%; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- App bar ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 32px);
  background: rgba(246,247,249,.8);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar__logo { height: 30px; width: auto; object-fit: contain; }
.appbar__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
.appbar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-2);
}
.appbar__status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16,163,127,.18);
}
.appbar__mail { color: var(--ink-2); font-weight: 500; }
.appbar__mail:hover { color: var(--brand); }

/* ---------- App container ---------- */
.app {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(18px, 4vw, 32px) 64px;
}

/* ---------- Welcome ---------- */
.welcome {
  margin-bottom: clamp(24px, 4vw, 36px);
}
.welcome__eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}
.welcome__title {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.025em;
}
.welcome__sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Hub grid ---------- */
.hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ---------- Tile ---------- */
.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  text-align: left;
  cursor: pointer;
  transition: transform var(--fast), box-shadow var(--med), border-color var(--fast);
  min-height: 88px;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.tile:active { transform: translateY(0); }

.tile__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 11px;
  display: grid;
  place-items: center;
}
.tile__icon svg { width: 100%; height: 100%; }

.tile__icon--indigo { background: var(--indigo-soft); color: var(--indigo); }
.tile__icon--amber  { background: var(--amber-soft);  color: var(--amber); }
.tile__icon--slate  { background: var(--slate-soft);  color: var(--slate); }
.tile__icon--green  { background: var(--green-soft);  color: var(--green); }
.tile__icon--blue   { background: var(--blue-soft);   color: var(--blue); }
.tile__icon--rose   { background: var(--rose-soft);   color: var(--rose); }
.tile__icon--violet { background: var(--violet-soft); color: var(--violet); }
.tile__icon--google { background: var(--google-soft); color: var(--google); }
.tile__icon--meta   { background: var(--meta-soft);   color: var(--meta); }

.tile__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tile__body h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tile__body p {
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile__arrow {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  transition: transform var(--fast), color var(--fast), background var(--fast);
}
.tile:hover .tile__arrow {
  color: var(--ink);
  background: var(--bg);
  transform: translateX(2px);
}
.tile--action:hover .tile__arrow {
  background: var(--brand);
  color: #fff;
  transform: scale(1.05);
}

/* Larger primary tiles */
.tile--lg {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 26px 24px;
  min-height: 180px;
}
.tile--lg .tile__icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: 14px;
}
.tile--lg .tile__body h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.tile--lg .tile__body p {
  font-size: 14px;
  white-space: normal;
}
.tile--lg .tile__arrow {
  position: absolute;
  top: 22px;
  right: 22px;
}

/* Service tiles with actions */
.tile--service {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  cursor: default;
}
.tile--service:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--line-2);
}
.tile--service .tile__body {
  flex: 0 0 auto;
}
.tile--service .tile__body h3 { font-size: 18px; }
.tile--service .tile__body p { white-space: normal; }
.tile__actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast);
}
.pill:hover {
  background: #fff;
  border-color: var(--slate);
  color: var(--ink);
}
.pill--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.pill--primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Info modal body */
.info-body {
  margin-bottom: 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-body ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}
.info-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Section ---------- */
.hub-section {
  margin-top: clamp(36px, 5vw, 56px);
}
.hub-section__head {
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.hub-section__head h2 {
  font-size: 18px;
  letter-spacing: -0.01em;
}
.hub-section__head p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.appfoot {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 32px) 32px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform var(--fast), background var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover {
  background: var(--brand);
  box-shadow: 0 10px 24px -10px rgba(233,117,43,.5);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  background: var(--bg);
  border-color: var(--slate);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.modal.is-open { display: block; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,22,35,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn var(--med) both;
}
.modal__panel {
  position: relative;
  max-width: 560px;
  margin: 6vh auto 4vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 3.5vw, 36px);
  animation: popIn var(--med) both;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn  { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background var(--fast), color var(--fast);
}
.modal__close svg { width: 18px; height: 18px; }
.modal__close:hover { background: var(--bg); color: var(--ink); }

.modal__head {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal__tag {
  align-self: flex-start;
  padding: 5px 11px;
  background: var(--brand-soft);
  color: #A04614;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}
.modal__head h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.modal__head p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Form ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.field .req { color: var(--brand); }
.field input,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  transition: border-color var(--fast), box-shadow var(--fast);
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:hover,
.field textarea:hover { border-color: #C9CED7; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(233,117,43,.12);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #D94141;
  box-shadow: 0 0 0 4px rgba(217,65,65,.10);
}

.form__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.form__status {
  font-size: 13.5px;
  min-height: 1em;
  text-align: right;
}
.form__status.is-success { color: #0E7C4A; }
.form__status.is-error   { color: #C42626; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hub { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hub { grid-template-columns: 1fr; }
  .appbar__mail { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .form__footer { flex-direction: column-reverse; }
  .form__footer .btn { width: 100%; }
  .modal__panel { margin: 4vh auto 2vh; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  transition: transform var(--fast), box-shadow var(--fast);
}
.wa-float svg {
  width: 30px;
  height: 30px;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37,211,102,.55);
}
.wa-float:active {
  transform: scale(0.97);
}
