/* Designsystem frank-müller.net – Tokens (Entwurf v0.1)
   Alle Farbpaare sind auf WCAG 2.2 AA (Text >= 4.5:1) geprüft, die meisten erreichen AAA. */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Farben hell */
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --surface: #ffffff;
  --border: #d5dde6;
  --text: #14202b;          /* 16,5:1 auf bg */
  --text-muted: #4a5a6a;    /*  7,1:1 */
  --primary: #003180;       /* 12,0:1, Marineblau (wie All Means All) */
  --primary-tint: #e6eef9;
  --on-primary: #ffffff;
  --accent: #006879;        /*  6,5:1, Petrol */
  --focus: #b45309;         /* Fokusring, kräftig und nicht blau */

  /* Typografie */
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);   /* Fließtext */
  --fs-1: clamp(1.15rem, 1.1rem + 0.3vw, 1.3rem);
  --fs-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --fs-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.5rem);
  --fs-4: clamp(2.3rem, 1.8rem + 2.4vw, 3.5rem);   /* Name auf der Startseite */
  --lh-body: 1.6;
  --measure: 68ch;

  /* Raum, Form */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4.5rem;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 14px rgb(0 0 0 / 0.06);
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --bg-soft: #16222f;
    --surface: #16222f;
    --border: #2a3a4d;
    --text: #e8eef4;        /* 15,7:1 */
    --text-muted: #a9b7c6;  /*  9,0:1 */
    --primary: #8fb6ff;     /*  9,0:1 auf bg */
    --primary-tint: #1c2b42;
    --on-primary: #0d1520;
    --accent: #4fc3d4;      /*  8,8:1 */
    --focus: #ffb454;
    --shadow: none;
  }
}

/* Bewegung nur auf Wunsch der Nutzenden */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Basis */
html { font-family: var(--font-body); font-size: 100%; }
body { background: var(--bg); color: var(--text); font-size: var(--fs-0); line-height: var(--lh-body); margin: 0; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--text); }
a { color: var(--primary); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip-link:not(:focus) { position: absolute; left: -999px; }

/* Projektkarte (Hauptelement der Startseite) */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--s-5);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card .meta { color: var(--text-muted); font-size: 0.9rem; }
.card .badge { background: var(--primary-tint); color: var(--primary); border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.85rem; }
.grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
