/* ==========================================================================
   FOUNDATION STYLES
   Base reset, custom properties, and typography system
   ========================================================================== */

/* Custom Properties - Color System (slightly adjusted from original ~5%) */
:root {
    /* Primary palette */
    --clr-primary-500: #352f8e;
    --clr-primary-600: #231c73;
    --clr-primary-700: #191451;
    
    /* Neutral palette */
    --clr-neutral-50: #f7f7f7;
    --clr-neutral-100: #ededed;
    --clr-neutral-200: #e0e0e0;
    --clr-neutral-400: #a0a0a0;
    --clr-neutral-500: #535353;
    --clr-neutral-900: #0a0a0a;
    --clr-white: #ffffff;
    --clr-black: #000000;
    
    /* Semantic colors */
    --clr-success: #1f8a61;
    --clr-warning: #ce7132;
    --clr-danger: #ce3632;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 0.5rem 1.25rem -0.5rem rgba(0, 0, 0, 0.15);
    --shadow-card: 0 0.5rem 0.9rem -0.5rem var(--clr-neutral-400);
    --shadow-inset: inset 0 0.1875rem 0.3125rem -0.125rem var(--clr-neutral-400);
    
    /* Typography scale */
    --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.25rem;
    --fs-4xl: 3.5rem;
    --fs-5xl: 6.25rem;
    
    /* Font family */
    --ff-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Font weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-bold: 700;
    
    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.625rem;
    --radius-lg: 1.25rem;
    --radius-xl: 3.75rem;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-base: 0.3s ease-in-out;
    --transition-slow: 0.45s ease;
    
    /* Container */
    --container-max: 94rem;
    --container-padding: 1rem;
    
    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 900;
    --z-modal: 1000;
    --z-overlay: 1100;
}

/* Box-sizing reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin/padding */
* {
    margin: 0;
    padding: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Body defaults */
body {
    font-family: var(--ff-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: 1.5;
    color: var(--clr-neutral-900);
    background-color: var(--clr-neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: 1.1;
}

h1 {
    font-size: var(--fs-5xl);
}

h2 {
    font-size: var(--fs-4xl);
}

h3 {
    font-size: var(--fs-3xl);
}

h4 {
    font-size: var(--fs-lg);
}

/* Responsive typography */
@media screen and (max-width: 61.9375rem) {
    h1 {
        font-size: clamp(2.5rem, 8vw, 4.5rem);
    }
    
    h2 {
        font-size: clamp(1.75rem, 5vw, 3rem);
    }
}

@media screen and (max-width: 47.9375rem) {
    h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
    }
}

/* Links */
a {
    color: var(--clr-primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--clr-primary-700);
}

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

/* Lists */
ul, ol, menu {
    list-style: none;
}

/* Buttons reset */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
}

/* Focus styles */
:focus-visible {
    outline: 0.125rem solid var(--clr-danger);
    outline-offset: 0.125rem;
}

/* Selection */
::selection {
    background-color: var(--clr-primary-500);
    color: var(--clr-white);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

