/* ============================================
   ENIGMA XIII - Global CSS Variables & Styles
   ============================================ */

:root {
    /* Typography Variables */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Color Palette Variables */
    --color-primary: #00FFFF;        /* Bright Cyan - Main CTA buttons, links, accents */
    --color-secondary: #FF00FF;      /* Bright Magenta - Accent borders, hover effects */
    --color-bg: #0A0A0A;             /* Main Background - Dark black */
    --color-surface: #111111;        /* Card Backgrounds - Slightly lighter black */
    --color-text-primary: #FFFFFF;   /* Main Text, Headings - White */
    --color-text-secondary: #AAAAAA; /* Sub-headings, meta-text - Light gray */

    /* Spacing Variables */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index Layers */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
}

/* ============================================
   Global Reset & Base Styles
   ============================================ */

/* Performance optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GPU acceleration for transforms */
*,
*::before,
*::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize rendering */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile image optimization */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        width: 100%;
        height: auto;
        object-fit: cover;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        display: block;
    }
    
    /* Prevent image overflow on mobile */
    .container img,
    section img {
        max-width: 100%;
        width: auto;
    }
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1;
}

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
    button,
    a.btn,
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
}

/* ============================================
   Typography
   ============================================ */

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

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Performance optimizations */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

/* ============================================
   Utility Classes
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

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

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: var(--spacing-xs);
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ============================================
   Skip to Main Content Link
   ============================================ */

.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-bg);
    padding: var(--spacing-sm);
    z-index: 10000;
    text-decoration: none;
    font-weight: 700;
}

.skip-to-main:focus {
    top: 0;
}

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* ============================================
   Animation Classes
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Responsive Typography
   ============================================ */

/* Container Responsive - Optimized */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    contain: layout style;
}

@media (max-width: 992px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

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

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p {
        line-height: 1.5;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }
}



