/* Servicely.Exchange — shared tokens and primitives (landing + platform) */
:root {
  --ink: #14213d;
  --ink-2: #3c4a66;
  --ink-3: #6b7790;
  --paper: #f6f7f4;
  --surface: #ffffff;
  --rule: #d6dbe2;
  --rule-soft: #e7eaee;
  --brand: #14213d;
  --focus: #2a62a8;

  /* Denomination colours — each voucher size has its own note colour */
  --d10k: #5b3f8c;
  --d10k-tint: #efeaf7;
  --d5k: #1d6b47;
  --d5k-tint: #e5f2eb;
  --d1k: #2a62a8;
  --d1k-tint: #e6eef8;

  --ok: #1d6b47;
  --warn: #9a6a00;
  --warn-tint: #fbf3df;
  --bad: #a3322a;
  --bad-tint: #fbe9e7;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --font: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: 3.052rem;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "tnum" 1;
}

/* Arabic text always sets in Cairo, wherever it appears */
:root[lang="ar"] { --font: var(--font-ar); }
[lang="ar"] body { line-height: 1.75; }
:lang(ar) { font-family: var(--font-ar); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  font: inherit; font-weight: 500; font-size: var(--step-0);
  border-radius: var(--r-md); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #22325a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn-quiet:hover { color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #e4b9b4; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--step--1); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Language toggle */
.lang-toggle {
  font: inherit; font-size: var(--step--1); font-weight: 500;
  background: transparent; border: 1px solid var(--rule); border-radius: var(--r-md);
  color: var(--ink); min-height: 36px; padding: 0 12px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--ink-3); }

/* Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.125rem; }
.wordmark svg { width: 30px; height: 30px; flex: none; }
.wordmark .dot { color: var(--d10k); }

/* Denomination chips */
.denom { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--step--1); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.denom-10000 { background: var(--d10k-tint); color: var(--d10k); }
.denom-5000 { background: var(--d5k-tint); color: var(--d5k); }
.denom-1000 { background: var(--d1k-tint); color: var(--d1k); }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: var(--step--1); font-weight: 500; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 0.8125rem; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r-md);
  min-height: 44px; padding: 8px 12px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 40%, transparent); outline-offset: 0; border-color: var(--focus); }
.check { display: flex; gap: 10px; align-items: center; font-size: var(--step-0); }
.check input { width: 18px; height: 18px; }

@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; }
}

[hidden] { display: none !important; }
