/**
 * fonts.css - Zentrale Schriftarten-Definitionen und grundlegende Element-Styles
 * Alle Schriftarten sind als CSS Custom Properties definiert
 * System-Font-Stack für optimale Performance
 * 
 * WICHTIG: Diese Datei ist die EINZIGE erlaubte Datei für allgemeine Element-Selektoren
 * (gemäß Regel 032 in ui-css.mdc)
 */

:root {
  /* Schriftfamilien */
  --font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Schriftgrößen Desktop (gemäß design.md) */
  --font-size-h1: 40px; /* 2.5rem gemäß design.md Regel 004.002 */
  --font-size-h2: 32px; /* 2rem gemäß design.md Regel 004.002 */
  --font-size-h3: 24px; /* 1.5rem gemäß design.md Regel 004.002 */
  --font-size-h4: 20px; /* 1.25rem gemäß design.md Regel 004.002 */
  --font-size-body: 16px; /* 1rem gemäß design.md Regel 004.002 */
  --font-size-small: 14px; /* 0.875rem gemäß design.md Regel 004.002 */
  --font-size-tiny: 12px;
  
  /* Schriftgewichte */
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Zeilenabstände */
  --line-height-body: 1.6;
  --line-height-heading: 1.3;
  --line-height-tight: 1.2;
  
  /* Monospace-Schriftart für Code-Darstellungen */
  --font-family-monospace: 'Courier New', monospace;
}

/* ============================================================
   GRUNDLEGENDE ELEMENT-RESETS (aus base.css verschoben)
   Diese Definitionen sind hier, da fonts.css die einzige Datei
   ist, die allgemeine Element-Selektoren verwenden darf
   ============================================================ */

/* Reset für alle Elemente */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* HTML-Element */
html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Basis-Schriftart für alle Elemente */
body, div, a, p, span, h1, h2, h3, h4, h5, h6, ul, li, button, input, textarea {
  font-family: var(--font-family-primary);
}

/* Text-Wrapping für lange Wörter (wichtig für Mobile) */
h1, h2, h3, h4, h5, h6, p, span, div, li {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Bilder */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Listen */
ul {
  list-style: none;
}

/* Fokus-States für Accessibility */
*:focus {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* Reduced Motion für Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Schriftgrößen und grundlegende Styles für Standard-Elemente */
body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-normal);
  overflow-x: hidden;
  max-width: 100vw;
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-semibold);
}

p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.3s ease;
  font-family: var(--font-family-primary);
}

a:hover {
  color: var(--color-link-hover);
}

/* Mobile Anpassungen */
@media (max-width: 576px) {
  :root {
    --font-size-h1: 32px; /* Leicht reduziert für mobile Geräte */
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-h4: 18px;
    --font-size-body: 16px;
  }
}
