/* ============================================
   LORAIX - MAIN STYLESHEET
   Design System Implementation
   ============================================ */

/* ============================================
   CSS VARIABLES (Design System)
   ============================================ */

:root {
    /* Primary Colors */
    --color-primary: #212A4A;
    --color-primary-light: #3A4A6B;
    --color-primary-lighter: #5A6B8C;
    
    /* Accent Colors */
    --color-accent: #4A90E2;
    --color-accent-light: #6BA3E8;
    
    /* Status Colors */
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-error: #DC3545;
    
    /* Neutral Colors */
    --color-bg-white: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-bg-medium: #E9ECEF;
    
    --color-text-dark: #212529;
    --color-text-medium: #495057;
    --color-text-light: #6C757D;
    
    --color-border-light: #DEE2E6;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    
    /* Spacing (8px grid) */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    --spacing-4xl: 6rem;     /* 96px */
    --spacing-5xl: 8rem;     /* 128px */
    
    /* Container */
    --container-max-width: 1200px;
    --container-narrow: 800px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(33, 42, 74, 0.08);
    --shadow-md: 0 4px 16px rgba(33, 42, 74, 0.12);
    --shadow-lg: 0 8px 24px rgba(33, 42, 74, 0.16);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-medium);
    background-color: var(--color-bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

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

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
}

p {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-medium);
    line-height: 1.7;
    letter-spacing: -0.005em;
}

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

a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.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;
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg-white);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.btn-primary:hover {
    background-color: #3A7BC8;
    color: var(--color-bg-white);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    padding: 10px 22px;
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-white);
    text-decoration: none;
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-medium);
    border: none;
}

.btn-ghost:hover {
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    text-decoration: none;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-bg-medium);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

/* ============================================
   SECTIONS
   ============================================ */

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

.section-alt {
    background-color: var(--color-bg-light);
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1023px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

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

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.scroll-animate {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--animation-delay, 0s);
}

.scroll-animate.animated {
    opacity: 1;
}

/* Fade In Animation */
.animate-fade-in {
    opacity: 0;
}

.animate-fade-in.animated {
    opacity: 1;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
.animate-slide-up {
    opacity: 0;
    transform: translateY(40px);
}

.animate-slide-up.animated {
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.8s ease-out forwards;
}

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

/* Slide Left Animation */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-40px);
}

.animate-slide-left.animated {
    opacity: 1;
    transform: translateX(0);
    animation: slideLeft 0.8s ease-out forwards;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Right Animation */
.animate-slide-right {
    opacity: 0;
    transform: translateX(40px);
}

.animate-slide-right.animated {
    opacity: 1;
    transform: translateX(0);
    animation: slideRight 0.8s ease-out forwards;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

