/* ========================================
   GLOBAL SYSTEM & TOKENS
   ======================================== */
:root {
    /* Colors from Spec */
    --primary-color: #4C3696;
    --secondary-color: #502BCB;
    --accent-color: #EAE8F2;
    --bg-white: #FFFFFF;
    --text-black: #000000;
    --text-dark: #1D1D1D;
    --complementary-1: #149e00;
    --complementary-2: #7fc453;

    /* Typography from Spec */
    --header-font: 'Josefin Sans', sans-serif;
    --nav-font: 'Sofia Pro', 'Josefin Sans', 'BBH Sans Bogle', sans-serif;
    --button-font: 'Sofia Pro', sans-serif;
    --body-font: 'Jost', sans-serif;

    /* Aliases */
    --font-headings: var(--header-font);
    --font-buttons: var(--button-font);
    --font-body: var(--body-font);

    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.60;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--header-font);
    color: var(--text-black);
    margin: 0 0 var(--space-md);
}

h1 {
    font-size: 48px;
    line-height: 1.05;
    font-weight: 900;
}

h2 {
    font-size: 36px;
    line-height: 1.10;
    font-weight: 900;
}

h3 {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
}

h4 {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}

h5 {
    font-size: 18px;
    font-weight: 700;
}

h6 {
    font-size: 16px;
    font-weight: 700;
}

@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 18px;
    }

    h5 {
        font-size: 16px;
    }

    h6 {
        font-size: 14px;
    }

    body {
        font-size: 14px;
    }
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Layout Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-5 {
        grid-template-columns: 1fr;
    }

    .flex-between.mobile-stack {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Site Utilities */
#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#site-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--accent-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--text-dark);
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 0px 4px rgba(76, 54, 150, 0.25);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    width: 140px;
    border-radius: 50px;
    background-color: var(--primary-color);
}

.back-to-top-btn::before {
    position: absolute;
    bottom: -20px;
    content: "Back to Top";
    color: white;
    font-size: 0px;
    font-family: var(--button-font);
}

.back-to-top-btn:hover::before {
    font-size: 13px;
    opacity: 1;
    bottom: unset;
}

/* Skeleton Loading */
.kaladastak-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    color: transparent;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}