/**
 * Ishaka Community Church Design Tokens
 * Strict 3-Color Premium Theme Palette
 */

:root {
    /* Pure 3-Color Palette */
    --color-primary: #1c3399;      /* Solid Blue */
    --color-secondary: #f1d255;    /* Warm Gold */
    --color-white: #FFFFFF;        /* Crisp White Backgrounds & Canvas */
    
    /* Text Readability Tones derived cleanly from Primary and White */
    --color-text-dark: #042027;    /* Using Primary Blue for high-end typographic legibility */
    --color-text-white: #FFFFFF;

    /* Typography */
    --font-headings: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, sans-serif;

    /* Font Sizes (Mobile-First Scalable Rem System) */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;

    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;

    /* Layout Parameters */
    --max-width-content: 1280px;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --border-radius-pill: 9999px;

    /* Shadows & Elevation (Softened Blue-Tinted Depth) */
    --shadow-sm: 0 2px 4px rgba(15, 76, 92, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 76, 92, 0.06);
    --shadow-lg: 0 12px 24px rgba(15, 76, 92, 0.12);

    /* Animation Transitions */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
}

/* Base resets & layout scaffolding */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--duration-fast) var(--transition-smooth);
}

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

button {
    font-family: var(--font-body);
    background: none;
    border: none;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ==========================================================================
   ISHAKA COMMUNITY CHURCH (ICC) - CORE DESIGN TOKENS
   File: assets/css/variables.css
   Description: Global CSS variables for branding, typography, and scales.
   ========================================================================== */

:root {
    /* --- Brand Color Palette --- */
    --color-primary: #0f3982;        /* Deep, authoritative solid blue */
    --color-primary-rgb: 15, 76, 92;  /* Used for custom RGBA opacity blending */
    --color-secondary: #e6bd06;      /* Warm Gold for accents and call-to-actions */
    --color-secondary-hover: #C59262;/* Darkened gold tone for rich interaction states */
    --color-background: #FFFFFF;     /* Pure canvas background */
    --color-accent: #F8F5F0;         /* Soft Cream/Beige for clean section nesting */
    --color-text-main: #2D2D2D;      /* Deep Slate/Dark Gray for high-contrast reading */
    --color-text-muted: #616161;     /* Subdued mid-gray for tertiary labels */
    --color-white: #FFFFFF;
    --color-success: #2E7D32;        /* Safe green for progress trackers and metrics */

    /* --- Strict Typography Scale (Min 15px Guardrail) --- */
    --font-family-heading: 'Lora', 'Georgia', serif;
    --font-family-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    
    --font-size-xs: 0.9375rem;       /* 15px - Hard Floor limit for micro-copy/badges */
    --font-size-sm: 1rem;            /* 16px - Base paragraph body text */
    --font-size-md: 1.125rem;        /* 18px - Subheadings / Card descriptions */
    --font-size-lg: 1.3125rem;       /* 21px - Core component titles */
    --font-size-xl: 1.75rem;         /* 28px - Section H3 Headlines */
    --font-size-2xl: 2.5rem;         /* 40px - Display H2 Main Headers */
    --font-size-hero: 3.5rem;        /* 56px - Mobile-optimized Hero Title */

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* --- Fluid Structural Spacing System --- */
    --spacing-xs: 0.5rem;            /* 8px */
    --spacing-sm: 1rem;              /* 16px */
    --spacing-md: 1.5rem;            /* 24px */
    --spacing-lg: 3rem;              /* 48px */
    --spacing-xl: 5rem;              /* 80px */
    --container-max-width: 1280px;

    /* --- Interface Layering & Smooth Motion --- */
    --radius-button: 50px;           /* Elegantly rounded pill configurations */
    --radius-card: 16px;             /* Modern soft edge card geometry */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 600ms;
}

/* Base Reset to Ensure Global Visual Harmony */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: rgb(14, 14, 167);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) var(--transition-smooth);
}

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



/* ==========================================================================
   PREMIUM LOADER: CROSS + LIGHT REVEAL ARCHITECTURE
   ========================================================================== */
:root {
    --loader-bg: #0B2545; /* Deep Sanctuary Blue */
    --loader-gold: #EEB902; /* Sacred Metallic Gold */
}

.sanctuary-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--loader-bg);
    z-index: 999999; /* Absolute topmost layer over navigation/footers */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Outward Glow Reveal Wipe Style on Termination */
.sanctuary-loader-overlay.dismissed-wipe {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05); /* Soft cinematic expansion away from viewport */
}

.loader-canvas-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    perspective: 1000px;
}

/* ==========================================
   ANIMATION PHASE 1: SACRED GEOMETRIC DRAWING
   ========================================== */
.sacred-cross-wrapper {
    position: relative;
    width: 80px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sacred-stroke-cross {
    width: 100%;
    height: 100%;
    display: block;
}

.sacred-stroke-cross path {
    /* Utilizing SVG path lengths to create simulated linear candle draw */
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawSacredCross 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawSacredCross {
    0% {
        stroke-dashoffset: 300;
        filter: drop-shadow(0 0 0px rgba(238, 185, 2, 0));
    }
    100% {
        stroke-dashoffset: 0;
        filter: drop-shadow(0 0 8px rgba(238, 185, 2, 0.6));
    }
}

/* Ambient Radiant Gold Pulse Aura */
.gold-pulse-aura {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(238, 185, 2, 0.4) 0%, rgba(11, 37, 69, 0) 70%);
    border-radius: 50%;
    top: 20px; /* Aligned exactly over cross intersection point */
    opacity: 0;
    transform: scale(0.5);
    /* Delayed execution: triggers right as the cross completes drawing */
    animation: goldAuraPulse 2s cubic-bezier(0.25, 1, 0.5, 1) 2s infinite;
    pointer-events: none;
}

@keyframes goldAuraPulse {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        filter: blur(4px);
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

/* ==========================================
   ANIMATION PHASE 2: TYPOGRAPHY ENGINE
   ========================================== */
.loader-text-engine {
    text-align: center;
    min-height: 40px; /* Anchors height to prevent layout shifts */
}

.loader-status-text {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    animation: fadeOutStatus 1.8s cubic-bezier(0.16, 1, 0.3, 1) 1.8s forwards;
}

@keyframes fadeOutStatus {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.loader-welcome-title {
    font-family: 'Playfair Display', 'Roboto', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: 1px;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    animation: revealWelcomeTitle 0.5s ease 2s forwards;
}

/* Global Golden Color Callout Class for Typist Component */
.loader-welcome-title .gold-accent {
    color: var(--loader-gold);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(238, 185, 2, 0.3);
}

@keyframes revealWelcomeTitle {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Interactive Cursor for Premium Typing Realism */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 18px;
    background-color: var(--loader-gold);
    margin-left: 3px;
    animation: blinkCursor 0.6s step-end infinite;
    vertical-align: middle;
}

@keyframes blinkCursor {
    from, to { background-color: transparent }
    50% { background-color: var(--loader-gold); }
}

/* Responsive Scaling Overrides */
@media (max-width: 576px) {
    .loader-welcome-title {
        font-size: 1.15rem;
        line-height: 1.5;
        padding: 0 1.5rem;
    }
    .sacred-cross-wrapper {
        width: 65px;
        height: 100px;
    }
}