/**
 * FezaFilm Creative Tools - Main Styles
 * Cinema Studio Theme
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors - Cinema Studio Palette */
    --color-bg-primary: #0A0A0B;
    --color-bg-secondary: #111113;
    --color-bg-tertiary: #1A1A1D;
    --color-bg-elevated: #222225;
    --color-bg-hover: #2A2A2E;
    
    /* Accent Colors */
    --color-gold: #D4A853;
    --color-gold-light: #E8C87A;
    --color-gold-dark: #B08A3E;
    --color-gold-muted: rgba(212, 168, 83, 0.15);
    
    --color-red: #C9302C;
    --color-red-light: #E54B47;
    --color-red-dark: #9E2622;
    --color-red-muted: rgba(201, 48, 44, 0.15);
    
    --color-success: #4ADE80;
    --color-warning: #FBBF24;
    --color-info: #60A5FA;
    
    /* Text Colors */
    --color-text-primary: #F5F5F5;
    --color-text-secondary: #A3A3A3;
    --color-text-muted: #6B6B6B;
    --color-text-inverse: #0A0A0B;
    
    /* Border Colors */
    --color-border: #2A2A2E;
    --color-border-light: #3A3A3E;
    --color-border-focus: var(--color-gold);
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(212, 168, 83, 0.2);
    --shadow-red: 0 0 20px rgba(201, 48, 44, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: var(--color-gold-muted);
    color: var(--color-gold-light);
}

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

/* ============================================
   FILM GRAIN OVERLAY
   ============================================ */
.film-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
}

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

a:hover {
    color: var(--color-gold-light);
}

small {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.text-gold { color: var(--color-gold); }
.text-red { color: var(--color-red); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-icon {
    font-size: var(--text-2xl);
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.nav-link.active {
    color: var(--color-gold);
    background: var(--color-gold-muted);
}

.nav-icon {
    font-size: var(--text-base);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    z-index: var(--z-sticky);
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition-base);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-link:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    min-height: calc(100vh - 140px);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-6) var(--space-6);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.footer-logo {
    font-size: var(--text-lg);
}

.footer-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-divider {
    color: var(--color-border);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.hidden { display: none; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeIn { animation: fadeIn var(--transition-base); }
.animate-slideUp { animation: slideUp var(--transition-base); }
.animate-slideDown { animation: slideDown var(--transition-base); }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
}

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

