/* ===== CSS VARIABLES - LorePages Design System ===== */
/* Figma Design System tokens for LorePages.com */

:root {
    /* ===== COLOR PALETTE ===== */
    /* Primary Colors */
    --color-primary: #D4A24C;
    --color-primary-dark: #B8832F;
    --color-primary-light: #E8C880;

    /* Secondary Colors */
    --color-secondary: #0B1F3A;
    --color-secondary-dark: #071428;
    --color-secondary-light: #132F5B;

    /* Accent Colors */
    --color-accent: #4CA6A8;
    --color-accent-dark: #3A8486;
    --color-accent-purple: #7A5C9E;

    /* Neutral Colors */
    --color-text: #0B1F3A;
    --color-text-light: #132F5B;
    --color-text-muted: #5A6B7D;
    --color-bg: #F5F1E8;
    --color-bg-alt: #EDE8DC;
    --color-white: #FFFFFF;
    --color-gray: #F0EDE6;

    /* Semantic Colors */
    --color-error: #C0392B;
    --color-error-light: #FADBD8;
    --color-success: #27AE60;
    --color-success-light: #D5F5E3;
    --color-warning: #E67E22;
    --color-warning-light: #FCF3CF;
    --color-info: #2980B9;
    --color-info-light: #D6EAF8;

    /* ===== TYPOGRAPHY ===== */
    --font-heading: 'Cinzel', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-accent: 'Cormorant Garamond', 'Georgia', serif;

    /* Font Sizes (Fluid Typography) */
    --font-size-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 1.8vw, 1rem);
    --font-size-base: clamp(1rem, 2vw, 1.125rem);
    --font-size-md: clamp(1.125rem, 2.2vw, 1.25rem);
    --font-size-lg: clamp(1.25rem, 2.5vw, 1.75rem);
    --font-size-xl: clamp(1.5rem, 3vw, 2.5rem);
    --font-size-2xl: clamp(2rem, 4vw, 3rem);
    --font-size-3xl: clamp(2.5rem, 5vw, 3.5rem);
    --font-size-4xl: clamp(3rem, 6vw, 4rem);

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.8;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Letter Spacing */
    --letter-spacing-heading: 0.02em;
    --letter-spacing-button: 0.08em;

    /* ===== SPACING (8pt grid) ===== */
    --space-3xs: 0.25rem;   /* 4px */
    --space-2xs: 0.375rem;  /* 6px */
    --space-xs: 0.5rem;     /* 8px */
    --space-sm: 1rem;       /* 16px */
    --space-md: 1.5rem;     /* 24px */
    --space-lg: 2rem;       /* 32px */
    --space-xl: 3rem;       /* 48px */
    --space-2xl: 4rem;      /* 64px */
    --space-3xl: 6rem;      /* 96px */

    /* ===== BORDERS & RADIUS ===== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-2xl: 30px;
    --radius-full: 50px;
    --radius-circle: 50%;

    --border-width: 1px;
    --border-width-thick: 2px;
    --border-color: rgba(11, 31, 58, 0.1);

    /* ===== SHADOWS ===== */
    --shadow-xs: 0 1px 2px rgba(11, 31, 58, 0.05);
    --shadow-sm: 0 2px 4px rgba(11, 31, 58, 0.05);
    --shadow-md: 0 4px 12px rgba(11, 31, 58, 0.08);
    --shadow-lg: 0 10px 30px rgba(11, 31, 58, 0.1);
    --shadow-xl: 0 20px 40px rgba(11, 31, 58, 0.12);
    --shadow-2xl: 0 25px 50px rgba(11, 31, 58, 0.15);
    --shadow-primary: 0 4px 20px rgba(212, 162, 76, 0.3);
    --shadow-primary-lg: 0 8px 30px rgba(212, 162, 76, 0.4);

    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Animation durations (respects prefers-reduced-motion) */
    --animation-duration: 0.3s;
    --animation-duration-slow: 0.8s;

    /* ===== Z-INDEX SCALE ===== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 500;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-popover: 1100;
    --z-tooltip: 1200;

    /* ===== CONTAINER WIDTHS ===== */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1440px;

    /* ===== GRID ===== */
    --grid-columns-desktop: 12;
    --grid-margin-desktop: 80px;
    --grid-gutter-desktop: 24px;
    --grid-columns-mobile: 4;
    --grid-margin-mobile: 16px;

    /* ===== FOCUS STYLES ===== */
    --focus-ring-color: var(--color-primary);
    --focus-ring-width: 3px;
    --focus-ring-offset: 2px;
    --focus-ring: 0 0 0 var(--focus-ring-offset) var(--color-white),
                  0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);

    /* ===== TOUCH TARGETS ===== */
    --touch-target-min: 44px;
}


/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    :root {
        --animation-duration: 0.01ms;
        --animation-duration-slow: 0.01ms;
        --transition-fast: 0.01ms;
        --transition-base: 0.01ms;
        --transition-slow: 0.01ms;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --color-text: #000000;
        --color-bg: #ffffff;
        --border-color: #000000;
        --focus-ring-width: 4px;
    }
}
