/* ══════════════════════════════════════════════
   VitaLumen — Refined Clinical Luxe Theme
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ── Core Palette ── */
    --primary: #4f46e5;          /* Indigo 600 */
    --primary-light: #818cf8;    /* Indigo 400 */
    --primary-dark: #3730a3;     /* Indigo 800 */
    --primary-subtle: #eef2ff;   /* Indigo 50 */

    --accent: #f59e0b;           /* Amber 500 */
    --accent-light: #fbbf24;     /* Amber 400 */
    --accent-subtle: #fffbeb;    /* Amber 50 */

    /* ── Surfaces ── */
    --bg: #f8f9fc;
    --bg-raised: #ffffff;
    --bg-sunken: #f1f3f8;
    --bg-overlay: rgba(15, 23, 42, 0.5);

    /* ── Text ── */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #f8fafc;

    /* ── Borders ── */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: var(--primary);

    /* ── Semantic ── */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;

    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;

    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;

    --info: #6366f1;
    --info-light: #e0e7ff;

    --muted: #94a3b8;
    --muted-light: #f1f5f9;

    /* ── 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.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);

    /* ── Radii ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;

    /* ── Transitions ── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* ── 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;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Subtle background texture ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ── Selection ── */
::selection {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-dark);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Focus ring ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; color: var(--danger); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
}

.animate-fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-out) both;
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

.animate-scale-in {
    animation: scaleIn var(--duration-normal) var(--ease-out) both;
}