/* ============================================
   BASE STYLES
   Reset, variables, and foundational styles
   ============================================ */

/* Font Faces */
@font-face {
    font-family: 'TalentFS';
    src: url('../fonts/TalentFS-Regular-1.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TalentFS';
    src: url('../fonts/TalentFS-Medium-1.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TalentFS';
    src: url('../fonts/TalentFS-Bold-1.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary: #0D1925;
    --color-secondary: #667eea;
    --color-accent: #764ba2;
    --color-text: #2c3e50;
    --color-text-light: #6c757d;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-bg-dark: #0D1925;
    --color-border: #dee2e6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;      /* 8px */
    --spacing-sm: 1rem;        /* 16px */
    --spacing-md: 2rem;        /* 32px */
    --spacing-lg: 4rem;        /* 64px */
    --spacing-xl: 6rem;        /* 96px */
    
    /* Typography */
    --font-primary: 'TalentFS', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-heading: 'TalentFS', 'Roboto Slab', 'Georgia', serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --line-height: 1.6;
    --line-height-heading: 1.2;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 10px;
    --border-radius-sm: 5px;
    
    /* Transitions */
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-tooltip: 1050;
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1rem;
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Lists */
ul, ol {
    list-style-position: inside;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    text-decoration: none;
    z-index: var(--z-tooltip);
}

.skip-link:focus {
    top: 0;
}

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

@media (min-width: 768px) {
    .container {
        padding-inline: var(--spacing-md);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.center {
    text-align: center;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* High Contrast Mode */
body.high-contrast {
    --color-bg: #000;
    --color-text: #fff;
    --color-bg-alt: #1a1a1a;
    --color-border: #fff;
    --color-primary: #fff;
    --color-secondary: #7c9eff;
    --color-accent: #a78bfa;
    --color-text-light: #c0c0c0;
}

/* Loading State */
.loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loaded {
    opacity: 1;
}

/* Focus Management */
:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .a11y-toolbar,
    .nav__toggle,
    .social-links,
    .lang-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* 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;
    }
}
