/**
 * BRAVA FRAMEWORK
 * Base styles, design tokens, layout utilities
 * 
 * @package BravaLongevity
 * @version 1.0.0
 * 
 * TABLE OF CONTENTS
 * =================
 * 1.  DESIGN TOKENS
 * 2.  BASE STYLES
 * 3.  COLOR UTILITIES
 * 4.  LAYOUT - Containers
 * 5.  LAYOUT - Sections
 * 6.  LAYOUT - Grid System
 * 7.  LAYOUT - Flexbox Helpers
 * 8.  UTILITIES - Spacing
 * 9.  UTILITIES - Text & Background
 * 10. RESPONSIVE - Tablet
 * 11. RESPONSIVE - Mobile
 */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
    /* ==========================================
       COLORS - System (Elementor Global)
       ========================================== */
    --color-primary:      #04B3E5;
    --color-secondary:    #005D8C;
    --color-text:         #1A2A35;
    --color-accent:       #04B3E5;

    /* Alias for backwards compatibility */
    --color-primary-dark: var(--color-secondary);

    /* ==========================================
       COLORS - Backgrounds
       ========================================== */
    --color-bg-dark:      #031E2E;
    --color-bg-dark-2:    #052638;
    --color-bg-light:     #F5F8FA;
    --color-bg-white:     #FFFFFF;

    /* ==========================================
       COLORS - Grays
       ========================================== */
    --color-gray-light:   #A1AAB1;
    --color-gray-dark:    #7C8790;
    --color-text-muted:   #4A5F6A;
    --color-text-light:   rgba(255, 255, 255, 0.7);

    /* ==========================================
       COLORS - Borders
       ========================================== */
    --color-border:       #DDEAF2;
    --color-border-light: #DDEAF2;
    --color-border-dark:  #e2e8f0;
    --color-border-input: #dfe5e8;

    /* Legacy aliases */
    --color-light-bg:     #f0f6fa;
    --color-light-border: #ddeaf2;

    /* ==========================================
       COLORS - Feedback
       ========================================== */
    --color-error:        #e53e3e;
    --color-success:      #38a169;
    --color-warning:      #dd6b20;

    /* ==========================================
       COLORS - Shadows (rgba values)
       ========================================== */
    --shadow-color-primary: rgba(4, 179, 229, 0.3);
    --shadow-color-dark:    rgba(0, 93, 140, 0.12);
    --shadow-color-light:   rgba(0, 0, 0, 0.08);

    /* ==========================================
       TYPOGRAPHY
       ========================================== */
    --font-heading: "Marcellus", serif;
    --font-body:    "IBM Plex Sans", sans-serif;
    --font-accent:  "Signika", sans-serif;

    /* ==========================================
       SPACING
       ========================================== */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 96px;

    /* ==========================================
       BORDER RADIUS
       ========================================== */
    --radius-xs:   5px;
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   12px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* ==========================================
       SHADOWS
       ========================================== */
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:    0 2px 12px rgba(0, 93, 140, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg:    0 8px 28px rgba(4, 179, 229, 0.1);
    --shadow-xl:    0 12px 40px rgba(0, 93, 140, 0.12);
    --shadow-hover: 0 8px 28px var(--shadow-color-primary);

    /* ==========================================
       TRANSITIONS
       ========================================== */
    --transition-fast:   0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow:   0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* ==========================================
       Z-INDEX
       ========================================== */
    --z-dropdown:  100;
    --z-sticky:    200;
    --z-modal:     300;
    --z-header:    999;
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */

body {
    font-family: var(--font-body);
    color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
}

p {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* ==========================================================================
   3. COLOR UTILITIES
   ========================================================================== */

.primary-blue {
    color: var(--color-primary);
}

.secondary-blue {
    color: var(--color-secondary);
}

/* ==========================================================================
   4. LAYOUT - Containers
   ========================================================================== */

.br-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.br-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ==========================================================================
   5. LAYOUT - Sections
   ========================================================================== */

.br-section {
    padding: var(--space-xl) 0;
}

.br-section-sm {
    padding: var(--space-lg) 0;
}

.br-section-dark {
    background: var(--color-bg-dark);
    color: white;
    padding: var(--space-xl) 0;
}

.br-section-dark-2 {
    background: var(--color-bg-dark-2);
    color: white;
    padding: var(--space-xl) 0;
}

.br-section-light {
    background: var(--color-bg-light);
    padding: var(--space-xl) 0;
}

/* ==========================================================================
   6. LAYOUT - Grid System
   ========================================================================== */

.br-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.br-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.br-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ==========================================================================
   7. LAYOUT - Flexbox Helpers
   ========================================================================== */

.br-flex {
    display: flex;
    align-items: center;
}

.br-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   8. UTILITIES - Spacing
   ========================================================================== */

.br-mt-md {
    margin-top: var(--space-md);
}

.br-mt-lg {
    margin-top: var(--space-lg);
}

.br-mb-md {
    margin-bottom: var(--space-md);
}

.br-mb-lg {
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   9. UTILITIES - Text & Background
   ========================================================================== */

.br-text-center {
    text-align: center;
}

.br-bg-dark {
    background: var(--color-bg-dark);
    color: white;
}

.br-bg-light {
    background: var(--color-bg-light);
}

.br-rounded {
    border-radius: var(--radius-md);
}

.br-rounded-lg {
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   10. RESPONSIVE - Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .br-container {
        padding: 0 28px;
    }

    .br-grid-2 {
        grid-template-columns: 1fr;
    }

    .br-grid-3,
    .br-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   11. RESPONSIVE - Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .br-container {
        padding: 0 20px;
    }

    .br-container-narrow {
        padding: 0 20px;
    }

    .br-grid-3,
    .br-grid-4 {
        grid-template-columns: 1fr;
    }

    .br-section {
        padding: var(--space-lg) 0;
    }
}
