/**
 * Base CSS - Grundlegende Styles und CSS Custom Properties
 *
 * Dieses File definiert:
 * - CSS Reset & Normalisierung
 * - Custom Properties (CSS Variablen) basierend auf theme.json
 * - Typografie Grundlagen
 * - Globale Element-Styles
 */

/* ============================================
   CSS RESET & BOX-SIZING
   ============================================ */

/**
 * Modernes CSS Reset
 * Setzt konsistente Browser-Defaults
 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

/**
 * Hauptdefinition der Design-Tokens
 * Diese Werte stammen aus theme.json und werden als CSS-Variablen verf�gbar gemacht
 * WordPress generiert automatisch --wp--preset--* Variablen aus theme.json
 */
:root {
  /* Farben - Prim�r */
  --slv-primary-blue: #5CB8E9;
  --slv-primary-yellow: #FCBC5B;

  /* Farben - Dunkel */
  --slv-blue-dark: #1177A0;
  --slv-yellow-dark: #D99A44;

  /* Farben - Hintergrund */
  --slv-bg-light: #F9FAFB;
  --slv-bg-white: #FFFFFF;

  /* Farben - Text */
  --slv-text-dark: #1A1A1A;
  --slv-text-muted: #6B6B6B;

  /* Farben - Borders */
  --slv-border-light: #E5E7EB;

  /* Spacing System (Mobile-First) */
  --slv-space-xs: 0.5rem;   /* 8px */
  --slv-space-s: 1rem;      /* 16px */
  --slv-space-m: 2rem;      /* 32px */
  --slv-space-l: 3rem;      /* 48px */
  --slv-space-xl: 5rem;     /* 80px */

  /* Typografie - Font Families */
  --slv-font-heading: "Montserrat", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --slv-font-body: "Inter", "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Typografie - Font Sizes (Mobile-First) */
  --slv-font-xs: 0.75rem;   /* 12px */
  --slv-font-s: 0.875rem;   /* 14px */
  --slv-font-m: 1rem;       /* 16px - Base */
  --slv-font-l: 1.25rem;    /* 20px */
  --slv-font-xl: 1.5rem;    /* 24px */
  --slv-font-xxl: 2.25rem;  /* 36px */
  --slv-font-hero: 3.25rem; /* 52px */

  /* Line Heights */
  --slv-line-height: 1.6;
  --slv-line-height-tight: 1.2;
  --slv-line-height-loose: 1.8;

  /* Layout - Container Widths */
  --slv-content-width: 1140px;
  --slv-wide-width: 1320px;

  /* Transitions */
  --slv-transition-fast: 150ms ease-in-out;
  --slv-transition-base: 250ms ease-in-out;
  --slv-transition-slow: 400ms ease-in-out;

  /* Border Radius */
  --slv-radius-s: 0.25rem;  /* 4px */
  --slv-radius-m: 0.5rem;   /* 8px */
  --slv-radius-l: 1rem;     /* 16px */
  --slv-radius-full: 999px; /* Pill-Form */

  /* Shadows */
  --slv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --slv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --slv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --slv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   RESPONSIVE FONT SIZES (Tablet & Desktop)
   ============================================ */

/**
 * Vergr��ert Font-Sizes auf gr��eren Bildschirmen
 * Mobile-First Ansatz: Basis-Werte sind mobil, hier werden sie f�r Tablet+ angepasst
 */
@media (min-width: 768px) {
  :root {
    --slv-font-xxl: 2.5rem;   /* 40px auf Tablet */
    --slv-font-hero: 3.75rem; /* 60px auf Tablet */
  }
}

@media (min-width: 1024px) {
  :root {
    --slv-font-xxl: 3rem;     /* 48px auf Desktop */
    --slv-font-hero: 4.5rem;  /* 72px auf Desktop */
  }
}

/* ============================================
   HTML & BODY GRUNDLAGEN
   ============================================ */

/**
 * Root Element - Basis f�r rem-Berechnungen
 * 1rem = 16px bei Standard-Browser-Settings
 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * Body - Basis-Typografie und Farben
 * Hintergrund: WEIß für sauberen Look
 */
body {
  font-family: var(--slv-font-body);
  font-size: var(--slv-font-m);
  line-height: var(--slv-line-height);
  color: var(--slv-text-dark);
  background-color: #FFFFFF;
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAFIE - �BERSCHRIFTEN
   ============================================ */

/**
 * �berschriften-Hierarchie
 * Nutzt Heading-Font und konsistente Abst�nde
 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--slv-font-heading);
  font-weight: 700;
  line-height: var(--slv-line-height-tight);
  color: var(--slv-text-dark);
  margin-bottom: var(--slv-space-s);
}

h1 {
  font-size: var(--slv-font-hero);
}

h2 {
  font-size: var(--slv-font-xxl);
}

h3 {
  font-size: var(--slv-font-xl);
}

h4 {
  font-size: var(--slv-font-l);
}

h5, h6 {
  font-size: var(--slv-font-m);
}

/* ============================================
   TYPOGRAFIE - TEXT-ELEMENTE
   ============================================ */

/**
 * Abs�tze mit optimiertem Abstand
 */
p {
  margin-bottom: var(--slv-space-s);
  color: var(--slv-text-muted);
}

/**
 * Links - SLV Branding-Farbe mit Hover-Effekt
 */
a {
  color: var(--slv-primary-blue);
  text-decoration: none;
  transition: color var(--slv-transition-fast);
}

a:hover,
a:focus {
  color: var(--slv-blue-dark);
  text-decoration: underline;
}

/**
 * Listen mit konsistentem Spacing
 */
ul, ol {
  margin-bottom: var(--slv-space-s);
  padding-left: var(--slv-space-m);
}

li {
  margin-bottom: var(--slv-space-xs);
}

/**
 * Text-Hervorhebungen
 */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

/* ============================================
   MEDIEN-ELEMENTE
   ============================================ */

/**
 * Responsive Bilder
 * Verhindert �berlauf und erh�lt Seitenverh�ltnis
 */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/**
 * Bild-Figure mit Caption
 */
figure {
  margin: var(--slv-space-m) 0;
}

figcaption {
  font-size: var(--slv-font-s);
  color: var(--slv-text-muted);
  margin-top: var(--slv-space-xs);
  font-style: italic;
}

/* ============================================
   FORMULARE - GRUNDLAGEN
   ============================================ */

/**
 * Input-Felder mit einheitlichem Styling
 */
input,
textarea,
select {
  font-family: var(--slv-font-body);
  font-size: var(--slv-font-m);
  padding: var(--slv-space-xs) var(--slv-space-s);
  border: 1px solid var(--slv-border-light);
  border-radius: var(--slv-radius-s);
  transition: border-color var(--slv-transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--slv-primary-blue);
}

/**
 * Buttons - Grundstil
 * Spezifische Varianten in components.css
 */
button,
.button,
.btn {
  font-family: var(--slv-font-body);
  font-size: var(--slv-font-m);
  font-weight: 600;
  padding: var(--slv-space-xs) var(--slv-space-m);
  border: none;
  border-radius: var(--slv-radius-full);
  cursor: pointer;
  transition: all var(--slv-transition-base);
  display: inline-block;
  text-align: center;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/**
 * Screen Reader Only - Accessibility
 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/**
 * Skip Link - Accessibility
 */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--slv-primary-blue);
  color: var(--slv-bg-white);
  padding: var(--slv-space-xs) var(--slv-space-s);
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/**
 * Clearfix f�r Floats (falls ben�tigt)
 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
