/* SHIFA Design-System „Moon haze“ – Tokens, Schriften, Grundelemente */
@font-face { font-family: "Inter"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-var-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jbmono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("/fonts/amiri-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  /* Farbstufen der Vorlage (0 % → 100 %) */
  --haze-0: #3a404e;
  --haze-25: #a19d98;
  --haze-50: #e2d8c7;
  --haze-75: #747883;
  --haze-100: #232836;
  --gradient-moon-haze: linear-gradient(180deg, var(--haze-0) 0%, var(--haze-25) 25%, var(--haze-50) 50%, var(--haze-75) 75%, var(--haze-100) 100%);

  /* Semantik */
  --bg: #1b1f2a;
  --bg-raised: #232836;
  --surface: rgba(58, 64, 78, 0.55);
  --surface-strong: #2b303d;
  --line: rgba(226, 216, 199, 0.12);
  --line-strong: rgba(226, 216, 199, 0.24);
  --text: #ece4d6;
  --text-soft: #b9b3aa;
  --text-mute: #8a8c94;
  --accent: #e2d8c7;
  --accent-ink: #232836;
  --pearl: #f3ede2;
  --ok: #a9c4a0;
  --warn: #e3bf86;
  --alert: #e39a8c;
  --info: #9fb3cf;

  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-arabic: "Amiri", "Noto Naskh Arabic", serif;
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow: 0 24px 60px -28px rgba(10, 12, 18, 0.8);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text);
  background: rgba(35, 40, 54, 0.35);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
a.chip:hover, button.chip:hover { background: rgba(226, 216, 199, 0.14); border-color: var(--accent); }

/* Filmkorn: Kachel wird zur Laufzeit erzeugt (grain.js) und als CSS-Variable gesetzt */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 50;
  background-image: var(--grain-url, none);
  background-size: 180px 180px;
  opacity: 0.075;
  mix-blend-mode: overlay;
  animation: grain-shift 0.9s steps(6) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Formularfelder */
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.input, .field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: rgba(27, 31, 42, 0.6);
  color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--accent); background: rgba(27, 31, 42, 0.85);
  box-shadow: 0 0 0 4px rgba(226, 216, 199, 0.08);
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-soft); cursor: pointer;
  display: grid; place-items: center;
}
.pw-toggle:hover { color: var(--accent); background: rgba(226, 216, 199, 0.08); }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-closed { display: none; }
.pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.pw-toggle[aria-pressed="true"] .eye-closed { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(226, 216, 199, 0.55); background: var(--pearl); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: rgba(226, 216, 199, 0.08); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
