/* ============================================
   ATCHISON AREA CHAMBER OF COMMERCE
   CSS Variables & Design System
   ============================================ */

:root {
    /* ==========================================
       PRIMARY BRAND COLORS (from Brand Guide)
       ========================================== */
    --chamber-red: #c41d15;
    --chamber-red-dark: #9a1710;
    --chamber-red-light: #c2514b;
    
    --chamber-slate: #334f5d;
    --chamber-slate-dark: #243a45;
    --chamber-slate-light: #4a6b7d;
    
    --chamber-teal: #1e8a82;        /* darkened from #27afa5 so teal text/links pass WCAG AA on white */
    --chamber-teal-bright: #27afa5; /* original bright teal — available for large fills/accents if wanted */
    --chamber-teal-dark: #1e8a82;
    --chamber-teal-light: #2aebce;
    
    /* Secondary Brand Colors */
    --chamber-gold: #d1aa66;
    --chamber-yellow: #e9ca5e;
    --chamber-muted-red: #c2514b;
    --chamber-bright-cyan: #2aebce;
    
    /* ==========================================
       MEMBERSHIP TIER COLORS
       ========================================== */
    --tier-bronze: #b08d57;
    --tier-bronze-bg: rgba(176, 141, 87, 0.1);
    
    --tier-silver: #808080;
    --tier-silver-bg: rgba(128, 128, 128, 0.1);
    
    --tier-gold: #d4af37;
    --tier-gold-bg: rgba(212, 175, 55, 0.1);
    
    --tier-platinum: #333333;
    --tier-platinum-bg: rgba(51, 51, 51, 0.1);
    
    --tier-diamond: #40E0D0;
    --tier-diamond-bg: rgba(64, 224, 208, 0.1);
    
    /* ==========================================
       NEUTRAL COLORS
       ========================================== */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --black: #1a1a1a;
    
    /* ==========================================
       SEMANTIC COLORS
       ========================================== */
    --success: #28a745;
    --success-light: #d4edda;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --error: #dc3545;
    --error-light: #f8d7da;
    --info: #17a2b8;
    --info-light: #d1ecf1;
    
    /* ==========================================
       TYPOGRAPHY (from Brand Guide)
       Fonts: Norwester, Cardo, The Something Script
       ========================================== */
    --font-primary: 'Cardo', Georgia, serif;
    --font-display: 'Norwester', 'Poppins', sans-serif;
    --font-accent: 'The Something Script', cursive;
    --font-body: 'Cardo', Georgia, serif;
    
    /* Font Sizes - Desktop */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* ==========================================
       SPACING
       ========================================== */
    --space-0: 0;
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
    --space-24: 6rem;       /* 96px */
    
    /* ==========================================
       LAYOUT
       ========================================== */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
    
    --nav-height: 80px;
    --nav-height-scrolled: 64px;

    /**
     * Pixels from the viewport top where sticky SUB-nav rows (filters, jobs bar)
     * should dock — must track masthead INNER height BEFORE and AFTER shrink.
     * Body toggles via :has(...) when `#siteHeader` gains `.site-header--scrolled`.
     */
    --sticky-header-offset: var(--nav-height);

    /* ==========================================
       BORDERS & RADIUS
       ========================================== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    --border-width: 1px;
    --border-color: rgba(0, 0, 0, 0.1);
    
    /* ==========================================
       SHADOWS
       ========================================== */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    /* Card shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    
    /* ==========================================
       TRANSITIONS
       ========================================== */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;
    
    /* ==========================================
       Z-INDEX LAYERS
       ========================================== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
}

/* Shrunk masthead: keep sticky offsets in sync — otherwise first scroll “jumps”.
   Depends on `#siteHeader` id from partials/header.html + main.js shrink class. */
body:has(#siteHeader.site-header--scrolled) {
    --sticky-header-offset: var(--nav-height-scrolled);
}

/* ==========================================
   DARK MODE SUPPORT (optional)
   ========================================== */
@media (prefers-color-scheme: dark) {
    :root.auto-dark {
        --white: #1a1a1a;
        --off-white: #242424;
        --light-gray: #333333;
        --medium-gray: #888888;
        --dark-gray: #cccccc;
        --black: #ffffff;
    }
}
