/* ========================================
   FONT FAMILY DEFINITIONS
   ======================================== */

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

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-RegularItalic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-LightItalic.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-Book.woff') format('woff');
    font-weight: 350;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-BookItalic.woff') format('woff');
    font-weight: 350;
    font-style: italic;
    font-display: swap;
}

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

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-MediumItalic.woff') format('woff');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

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

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-Semi-BoldItalic.woff') format('woff');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

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

@font-face {
    font-family: 'FTSterling';
    src: url('../fonts/FTSterling-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ========================================
   STREAMLINED COLOR SYSTEM
   ======================================== */

:root {
  /* ========================================
     TYPOGRAPHY
     ======================================== */
  
  /* Font family */
  --font-family: 'FTSterling', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* ========================================
     CORE COLORS
     ======================================== */
  
  /* Primary brand colors */
  --primary: #1a1a1a;
  --secondary: #000000;
  
  /* Text colors */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-light: #cccccc;
  --text-heading: #000000;
  
  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  
  /* ========================================
     GRADIENTS
     ======================================== */
  
  /* Monochrome interface: no gradients */
  --gradient-main: #000000;
  
  /* ========================================
     COMPONENT COLORS
     ======================================== */
  
  /* Buttons */
  --btn-primary-bg: #1a1a1a;
  --btn-primary-text: #ffffff;
  /* Secondary buttons (light mode): visible on light backgrounds */
  --btn-secondary-bg: rgba(0, 0, 0, 0.06);
  --btn-secondary-text: var(--text-primary);
  --btn-secondary-border: rgba(0, 0, 0, 0.12);
  
  /* Forms */
  --input-bg: var(--bg-primary);
  --input-border: var(--bg-tertiary);
  --input-border-focus: var(--primary);
  --input-border-error: var(--error);
  
  /* File lists */
  --file-list-bg: var(--bg-secondary);
  --file-list-border: var(--bg-tertiary);
  --file-item-border: var(--bg-tertiary);
  
  /* Progress */
  --progress-bg: var(--bg-tertiary);
  --progress-fill: var(--gradient-main);
  
  /* ========================================
     STATUS COLORS
     ======================================== */
  
  --success: #28a745;
  --error: #ff6b6b;
  --warning: #ffc107;
  --info: #17a2b8;
  
  /* ========================================
     UTILITY COLORS
     ======================================== */
  
  /* Shadows */
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --shadow-heavy: rgba(0, 0, 0, 0.3);
  
  /* Scrollbars */
  --scrollbar-track: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb: rgba(0, 0, 0, 0.4);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.6);
  
  /* Overlays */
  --overlay-light: rgba(255, 255, 255, 0.1);
  --overlay-medium: rgba(255, 255, 255, 0.2);
  --overlay-heavy: rgba(255, 255, 255, 0.95);
  
  /* ========================================
     EFFECTS
     ======================================== */
  
  --blur-light: blur(10px);
  --blur-medium: blur(15px);
  
  /* ========================================
     LEGACY SUPPORT (for backward compatibility)
     ======================================== */
  
  /* Primary variations (deprecated - use --primary directly) */
  --primary-color: var(--primary);
  --primary-dark: #111111;
  --primary-light: #333333;
  
  /* Secondary variations (deprecated - use --secondary directly) */
  --secondary-color: var(--secondary);
  --secondary-dark: #222222;
  --secondary-light: #666666;
  
  /* Text variations (deprecated - use specific text colors) */
  --title-primary: var(--text-heading);
  --title-secondary: var(--secondary);
  
  /* Link colors (deprecated - use --primary directly) */
  --link-color: #000000;
  --link-hover: #111111;
  
  /* Background gradients (deprecated - use --gradient-main) */
  --bg-gradient-primary: var(--gradient-main);
  --bg-gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  
  /* Status backgrounds (deprecated - use status colors directly) */
  --success-color: var(--success);
  --success-bg: rgba(40, 167, 69, 0.1);
  --success-border: var(--success);
  
  --error-color: var(--error);
  --error-bg: rgba(255, 107, 107, 0.1);
  --error-border: var(--error);
  
  --warning-color: var(--warning);
  --warning-bg: rgba(255, 193, 7, 0.1);
  --warning-border: var(--warning);
  
  --info-color: var(--info);
  --info-bg: rgba(23, 162, 184, 0.1);
  --info-border: var(--info);
  
  /* Gradient text (deprecated - use --gradient-main) */
  --gradient-text: var(--gradient-main);
  
  /* Background overlay used for glass panels (light mode) */
  --bg-overlay: rgba(255, 255, 255, 0.85);
  --bg-overlay-light: rgba(255, 255, 255, 0.1);
  --bg-overlay-medium: rgba(255, 255, 255, 0.2);
  
  /* Opacity values (deprecated - use rgba directly) */
  --opacity-light: 0.1;
  --opacity-medium: 0.3;
  --opacity-heavy: 0.5;
  --opacity-very-heavy: 0.7;
} 

/* Automatic dark mode using system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ffffff;
    --secondary: #ffffff;

    --text-primary: #f5f5f5;
    --text-secondary: #cfcfcf;
    --text-muted: #aaaaaa;
    --text-light: #888888;
    --text-heading: #ffffff;

    --bg-primary: #0f0f10;
    --bg-secondary: #151517;
    --bg-tertiary: #222428;

    --input-bg: #111214;
    --input-border: #2a2c31;
    --input-border-focus: #6b6b6b;

    --file-list-bg: var(--bg-secondary);
    --file-list-border: var(--bg-tertiary);
    --file-item-border: var(--bg-tertiary);

    --progress-bg: #2a2c31;
    --progress-fill: #ffffff;

    --success: #39d353;
    --error: #ff6b6b;
    --warning: #ffd166;
    --info: #4cc9f0;

    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --shadow-heavy: rgba(0, 0, 0, 0.8);

    --scrollbar-track: rgba(255, 255, 255, 0.08);
    --scrollbar-thumb: rgba(255, 255, 255, 0.35);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.55);

    --primary-dark: #e5e5e5;
    --primary-light: #ffffff;
    --secondary-dark: #e5e5e5;
    --secondary-light: #ffffff;

    --link-color: var(--primary);
    --link-hover: var(--primary-dark);

    --bg-overlay: rgba(0,0,0,0.85);
    --bg-overlay-light: rgba(255,255,255,0.06);
    --bg-overlay-medium: rgba(255,255,255,0.12);

    /* Buttons (dark mode): visible on dark backgrounds */
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-secondary-bg: rgba(255, 255, 255, 0.15);
    --btn-secondary-text: #ffffff;
    --btn-secondary-border: rgba(255, 255, 255, 0.3);

    /* Monochrome in dark mode as well */
    --gradient-main: #000000;
  }
}

