/* ============================================================
   NexoraFund — base.css
   Global reset, CSS variables, typography
   ============================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ── CSS Variables ── */
:root {
    /* Brand colours */
    --color-primary:        #2563EB;
    --color-primary-dark:   #1D4ED8;
    --color-primary-light:  #EFF6FF;
    --color-secondary:      #7C3AED;
    --color-accent:         #059669;

    /* Neutrals */
    --color-text-primary:   #111827;
    --color-text-secondary: #6B7280;
    --color-text-muted:     #9CA3AF;
    --color-text-inverse:   #FFFFFF;

    /* Backgrounds */
    --color-bg-base:        #F9FAFB;
    --color-bg-white:       #FFFFFF;
    --color-bg-subtle:      #F3F4F6;
    --color-bg-overlay:     rgba(0, 0, 0, 0.5);

    /* Borders */
    --color-border:         #E5E7EB;
    --color-border-focus:   #2563EB;

    /* Status */
    --color-success:        #059669;
    --color-success-bg:     #ECFDF5;
    --color-warning:        #D97706;
    --color-warning-bg:     #FFFBEB;
    --color-danger:         #DC2626;
    --color-danger-bg:      #FEF2F2;
    --color-info:           #2563EB;
    --color-info-bg:        #EFF6FF;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-lg:  0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
    --shadow-xl:  0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.03);

    /* Radius */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Spacing scale */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-base:   0.2s ease;
    --transition-slow:   0.3s ease;

    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-modal:    300;
    --z-toast:    400;
    --z-tooltip:  500;
}

/* ── Typography scale ── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p  { line-height: 1.7; color: var(--color-text-secondary); }

small { font-size: 0.8125rem; }

/* ── Utility classes ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-muted   { color: var(--color-text-muted); }
.text-danger  { color: var(--color-danger); }
.text-success { color: var(--color-success); }

.d-none   { display: none !important; }
.d-block  { display: block !important; }
.d-flex   { display: flex !important; }

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

/* ── Form base (shared across all auth pages) ── */
.nexora-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    background: var(--color-bg-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    appearance: none;
    -webkit-appearance: none;
}

.nexora-input:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.nexora-input::placeholder {
    color: var(--color-text-muted);
}

.nexora-input.is-error {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nexora-input.is-success {
    border-color: var(--color-success);
}

.nexora-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.nexora-btn-primary {
    background: var(--color-primary);
    color: #FFFFFF;
}

.nexora-btn-primary:hover {
    background: var(--color-primary-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nexora-btn-primary:active {
    transform: translateY(0);
}

.nexora-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.nexora-btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.nexora-btn-outline:hover {
    background: var(--color-primary-light);
}

/* ── Alert / feedback messages ── */
.nexora-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.nexora-alert-danger  { background: var(--color-danger-bg);  color: var(--color-danger);  border: 1px solid rgba(220,38,38,0.2); }
.nexora-alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(5,150,105,0.2); }
.nexora-alert-info    { background: var(--color-info-bg);    color: var(--color-info);    border: 1px solid rgba(37,99,235,0.2); }
.nexora-alert-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid rgba(217,119,6,0.2); }

/* ── Field error message ── */
.nexora-field-error {
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Scrollbar (subtle) ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }
