/* ================================================
   BASE STYLES - RESET, VARIABLES, CORE STYLES
   ================================================ */

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

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

body {
    min-height: 100vh;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

/* Remove default button styles */
button {
    border: none;
    background: none;
    cursor: pointer;
}

/* Improve link accessibility */
a {
    text-decoration: none;
    color: inherit;
}

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

/* ================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ================================================ */

:root {
    /* Colors - Dark Professional Theme */
    --color-primary: #0f172a;        /* Dark slate */
    --color-secondary: #1e293b;      /* Medium slate */
    --color-accent: #3b82f6;         /* Blue accent */
    --color-accent-hover: #2563eb;   /* Darker blue */
    --color-text-primary: #ffffff;   /* White text */
    --color-text-secondary: #cbd5e1; /* Light gray text */
    --color-text-muted: #94a3b8;     /* Muted gray text */
    --color-border: #334155;         /* Border gray */
    
    /* Typography Scale using clamp() for fluid typography */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --font-size-3xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);
    --font-size-4xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing Scale */
    --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --space-xl: clamp(2rem, 1.6rem + 2vw, 3rem);
    --space-2xl: clamp(3rem, 2.4rem + 3vw, 4.5rem);
    --space-3xl: clamp(4rem, 3.2rem + 4vw, 6rem);
    
    /* Layout */
    --container-max-width: 1200px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ================================================
   BASE LAYOUT
   ================================================ */

body {
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   ACCESSIBILITY & PERFORMANCE
   ================================================ */

/* Reduced motion support */
@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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-text-secondary: #ffffff;
        --color-border: #ffffff;
    }
}

/* Focus management for keyboard navigation */
.nav__link:focus-visible,
.hero__cta:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip links for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-accent);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Print styles */
@media print {
    .header {
        position: static;
        background: none;
        border: none;
    }
    
    .hero {
        min-height: auto;
        background: none;
        color: black;
    }
    
    .hero__cta {
        background: none;
        border: 2px solid black;
        color: black;
    }
}
