/* Modern Design System for St. Patrick's Catholic Church */
/* Clean, contemporary aesthetic with accessibility in mind */

:root {
    /* Modern Color Palette - Sophisticated & Clean */
    --primary-blue: #1e3a8a;        /* Deep professional blue */
    --primary-light: #3b82f6;       /* Vibrant blue for accents */
    --secondary-green: #059669;     /* Fresh emerald green */
    --accent-gold: #f59e0b;         /* Warm amber/gold */
    --accent-purple: #7c3aed;       /* Modern purple for liturgical */
    --liturgical-purple: #7c3aed;   /* Purple for liturgical seasons */
    --crimson-red: #dc2626;         /* Rich crimson red */

    /* Neutral Colors - Modern grayscale */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    /* Semantic Colors */
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-muted: var(--neutral-500);
    --background: #ffffff;
    --background-alt: var(--neutral-50);
    --border: var(--neutral-200);

    /* Modern Typography - Better Fallbacks */
    --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Type Scale - Reduced for better deployment */
    --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.375rem;   /* 22px - reduced from 24px */
    --text-3xl: 1.625rem;   /* 26px - reduced from 30px */
    --text-4xl: 2rem;       /* 32px - reduced from 36px */
    --text-5xl: 2.5rem;     /* 40px - reduced from 48px */
    --text-6xl: 3rem;       /* 48px - reduced from 60px */

    /* Spacing Scale - Optimized */
    --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.25rem;    /* 36px - reduced from 40px */
    --space-12: 2.5rem;     /* 40px - reduced from 48px */
    --space-16: 3rem;       /* 48px - reduced from 64px */
    --space-20: 4rem;       /* 64px - reduced from 80px */
    --space-24: 5rem;       /* 80px - reduced from 96px */

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows - Modern, subtle depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --max-width-sm: 640px;
    --max-width-md: 768px;
    --max-width-lg: 1024px;
    --max-width-xl: 1280px;
    --max-width-2xl: 1536px;
    --container-padding: var(--space-4);

    /* Z-index Scale */
    --z-0: 0;
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
}

/* Modern Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    font-size: 16px; /* Lock base font size */
    -webkit-text-size-adjust: 100%; /* Prevent iOS text size adjustment */
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem; /* Use rem instead of variable */
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

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

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

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-blue);
}

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

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px; /* Fixed max-width instead of variable */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

.container-narrow {
    max-width: 1024px;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.section {
    padding: var(--space-12) 0;
}

.section-sm {
    padding: var(--space-8) 0;
}

.section-lg {
    padding: var(--space-16) 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    :root {
        --text-6xl: 2rem;     /* 32px on mobile */
        --text-5xl: 1.75rem;  /* 28px on mobile */
        --text-4xl: 1.5rem;   /* 24px on mobile */
        --text-3xl: 1.25rem;  /* 20px on mobile */
        --text-2xl: 1.125rem; /* 18px on mobile */
    }

    .section {
        padding: var(--space-8) 0;
    }

    .section-lg {
        padding: var(--space-12) 0;
    }

    .hero {
        min-height: 50vh;
        padding: var(--space-12) 0;
    }
}