/* ========================================
   HEADER COMPONENTS
   ======================================== */

.header-logo {
    position: fixed;
    top: 1rem;
    left: 1rem;
    height: 40px;
    width: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
}

/* Hide dark logo by default (light mode) */
.header-logo .logo-dark {
    display: none;
}

/* Hide light logo in dark mode */
@media (prefers-color-scheme: dark) {
    .header-logo .logo-light {
        display: none;
    }
    
    .header-logo .logo-dark {
        display: block;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .header-logo {
        top: 0.5rem;
        left: 1rem;
        height: 30px;
    }
    
    /* Add space for header on mobile */
    body {
        padding-top: 0px !important;
    }
}

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

h1-component, .typography-h1 {
    font-family: var(--font-family);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5em 0;
    color: var(--text-heading);
}

h2-component, .typography-h2 {
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    color: var(--text-heading);
}

h3-component, .typography-h3 {
    font-family: var(--font-family);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    color: var(--text-heading);
}

h4-component, .typography-h4 {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    color: var(--text-heading);
}

h5-component, .typography-h5 {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    color: var(--text-heading);
}

bodytext, .typography-body {
    font-family: var(--font-family);
    font-size: 1.08rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 0.5em 0;
}

smalltext, .typography-small {
    font-family: var(--font-family);
    font-size: 0.98rem;
    color: var(--text-secondary);
    margin: 0 0 0.5em 0;
}

mutedtext, .typography-muted {
    font-family: var(--font-family);
    font-size: 1.08rem;
    color: var(--text-muted);
    margin: 0 0 0.5em 0;
}

captiontext, .typography-caption {
    font-family: var(--font-family);
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 0 0.5em 0;
}