/* ── Self-hosted fonts ──────────────────────────── */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-300-normal.woff2') format('woff2');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-400-normal.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-600-normal.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-700-normal.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit/outfit-latin-400-normal.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit/outfit-latin-500-normal.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit/outfit-latin-600-normal.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit/outfit-latin-700-normal.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit/outfit-latin-800-normal.woff2') format('woff2');
    font-weight: 800; font-style: normal; font-display: swap;
}

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

html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(0, 0, 0, 0.12);
    color: var(--color-text);
}

:root {
    /* ── Colors — Black & White ──────────────────── */
    --color-primary:      #000000;
    --color-primary-dark: #000000;
    --color-primary-light:#f0f0f0;
    --color-accent:       #000000;

    --color-success:      #1a7a4a;
    --color-success-light:#edf7f2;
    --color-danger:       #b91c1c;
    --color-danger-light: #fef2f2;
    --color-warning:      #92400e;
    --color-warning-light:#fffbeb;
    --color-info:         #1e3a5f;
    --color-info-light:   #eff6ff;

    --color-background:   #eef1f5;
    --color-surface:      #ffffff;
    --color-surface-2:    #f5f7fa;
    --color-surface-3:    #eceff3;

    --color-text:         #11181f;
    --color-text-muted:   #5b6675;
    --color-text-light:   #8a93a0;
    --color-border:       #e3e7ec;
    --color-border-2:     #d3d9e0;

    --color-sidebar:      #ffffff;
    --color-sidebar-hover:#e8e8e8;
    --color-sidebar-text: #444444;

    /* ── 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;

    /* Legacy aliases */
    --primary:        var(--color-primary);
    --primary-dark:   var(--color-primary-dark);
    --success:        var(--color-success);
    --danger:         var(--color-danger);
    --warning:        var(--color-warning);
    --background:     var(--color-background);
    --surface:        var(--color-surface);
    --text-primary:   var(--color-text);
    --text-secondary: var(--color-text-muted);
    --text-muted:     var(--color-text-muted);
    --border:         var(--color-border);
    --sidebar-bg:     var(--color-sidebar);
    --sidebar-text:   var(--color-sidebar-text);
    --space-xs:       var(--space-1);
    --space-sm:       var(--space-2);
    --space-md:       var(--space-4);
    --space-lg:       var(--space-6);
    --space-xl:       var(--space-8);

    /* ── Typography ──────────────────────────────── */
    --font-main:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* tabular, lining figures so currency/numbers align like a real app */
    --font-numeric: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --text-2xs:   0.6875rem;   /* 11px */
    --text-xs:    0.75rem;     /* 12px */
    --text-sm:    0.8125rem;   /* 13px */
    --text-base:  0.875rem;    /* 14px */
    --text-md:    0.9375rem;   /* 15px */
    --text-lg:    1rem;        /* 16px */
    --text-xl:    1.125rem;    /* 18px */
    --text-2xl:   1.375rem;    /* 22px */
    --text-3xl:   1.625rem;    /* 26px */
    --text-4xl:   2rem;        /* 32px */

    /* ── Radius ──────────────────────────────────── */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius-md:  8px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-2xl: 28px;
    --radius-full:9999px;

    /* ── Shadows ─────────────────────────────────── */
    --shadow-xs:       0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:       0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:          0 3px 8px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-md:       0 6px 14px -2px rgba(0,0,0,0.07), 0 3px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg:       0 12px 24px -4px rgba(0,0,0,0.08), 0 5px 10px -3px rgba(0,0,0,0.04);
    --shadow-premium:  0 8px 16px -3px rgba(0,0,0,0.05), 0 3px 6px -2px rgba(0,0,0,0.02), 0 0 0 1px rgba(0,0,0,0.025);
    --shadow-floating: 0 20px 40px -8px rgba(0,0,0,0.08), 0 8px 16px -4px rgba(0,0,0,0.03);
    --shadow-glow:     0 0 0 3px rgba(114, 124, 245, 0.2), 0 4px 12px rgba(114, 124, 245, 0.15);
    --shadow-inset:    inset 0 1px 3px rgba(0,0,0,0.06);

    /* ── Glass ───────────────────────────────────── */
    --glass-bg:     rgba(255,255,255,0.75);
    --glass-border: rgba(255,255,255,0.6);
    --glass-blur:   14px;

    /* ── Transitions ─────────────────────────────── */
    --transition:      all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

body {
    font-family:             var(--font-main);
    background:              var(--color-background);
    color:                   var(--color-text);
    font-size:               var(--text-base);
    line-height:             1.55;
    -webkit-font-smoothing:  antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ── Page fade-in ────────────────────────────────── */
.main-content {
    animation: pageIn 0.3s ease-out both;
}

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