/**
 * Mijn Bijbel - Base Styles
 * CSS Variables, Reset, Typography
 * Version: 2.0.0
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Grenze:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   CSS Custom Properties - Light Theme (Default)
   ========================================================================== */

:root {
    /* Brand Colors */
    --brand-color: #386c9e;
    --brand-hover: #2d5a87;
    --brand-light: rgba(56, 108, 158, 0.1);
    
    /* Background Colors */
    --bg-primary: #E8E8E8;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F5F5F5;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    
    /* Border & Dividers */
    --border-color: #E0E0E0;
    --divider-color: #EEEEEE;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    
    /* Highlights */
    --highlight-green: rgba(56, 108, 158, 0.25);
    --highlight-gold: rgba(218, 165, 32, 0.25);
    
    /* Typography */
    --font-body: 'Crimson Text', Georgia, serif;
    --font-display: 'Grenze', Georgia, serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Spacing */
    --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;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 60px;
    --header-height: 60px;
    --bottom-nav-height: 60px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   CSS Reset
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Remove default list styles */
ul, ol {
    list-style: none;
}

/* Remove default link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Remove default button styles */
button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

/* Remove default input styles */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Remove default image styles */
img, svg {
    display: block;
    max-width: 100%;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

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

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Text utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-color); }

/* Background utilities */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-brand { background-color: var(--brand-color); }

/* Display utilities */
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox utilities */
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Spacing utilities */
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.m-2 { margin: var(--space-2); }
.m-4 { margin: var(--space-4); }

/* ==========================================================================
   Material Icons
   ========================================================================== */

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: 300;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Icon sizes */
.icon-sm { font-size: 18px; }
.icon-md { font-size: 24px; }
.icon-lg { font-size: 32px; }
.icon-xl { font-size: 48px; }

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* ==========================================================================
   Focus States
   ========================================================================== */

:focus {
    outline: none;
}

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

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
    background-color: var(--brand-light);
    color: var(--text-primary);
}

/* ==========================================================================
   Preload State (prevents transitions on page load)
   ========================================================================== */

.preload * {
    transition: none !important;
}

/* ==========================================================================
   Font Size Variants
   ========================================================================== */

.font-size-1 {
    font-size: 16px;
    line-height: 1.6;
}

.font-size-2 {
    font-size: 18px;
    line-height: 1.7;
}

.font-size-3 {
    font-size: 20px;
    line-height: 1.75;
}

.font-size-4 {
    font-size: 24px;
    line-height: 1.8;
}

