/* ============================================
   KI ACADEMY - MAIN STYLESHEET
   Design System & Base Styles
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
    /* Primary Colors - Sun & Warmth */
    --color-sun: #F5D547;
    --color-apricot: #F4A261;
    --color-terracotta: #E76F51;
    
    /* Secondary Colors - Nature & Calm */
    --color-sage: #90A955;
    --color-mint: #B7CECE;
    --color-cream: #FDFCF7;
    
    /* Neutral Colors */
    --color-anthracite: #2A363B;
    --color-gray-dark: #6B7280;
    --color-gray-medium: #9CA3AF;
    --color-gray-light: #E5E7EB;
    --color-white: #FFFFFF;
    
    /* Semantic Colors */
    --color-info: #A8DADC;
    --color-warning: #E9C46A;
    --color-error: #D62828;
    --color-success: var(--color-sage);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-apricot) 0%, var(--color-sun) 100%);
    --gradient-calm: linear-gradient(180deg, var(--color-cream) 0%, var(--color-mint) 100%);
    --gradient-success: linear-gradient(90deg, var(--color-sage) 0%, var(--color-mint) 100%);
    --gradient-hero: linear-gradient(135deg, var(--color-apricot) 0%, var(--color-sun) 50%, var(--color-sage) 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Manrope', var(--font-primary);
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;
    --font-size-5xl: 4rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    --line-height-loose: 1.8;
    
    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows - Premium Warm Tones */
    --shadow-sm: 0 1px 3px rgba(244, 162, 97, 0.08), 0 1px 2px rgba(42, 54, 59, 0.04);
    --shadow-md: 0 4px 12px rgba(244, 162, 97, 0.1), 0 2px 4px rgba(42, 54, 59, 0.04);
    --shadow-lg: 0 10px 25px rgba(244, 162, 97, 0.12), 0 4px 6px rgba(42, 54, 59, 0.05);
    --shadow-xl: 0 20px 40px rgba(244, 162, 97, 0.15), 0 8px 12px rgba(42, 54, 59, 0.06);
    --shadow-card: 0 4px 24px rgba(244, 162, 97, 0.1), 0 1px 3px rgba(42, 54, 59, 0.04);
    --shadow-hover: 0 12px 40px rgba(244, 162, 97, 0.2), 0 4px 8px rgba(42, 54, 59, 0.08);
    --shadow-glow: 0 0 40px rgba(245, 213, 71, 0.3);
    --shadow-apricot: 0 8px 32px rgba(244, 162, 97, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Layout */
    --container-max: 1200px;
    --container-narrow: 720px;
    
    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-nav: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}



/* DARK MODE VARIABLES */
[data-theme="dark"] {
    --color-cream: #0F1419;
    --color-anthracite: #F0F4F8;
    --color-gray-dark: #CBD5E0;
    --color-gray-medium: #A0AEC0;
    --color-gray-light: #2D3748;
    --color-white: #1A202C;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* DARK MODE - Ensure High Contrast Text */
[data-theme="dark"] body {
    color: #F0F4F8;
}

[data-theme="dark"] .card,
[data-theme="dark"] .interactive-card,
[data-theme="dark"] .concept-box,
[data-theme="dark"] .info-box,
[data-theme="dark"] .checkpoint-box {
    color: #F0F4F8;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span:not(.module-number):not(.progress-value) {
    color: #CBD5E0;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #F7FAFC;
}

[data-theme="dark"] .lead,
[data-theme="dark"] .text-large {
    color: #E2E8F0;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--color-anthracite);
    background-color: var(--color-cream);
    min-height: 100vh;
}
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography Reset */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-anthracite);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

a:focus-visible {
    outline: 2px solid var(--color-apricot);
    outline-offset: 2px;
}

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

ul, ol {
    list-style: none;
}

/* ============================================
   UNIFIED HEADER - ROBUSTE ZENTRALE DEFINITION
   ============================================ */

/* Header Container - EINHEITLICH für alle Seiten */
.nav-container,
.main-nav .nav-container,
.module-nav .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px !important;
    width: 100%;
    margin: 0 auto !important;
    padding: 0 16px !important;
    position: relative;
    box-sizing: border-box;
}

/* Container - EINHEITLICH */
.container,
.module-layout {
    width: 100%;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
}

/* Tablet */
@media (min-width: 640px) {
    .nav-container,
    .main-nav .nav-container,
    .module-nav .nav-container,
    .container,
    .module-layout {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .nav-container,
    .main-nav .nav-container,
    .module-nav .nav-container,
    .container,
    .module-layout {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-anthracite);
    color: var(--color-white);
    border-radius: var(--radius-md);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Selection */
::selection {
    background-color: var(--color-apricot);
    color: var(--color-white);
}

/* Focus Visible Polyfill Support */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
