/* ==========================================================================
   base.css – Designvariablen, Schrift, Reset, Grundelemente
   Digitale bAV-Verwaltung – VIAKP e.V.
   ========================================================================== */

/* Lokale Schrift (WOFF2). Dateien in /assets/fonts/ ablegen, siehe CLAUDE.md.
   Fehlen die Dateien, greift automatisch die Fallback-Schrift. */
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-brand: #359BFF;        /* VIAKP-Hauptblau (Logo, Flächen, Icons, Verläufe) */
  --color-primary: #1A73D1;      /* VIAKP-Blau, abgedunkelt für Buttons/Links (Kontrast 4,75:1 zu Weiß) */
  --color-primary-dark: #0B4F9C; /* Überschriften, Hover */
  --color-secondary: #8CC8FF;
  --color-background: #F5FAFF;
  --color-surface: #FFFFFF;
  --color-text: #1F2A37;
  --color-text-muted: #4B5563;
  --color-border: #D6E6F5;
  --color-border-strong: #8A9BAA; /* Feldrahmen: mind. 3:1 Kontrast zu Weiß */
  --color-success: #3BAE5A;
  --color-warning: #F5A623;
  --color-error: #B42318;

  --font-base: "Nunito Sans", Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 16px 40px rgba(11, 79, 156, 0.12);
  --shadow-soft: 0 8px 24px rgba(11, 79, 156, 0.08);

  --container-max: 1180px;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;

  /* Fokus: dunkler Ring + heller Halo, sichtbar auf hellem und farbigem Grund */
  --focus-ring: 0 0 0 3px var(--color-surface), 0 0 0 6px var(--color-primary-dark);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid transparent; /* bleibt im Windows-Kontrastmodus sichtbar */
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

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

[hidden] {
  display: none !important;
}
