/* Base styles and variables */
:root {
    /* Colors */
    --primary-color: #030369;
    --primary-dark: #02024d;
    --primary-light: #040485;
    --primary-rgb: 3, 3, 105;
    --accent-color: #f0b429;
    --neutral-100: #f8f9fb;
    --neutral-200: #eef1f6;
    --neutral-800: #1f2937;

    /* Neutral scale */
    --color-base-00: #ffffff;
    --color-base-10: rgba(255, 255, 255, 0.9);
    --color-base-20: rgba(255, 255, 255, 0.72);
    --color-base-40: #e2e8f0;
    --color-base-60: #94a3b8;
    --color-base-70: #64748b;
    --color-base-80: #475569;
    --color-base-90: #1f2937;
    --color-base-120: #0b1120;

    /* Aliases for legacy references */
    --color-primary: var(--primary-color);
    --color-primary-dark: var(--primary-dark);
    --color-primary-light: var(--primary-light);
    --color-accent: var(--accent-color);
    --color-light: var(--neutral-100);
    --color-text: var(--text-color);
    --color-text-light: var(--text-light);
    --color-surface: #ffffff;
    
    /* Layout */
    --header-height: 88px;
    --container-width: 1200px;
    
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --text-color: #1f2937;
    --text-light: #4b5563;
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 2rem);
}

body {
    font-family: var(--font-primary);
    font-size: clamp(0.95rem, 1vw + 0.5rem, 1.0625rem);
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: var(--header-height);
}

main :where([id]) {
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.25rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2rem); }
h4 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1.1rem, 1.8vw, 1.25rem); }

p {
    margin-bottom: var(--spacing-md);
    font-size: clamp(1rem, 1.4vw, 1.125rem);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

/* Section styling */
.section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* Card styles */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Media Queries */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}