/*
 * Consight DesignPack - Variables
 * CSS Custom Properties for Light & Dark themes
 * 2025 Modern Thin Design System
 */

/* ============================================
   Google Fonts - Montserrat
   ============================================ */
/* Montserrat is loaded once by Layouts/Base.html (one Google Fonts request with JetBrains Mono); a CSS @import here was a second, serial, render-blocking request. */

/* ============================================
   Root Variables (Light Mode - Default)
   ============================================ */
:root {
    /* Font Family */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Spacing (8px grid) */
    --space-0: 0;
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */

    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-base: 200ms ease-out;
    --transition-slow: 300ms ease-out;
    --transition-slower: 500ms ease-out;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;

    /* ========================================
       Light Mode Colors
       ======================================== */

    /* Background - Almost white */
    --bg-primary: #FDFDFD;
    --bg-secondary: #F9F9F9;
    --bg-tertiary: #F5F5F5;
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Text */
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-tertiary: #6B7280;
    --text-muted: #9CA3AF;
    --text-disabled: #D1D5DB;
    --text-inverse: #FFFFFF;

    /* Border */
    --border-default: #E5E7EB;
    --border-muted: #F3F4F6;
    --border-strong: #D1D5DB;
    --border-focus: #3B82F6;

    /* Brand Colors */
    --color-primary: #3B82F6;
    --color-primary-hover: #2563EB;
    --color-primary-active: #1D4ED8;
    --color-primary-light: #EFF6FF;
    --color-primary-muted: rgba(59, 130, 246, 0.1);

    /* Semantic Colors */
    --color-success: #10B981;
    --color-success-hover: #059669;
    --color-success-light: #ECFDF5;
    --color-success-muted: rgba(16, 185, 129, 0.1);

    --color-warning: #B45309;
    --color-warning-hover: #92400E;
    --color-warning-light: #FFFBEB;
    --color-warning-muted: rgba(180, 83, 9, 0.1);

    --color-danger: #EF4444;
    --color-danger-hover: #DC2626;
    --color-danger-light: #FEF2F2;
    --color-danger-muted: rgba(239, 68, 68, 0.1);

    --color-info: #06B6D4;
    --color-info-hover: #0891B2;
    --color-info-light: #ECFEFF;
    --color-info-muted: rgba(6, 182, 212, 0.1);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.15);

    /* Glass Effect (Glassmorphism) */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(10px);

    /* Input Specific */
    --input-bg: #FFFFFF;
    --input-border: #E5E7EB;
    --input-border-hover: #D1D5DB;
    --input-border-focus: #3B82F6;
    --input-placeholder: #9CA3AF;
}

/* ============================================
   Dark Mode Colors - Champions League Theme
   Deep Navy + Gold Accent
   ============================================ */
[data-theme="dark"] {
    /* Background - Deep Navy */
    --bg-primary: #050A18;
    --bg-secondary: #0A1628;
    --bg-tertiary: #0F1F3D;
    --bg-surface: #0C1829;
    --bg-elevated: #122444;
    --bg-overlay: rgba(5, 10, 24, 0.85);

    /* Text - White & Silver */
    --text-primary: #FFFFFF;
    --text-secondary: #E8ECF4;
    --text-tertiary: #A0AECA;
    --text-muted: #6B7FA3;
    --text-disabled: #3D5078;
    --text-inverse: #050A18;

    /* Border - Navy tones */
    --border-default: #1A3055;
    --border-muted: #142544;
    --border-strong: #254170;
    --border-focus: #60A5FA;

    /* Brand Colors - Gold */
    --color-primary: #D4AF37;
    --color-primary-hover: #E5C04A;
    --color-primary-active: #C49B2A;
    --color-primary-light: rgba(212, 175, 55, 0.2);
    --color-primary-muted: rgba(212, 175, 55, 0.12);

    /* Semantic Colors */
    --color-success: #4ADE80;
    --color-success-hover: #22C55E;
    --color-success-light: rgba(74, 222, 128, 0.15);
    --color-success-muted: rgba(74, 222, 128, 0.1);

    --color-warning: #FBBF24;
    --color-warning-hover: #F59E0B;
    --color-warning-light: rgba(251, 191, 36, 0.15);
    --color-warning-muted: rgba(251, 191, 36, 0.1);

    --color-danger: #FB7185;
    --color-danger-hover: #F43F5E;
    --color-danger-light: rgba(251, 113, 133, 0.15);
    --color-danger-muted: rgba(251, 113, 133, 0.1);

    --color-info: #60A5FA;
    --color-info-hover: #3B82F6;
    --color-info-light: rgba(96, 165, 250, 0.15);
    --color-info-muted: rgba(96, 165, 250, 0.1);

    /* Shadows - Deep navy glow */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-focus: 0 0 0 3px rgba(96, 165, 250, 0.25);

    /* Glass Effect - Navy glass */
    --glass-bg: rgba(12, 24, 41, 0.85);
    --glass-border: rgba(96, 165, 250, 0.15);
    --glass-blur: blur(12px);

    /* Input Specific */
    --input-bg: #0A1628;
    --input-border: #1A3055;
    --input-border-hover: #254170;
    --input-border-focus: #60A5FA;
    --input-placeholder: #6B7FA3;
}

/* ============================================
   Base Reset & Defaults
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Smooth theme transition */
* {
    transition: background-color var(--transition-base),
                border-color var(--transition-base),
                box-shadow var(--transition-base);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: var(--color-primary);
    color: var(--text-inverse);
}

/* ============================================
   BrainyTech brand tokens (site: Home + Portfolio)
   --c-*  : fixed brand colours. Used on surfaces that stay dark in both
            themes (hero, closing, deep cards, demo controls).
   --bt-* : semantic tokens of the light "sheet" (collection, case panel,
            services). These swap in the dark palette.
   ============================================ */
:root {
    --c-navy: #0A2C5B;
    --c-deep: #030719;
    --c-royal: #1D2B8F;         /* royal blue: the offer card on /maliyet (owner, 2026-11-28) */
    --c-royal-deep: #182375;    /* one step darker: the hero plate behind the product screens */
    --c-paper: #F3F1EA;
    --c-paper2: #E6E2D7;
    --c-ink2: #3A4D70;
    --c-mist: rgba(243, 241, 234, .78);
    --c-line: rgba(243, 241, 234, .18);
    --c-signal: #E0502A;
    --c-signal-fill: #C9441F;   /* orange behind white text (4.8:1); --c-signal stays the accent */
    --c-white: #FFFFFF;

    --bt-surface: var(--c-paper);
    --bt-sand: var(--c-paper2);
    --bt-ink: var(--c-navy);
    --bt-ink2: var(--c-ink2);
    --bt-ink-strong: #000000;
    --bt-hair: rgba(10, 44, 91, .16);
    --bt-glass: rgba(243, 241, 234, .94);
    --bt-tint: rgba(10, 44, 91, .07);

    --bt-sans: "Montserrat", system-ui, sans-serif;
    --bt-mono: "JetBrains Mono", ui-monospace, monospace;
    --bt-pad: clamp(24px, 3.9vw, 64px);
    --bt-max: 1720px;
    --bt-ease: cubic-bezier(.65, 0, .2, 1);
    --bt-out: cubic-bezier(.16, .8, .2, 1);
}

/* BrainyTech themes: light = paper sheet + paper hero (PortfolioLight.css),
   dark = night sheet + navy hero. The sheet is --c-deep (the Melek Fryers
   tone) — chosen by the owner 2026-11-22; it used to be #0A1628, then #061D3E, #04152A; now #030719 (owner, 2026-11-22). */
[data-theme="dark"] {
    --bt-surface: var(--c-deep);
    --bt-sand: color-mix(in srgb, var(--c-paper) 6%, var(--c-deep));
    --bt-ink: var(--c-paper);
    --bt-ink2: rgba(243, 241, 234, .84);
    --bt-ink-strong: #FFFFFF;
    --bt-hair: rgba(243, 241, 234, .14);
    --bt-glass: rgba(3, 7, 25, .94);
    --bt-tint: rgba(243, 241, 234, .06);
}
